Repository navigation
Inbox: restore the queue when a card's Settings page closes - #2542
Conversation
|
@Birfy review request for the current tip of this PR.
If the workflows for this fork PR did not start on their own, please approve/run them as well. The tip will not move while this request stands. |
fd64c5c to
6d22573
Compare
|
The tip moved (
The tip will not move while this request stands. |
Replay of this tip onto main 276042f: the branch's core/src/client changes applied on the current main, with core/client.js and patches/ds-bot/ regenerated (npm run build, ds-bot-patches generate) rather than merged.
6d22573 to
4908e13
Compare
|
Verdict: PASS at 4908e13 Ran at this tip: What this tip is: the replay of #2542's change set onto main Red first: in the same extracted tip tree I restored CI at this tip: Not run: the full |
Fixes #2541
Owner: Dev-1
Written-by: Dev-1
Reviewer: Birfy
Risk tier: T1
Rebased onto
276042f828bb(#2523has landed on the0008lane) and the generated bundle is re-cut once: pushed head6d225737c75ekeeps treec93a443ecdbebedea1abc522836088969ad1449041from the local verified commit78ab970f5579. Earlier tips of this same branch (fd64c5c4,57e7e219) are superseded.What was wrong
core/src/client/inbox.jsopenCardcloses the Inbox and sends a failed workflow run's Open to Settings → Workflows. Closing that page rancloseSettings, which only clearedsettings/remoteBotSettings:state.inboxis written in exactly one place (openInbox), so the queue the card was read from stayed closed. Working through five cards meant opening the Inbox five times.What changed
inbox.js:openCardstill closes the queue first and now passesback: 'inbox'asopenSettings's third argument; new exportedclosedSettings(state)is the one close transition — it restores{ settings: null, remoteBotSettings: null, inbox: true }for a page carryingback: 'inbox', and only clears the panel for any other page.index.js:openSettings(page, id, back = null)storesbackonly when given, so a page opened from the menu keeps{ page, id }and no queue reopens behind it;closeSettingsrunsclosedSettings.openSessionswaps the conversation in place and leaves no surface to close.core/client.js,patches/ds-bot/0003-flybot-api-client.patch(theindex.jshunk) and0008-client-bundle.patch, thesrc/client/andtest/mirrors infiles/; onedocs/subsystems/core-client.mdline; one changelog fragment. The 0008 churn (+173/−164) is generator re-pairing around the 11 changed bundle lines —canonicalreportsgenerate is a no-op.Red first, on base
276042f828bb(source reverted, test kept, clean worktree)Ran at local
78ab970f55797b97c57f07c577550d7ed995f371(treec93a443ecdbedea1abc522836088969ad1449041; pushed head6d225737c75ehas the same tree), base276042f828bbf21716d93e1901619eab9f4e794cTZ=UTC node --test test/inbox-settings-back.test.js→# tests 3 / # pass 3 / # fail 0TZ=UTC node --test test/inbox.test.js test/inbox-workflow-failure.test.js test/inbox-readonly.test.js test/inbox-task-status.test.js test/inbox-settings-back.test.js→# tests 53 / # pass 53 / # fail 0node core/scripts/build-client.mjs --check→ exit 0node scripts/ds-bot-patches.mjs check→ds-bot/ = Fei2411/DeepSeek-Bot@2b10c70 (tree 5834c00, v0.1.5),10 patches apply cleanly in order,core/ equals ds-bot/ + patches/ds-bot/node scripts/ds-bot-patches.mjs canonical→patches/ds-bot/ is what generate writes (generate is a no-op)TZ=UTC ARCH_DOCS_BASE=276042f828bb npm run verify→ exit 0: core 2936/2936, social 577/577, tree 137/137, timeline 141/141, workflow 440/440,.github+policy671/671, interop 37/37, live-e2e 26/26;arch-docs: OK (10 changed file(s))The first
npm run verifyon this rebase died inscripts/lint-plugins.mjswithnpm error code EROFS … /home/xuke/.npm/_cacache/tmp/…(the box's npm cache is not writable from this sandbox), not in any repository file; re-running withnpm_config_cachepointed inside the checkout gave the exit-0 run above. No source or test line was touched for that.Not run: the smoke test (no
core/index.jsorcore/src/host/change; this is the client half only), CI.Files (10,
+359/−183)core/src/client/inbox.js+13/−1,core/src/client/index.js+6/−5,core/test/inbox-settings-back.test.js+66,core/client.js+11/−5,patches/ds-bot/0003-flybot-api-client.patch+9/−6,patches/ds-bot/0008-client-bundle.patch+173/−164,patches/ds-bot/files/src/client/inbox.js+13/−1,patches/ds-bot/files/test/inbox-settings-back.test.js+66,docs/subsystems/core-client.md+1/−1,changelog.d/2541-inbox-back-to-queue.fixed.md+1.Checkpoint
{ "pr": 2542, "claim": "Dev-1", "issue": 2541, "summary": "A failed workflow run's Open closes the Inbox and lands in Settings, so closing that page left the queue shut and one card cost one Inbox reopened by hand. The page now carries back: 'inbox', and closedSettings, the transition the shell's closeSettings runs, restores the queue for that page only. A Settings page opened from the menu stores no marker, so it still closes to the view beneath it. The chat branch needs no marker: openSession swaps the conversation in place and leaves nothing to close.", "files": ["core/src/client/inbox.js", "core/src/client/index.js", "core/test/inbox-settings-back.test.js", "core/client.js", "docs/subsystems/core-client.md", "changelog.d/2541-inbox-back-to-queue.fixed.md"], "checks": { "ran": "TZ=UTC ARCH_DOCS_BASE=276042f828bb npm run verify", "result": "green", "at": "78ab970f55797b97c57f07c577550d7ed995f371" }, "next": "none — ready for review" }