Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
328c7c2
feat: support multiple channel lists with ChannelPaginatorsOrchestrator
MartinCupela Sep 3, 2025
65fd6cd
feat: allow to boost paginator items and lock item order
MartinCupela Sep 15, 2025
69b421f
feat: support missing ChannelManager features in BasePaginator
MartinCupela Nov 7, 2025
f4892c6
feat: add filter resolvers for channel filters archived, app_banned, …
MartinCupela Nov 10, 2025
aeaa92d
feat: allow to keep channels in certain matching paginators and not i…
MartinCupela Nov 10, 2025
8938419
feat: allow to keep channels in certain matching paginators and not i…
MartinCupela Nov 11, 2025
03614c7
fix: do not remove channel from paginator on channel.hidden
MartinCupela Nov 11, 2025
0187696
chore: move paginators to a dedicated folder
MartinCupela Nov 18, 2025
53941ef
feat: introduce intervals to BasePaginator
MartinCupela Nov 21, 2025
7aa4f91
feat: add MessagePaginator
MartinCupela Jan 12, 2026
98c4d1b
chore(Thread): add initial spec for Thread Constructor Minimal Init
MartinCupela Feb 27, 2026
1ff2271
feat(Thread): implement Add Optional `threadData` Constructor Branch …
MartinCupela Feb 27, 2026
9650862
feat(Thread): implement Complete Hydration + Pagination Bootstrap for…
MartinCupela Feb 27, 2026
2ab25b9
feat: add reactive states to ChannelState
MartinCupela Mar 3, 2026
97c2650
Merge remote-tracking branch 'wt/agent/feat/init-empty-thread' into f…
MartinCupela Mar 3, 2026
892f6e6
test: fix message composer tests
MartinCupela Mar 3, 2026
3a7c938
feat: add message send retry cache
MartinCupela Mar 3, 2026
9172f11
feat: query replies with MessagePaginator
MartinCupela Mar 4, 2026
a703f7c
feat: support delete operation on MessageOperations
MartinCupela Mar 4, 2026
314ea2c
feat: allow to define custom mark-read request function for Thread an…
MartinCupela Mar 4, 2026
fe7a68d
feat: add messageFocusSignal state to MessagePaginator
MartinCupela Mar 4, 2026
cf4252e
refactor: remove thread from Channel's CustomMarkReadRequestFn
MartinCupela Mar 4, 2026
aa706de
test: fix failing tests
MartinCupela Mar 5, 2026
1fbf420
feat: export configuration service
MartinCupela Mar 5, 2026
a3f4bd7
feat: add backwards compatible APIs
MartinCupela Mar 5, 2026
ed0ce71
fix: nullify first_unread_message_id on message.read event
MartinCupela Mar 5, 2026
c972ee9
fix: update thread participant counts and reply counts on message.new…
MartinCupela Mar 5, 2026
43d365f
feat: decouple request sort from in-memory item order via BasePaginat…
MartinCupela Mar 5, 2026
2444199
fix: make Channel's MessagePaginator ingest message on message.new
MartinCupela Mar 5, 2026
a971056
fix: make Channel's MessagePaginator react to channel.truncated, user…
MartinCupela Mar 5, 2026
08d2073
fix: reflect quoted message update among MessagePaginator items and r…
MartinCupela Mar 5, 2026
31eedab
fix: emit new paginator state always when jumping to a message
MartinCupela Mar 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Breaking-Change Summary (`master`...`feat/message-paginator`)

## Highest-Risk Changes

1. **`BasePaginator` API contract changed behind same public export name**

- Old API shape (`next/prev`, `hasNext/hasPrev`, `cursor.next/prev`, direction `next|prev`) was replaced by (`toHead/toTail`, `hasMoreHead/hasMoreTail`, `cursor.headward/tailward`, direction `headward|tailward`).
- This can break downstream subclasses and direct usages.

2. **Moved paginator source files can break unsupported deep-import paths (out of scope)**

- Files moved from `src/pagination/*` to `src/pagination/paginators/*`.
- Root exports remain available via `src/index.ts -> export * from './pagination'`.
- Risk exists only for consumers importing internal paths such as `stream-chat/src/pagination/BasePaginator`.
- This is out of scope for this compatibility pass because the supported interface is root exports.

3. **`MessageReceiptsTracker` constructor options changed (mostly internal/pseudo-break)**

- Old usage expected `{ locateMessage }`; new usage requires `{ channel, locateMessage? }`.
- Existing direct instantiation can break, but expected impact is low because this class is primarily used internally by `Channel`.

## Medium-Risk Changes

4. **Setup-related type exports moved out of `client.ts`**

- `MessageComposerSetupState` and related setup types were exported previously from `client.ts` and now live in `configuration/types.ts`.
- This is resolved if root `index.ts` re-exports `./configuration`.

5. **`StreamChat._messageComposerSetupState` removed (internal-only)**

- This is internal API and not part of supported semver surface.

## Suggested Release Classification

- If compatibility shims/re-exports are **not** added: treat as **major**.
- If shims/re-exports are added and `BasePaginator` compatibility is preserved/aliased: could remain **minor**.
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Compatibility Report: `stream-chat-react@release-v13` vs local `stream-chat-js@feat/message-paginator`

## Environment

- React worktree: `/Users/martincupela/Projects/stream/chat/stream-chat-react-worktrees/chatview-layout-controller`
- React branch: `release-v13`
- JS SDK repo: `/Users/martincupela/Projects/stream/chat/stream-chat-js`
- JS branch: `feat/message-paginator`

## Dependency wiring

`stream-chat-react` resolved `stream-chat` through existing yarn-link symlink:

- `node_modules/stream-chat -> /Users/martincupela/.config/yarn/link/stream-chat`
- `/Users/martincupela/.config/yarn/link/stream-chat -> /Users/martincupela/Projects/stream/chat/stream-chat-js`

So test runs consumed local SDK code from this branch.

## Commands run

1. Build / type readiness on JS SDK side (already validated in prior steps):

- `yarn build` (in `stream-chat-js`)

2. Targeted release-v13 compatibility tests (React worktree):

- `yarn test --watchman=false src/components/Channel/__tests__/Channel.test.js src/components/MessageList/__tests__/MessageList.test.js src/components/Thread/__tests__/Thread.test.js`

3. Typecheck in React worktree:

- `yarn types`

4. Full React test matrix:

- `yarn test --watchman=false`

5. Reproduction of initially failing suites only:

- `yarn test --watchman=false src/components/MessageInput/__tests__/ThreadMessageInput.test.js src/components/Poll/__tests__/PollCreationDialog.test.js`

6. Full React test matrix after test updates:

- `yarn test --watchman=false`

## Results

- Targeted test suites: **PASS**
- `Channel.test.js`: pass
- `MessageList.test.js`: pass
- `Thread.test.js`: pass
- Total: 3 suites, 133 tests passed
- React typecheck: **PASS**
- Full suite (final): **PASS**
- `139 passed, 0 failed`
- `2024 passed tests, 2 skipped`

## Observations

- `--watchman=false` was required due to sandbox watchman permission errors; this is environment-related, not product behavior.
- There were pre-existing console warnings in tests (`MessageTimestamp ... invalid created_at date`, React `act(...)` warnings), but no assertion failures.

## Compatibility conclusion (targeted)

For the validated `release-v13` compatibility surfaces, no breaking regressions were detected when using local `stream-chat-js@feat/message-paginator`:

- Legacy channel pagination usage (`channel.state.messagePagination` / `messageSets`) continues to work in tested flows.
- mark-read / `doMarkReadRequest`-related Channel and MessageList flows pass.
- Thread flows in tested suite pass.

## Full-suite findings and resolution

1. `ThreadMessageInput` draft test triggered unexpected network delete request

- Failing test:
- `src/components/MessageInput/__tests__/ThreadMessageInput.test.js`
- case: `draft › is queried when drafts are enabled`
- Error:
- `AxiosError: Network Error` from `Channel._deleteDraft` via `MessageComposer.deleteDraft`.
- Resolution:
- mocked `customChannel._deleteDraft` in test setup to avoid external HTTP in test env.

2. Poll max-vote validation behavior changed (value clamping)

- Failing test:
- `src/components/Poll/__tests__/PollCreationDialog.test.js`
- case updated to `clamps max vote count to 10 and allows submission`
- Resolution:
- adjusted assertions to new behavior:
- error text is empty
- value is clamped to `10`
- submit button is enabled
- no translation updates required (`i18n/en.json` already contains the previous key).

## Remaining risk

- Full Jest matrix is green for this setup; no blocking compatibility failures remain.
64 changes: 64 additions & 0 deletions specs/message-paginator-release-compat/decisions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Message Paginator Release Compatibility Decisions

## Decision: Treat BasePaginator API drift as the primary release risk

**Date:** 2026-03-05
**Context:**
`BasePaginator` remains publicly exported but its method names, direction values, cursor shape, and state fields changed.

**Decision:**
Prioritize compatibility strategy for `BasePaginator` before merging branch to `master`.

**Reasoning:**
This is the most likely downstream compile/runtime break for advanced integrators that extend paginator classes.

**Alternatives considered:**

- Ignore and treat as internal-only: rejected because `BasePaginator` is exported.
- Delay until post-merge: rejected because release classification would be unclear.

## Decision: Compatibility scope is root exports from `src/index.ts` only

**Date:** 2026-03-05
**Context:**
The release compatibility target is the public package API exposed through root exports.

**Decision:**
Do not add deep-import compatibility shims for moved paginator files.
Compatibility work is limited to symbols exported via `src/index.ts`.

**Reasoning:**
Deep imports are not the supported interface contract for this release.
Focusing on root exports keeps the compatibility scope explicit and maintainable.

**Alternatives considered:**

- Add shims for old deep-import file paths: rejected as out-of-scope for public API compatibility.

## Decision: Restore removed setup type exports on root surface

**Date:** 2026-03-05
**Context:**
`MessageComposerSetupState` moved into configuration internals and is no longer exported from root API.

**Decision:**
Plan includes restoring root exports (directly or via re-export) to avoid unintended TypeScript breakage.

**Reasoning:**
Type-only breaks still impact consumers and should be avoided in non-major release.

## Decision: Add transitional BasePaginator compatibility aliases

**Date:** 2026-03-05
**Context:**
`BasePaginator` introduced head/tail naming (`toTail`, `toHead`, `hasMoreTail`, `hasMoreHead`, `tailward/headward` cursors), while older consumers may still call legacy APIs.

**Decision:**
Add deprecated alias APIs on `BasePaginator`:

- methods: `next`, `prev`, `nextDebounced`, `prevDebounced`
- getters: `hasNext`, `hasPrev`
- query response compatibility: accept `next/prev` cursor fields as fallback to `tailward/headward`.

**Reasoning:**
This preserves backward compatibility for non-migrated paginator consumers while keeping new naming as canonical.
161 changes: 161 additions & 0 deletions specs/message-paginator-release-compat/plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
# Message Paginator Release Compatibility Plan

## Worktree

**Worktree path:** `/Users/martincupela/Projects/stream/chat/stream-chat-js`
**Branch:** `feat/message-paginator`
**Base branch:** `master`

## Task overview

Scope is limited to the public interface exported via `src/index.ts`.
Deep-import path compatibility is explicitly out of scope.

## Task 1: Confirm Public Interface Scope

**File(s) to create/modify:** `specs/message-paginator-release-compat/decisions.md`, `specs/message-paginator-release-compat/spec.md`

**Dependencies:** None

**Status:** done

**Owner:** codex

**Scope:**

- Lock compatibility target to root exports from `src/index.ts`.
- Mark deep-import path stability as non-goal.

**Acceptance Criteria:**

- [x] Scope decision is documented.
- [x] Breaking-change summary reflects this scope.

## Task 2: Restore Root Export Coverage for Configuration Types

**File(s) to create/modify:** `src/index.ts`, `test/typescript/unit-test.ts`

**Dependencies:** Task 1

**Status:** done

**Owner:** codex

**Scope:**

- Ensure configuration setup types are root-exported (`export * from './configuration'`).
- Add a type-level regression check for configuration setup types.

**Acceptance Criteria:**

- [x] Root index exports configuration module.
- [x] Type-level regression check compiles.

## Task 3: Add Legacy BasePaginator API Aliases

**File(s) to create/modify:** `src/pagination/paginators/BasePaginator.ts`

**Dependencies:** Task 1

**Status:** done

**Owner:** codex

**Scope:**

- Add compatibility aliases:
- `next`/`prev`
- `nextDebounced`/`prevDebounced`
- `hasNext`/`hasPrev`
- Support legacy `next/prev` cursor fields in query result fallback.

**Acceptance Criteria:**

- [x] Existing legacy paginator call sites compile and run via aliases.
- [x] New API remains primary and unchanged.
- [x] Aliases are documented as transitional compatibility layer.

## Task 4: Add Regression Tests for Alias Compatibility

**File(s) to create/modify:** `test/unit/pagination/paginators/BasePaginator.test.ts`

**Dependencies:** Task 3

**Status:** done

**Owner:** codex

**Scope:**

- Add tests for legacy method/getter aliases.
- Add test for `next/prev` cursor field fallback.

**Acceptance Criteria:**

- [x] Alias tests pass.
- [x] Existing paginator tests stay green.

## Task 5: Final Release Notes and Compatibility Summary

**File(s) to create/modify:** `specs/message-paginator-release-compat/spec.md`, `specs/message-paginator-release-compat/decisions.md`, `specs/message-paginator-release-compat/breaking-change-summary.md`

**Dependencies:** Task 2, Task 4

**Status:** done

**Owner:** codex

**Scope:**

- Finalize real vs pseudo breaking changes for public root API.
- Document deprecations and migration notes.

**Acceptance Criteria:**

- [x] Summary is aligned with public root export scope.
- [x] Remaining intentional breaks are explicitly listed.

## Task 6: Cross-Repo `release-v13` Compatibility Validation

**File(s) to create/modify:** `specs/message-paginator-release-compat/compatibility-report.release-v13.md`

**Dependencies:** Task 2, Task 4

**Status:** done

**Owner:** codex

**Scope:**

- Use `stream-chat-react` worktree at `/Users/martincupela/Projects/stream/chat/stream-chat-react-worktrees/chatview-layout-controller` (`release-v13` branch).
- Run tests against local `stream-chat-js` branch build (`feat/message-paginator`) by wiring React worktree dependency to local SDK.
- Focus on legacy compatibility surfaces:
- `channel.state.messagePagination` and `messageSets` behavior used by `release-v13`.
- mark-read and `doMarkReadRequest` flows.
- paginator compatibility behavior where relevant.
- Record exact commands, results, and failures.

**Acceptance Criteria:**

- [x] Targeted `release-v13` tests for Channel/MessageList/Thread run against local JS SDK.
- [x] Any failures are categorized as real break, expected behavior shift, or test issue.
- [x] Compatibility report is committed to specs folder.

## Execution order

- **Phase 1 (serial):** Task 1
- **Phase 2 (parallel):** Task 2, Task 3
- **Phase 3 (serial):** Task 4
- **Phase 4 (serial):** Task 5
- **Phase 5 (serial):** Task 6

## File ownership summary

| Task | Creates/Modifies |
| ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Task 1 | `specs/message-paginator-release-compat/decisions.md`, `specs/message-paginator-release-compat/spec.md` |
| Task 2 | `src/index.ts`, `test/typescript/unit-test.ts` |
| Task 3 | `src/pagination/paginators/BasePaginator.ts` |
| Task 4 | `test/unit/pagination/paginators/BasePaginator.test.ts` |
| Task 5 | `specs/message-paginator-release-compat/spec.md`, `specs/message-paginator-release-compat/decisions.md`, `specs/message-paginator-release-compat/breaking-change-summary.md` |
| Task 6 | `specs/message-paginator-release-compat/compatibility-report.release-v13.md` |
Loading