Registry Mirror
Skip to content

Conversation

@backnotprop

Copy link
Copy Markdown
Owner

Fixes two Inbox window bugs the owner reported on 2026-10-16.

1. The "↓ N new" pill keeps showing after the message was read, and comes back on scroll up

"Why does this whole 'one new' thing keep showing, even though I've seen the whole message? Shows when I scroll up."

Cause. newBelow (packages/inbox/components/Thread.tsx) counted every message below the view that had not been seen on sight (data-arrival without data-sighted), and otherwise every message that was new at the open (data-new). It never remembered that the person had already had a message on screen:

  • Seen on sight needs the window in front for a second. When the person reads the Inbox while another app has focus (a terminal, for example), the reply is never marked sighted. So whenever it was below the view again (after scrolling up), the pill counted it again.
  • Messages that were new at the open were never marked at all. Scrolling back up above one of them brought it back into the count.
  • At the end of the thread, a short last message whose top was inside the pill's 56 px band counted as "below". That kept the pill up, and the band then covered the message's first lines, so seen on sight never fired either. The pill stayed up for good.

Fix. ThreadPane keeps a per-visit passed set. When a new message's top is in the view, or the view has gone past it, the message goes into the set, as long as the tab is visible and nothing covers the thread. Once a message is in the set, the pill never counts it again. Scrolled to the end, nothing counts as below. Seen on sight (the store's look, the row's bold) is unchanged: it still needs the window in front.

2. A thread started with compose doesn't show in the list after Send

"When I create a new thread and hit send, why doesn't it show up in the Sent list? I don't see it in the inbox list at all."

Cause. The server lists the row in Sent. In the window, composeSent (packages/inbox/App.tsx) called refreshList(adopt = !thread). While a thread is open, the list on screen is held, and refreshHeldRows only updates rows that are already on screen. So the new thread was missing until the person closed the thread they were reading.

Fix. New pure addOwnThreads in packages/inbox/held.ts. After the refresh, while a thread is open, it puts the thread the person just started into its section at its place (the top of Sent). The other rows keep their order and slide to make room. Starting a thread is the person's own action, so it never waits behind "N new". Agent news still does.

Tests

  • DOM (seenOnSight.test.tsx): an arrival read with the window in the background, then a scroll up; messages new at the open, read, then a scroll up; a short arrival at the end inside the pill band (no pill, and it is seen); a hidden tab marks nothing. The first three fail on main.
  • DOM (threadFolding.test.tsx): the ResizeObserver test now proves the pill is re-measured both ways and that a message once on screen does not come back.
  • DOM (compose.test.tsx): Send with a thread open puts the row in Sent ("To Claude Code") and keeps every other row in place (fails on main). Send with no thread open does the same.
  • Unit (held.test.ts): addOwnThreads.
  • e2e on the compiled binary: inbox-seen-on-sight.spec.ts covers the pill staying off on a step-by-step scroll back to the top, and a reply read with another app in front (with hasFocus false). inbox-compose.spec.ts covers Send with a thread open. I ran the new e2e cases against a binary built from main: they fail there and pass here.
  • The CLAUDE.md "Folding a thread" and "Compose" sections are updated.

backnotprop and others added 3 commits October 16, 2026 22:23
… Sent with a thread open

The "↓ N new" pill counted any new message below the view that was not
seen on sight, so a message read with another app in front (no dwell) or
new at the open came back into the count whenever the person scrolled up,
and a short last message whose top sat in the pill's band kept the pill up
at the end of the thread. A message once on screen now leaves the pill for
the visit, and at the end nothing is below.

Compose's Send refreshed the list held while a thread was open, which
takes no new row, so the thread the person just started was missing until
they closed the one they were reading. addOwnThreads puts that row into
Sent at its place; other rows keep their order and agent news still waits.

Co-Authored-By: Claude <noreply@anthropic.com>
… already read

Co-Authored-By: Claude <noreply@anthropic.com>
…a cover closes

An arrival that landed at the end while the tab was hidden kept the pill up
until the person scrolled, and the pill's band kept the message from being
seen. Re-check what is on screen on visibilitychange and when the thread
stops being covered.

Co-Authored-By: Claude <noreply@anthropic.com>
@backnotprop
backnotprop merged commit 9359d5f into main Oct 17, 2026
29 checks passed
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.

1 participant