feat(web): show machine + last-active in session detail header - #1244
Conversation
There was a problem hiding this comment.
Findings
-
[Major] The new last-active field reads
activeAt, but the session-detail SSE cache still discardsactiveAt-only heartbeats. Active sessions can therefore appear stale even while the hub receives fresh keep-alives. Evidenceweb/src/components/SessionHeader.tsx:150, related contextweb/src/hooks/useSSE.ts:66.
Suggested fix:// Detail-session cache: activeAt now affects rendered output. for (const [key, value] of Object.entries(patch)) { if (current[key] !== value) return false }
-
[Minor] The relative label is memoized only from the stored timestamp and translator, so it never advances when an inactive session receives no further updates. Evidence
web/src/components/SessionHeader.tsx:151.
Suggested fix:const [relativeTimeTick, setRelativeTimeTick] = useState(0) useEffect(() => { const timer = window.setInterval(() => setRelativeTimeTick((tick) => tick + 1), 60_000) return () => window.clearInterval(timer) }, []) const ageLabel = useMemo( () => lastActiveAt > 0 ? formatRelativeTime(lastActiveAt, t) : null, [lastActiveAt, t, relativeTimeTick] )
Questions
- None.
Summary
- Review mode: initial
- Two freshness defects found in the new last-active display. No other high-confidence correctness, security, data-loss, performance, or maintainability issues found in the full diff.
Testing
- Not run (automation; PR code was not executed). Static coverage gap: update the detail-SSE heartbeat test and add a fake-timer rollover test for the header age.
HAPI Bot
There was a problem hiding this comment.
Findings
- None.
Questions
- None.
Summary
- Review mode: follow-up after new commits
- No high-confidence correctness, security, regression, data-loss, performance, or maintainability issues found in the full latest diff. The prior
activeAtcache and relative-time rollover findings are addressed at this head. Residual risk: multi-machine rename/fallback behavior remains primarily unit-tested rather than browser-integrated.
Testing
- Not run locally (automation; PR code was not executed). GitHub
testcheck passed for this head. Existing coverage now exercises detail-cacheactiveAtrelevance, minute rollover, and machine-label fallback.
HAPI Bot
a185115 to
2ae049c
Compare
There was a problem hiding this comment.
Findings
- None.
Questions
- None.
Summary
Review mode: follow-up after new commits
- No high-confidence correctness, security, regression, data-loss, performance, or maintainability issues found in the full latest diff.
- Residual risk: live machine-rename refresh and fallback behavior remain unit-tested rather than browser-integrated.
Testing
- Not run (automation; PR code was not executed).
- GitHub
testcheck was still in progress at review time. - Existing coverage exercises detail-cache
activeAtrelevance, minute rollover, machine-label fallback, and the extracted todo helper.
HAPI Bot
… meta Co-authored-by: Cursor <cursoragent@cursor.com>
Remat re-thin (Meta P0)Tip force-pushed for soup remat onto intermediate
Did not touch
Note: tip ancestry is temporarily the remat intermediate (not |
2ae049c to
ba35a52
Compare
Remat re-thin (temporary tip)Soup remat needed tip on exact intermediate Force-pushed Product delta vs that base is header + useSSE + locales only (no SessionList / helpers churn). Meta rematting now. Note: this tip has soup ancestry (garden paths in range). After remat is green I will re-thin back onto |
There was a problem hiding this comment.
Findings
-
[Blocker] The force-push imported the integration-soup branch and made the PR unmergeable — the previously reviewed head differed from main in 9 files, while this head now changes 450 files / +47,857 lines, including unrelated Overseer, runner-upgrade, Garden, import, and media work (.github/workflows/overseer-replay.yml:1). The resulting mixed tree also fails TypeScript compilation at web/src/components/AssistantChat/HappyThread.tsx:1013, web/src/router.tsx:722, and multiple other locations. Rebuild this PR from origin/main with only its four clean feature commits.
Suggested fix:git fetch origin main git switch -c pr-1244-clean origin/main git cherry-pick 82fb3267 68aab89c b50205f3 2ae049c9
Questions
- None.
Summary
Review mode: follow-up after new commits
- Blocked: current head has unrelated branch ancestry and does not typecheck. Restore the clean PR history before another review.
Testing
- Not run (automation; PR code was not executed).
- GitHub test check failed during bun typecheck; representative errors: nonexistent props.outlineTitle, undefined projectCount, missing exports, and missing modules.
HAPI Bot
Multi-machine estates lose the machine signal after leaving list filter chips; surface machine label + relative age in SessionHeader meta row. Fixes tiann#1241. Co-authored-by: Cursor <cursoragent@cursor.com>
Treat detail-cache activeAt keep-alives as render-relevant now that the header reads them, and tick relative age every minute so labels advance without a session prop change. Co-authored-by: Cursor <cursoragent@cursor.com>
ba35a52 to
4f3de28
Compare
Re-thinned onto upstream/main (post-remat)Soup remat green with prior tip
Cold review of full PR diff: no Blocker/Major. Prior bot freshness findings remain addressed. Hard-reload dogfood if Workbox sticks on pre-remat assets ( |
There was a problem hiding this comment.
Findings
- [Major] Every keep-alive now rerenders the full session-detail tree - the hub emits a changed
activeAtabout every 10 seconds, and this change makes each heartbeat replace the cachedSessionobject. Both session-page query subscribers rerender, followed bySessionChatand the unmemoizedHappyThread, even though the header label changes only at minute boundaries. Evidence:web/src/hooks/useSSE.ts:63; related contexthub/src/sync/sessionCache.ts:293,web/src/hooks/useSSE.ts:426,web/src/router.tsx:704,web/src/components/SessionChat.tsx:447.
Suggested fix:if ( key === 'activeAt' && typeof value === 'number' && Math.abs(value - session.activeAt) < 60_000 ) { continue }
Questions
- None.
Summary
- Review mode: follow-up after new commits
- One major performance regression remains: sub-minute heartbeats invalidate and rerender the entire active chat view.
Testing
- Not run (automation; PR code was not executed).
- GitHub
testcheck was pending at review time. - Add coverage showing sub-minute
activeAtmovement is ignored while a minute-boundary update remains render-relevant.
HAPI Bot
Relative age only changes at 60s boundaries; accepting every ~10s heartbeat replaced the Session object and re-rendered the chat tree for no visible header change. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Babysit update (
|
There was a problem hiding this comment.
Findings
- None.
Questions
- None.
Summary
- Review mode: follow-up after new commits
- No reportable issues found in the latest full diff. The prior major keep-alive rerender finding is resolved at this head.
- Residual testing gap: the SessionHeader component tests pass
api={null}, so live machine-query/display-name refresh behavior is not exercised; label precedence, host fallback, relative-age ticking, and SSE threshold logic have direct coverage.
Testing
- Not run (automation; PR content was not executed).
- GitHub
testcheck: passed.
HAPI Bot
Co-authored-by: Cursor <cursoragent@cursor.com>
…oted Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
activeAtkeep-alives as render-relevant (SessionHeader reads them) and tick relative age every minute.Test plan
cd web && bun run test -- src/components/SessionHeader.test.tsx src/hooks/useSSE.test.ts(21 pass)bun run typecheck:webmachine: <label>and a relative age with absolute tooltiphost/ short id still shows a machine labelFixes #1241