Skip to content

docs: add AI migration guide and drop legacy stream-chat-css wiring#3129

Merged
oliverlaz merged 7 commits intomasterfrom
docs/ai-migration-guide
Apr 17, 2026
Merged

docs: add AI migration guide and drop legacy stream-chat-css wiring#3129
oliverlaz merged 7 commits intomasterfrom
docs/ai-migration-guide

Conversation

@oliverlaz
Copy link
Copy Markdown
Member

@oliverlaz oliverlaz commented Apr 17, 2026

🎯 Goal

Add ai-docs/ai-migration.md β€” a token-optimized, execution-only guide for coding agents performing the v13 β†’ v14 migration. Distills the 62 confirmed breaking changes from ai-docs/breaking-changes.md into ordered phases, rename lists, and code-level rewrites.

Prune the now-legacy @stream-io/stream-chat-css wiring. The package is no longer installed (absent from package.json and yarn.lock; dist/ has no scss/, css/v2/, or assets/), but stale tooling and docs around it remained. This PR removes those references so the repo reflects reality.

πŸ›  Implementation details

New ai-docs/ai-migration.md (~415 lines), organized into 8 ordered phases:

  1. Source of Truth + import/symbol renames (read installed .d.ts files; never rely on pretraining knowledge)
  2. Removed symbols with code-level rewrites (HOCs, MessageOptions, EditMessageForm, MessageListNotifications, ConnectionStatus, etc.)
  3. Move UI overrides from Channel / ChannelList props to WithComponents
  4. Composer / edit / cooldown rewrites
  5. Message-actions model (messageActionSet, quick-dropdown-toggle, handleDelete semantics)
  6. Search, sidebar, ChatView, explicit query limits
  7. Behavior changes that compile cleanly (timestamps, date separator, typing indicator, etc.)
  8. CSS / DOM / selector audit

Style is optimized for token efficiency: bullet lists instead of markdown tables (no pipe/padding overhead), no commit SHAs, no audit metadata, no motivation prose. Verification section is package-manager agnostic (detects pnpm / yarn / bun / npm from lockfiles).

