Repository navigation
[PR] fix: sessions UI — live means active (recent), hide :side:/:sub: children by default - #7894
ranxianglei wants to merge 3 commits into
Conversation
…dren by default (#7876) The sessions page's Live filter was a no-op: `live` meant "resident in the in-memory pool", and the pool only evicts when full, so on a long-running daemon every session seen since process start stayed live (104/104 rows marked live while ~3 were actually active). A restart just moved the same sessions to History. P1: `live` is now recency-gated active — in memory AND seen within 10 min (the repo's existing active/fresh convention, SPLIT_CANARY_FRESH_MS / PERSONA_LINEAGE_FRESH_MS). The state filter, the overview live count, and the row/detail badges all key off the active state. P2: client-minted child conversations (:side:/:sub:, one-shot auxiliary calls) are hidden from the list by default (new "show side/sub sessions" toggle) and inherit the parent's clientHint, so omp's auxiliary calls read as omp instead of the UA-sniffed "claude". Closes #7876
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) Reviewing PR #7894 (Closes #7876). Early status before the full verdict: Duplicate screening: not a duplicate — related to the already-merged #7594, different mechanism and population. Master's #7594 ("filter top-level and child sessions") added a Live state of the PR (verified just now):
Plan: merge current master into the PR branch, resolve the 13 hunks as a union of intent (keep #7594's |
Conflict resolution (union of intent, 5 files): - admin.ts / sessions-data.ts / client.ts / page.ts: keep BOTH master's kind=top|child filter (parentSessionId lineage, #7594) and this branch's showChildren toggle (id-suffix :side:/:sub: auxiliary calls, #7876) — they address different populations and compose. - i18n.ts: de-collide ses.badge_child (master: derived-lineage badge) vs the branch's auxiliary-call badge -> renamed to ses.badge_aux/_tip; the client-cell chip is guarded with !s.parentSessionId so a declared-lineage child is not double-badged. - i18n.ts: added the 4 new keys to the ko locale (added to master after the branch point) and updated ko ses.badge_live_tip to the recency wording — required by the #1024 catalog-parity test. - state filter: keep this branch's recency-gated live (drop !restored); master's kind lines kept verbatim. Verified: typecheck clean; tests/web-sessions.test.ts + web-i18n + side-window-inherit 57/57 pass.
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.12286-pr.7894.51894a0This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr7894.tgz
npm install -g packageInstall instructions are refreshed on each push. |
…r (fastpath #7891, no overlap)
(ai: vllm-qwen/qwen3.8-27b) Review complete — the branch was 588 commits behind master (CI had never run on it); I merged master in, resolved all 13 conflict hunks as a union of intent, and pushed. CI is now green on the new head. What I did to the branchThe branch predated master's
Review findings① Direction (source issue #7876). Correct root-cause framing on both counts. P1: ② Regression audit (existing behaviors on the touched paths):
③ Code. ④ Tests. The two new regression tests assert real behavior in both directions (idle-2h resident → ⑤/⑤b Diff & code hygiene. Clean: 8 files, every line on-topic; clear naming, no dead code, no new dependencies, trilingual i18n consistent with the repo's style. 结构化八问
判定:可合。 head |
(ai: vllm-qwen/qwen3.8-27b) CI-engineer run: no merge conflict to resolve — the PR is already up to date with master. I verified the live state before touching the branch, and there is nothing for this lane to fix:
So there was nothing to rebase, resolve, or push. I made no push (no changes to push; pushing would only churn the branch and re-trigger CI) and did not merge or approve (human-only). The 八问
收工判定: 本 PR 无合并冲突、CI 全绿,CI-engineer 侧无可做之事。剩余 |
[ework] CI fix verified green ✓ |
Closes #7876
What
Two fixes for the Web UI sessions page (
/__bili/#/sessions):P1 — the Live filter was a no-op.
liveinGET /__bili/sessionsmeant "resident in the in-memory pool". The pool only evicts when full (count/byte cap), so on a long-running daemon every session seen since process start stayedlive: true— the reporter saw 104/104 rows marked live while ~3 were actually active. A restart just moved the same sessions to "History".liveis now recency-gated active: in memory AND seen within 10 min (the repo's existing active/fresh convention —SPLIT_CANARY_FRESH_MS/PERSONA_LINEAGE_FRESH_MS). The state filter, the overview live count, and the row/detail badges all key off the active state.P2 —
:side:/:sub:sessions flooded the list. Client-minted child conversations (one-shot auxiliary calls, e.g. omp's auxiliary calls) were listed as top-level rows — 65 of them vs 39 real sessions — and showed the UA-sniffedclaudeinstead of the real client. They are now hidden by default (new "Show side/sub sessions" toggle) and inherit the parent's clientHint (so omp's auxiliary calls read as omp).Behavior changes (old → new)
livefield inGET /__bili/sessions/ session detail: "in memory since daemon start" → "active in the last 10 min". A recently-used restored session is now Live (the old!restoredexclusion is dropped). Any script/automation keying onlive: truenow gets only recently-active sessions, not every resident one.:side:/:sub:sessions are hidden from the list by default (new?children=1opt-in). TheunfilteredTotalin the list response reflects the child-hidden view.clientHint(e.g.omp) instead of their own UA-sniffed hint (e.g.claude).No new config knob (the 10-min window is a module constant; the config surface is owner-gated). No model-facing prompt text touched.
Tests
tests/web-sessions.test.ts: 2 new regression tests —#7876 P1: live = active (recent), not merely resident(idle-2h resident →live:false; fresh →live:true; state filter discriminates; overview live = 1)#7876 P2: child sessions hidden by default, inherit parent clientHint(default hides children;showChildrenreveals + marks + inheritsomp)npm run typecheckclean;tests/web-sessions.test.ts31/31,tests/web-i18n.test.ts11/11 (zh/en parity).