feat: Add toggleable session lineage indicators setting - #2072
Conversation
Adds a 'Show session lineage indicators' toggle to the Settings panel (default: on). When disabled, hides both the git-branch icon (forked sessions) and the 'N segments' count in the session list sidebar — without requiring a page reload. Changes: - api/config.py: add 'lineage_indicators': True default - static/index.html: add checkbox after 'Sidebar density' setting - static/boot.js: initialize window._lineageIndicators from server settings on boot (mirrors _sidebarDensity pattern) - static/panels.js: read/save preference; call renderSessionListFromCache() after apply for immediate UI feedback - static/sessions.js: guard branch indicator and segment count with window._lineageIndicators !== false - static/i18n.js: translate label + description across all 9 locales (en, ja, ru, es, de, zh, zh-TW, pt, ko) - tests: fix 2 assertions broken by the guarded segmentCount expression
SummaryReading the diff against Code reference
const segmentCount=window._lineageIndicators!==false?_sessionSegmentCount(s):0;
const lineageSegments=Array.isArray(s._lineage_segments)?s._lineage_segments.filter(seg=>seg&&seg.session_id&&seg.session_id!==s.session_id):[];
const canExpandLineageSegments=Boolean(lineageKey&&segmentCount>1&&lineageSegments.length>0);Reading carefully — setting Hot-apply path looks rightThe One small nit: the comment on line 5792 reads i18n coverage9 locales ( If/when #2067 (Italian) merges, that PR will need to add the two new keys — but that's a normal merge-conflict housekeeping issue, not a problem with this PR. Test coverage
assert "const segmentCount=window._lineageIndicators!==false?_sessionSegmentCount(s):0;" in jsThat catches any accidental regression of the guard back to the unconditional form. The git-branch indicator guard at assert "if(s.parent_session_id&&window._lineageIndicators!==false){" in jsOptional, not blocking. The CIThree Python versions green. Pure additive, no backend behavior changed, no security surface. VerdictLGTM. Worth getting the comment placeholder filled in ( |
|
Thanks @JKJameson — this looks structurally sound (per-pref toggle, no reload required, default-on so the existing UX is unchanged). Before I queue this for merge, can you drop 1280px and 390px screenshots of the sidebar showing:
Mobile width matters because the lineage segments count was originally added partly to densify the mobile sidebar — want to make sure the toggle-off state doesn't leave awkward empty space on small viewports. Once those land I'll route this through the UX gate. The implementation diff itself is fine. |
|
Re-ping for screenshots — UX gate Hey @JKJameson, this PR is structurally sound and ready to ship as soon as we have the screenshots requested on May 11:
1280px (desktop) and 390px (mobile) viewports for each state, so 4 screenshots total. Once these land in the PR body or a comment, we'll send through the UX gate and merge. If you're no longer interested in driving this through, no worries — just leave a comment and we can close gracefully. |
|
Stuck-PR sweep — closing as superseded Thanks for this PR, @JKJameson — the design call was sound (give users a way to hide the lineage badges from the sidebar). But while this PR was waiting on screenshots, the same UX goal got shipped via a different mechanism that's now live on master. Where the feature now lives Settings → Sidebar density:
The Why I'm closing rather than salvaging The diff here is well-built (clean opt-out toggle, persists correctly, no reload required), but every observable behavior change it introduces — hiding segment count + branch chrome — is already achieved by setting If there's a specific case where the density-based gating doesn't capture what you wanted (e.g. you want segment count in compact mode but not branch chrome, or vice versa), please open a fresh issue describing the case and we can split the gating into two controls. Closing now to keep the stuck-PR list honest. Thanks for the work and patience. |
Summary
Adds a Show session lineage indicators toggle to the Settings panel (default: on). When disabled, both the git-branch icon (forked sessions) and the N segments count are hidden from the session list sidebar — without requiring a page reload.
Changes
Technical Notes
Model used: MiniMax (MiniMax-M2.7, via Nous Research / Hermes Agent)
Screenshots
Before (Default Behaviour, remains the default with option checked by default)

After (Unchecked)
