Skip to content

Persist thread sidebar state#818

Open
Mitch515 wants to merge 3 commits intopingdotgg:mainfrom
Mitch515:pr/thread-sidebar-state-persistence
Open

Persist thread sidebar state#818
Mitch515 wants to merge 3 commits intopingdotgg:mainfrom
Mitch515:pr/thread-sidebar-state-persistence

Conversation

@Mitch515
Copy link

@Mitch515 Mitch515 commented Mar 10, 2026

What Changed

  • persist thread-level sidebar metadata such as hidden state and dismissed sidebar keys
  • add the contracts, server projection, persistence, migration, and web-state wiring needed to restore that sidebar state after reload
  • apply default sidebar-state coverage in related web fixtures and tests

Why

  • per-thread sidebar dismissal and hidden-state choices should survive reloads and reconnects
  • restoring thread-specific sidebar state makes the UI more predictable during longer-running workflows

UI Changes

  • screenshots are attached in the PR asset comment

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes, if applicable

Note

Persist thread sidebar state across client and server

  • Adds sidebarHiddenAt and dismissedSidebarKeys fields to the OrchestrationThread contract, client Thread type, and ProjectionThread persistence model
  • Introduces a thread.sidebar-state.update command and thread.sidebar-state-updated event; the decider deduplicates dismissed keys and sets updatedAt
  • Adds migration 016_ProjectionThreadsSidebarState.ts to add sidebar_hidden_at and dismissed_sidebar_keys_json columns to projection_threads via conditional PRAGMA-guarded ALTER TABLE
  • The projection pipeline and in-memory projector apply sidebar state updates with deduplication; snapshots hydrate these fields by parsing the stored JSON array
  • Client store (syncServerReadModel) maps both fields from the server read model into local thread state

Macroscope summarized bbaab2b.

@coderabbitai
Copy link

coderabbitai bot commented Mar 10, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 64544714-f012-413b-ba4b-3b883c831dd3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

@github-actions github-actions bot added the vouch:unvouched PR author is not yet trusted in the VOUCHED list. label Mar 10, 2026
@Mitch515
Copy link
Author

Assets for review:

Before reload:

Before reload

After reload:

After reload

@Mitch515 Mitch515 marked this pull request as ready for review March 10, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant