tjhhhh runs several agent sessions at once. The Routing page's context
window card followed whichever request came last, so it jumped from one
session's prompt to another's. The card still tells of the request it
picked. Under it, while two or more sessions are live, a strip now
shows one small block per session (renderCtxSessions):
- keyed as the card's line of prompts is (sessionKey, else the
conversation);
- named by the agent's title for the session (sessionName), else its
folder's last level, never a bare id;
- holding that session's newest reading through context.js's stack bar,
exported as window.ctxStack.
A session is live while a request of it is under way, or while its
newest request is within 15 minutes of the newest overall. At most six
blocks show, newest session first. A block keeps its place while the
sessions take turns, because blocks are ordered by each session's first
request. The block the card tells of is lit (aria-pressed), and a click
on a block picks that session's newest request. The card's footer names
the session by its title too. New words are in every locale in
plugins/routing/i18n.js. The strip reuses the card's tokens: no select,
no coloured border, no gradient.
The strip sits under the card, not over it. Over it, the strip's first
appearance moved the card, and routing-ctx-still ("the cache kept its
place") went red in both engines. It is green at base ccc791231, and
green again with the strip under.
What was run (mote, through mote-run):
- New routing-ctx-sessions.test.cjs: two engines, en/zh/zh-TW/ja/de at
1100 and 390px, plus one session alone and one with no title. Red on
origin/main, since there is no strip there. Broken by hand: ordering
blocks by newest request instead of first request turns the
"keeps its place" check red. Green, 4 of 4 tests, at the final tree.
- routing-ctx-still: red with the strip over the card, green with it
under (tests 391/392, both engines).
- Whole GUI suite, at the first version (strip over the card), under
load 25 to 30 from other sessions: 16892 tests, 16595 pass, 297 fail
in 49 files. That version's own red was routing-ctx-still (fixed
above). Every other red file has an issue:
- Filed before: agent-panel-name-width #4203, context-map #3488,
gui-ja #4580, i18n-keys "Unmarked" #4524, header-centre #3479,
key-replace #4126, menu-input-scroll #3402, mobile-web #3952,
model-chip-steady #4388, models-works-only #4391, page-width-steady
#4541, phone-connect-menu #3524, plugin-card-update #3079,
plugin-move-unserved #4392, provider-fetch-again #3292,
provider-levels-scroll #4394, provider-models-rest #4396,
provider-picks-stay #4397, provider-typed #4461, recovered-file
#4320, remote-magpie #4398, rest-try-now #2564, routing-row-swap
#3799, routing-steady #3412, the routing rule-drag, rule-remove,
rules-line and upstream files #4585 and #4494, s3-sync #3413,
searcher-pick #4274, segs-press-redraw #4189 and #4566,
usage-agents-hide #3414, warm-now #4322.
- Filed with this commit: editor-advanced-align #4615,
gateway-key-models #4616, group-found-skip #4617, images-codex-one
#4618, import-row #4619, market-have #4620, model-copy-id #4621,
nav-timeout #4622, number-units #4623, omarchy #4624, tencent-cloud
#4625, usage-ledger #4626, routing-order-unknown #4627,
routing-steps-cap #4628, routing-story-shrinks #4629.
- The files this change can reach (routing-*, context-*, i18n-keys,
gui-ja), alone at concurrency 2 on the first version against base
ccc791231: 54 fail on the head and 34 at the base. The only red that
was on the head and not the base was routing-ctx-still. The rest were
routing reds under load that show on both.
- The same files rerun with the strip under the card: 2331 tests,
35 fail. routing-ctx-sessions and routing-ctx-still are green. Each
red has an issue: context-map webkit 420px "two tiles overlap"
(#3488, the same at base), gui-ja (#4580), i18n-keys "Unmarked"
(#4524), routing-many-keys (#4082), routing-row-swap (#3799),
routing-steady (#3412), routing-order-unknown (#4627),
routing-steps-cap (#4628), routing-story-shrinks (#4629), and
rule-drag, rule-remove, rules-line and upstream (#4585).
- TestCoreScriptBudget went red after the rebase: the core was over by
266 bytes, which is the new stackBar helper in context.js. The budget
was not raised. stackBar was written tighter and the comments around
it cut, and context.js is now 1 byte under its size at origin/main.
- Rebased on origin/main 2e9df9b1b, on mote:
- `go test ./internal/gui`: TestCoreScriptBudget passes. Two reds are
already filed: TestSettingsSaveKeepsWhatItDoesNotSend (#4514, red
on main) and TestMainWindowCorners (#3949, macOS 27).
- routing-ctx-*, context-*, i18n-keys and gui-ja: 337 tests, 8 fail.
routing-ctx-sessions is 4/4, routing-ctx-still 2/2, and every
context-* other than context-map is green. The reds are context-map
"two tiles overlap" (webkit 420px in every language and chromium
zh 420px, #3488), gui-ja (#4580) and i18n-keys "Unmarked" (#4524).
- Rebased again on origin/main e8347401f, which changes the core
budget and fixes#4524. This is the pushed tree. TestCoreScriptBudget
is ok, and routing-ctx-sessions, routing-ctx-still and i18n-keys pass
44/44.
Not tried: a real gateway with several live agent sessions sending at
once (only the page's fixture feed was used), the Linux WebKitGTK app,
and the whole GUI suite at the final tree (only the files above,
which the change can reach).