Skip to content

docs(ai-migration): cover gaps found migrating the website demo apps - #3356

Merged
oliverlaz merged 1 commit into
masterfrom
docs/v15-migration-guide-gaps
Oct 29, 2026
Merged

oliverlaz merged 1 commit into
masterfrom
docs/v15-migration-guide-gaps

Conversation

@oliverlaz

@oliverlaz oliverlaz commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Goal

Ticket: https://linear.app/stream/issue/REACT-1162

We migrated two demo apps from v14 to 15.0.0-rc.3 (stream-chat@10.0.0-rc.26) using only ai-docs/ai-migration-v14-v15.md and the stream-chat-js v10-breaking-changes.md, and logged every place the guides fell short. The findings and the migrated code are in GetStream/website-react-examples#138. Every compile error had an answer in the guides; the gaps are UI states that compile but behave differently, mostly because ChatView unmounts the inactive view, plus a few type-level holes. This PR fixes them in the guide. Docs only, and it describes the current rc API.

Implementation details

Each claim was checked against the source in this repo, and every new or changed snippet compiles against the installed stream-chat-react@15.0.0-rc.3 / stream-chat@10.0.0-rc.26 (strict, noImplicitReturns, noUnusedLocals).

  • Section 3: says the inactive ChatView view unmounts. Only the slot bindings survive; state, refs and effects inside a view start over on every switch.
  • Section 6, useOpenFirstChannel: the useRef guard reset on remount, so returning from the threads view re-opened the first channel over the one the user had open. The hook now guards on useWorkspaceNavigation().openChannels.length === 0. It also notes where to call it (the channels view, not an always-rendered ChatView child, where openChannels is empty in the threads view) and that it re-opens when nothing is open.
  • Section 6, paginator example: the paginator is created and registered once, above ChatView (useChannelPaginator), so it is not re-created and re-queried on every view switch.
  • Section 4, "Without ChatView": the override list is split into always / threads / default headers. It adds isThreadDismissable (the default ThreadHeader close button needs it, and its default is () => false), isChannelDismissable with closeChannel, and canGoBack with goBack. The example now overrides isThreadDismissable.
  • Section 5: a concrete stale-state example (useState(channel.data?.custom?.name) keeps the previous channel name) and its fix.
  • Section 9: reading event.user from the typing slice behind an EventPayload<'typing.start'> type guard (Event is a union, so the unguarded read fails with TS2339), plus a note that the guard can go if stream-chat narrows the slice type.
  • Section 19: a ready-to-run grep for the removed classes over *.css / *.scss / *.sass / *.less, which also matches them inside combinators (e.g. .x + .str-chat__main-panel) and skips .str-chat__main-panel-inner and .str-chat__thread-container, which still exist.
  • Silent-break table: new rows for the channel resetting after a view switch, the missing thread close button without ChatView, and state seeded from the channel going stale; the CSS row now points at the grep.
  • Smaller fixes:
    • Sections 7 and 10: warn that TypeScript's "Did you mean ThreadHead?" for a stale ThreadHeader key points at the parent-message slot.
    • Section 7: useCloseThread takes a WorkspaceNavigationTriggerEvent, narrower than v14's BaseSyntheticEvent.
    • Section 10: opens with "if your custom message UI calls getMessageActions()" so those apps know to switch to useUserRole.
    • Section 13: new subsection on setMessageComposerSetupFunction being deprecated in favour of client.config.setSetupFunction('messageComposer', ...).
    • Section 18: the flow "string not in the key map, so app-owned, so asDynamicKey".
    • Section 6: a custom ChannelListItemUI receives the computed active prop.
    • Section 1: reads the stream-chat peer range from the installed package.json instead of a hard-coded rc, and lists the stream-chat type changes that are usually the first errors (ChannelSort to SortParamRequest[], queryChannels raw vs queryChannelsAndHydrate, queryUsers({ payload })).
  • Links: the three links to stream-chat-js master/ai-docs/v10-breaking-changes.md returned 404, because the file lives on release-v10 (docs: consolidate v10 breaking changes into ai-docs stream-chat-js#1919 merged there). They now point at release-v10 and use that guide's explicit anchors.

UI Changes

None, documentation only.

Summary by CodeRabbit

  • Documentation
    • Updated the v14-to-v15 migration guide with guidance on channel state during view changes and workspace navigation, thread-header dismissal, and custom channel-list setup.
    • Revised examples for pagination and channel opening, and clarified compatibility guidance, typing-event handling, CSS search, and references to earlier migration documentation.

Migrating two demo apps from v14 to 15.0.0-rc.3 with only the guides
surfaced UI states that compile but behave differently, mostly around
ChatView unmounting the inactive view, and a few type-level holes.

- explain that ChatView views unmount; create the channel paginator
  above ChatView and guard useOpenFirstChannel on openChannels
- list isThreadDismissable and the header members in "Without ChatView"
- show stale state seeded from the channel, and a typing.start guard
- add a grep for removed CSS classes, combinators included
- smaller fixes in sections 1, 6, 7, 10, 13 and 18
- point the stream-chat-js v10 guide links at release-v10 (master 404s)
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 48d8762c-0566-4317-9139-03e722712310
Commits

Reviewing files that changed from the base of the PR and between fc8795a and ffcc9c0.

Files selected for processing: 1
  • ai-docs/ai-migration-v14-v15.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Walkthrough

The v14-to-v15 migration guide adds guidance on view lifecycle, channel navigation, and channel-list state. It also updates API and type migration notes, compatibility references, translation guidance, and CSS troubleshooting instructions.

Changes: Migration guide

Layer / File(s) Summary
View lifecycle and channel navigation
ai-docs/ai-migration-v14-v15.md
Explains how ChatView unmounts inactive views and how local state and paginators behave on return. Updates navigation overrides, channel-name draft handling, and first-channel initialization examples.
API and migration clarifications
ai-docs/ai-migration-v14-v15.md
Updates stream-chat compatibility guidance and clarifies typing events, thread slots, message actions, composer setup, translations, and CSS troubleshooting. Also updates migration-note references and channel-list item guidance.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Possibly related PRs

Suggested reviewers: martincupela, nikolagorannaumovski

Merge Risk: Minimal · up to ffcc9

This documentation-only update clarifies migration guidance and examples, and no concrete defect remains. There is no runtime impact and no merge-blocking risk.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly summarizes the main change: updating the AI migration documentation to address gaps found while migrating website demo apps.
Description check Passed The description includes the goal, implementation details, and UI changes sections. It explains the migration findings, documentation updates, validation approach, and confirms that no UI changes were…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description includes the goal, implementation details, and UI changes sections. It explains the migration findings, documentation updates, validation approach, and confirms that no UI changes were made.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.66%. Comparing base (3c8b30a) to head (ffcc9c0).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3356   +/-   ##
=======================================
  Coverage   88.66%   88.66%           
=======================================
  Files         563      563           
  Lines       17139    17139           
  Branches     5246     5246           
=======================================
  Hits        15196    15196           
  Misses       1943     1943           

☔ View full report in Codecov by Harness.
📢 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.

@oliverlaz
oliverlaz merged commit cf7a9f1 into master Oct 29, 2026
13 checks passed
@oliverlaz
oliverlaz deleted the docs/v15-migration-guide-gaps branch October 29, 2026 10:10
oliverlaz added a commit that referenced this pull request Oct 29, 2026
The guide's section 4 (from #3356) already lists every navigation
member to override, so the builder would add public API for the
minority path without ChatView. Section 4 is back to master's text;
the section 6 open-first-channel snippet fix stays.
oliverlaz added a commit that referenced this pull request Nov 2, 2026
…e apps (#3361)

### 🎯 Goal

Cover the gaps in the v14 → v15 AI migration guide that the
stream-video-js sample-app migration hit
(GetStream/stream-video-js#2559). Gaps already
fixed by #3356 were dropped.

### 🛠 Implementation details

Checked against `stream-chat-react@15.0.0-rc.3` (and `14.10.0` for the
v14 comparisons). The new snippets type-check.

- **List widths:** `--str-chat__channel-list-width` /
`--str-chat__thread-list-width` default to `100%` with `flex-shrink: 0`.
In a view with a list beside a `<Slot>`, the slot collapses and the page
scrolls sideways. Added to Panel layout and the silent-break table.
- **Active row:** v14 styled `[aria-pressed=true]` and
`[aria-selected=true]`; v15 styles only `[aria-selected=true]`. Updated
the `active` prop row, the `CustomItem` example and the §19 table.
- **Open channel outside `ChatView`:** an app component that reads
`useWorkspaceNavigation()` next to `ChatView` always gets `openChannels:
[]`. Render it as a `ChatView` child, which sits inside the provider and
stays mounted across view switches.
- **Stability:** only `layouts` re-creates the layout controller.
`views` is read per render, and slot renderers are called as plain
functions, so neither has to be module-scoped. The comments and the §6
bullet are relaxed accordingly. If stability is meant as a contract,
keep the old wording and I'll drop this part.
- **i18n:** 62 v14 keys (`live`, `Create`, `Submit`, typing strings,
...) have no key-map entry, so "never an SDK key" was wrong for them.
Step 3 is reworded, and `i18n-v15-migration.md` gets the list. Please
check whether any of them were renamed and just missed in the map.

Ticket: https://linear.app/stream/issue/REACT-1474

### 🎨 UI Changes

None (docs only).


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Documentation**
* Clarified migration guidance for component placement, view
configuration, referential stability, channel lists, accessibility,
styling, and translations.
* Documented how to handle translation keys that no longer have v15
replacements.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

This branch was successfully deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants