Skip to content

chat: add read state action - #489

Merged
Sandeep Somavarapu (sandy081) merged 9 commits into
mainfrom
sandy081/agents/update-chat-read-state-action
Oct 2, 2026
Merged

Sandeep Somavarapu (sandy081) merged 9 commits into
mainfrom
sandy081/agents/update-chat-read-state-action

Conversation

@sandy081

@sandy081 Sandeep Somavarapu (sandy081) commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add client-dispatchable chat/isReadChanged with { isRead: boolean }, including action-origin typing and exact-chat SessionStatus.IsRead reducer behavior. Any known chat, including the default chat, has independent read state from its owning session and siblings.
  • Consolidate unreleased SessionChatSummary.isRead and archived fields into optional status?: SessionStatus. The bitset mirrors ChatSummary.status; omission means unknown, not unread or unarchived, allowing incremental host/client adoption.
  • Keep the current protocol version and action registration at 0.9.0, as requested in review. Actions added after the v0.9.0 release are registered as 0.9.0 #491 will bump the protocol and correct pending action-version assignments together; no new capability is introduced here.
  • Regenerate schemas and TypeScript, Rust, Kotlin, Swift, Go, and .NET bindings; update projection docs, shared fixtures, client integration tests, and change fragments.

Validation

Latest optional-status revision:

  • npm run generate — passed.
  • npm run test — passed: 510 tests, 0 failures, 100% reducer statement, branch, function, and line coverage. Includes typecheck, lint, release metadata, changelog, change-fragment, and generated-output verification.
  • cd clients/typescript && npm run typecheck && npm test — passed: 73 tests, 0 failures.
  • cd clients/rust && cargo fmt --all && cargo test --workspace — passed, including optional/combined/future status round trips and host summary projection tests.
  • cd clients/go && go test ./... — passed.
  • swift build — passed.
  • Direct assertions against all five JSON schemas — passed: catalog status exists but is not required; separate isRead and archived properties are absent.
  • git diff --check — passed.

CI is rerunning for the updated head. Kotlin and .NET tests and Swift XCTest remain unavailable locally; these jobs passed on earlier revisions and must revalidate the new bindings/fixtures in CI.

Reviewer notes

  • Action version assignments remain provisional until Actions added after the v0.9.0 release are registered as 0.9.0 #491. Version gating alone does not distinguish older published 0.9.0 hosts from development hosts implementing this action; the release will establish that boundary.
  • Optional status avoids requiring hosts to populate the field immediately. Consumers of the unreleased catalog booleans must migrate to status-bit checks, treating absent status as unknown.
  • session/isReadChanged and chat/isReadChanged affect their respective states independently. No VS Code-specific _meta escape hatch is introduced.

Add the client-dispatchable chat/isReadChanged action and propagate per-chat read state through reducers, schemas, generated clients, and protocol documentation. Advance the protocol capability boundary to 0.10.0 so clients do not dispatch the action to older hosts.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep Swift's enum-based dispatchability check aligned with the generated action-origin metadata and wire-name allowlist.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jackfreemanceo-dotcom

jackfreemanceo-dotcom commented Oct 2, 2026 via email

Copy link
Copy Markdown

Keep chat/isReadChanged registered under the current development protocol version as requested in review. Release tracking in #491 will update the pending action version assignments together.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread types/channels-session/state.ts Outdated
Replace the unreleased SessionChatSummary isRead and archived fields with the required SessionStatus bitset. Keep compact and full chat summary projections consistent, regenerate native bindings and schemas, and cover combined and future flags in the shared round-trip corpus.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This reverts commit 9cd3ff5. Defer the required compact status field until the consuming client is ready for the adoption work.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace unreleased catalog read and archive booleans with optional SessionStatus. Omitted status remains unknown so hosts can adopt the projection incrementally. Regenerate bindings and schemas, update projection docs, and cover omitted and combined flags in shared fixtures.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@connor4312 Connor Peet (connor4312) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise fine

Comment on lines +84 to +86
* When `changes.status` changes, the host MUST project that exact value into
* the matching `SessionChatSummary.status` field and publish
* the updated compact chat catalog through `root/sessionSummaryChanged`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can just delete this part now; status is no different than anything else

@sandy081
Sandeep Somavarapu (sandy081) merged commit 01292d0 into main Oct 2, 2026
9 checks passed
@sandy081
Sandeep Somavarapu (sandy081) deleted the sandy081/agents/update-chat-read-state-action branch October 2, 2026 18:18
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.

4 participants