Skip to content

feat(sidebar): keep the open chat listed under the Unread filter - #37210

Open
rnoack1 wants to merge 1 commit into
mainfrom
feat/keep-open-chat-in-filtered-list
Open

rnoack1 wants to merge 1 commit into
mainfrom
feat/keep-open-chat-in-filtered-list

Conversation

@rnoack1

@rnoack1 rnoack1 commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: The chat you have open stays in the session list and on the board while a status filter such as Unread is on.

With Unread on, clicking an unread chat opens it and marks it read. The row then fails the Unread chip and vanishes from the list and the board, while the person is still working in that chat. The same happens with In progress when the open chat's turn ends.

Why it matters

Working through an Unread inbox makes the list jump on every click, and the row you are in cannot be renamed, pinned or moved from the list. Mail clients avoid this by keeping the open message in an unread-only view until you leave it.

Not a goal

  • A setting to turn this off. The issue leaves that open for triage.
  • Exempting the open chat from search, the folder hides, the status-chip hides or the tag and model filters.
  • Changing what any chip counts.

What changed (motivation → approach → change)

Filter Open chat before Open chat now
Unread chip hidden once opening it marks it read shown while open
In progress, Pinned, Recent, Crew chips follows the chip follows the chip
Search, folder hide, status hide, tags, model hidden hidden

The Unread chip now passes the open chat: the row model takes the active slot as LocalRowIndex.openKey, and ChatSidebar.tsx passes activeSlot in (makeDimensions in website/src/pages/chat-sidebar/rows.ts). Only Unread gets the pass, because opening a chat is what changes it; the other chips never change on open, so they still decide as before. The pass checks the local key only, so a peer row with the same key gets nothing. Opening a different chat drops the old one under normal rules. The list and the board read the same filtered rows, so both keep it.

This PR covers the Unread chip only. The In progress case named above is unchanged and stays open in #36670.

Backwards compatibility

Compatible: no stored setting, API or type outside the sidebar row model changes; a row that was shown before is still shown.

Removes nothing: the change only lets one more row through the status chips.

Tests

website/src/pages/chat-sidebar/rows.test.ts, new block "the open chat is exempt from the status chips":

  • the open chat stays listed under Unread after it was marked read;
  • it drops out once another chat is opened;
  • a peer row with the same key gets no pass;
  • the In progress chip gives it no pass;
  • a change of openKey alone rebuilds the filtered rows (the memo leaves table);
  • when the search drops the open chat, a reveal blames only the search, not the Unread chip;
  • search and a status hide still drop it.

Removing the pass in rows.ts makes the first test fail (1 failed, 152 passed); with it, 153 pass. The sidebar, ChatSidebar and sidebar integration suites pass, including ChatSidebarNotInProgressFilter (185 files, 2336 tests). tsc -p tsconfig.app.json is clean.

Manual verification

Rendered the real ChatSidebar in an isolated Playwright capture with Unread on, in the list and on the board. The open, read chat stays listed next to the chats still unread; after another chat is opened, it leaves the list. Unread stays on because other chats are still unread.

Screenshots / video

List, Unread on: the open chat ("On-call ticket triage", highlighted, no unread dot) stays next to two unread chats.

list with the open chat kept

List, after opening "Design doc questions": the first chat is gone.

list after opening another chat

Board, Unread on: the open, read chat stays in its column.

board with the open chat kept

The stills are committed under .github/screenshots/37210/. They were taken from 598629b60a (scripted Playwright over the real ChatSidebar, dark theme); the rebase onto main since then did not change the logic.

Related Issues

Part of #36670

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 387812468d57e8ced43c0610c59bd81b2e6d7bd3 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks. The Unread pass is narrow, sits in the row model the list and board both read, and is backed by committed screenshots of this revision.

Notes

[DESIGN-REVIEWED] 3878124

Description read

[DESCRIPTION-READ] ca78af9fe3b02540d8753a4d0ae2a02befdf43cca126dffc6a9b0f6eecbb4d9b

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 387812468d57e8ced43c0610c59bd81b2e6d7bd3 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing blocks: the diff adds no controls, and the screenshots show both the kept row and the row dropping out later. The blind reader correctly read the highlighted row as "the chat I have open right now".

Notes

  • With Unread on, the list shows one more row than the pill counts. Shot 1 shows "Unread (2)" over 3 rows, and the reader asked: "does 'Unread' mean unread or unread plus whatever I have open?" A quiet marker on the kept row (e.g. "Open") would explain why a read chat is in an Unread list without changing what the chip counts.
  • The kept row still vanishes as soon as another chat is opened. In shot 2 the reader said "Nothing on screen explains why it disappeared." Fading the row out on that click would make the drop easy to follow. The list behaved the same way before this PR, so this is a follow-up, not a fix for this diff.

[UX-REVIEWED] 3878124

Description read

[DESCRIPTION-READ] 38d85720f0f3849577aa7f4669fffd0b259a378a3bc7ada7aeb73b3448d276cf

That sha256 names everything this verdict read: the PR description, plus the 6 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 387812468d57e8ced43c0610c59bd81b2e6d7bd3 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 3878124

Verdict parsed from the review's SHA-scoped output markers for commit 387812468d57e8ced43c0610c59bd81b2e6d7bd3.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 387812468d57e8ced43c0610c59bd81b2e6d7bd3 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 387812468d57e8ced43c0610c59bd81b2e6d7bd3 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks: the one new behaviour removes a reported harm (#36670) at the filter that causes it. A test pins it and fails without the change.

Notes

  • Item 3 — duplicate of RowScene.activeSlot (website/src/pages/chat-sidebar/rows.ts:242): openKey: activeSlot ?? null adds a second input field for a value the row model already receives. Subtraction: none to apply; it stays a note because the filter memo deliberately reads only local/filters.

What this change ships

Inventory (4 items) — 2 justified

Intent: when Unread is on, the chat being worked in stays in the list instead of vanishing once opening it marks it read. FIX framed as feat.

  1. With Unread on, the open chat stays in the list and on the board until another chat is opened — justified
  2. When search or a hide drops the open chat, a reveal clears that filter and leaves the Unread chip on — justified
  3. New LocalRowIndex.openKey input to the row model — duplicate of RowScene.activeSlot (one consumer)
  4. Three PNG stills committed under .github/screenshots/37210/ — rides along

[FIRST-PRINCIPLES-REVIEWED] 3878124

Description read

[DESCRIPTION-READ] 6aea648f3712c4bc6d58fdfd462a4be4e2de66905d7ef053a3279e612c4a9a6e

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 387812468d57e8ced43c0610c59bd81b2e6d7bd3 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 3878124

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 387812468d57e8ced43c0610c59bd81b2e6d7bd3 false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 14, 2026
@rnoack1
rnoack1 force-pushed the feat/keep-open-chat-in-filtered-list branch from f6b5916 to c4510ef Compare November 14, 2026 13:51
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 14, 2026
@rnoack1
rnoack1 marked this pull request as ready for review November 18, 2026 15:40
@rnoack1
rnoack1 requested review from a team and KiroCrewCaptain as code owners November 18, 2026 15:40
@rnoack1
rnoack1 requested a review from CrysisDeu November 18, 2026 15:40
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 18, 2026

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the narrow fix. The code looks correct, but one evidence gap blocks the merge.

  1. No still screenshots of this head (website/src/pages/chat-sidebar/rows.ts:633-634, the visible change). The UX review on c4510ef says it could not evaluate the change because the PR has no still screenshots. A review that cannot run for missing evidence counts as a block, not a pass. The only attachment is a video, and the body says it was recorded from f6b5916. In that commit the open chat passed every status chip. The head passes it under Unread only, so the video cannot show how the head behaves under In progress or Recent. Smallest fix: attach stills taken from c4510ef:

    • the sidebar with Unread on, showing the opened, now read chat next to a chat that is still unread;
    • the same list after you open another chat, with the first chat gone;
    • the board with Unread on, still showing the open, read chat.

    Re-record the video from this head or remove it, then re-run the UX review. No code change is needed.

Optional:

  • Closes #36670 closes the issue, but the In progress case (named in your own Problem section) stays unfixed. Consider Part of #36670 plus a follow-up issue, or retitling to name the Unread chip.
  • The leaves table in rows.test.ts has no local.openKey row. Without one, removing openKey from the dimensions memo deps at rows.ts:904 turns no test red, and ChatSidebar always builds incrementally. Adding ['local.openKey', withLocal('openKey', 'c')] would pin it.
  • No test pins the new hides clause at rows.ts:691. A case with Unread on plus a search that drops the open chat, asserting that only the search dimension hides it, would cover it.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: passed Eligible automated validation passed for the current revision labels Nov 18, 2026
@KiroCrewCaptain

KiroCrewCaptain commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Code change approver deep review: A person should decide

The open decision comes from #36670: should the open chat stay listed under Unread by default, or only behind a setting? This PR makes it the default for every user. No maintainer has recorded that decision on this PR or on the issue yet. If the answer is "default", no code change is needed.

The review found no blocking issue on 3878124. What it checked on this head:

  • passesChip (rows.ts:647) passes the open chat for the Unread chip only.
  • isOpen (rows.ts:646) compares the local key, so a peer row with the same key gets no pass.
  • The status hides clause (rows.ts:704) agrees with the pass in filtersRow (rows.ts:700).
  • openKey is in the memo dependencies (rows.ts:942), and ChatSidebar.tsx:522 is the only production caller.
  • The diff touches no security, sandbox or approval gate.
  • PR Readiness is green on this head, and the review lanes report no blocking finding.

Not verified: this review did not run the tests, and it could not open the three committed screenshots.

Done well: the rule lives in one place, the row model that both the list and the board read. Each excluded case (search, a status hide, a peer row with the same key) has its own test.

Optional:

This changes behaviour users already rely on, so it needs a design sign-off from a maintainer before it can merge. A maintainer will post the decision here.

To propose a design, follow the request-for-change process in CONTRIBUTING.md (docs/request-for-change/).

Tier: 2, held for a person: reviewer-finding: Design Review.

A deep review by the code change approver, not by a person · commit 387812468d · 70 changed lines. If it is wrong, reply here: replies are how the approver is evaluated.

@rnoack1
rnoack1 force-pushed the feat/keep-open-chat-in-filtered-list branch from c4510ef to 598629b Compare November 18, 2026 17:32
@rnoack1 rnoack1 changed the title feat(sidebar): keep the open chat listed while status filters are on feat(sidebar): keep the open chat listed under the Unread filter Nov 18, 2026
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 18, 2026
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Nov 18, 2026

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for narrowing the change. The code looks correct on this head, but one evidence gap still blocks the merge.

  1. No design or UX review has seen this change rendered (website/src/pages/chat-sidebar/rows.ts:647, and the status hides change around rows.ts:700). With Unread on, passesChip keeps the open chat in the list and on the board, so users see a change. The Design and UX reviews on f8f7124 both say they could not evaluate it: Design downloaded 0 images and UX saw each image as "[image removed]". The three images in the description return HTTP 404 when fetched without credentials, so a re-run cannot admit them either. A review that cannot run because evidence is missing counts as a block, even though its header reads PASS. Smallest fix: commit the three stills under .github/screenshots/, or re-upload them so the links are public. Then re-run the Design and UX reviews on this head. No code change is needed. The stills come from 598629b, but the rebase did not change your logic, so you do not need to retake them. One line in the description saying so is enough.

Status of my earlier review on c4510ef:

  • Stills of the head: still open. They are attached, but no review could load them (item 1 above).
  • Part of #36670 and a title that names Unread: fixed.
  • local.openKey row in the memo leaves table: fixed.
  • Test for the new hides clause: not added (optional, see below).

Optional:

  • No test fails if you delete the new hides clause at rows.ts:704. In the "Unread plus search 'beta'" case, assert that only the search dimension reports hides(opened) as true.
  • The test "stays listed under Unread after opening it marked it read" never makes the open row unread first. It actually pins a wider rule: any open chat shows under Unread, even one that was never unread. If that is the intent, rename the test and add one sentence to What changed.
  • The commit subject and the describe block still say "status filters" or "status chips", but only Unread gets the pass. Consider renaming both, and marking the In progress sentence in the Problem section as left for #36670.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: passed Eligible automated validation passed for the current revision labels Nov 18, 2026
@rnoack1
rnoack1 force-pushed the feat/keep-open-chat-in-filtered-list branch from f8f7124 to 9273c6e Compare November 18, 2026 21:20
@rnoack1

rnoack1 commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Addressed at head 9273c6e32c.

  • Evidence the review lanes can read. The three stills are now committed under .github/screenshots/37210/ (list with the open chat kept, the list after opening another chat, and the board with the open chat kept). The description links them by repo path instead of the attachment URLs that returned 404. A line in the description says they were taken from 598629b60a and that the rebase did not change the logic. Design and UX re-run on this push.
  • Test for the new hides clause. rows.test.ts adds "is not blamed on the status chips when the search drops it, so a reveal clears only the search". With the hides clause in rows.ts deleted, it fails (as does the local.openKey leaves row). With the clause present, all 153 tests pass. The sidebar suites pass (185 files, 2336 tests), and tsc -p tsconfig.app.json is clean.
  • Scope. ## What changed now says this PR covers the Unread chip only, and the In progress case stays open in Sidebar: the chat you have open disappears from the list when the Unread filter is on #36670.

No production code changed in this push.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 18, 2026
@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator

This review found no blocking issue on 9273c6e. It cannot be approved yet because PR Readiness is red on this head.

The failing checks are Backend Tests shard 8 (Linux and Windows) and the Coverage Gate that follows it. The failing test is test/test_bare_session_handle_guard.py::test_no_test_builds_a_bare_session_handle_directly. It fails on a test file that this PR does not contain, and main already fixed it in #39262. This branch merges cleanly with current main, so rebasing onto main should clear the red. After that, the earlier change request can be replaced with an approval.

What the review checked on this head:

  • The Unread-only pass in passesChip (rows.ts:647) and the matching hides clause (rows.ts:704) agree. A reveal that the search blocks clears only the search.
  • isOpen goes through localKeyOf, so a peer row with the same key gets no pass. A paused Unread chip gives no pass.
  • Status hides, search and folder hides still drop the open chat.
  • Each piece has a focused test, and local.openKey has its own row in the memo leaves table.
  • The committed stills under .github/screenshots/37210/ match the description.

Done well: the rule lives in one place, the row model that both the list and the board read.

Status of my earlier requests:

  • Stills that the review lanes can read: fixed. They are committed, and Design and UX pass on this head.
  • Part of #36670 and a title that names Unread: fixed.
  • local.openKey row in the leaves table: fixed.
  • Test for the new hides clause: fixed.
  • Test name and commit subject wording: still open, but optional (see below).

The issue asked whether this should be the default or sit behind a setting. The PR makes it the default. The approving maintainer should confirm that choice.

Optional:

  • Rename the describe block and the commit subject to name Unread, not every status chip. Rename the test at rows.test.ts:521 to say it covers any open chat, read or unread.
  • In the rows.test.ts:535 case, add expect(rows.revealBlockingFilters[2].hides(opened)).toBe(true) so the includes('unread') guard has a test that fails without it.
  • This PR and fix(sidebar): a paused Pinned chip lets the other status chips narrow pinned rows #38902 edit the same status-dimension lines. Whichever lands second must keep both clauses in hides.

@KiroCrewCaptain
KiroCrewCaptain dismissed their stale review November 18, 2026 22:40

Withdrawn: every item in this review is fixed or answered on the current head (see the follow-up comment). Other holds on this PR are listed there.

@rnoack1
rnoack1 force-pushed the feat/keep-open-chat-in-filtered-list branch from 9273c6e to 3b5077d Compare November 18, 2026 23:08
@rnoack1
rnoack1 force-pushed the feat/keep-open-chat-in-filtered-list branch from 3b5077d to 3878124 Compare November 19, 2026 01:15
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 19, 2026
@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator

This changes behaviour users already rely on, so it needs a design sign-off from a maintainer before it can merge. A maintainer will post the decision here. To propose a design, follow the request-for-change process in CONTRIBUTING.md (docs/request-for-change/).

The open decision comes from #36670: should the open chat stay listed under Unread by default, or only behind a setting? This PR makes it the default.

The review found no blocking issue on 3878124. What it checked on this head:

  • passesChip (rows.ts:647) passes the open chat for the Unread chip only. A paused Unread chip gives no pass.
  • isOpen goes through localKeyOf, so a peer row with the same key gets nothing.
  • The status hides clause (rows.ts:704) matches the pass. A reveal that only the search blocks clears only the search.
  • Search, folder hides and status hides still drop the open chat. Chip counts do not change.
  • The board lanes derive from filteredSlots, so the list and the board agree.
  • The committed stills under .github/screenshots/37210/ match the head logic. All review lanes pass on this head.

Done well: the rule lives in one place, the row model that both the list and the board read, and each part has a focused test.

Status of my earlier requests:

  • Stills the review lanes can read: fixed.
  • Part of #36670 and a title that names Unread: fixed.
  • local.openKey row in the memo leaves table: fixed.
  • Test for the new hides clause: fixed.

Optional:

  • In the Running-only case at rows.test.ts:535, add expect(rows.revealBlockingFilters[2].hides(opened)).toBe(true). Today, if !(activeStatus.includes('unread') && isOpen(slot)) is loosened to !isOpen(slot), no test fails.
  • This PR and fix(sidebar): a paused Pinned chip lets the other status chips narrow pinned rows #38902 edit the same status-dimension filtersRow and hides lines. Whichever PR lands second must keep both clauses.
  • docs/system-specs/modules/history.md (around line 830) still names the pinned row as the only status exemption. One clause about the open chat under Unread would keep the spec complete.

@KiroCrewCaptain
KiroCrewCaptain dismissed their stale review November 19, 2026 11:25

Withdrawn: every item in this review is fixed or answered on the current head (see the follow-up comment). Other holds on this PR are listed there.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: passed Eligible automated validation passed for the current revision readiness: checking Automated validation is still running labels Nov 19, 2026
@rnoack1

rnoack1 commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

@CrysisDeu could you make the design call this PR is waiting on?

The question, from #36670: with the Unread filter on, should the chat you have open stay in the list after opening it marks it read?

Option What happens
Default (this PR) The open chat stays listed until you open another chat. No setting.
Behind a setting Same behaviour, but off unless the user turns it on in Settings.

Every check and review lane passes at 387812468d, and the Captain's review found no blocking issue. If you pick "behind a setting", I will add the setting in this PR.

This branch has not been deployed

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

Labels

readiness: passed Eligible automated validation passed for the current revision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants