Repository navigation
Conversation
…thout one While an update is offered on a managed-venv install, Settings > About showed no restart control at all: the standing "Restart gateway" row hid whenever the update card was on screen, but only the installer command branch of that card draws its own Restart. The in-app arm flow, the policy-managed note and a command-less installer card draw none, and an armed update is applied by exactly that user restart. The row now hides only when the card renders its own button. Part of kirodotdev#39354 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem / Motivation
Goal: While an update is offered on an install whose update card has no Restart button of its own, Settings → About still shows the standing "Restart gateway" control.
On a managed-venv install (nightly, in-app update), the About panel has no restart control at all while an update is offered or armed. The standing "Restart gateway" row is guarded by
restartControls && !showManualUpdate, so it hides whenever any update card is on screen. Only one branch of that card draws its ownRestartGatewayButton: the installer-command branch with a command to show. The in-app arm flow (InAppUpdateFlow) draws none, and neither does the policy-managed note or an installer card with no command. The only way to restart iskirocrew restarton the host.Why it matters
Under updates never restart a running gateway, an armed update is applied only by a user restart. The row disappears in exactly the window where restarting is the next step, so a person who approves an in-app update from the dashboard is left with no way to finish it there. That matters most for someone on a phone or a remote dashboard with no shell on the host.
Not a goal
applying_restart_notecopy inInAppUpdateFlow. That is a wording change across 12 catalogs. Open PR fix(settings): show the arm poll notices after three failed polls #38160 is also changingAboutPanelUpdateFlow.tsx, so it is left for a separate change.What changed (motivation → approach → change)
Symptom: zero restart controls during the in-app update lifecycle.
Root cause: the standing row's guard
!showManualUpdatestands in for "the card already has a Restart". That is true for only one of the card's four branches.The issue suggests
!effectiveCommand. That alone is not enough: an armable managed-venv install also reports anupdate_command, the one shown under "Or re-run the installer manually", yet it rendersInAppUpdateFlowand no button. So the guard has to follow the card's own branch order.Change: in
website/src/pages/settings/AboutPanelGatewayUpdate.tsx, a newcardHasRestart = showManualUpdate && !effectiveGwCanArm && !gwManagedByCommand && !!effectiveCommandmirrors the conditions under which the card draws its in-card Restart. The standing row and itsErrorNoticenow hide only whencardHasRestartis true. The comment on the row says why.The screenshots below are committed under
temp-screenshots/39354/because this is a fork PR. The capture harness that produced them stays out of the diff.Backwards compatibility
Compatible: the row appears in more states and never in fewer. The installer-command branch still shows exactly one Restart button, and
does not render two Restart buttons at oncestill passes.Removes nothing: nothing is hidden or removed; a control that was hidden in three card states now shows.
Tests
website/src/test/AboutPanel.gatewayChannelRestart.test.tsxgainskeeps the standing Restart beside $name, with three cases:Each case asserts four things:
gateway-restart-rowis present;gateway-restartexists, so there is still one Restart;/api/restart.Proof: not provable -- frontend test (prove.py runs Python only)
Negative control by hand: with main's
AboutPanelGatewayUpdate.tsxrestored over fix commitfce0bc6eb51c, all 3 new cases fail and the other 27 in the file pass. With the fix, all 30 pass.Run locally on Windows 11, Node, a fresh
npm ci:npx vitest run src/test/AboutPanel.gatewayChannelRestart.test.tsx src/test/AboutPanel.inAppApply.test.tsx src/test/AboutPanel.desktopRestart.test.tsx→ 3 files, 71 tests passed.npx tsc --noEmit -p tsconfig.app.jsonis clean, and eslint on the changed files is clean.Manual verification
I rendered the real
AboutPanelwith the stubbed status of a nightly managed-venv install offering an in-app update (update_can_arm: true,update_managed_by: 'kirocrew',update_commandset). On main there is no restart control. On head the "Restart gateway" row appears under the auto-update switch (screenshots below).Real-machine verification
Machine: own computer, Windows 11 Home 10.0.26200, x86_64, Chromium (Playwright) against a Vite dev server.
Before (main c313abe): a Playwright script that mounts the real
AboutPanel(stubbed status and API,locale: 'en-US') and counts[data-testid="gateway-restart-row"](labelbefore) ->gateway-restart-row count=0in dark and lightAfter (head cd99679): same command with label
after->gateway-restart-row count=1in dark and lightCleanup: own computer; the Vite server was stopped.
Screenshots / video
Before, main: an in-app update with no restart control anywhere on the card.
After, head: the standing "Restart gateway" row under the auto-update switch.
After, light
Related Issues
Part of #39354
Sibling sweep
Swept: git grep -n "showManualUpdate" -- website/src/
Sibling: website/src/pages/settings/AboutPanelGatewayUpdate.tsx -- changed here: both guards (the row and its ErrorNotice) now use cardHasRestart
Sibling: website/src/pages/settings/AboutPanel.tsx -- not affected -- it only computes showManualUpdate and passes it down; the desktop branch draws its own DesktopGatewayRestartRow
Pattern harvest
Not generalizable: a single guard that used "a card is shown" for "the card has this button"; the fix ties the guard to the card's own branch conditions.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...); PR Hygiene does not count commitsContribution License Agreement
🤖 Generated with Claude Code