Legacy @stream-io/stream-chat-css cleanup:

  • Remove ai-docs/DEPRECATED_API_REMOVAL_PLAN.md β€” superseded by the new guide.
  • Remove ./dist/scss/* and ./scss/* entries from package.json exports β€” dist/scss/ is no longer emitted.
  • Delete scripts/copy-css.sh β€” not wired into the build script; unreferenced outside stale docs.
  • Delete scripts/merge-stream-chat-css-docs.sh β€” copies docs into ./docusaurus/docs/React, a directory that no longer exists in this repo.
  • Drop the @stream-io/stream-chat-css entry from .github/dependabot.yml since the package isn't installed.
  • Update CLAUDE.md to reflect the current 4-step build (build-translations, vite build, tsc, build-styling) and the single-source styling tree under src/styling/.

🎨 UI Changes

N/A β€” docs + build tooling only.

Adds ai-docs/ai-migration.md, a token-optimized execution guide for coding
agents performing the v13 β†’ v14 migration. Distills the 62 confirmed
breaking changes from ai-docs/breaking-changes.md into ordered phases,
rename lists, and code-level rewrites.

Removes the superseded ai-docs/DEPRECATED_API_REMOVAL_PLAN.md.
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 17, 2026

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 82.33%. Comparing base (04f6998) to head (07575d6).
⚠️ Report is 6 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3129   +/-   ##
=======================================
  Coverage   82.33%   82.33%           
=======================================
  Files         419      419           
  Lines       12269    12269           
  Branches     3950     3950           
=======================================
  Hits        10102    10102           
  Misses       2167     2167           

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Instruct agents to verify against installed node_modules rather than
relying on pretraining knowledge, which skews to v13 and frequently
hallucinates removed APIs.
.d.ts types are emitted under dist/types/, not dist/ root. Update the
three affected paths and remove the incorrect .d.cts reference (the SDK
emits .d.ts only). Point at dist/es/ and dist/cjs/ for transpiled JS.

Also remove ./dist/scss/* and ./scss/* from the package.json exports
map β€” dist/scss/ is no longer emitted, so those exports were dead.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 17, 2026

Size Change: 0 B

Total Size: 624 kB

ℹ️ View Unchanged
Filename Size
dist/cjs/audioProcessing.js 1.32 kB
dist/cjs/emojis.js 3.01 kB
dist/cjs/index.js 240 kB
dist/cjs/mp3-encoder.js 1.27 kB
dist/cjs/WithAudioPlayback.js 44.7 kB
dist/css/emoji-picker.css 188 B
dist/css/emoji-replacement.css 456 B
dist/css/index.css 45 kB
dist/es/audioProcessing.mjs 1.31 kB
dist/es/emojis.mjs 2.52 kB
dist/es/index.mjs 239 kB
dist/es/mp3-encoder.mjs 756 B
dist/es/WithAudioPlayback.mjs 44.5 kB

compressed-size-action

The SDK no longer depends on @stream-io/stream-chat-css β€” the package
is absent from package.json and yarn.lock, and dist/ has no scss/,
css/v2/, or assets/ directories. Removes the now-dead tooling around it:

- scripts/copy-css.sh: not wired into the build script and unreferenced
  outside of stale docs.
- scripts/merge-stream-chat-css-docs.sh: copies docs into
  ./docusaurus/docs/React, a directory that no longer exists in this
  repo.
- .github/dependabot.yml: drop the @stream-io/stream-chat-css auto-bump
  entry since the package isn't installed.

Also update CLAUDE.md to reflect the current 4-step build
(build-translations, vite build, tsc, build-styling) and the single-
source styling tree under src/styling/.
@oliverlaz oliverlaz changed the title docs: add AI-focused v13 β†’ v14 migration guide docs: add AI migration guide and drop legacy stream-chat-css wiring Apr 17, 2026
Four SDK-mismatch fixes surfaced by validating the guide against
node_modules/stream-chat-react/dist/types:

- Hook name: useMessageComposer β†’ useMessageComposerController. The
  former does not exist in v14. The human migration guide had the
  correct name; the AI guide had a hallucination.
- usePinHandler v14 signature is (message) with no second arg;
  notifications are published internally via useNotificationApi().
- FileIcon props: `size` is not removed, only retyped from number to
  FileIconSize ('sm' | 'md' | 'lg' | 'xl'); new `sizeConfig` prop
  exists. Only `big`, `sizeSmall`, `type` were removed.
- ModalGalleryProps: no `initialIndex`. Actual props are { items,
  className?, modalClassName?, closeOnBackgroundClick? }.

Also recommend the /css/* alias over /dist/css/* for stylesheet
imports: package.json exports map aliases it, so consumers do not need
to depend on the internal dist/ layout.
Same four fixes applied to ai-migration.md, now also at source so the
audit tracker matches the installed v14 SDK:

- BC-008: useMessageComposer().initState(...) β†’
  useMessageComposerController().initState(...) (the former hook does
  not exist). Also correct the file ref to
  src/components/MessageActions/MessageActions.defaults.tsx:160.
- BC-021: FileIconProps still exposes size (retyped to FileIconSize
  'sm' | 'md' | 'lg' | 'xl') and adds sizeConfig; only big, sizeSmall,
  type were removed.
- BC-025: ModalGallery no longer accepts initialIndex. Rename guidance
  now points consumers at Gallery + GalleryUI when a non-zero starting
  item is required.
- BC-059: usePinHandler v14 signature is (message), not (message,
  notifications?). Notifications are published internally via
  useNotificationApi().
… models

Add two short orienting subsections that name the replacement primitives
for pieces scattered across Phase 2 / Phase 5 / Phase 7:

- Notification system (end of Phase 2): useNotificationApi(),
  NotificationList, useSystemNotifications() /
  useReportLostConnectionSystemNotification(). Consolidates the mental
  model behind MessageListNotifications / ConnectionStatus / get*Notification
  removals.
- Gallery model (mid Phase 7): ModalGallery vs. Gallery vs. GalleryUI as
  three distinct primitives, with a migration shortcut for the common
  <Gallery images={...}/> v13 usage.

No teaching content β€” just enough to point consumers at the right
primitives. Feature docs own the full usage.
@oliverlaz oliverlaz merged commit fbb3556 into master Apr 17, 2026
8 checks passed
@oliverlaz oliverlaz deleted the docs/ai-migration-guide branch April 17, 2026 12:37
@stream-ci-bot
Copy link
Copy Markdown

πŸŽ‰ This PR is included in version 14.0.1 πŸŽ‰

The release is available on:

Your semantic-release bot πŸ“¦πŸš€

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants