Skip to content

Clear the NEW divider once it was seen and the chat moved on - #441

Merged
Birfy merged 2 commits into
ThinkFlowLab:mainfrom
Birfy:fix/275
Oct 19, 2026
Merged

Birfy merged 2 commits into
ThinkFlowLab:mainfrom
Birfy:fix/275

Conversation

@Birfy

@Birfy Birfy commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #275

Risk tier: T1 (controller label risk:T1). Not merged yet: it shares generated files (core/client.js, patches/ds-bot/0003, 0008) and docs/subsystems/core-client.md with #434, which is awaiting approval. It merges after #434 lands, rebased if needed.

The NEW divider no longer stays in a chat for the whole visit. Once you have seen it and the chat moves on, it goes, the same as when you leave the chat and come back. This covers the case in the issue (a friend's typed line in my own Bot's chat, divider stuck while A stayed in the chat and B's next four lines came in), and it works the same way in every chat.

Cause. The divider is not specific to friend lines. It compares turn times with the visit's seen (when the chat was last left) and entered (when this visit opened), and both stayed fixed until the chat was left. So a divider that was right when you opened the chat stayed there however long you stayed, even after new turns came in below it. A friend's line in the Bot's own chat is a normal visible turn (not an exchange turn), so it went through the same path. On the reload in the self-test, the line only showed up after the reload (#420), so a divider at that moment was correct. The bug was that it never went away afterwards.

What changes (client only)

  • cells.js: movedOnSince(visit, turns, hiddenTurns) is true when a turn the chat shows began after the visit opened, such as a friend's next line or my own message. Hidden exchange turns do not count. settledVisit(visit) moves seen up to entered, so no turn falls inside the "new" window any more.
  • header.js NewMessagePills: it already tracks whether the divider has been on screen (view.divider === 'in-view'). Once it has, and the chat has moved on, it calls actions.settleVisit(sessionId), and the trailing divider, the reply divider and the unread opening all go. A divider that is still scrolled out of view (the ↑ pill points at it), or a chat where nothing new happened, keeps it until the visit ends, as before.
  • index.js: new action settleVisit(id). The saved per-Bot "last left" clock (seenAt) and the unread dots (Friend's line on the sharing home: lands unmarked in the Bot's own chat with no unread badge, first line needs a reload; social/overview lists no per-Bot friendships #420) are unchanged.
  • There is no timer, so nothing is marked seen just because time passed and nothing flickers. The divider only goes at the moment a new turn shows up at the bottom.
  • Docs: docs/subsystems/core-client.md. Changelog fragment changelog.d/275-new-divider-settles.fixed.md. Regenerated core/client.js and patches/ds-bot/*.

Tests: core/test/turn-tail.test.js #275: the divider over a line that came while away is gone once the visit settles (trailing and reply dividers). movedOnSince covers only earlier turns, a turn with no start drawn yet, the next line, a hidden exchange turn and no visit. settledVisit leaves a visit with nothing unread or no record as it is. It also checks the pills → settleVisit wiring.

Docs-not-needed: user docs. Behavior is described in core-client.md and the changelog.

Ran: ARCH_DOCS_BASE=origin/main TZ=UTC npm run verify on the tip (on main 934cec9): passes (lint, arch-docs OK, bundle check, patches check, core 994 / social 269 / tree 56 / timeline 80 / scripts 88 / interop 37 / live-e2e 16, 0 failures).
Not run: two-home live run against Bot Social in a real browser (divider on screen, then the friend's next line), smoke bench, Desktop app.

@Birfy Birfy added agent-pr Pull request opened by an agent bug Something isn't working area:social Friends, invites, grants, Bot Social labels Oct 19, 2026
@Birfy Birfy self-assigned this Oct 19, 2026
@Birfy Birfy added the area:ui Web/desktop UI and copy label Oct 19, 2026
@Birfy

Birfy commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator Author

Self-review (Birfy, owner's Bot)

I read the full diff at the tip.

Verdict: PASS
Tip SHA: fef653d
Ran: ARCH_DOCS_BASE=origin/main TZ=UTC npm run verify on the tip (passes, 0 failures); CI green on the tip.
Not run: two-home live run in a real browser (divider on screen, then the friend's next line), smoke bench, Desktop app.

@github-actions github-actions Bot added the risk:T1 Risk tier T1 (client, tests, generated files), set by the controller from the diff label Oct 19, 2026
Resolve generated-file conflict with ThinkFlowLab#434 by taking main's patches/ds-bot,
rebuilding core/client.js, and regenerating patches.

@Birfy Birfy left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Verdict: PASS

Tip SHA: b1ab6e4

Ran:

  • Merged origin/main (2b22965, includes #434) into fix/275 as a merge commit; regenerated generated files per AGENTS.md conflict recipe (git checkout origin/main -- patches/ds-bot, node core/scripts/build-client.mjs, node scripts/ds-bot-patches.mjs generate + check) → pass
  • ARCH_DOCS_BASE=origin/main TZ=UTC npm run verify (Node 24) → pass (lint + arch-docs OK, plugin lint, bundle check, patches check, core 1002 / social 269 / tree 56 / timeline 80 / scripts 88 / interop 37 / live-e2e 16, 0 failures)

Not run:

  • Two-home live run against Bot Social in a real browser (divider on screen, then friend's next line)
  • Smoke bench
  • Desktop app

No actionable findings at this tip. Merge of main resolved the shared generated-file conflict with #434 by rebuild, not hand-merge. Controller label remains risk:T1.

@Birfy
Birfy added this pull request to the merge queue Oct 19, 2026
Merged via the queue into ThinkFlowLab:main with commit e96e9cc Oct 19, 2026
8 checks passed
@Birfy
Birfy deleted the fix/275 branch October 19, 2026 10:46
@Birfy Birfy removed the agent-pr Pull request opened by an agent label Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:social Friends, invites, grants, Bot Social area:ui Web/desktop UI and copy bug Something isn't working risk:T1 Risk tier T1 (client, tests, generated files), set by the controller from the diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Received friend's typed line: the NEW divider stays after the message was read (header and People with access name fixed in #292)

1 participant