Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/feature-map/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ is `/settings/<key>`. Panels live in `pages/settings/`.
| `developer` -> session control | One On/Off switch for `agent.session_control`, which withdraws the session-control tools from every agent at once (Bots and the owner-tab Conductor keep driving sessions they created while `agent.member_dispatch` is on). Drawn only once the stored value is read; a change applies on the next session-control call, running sessions included | `SessionControlSection.tsx` (mounted by `DeveloperPanel.tsx` after Agent MCP servers) | `handlers/core.py` (the shared config route) | `GET,PATCH /api/config/kirocrew` |
| `advanced` (hidden: no tab, no search entry; `/settings/advanced` opens the first tab) | All settings: every scalar and string-list config key from the gateway's schema, with its help, current value, default and a Needs restart badge. A key with its own control links there; sandbox, approval, sign-in, reach, channel and preview keys are read-only; the rest get a toggle, select, number, text or one-per-line list, a save status line (Saves when you leave the field, Saving…, Saved) and Reset to default (removes the stored value). Rule per key: `config.md` § "Settings → Advanced" | `AdvancedPanel.tsx` (rows: `components/allSettings/AllSettingsList.tsx`) | `handlers/agents.py` (schema), `handlers/core_config_patch.py`, `handlers/config_all_settings.py` | `GET /api/config/schema`, `GET,PATCH /api/config/kirocrew` |
| `about` → **Release notes** | At the foot of About: the running release's notes, then earlier releases five rows at a time, each opening in place; `/settings/releases` and `/settings/releases/<version>` open About at that release. Under Updates, **What you'd get** lists the changes an available update brings, read from the changelog text the update carries | `ReleasesPanel.tsx`, `AboutPanelUpdateChanges.tsx`, `updateChanges.ts` | `handlers/updates.py` | `GET /api/releases` |
| `about` | Version, build, diagnostics bundle, and the in-app update step-up: an agent (or the panel) ARMS an update, a human approves it. On a managed-venv install the approval is the printed host command; on a packaged desktop install the gateway holds only a nonce-free request (version, who, when) and the approval is the human's own Install click in this panel, which drives the desktop updater's existing download→install IPC — there is no gateway endpoint that installs. **Restart gateway** is `POST /api/restart` in a browser; in the desktop app it is the app's own stop-respawn-reconnect of the gateway it runs (`gateway:restart` IPC), shown only for that gateway. An **Upcoming update** block sits inline under the update controls (never a pop-up) and shows only a version announced ahead of its release (a build already on offer is the update card's to show). On a container install, which updates only by pulling a newer image, the panel names a newer release and links its notes once the gateway has confirmed that version's image on GHCR (anonymous pull token, then a manifest HEAD; only a 200 counts), with no Update button. Release channel, update check, and the changelog behind the update prompt. A terminal CLI update on a POSIX git checkout also pokes the gateway (`POST /api/update/revalidate`, sent by the CLI, not the panel) to drop its cached update verdict and re-check, so the badge reconciles without waiting for the scheduled poll; the poke sends the local secret only after proving the connected peer is this install's gateway (owner-only unix socket, or loopback TCP on Windows and TCP-only gateways), and a peer that cannot be proven gets nothing and the badge reconciles on the next scheduled check or restart | `AboutPanel.tsx`, `AboutPanelUpdateFlow.tsx` (`InAppUpdateFlow`, `AgentUpdateRequestCard`, `RestartGatewayButton`), `AboutPanelGatewayUpdate.tsx`, `AboutPanelUpcomingUpdate.tsx`, `DesktopGatewayRestartRow.tsx`, `ReportProblemCard.tsx`, `shell/updates/updateFlow.tsx` | `handlers/diagnostics.py`, `handlers/feedback.py`, `handlers/updates.py`, `handlers/_update_feed.py` (internal release-feed transport), `http_proxy.py` (shared explicit proxy selection), `handlers/_update_announce.py`, `handlers/_update_image.py` (the container image probe), `platform/update_stepup.py`, `platform/app_update_request.py`, `cli_server_update.py` (the CLI poke) | `POST /api/diagnostics/collect`, `GET /api/diagnostics/download/{filename}`, `GET /api/update/check`, `POST /api/update`, `POST /api/update/channel`, `POST /api/update/revalidate`, `GET /api/changelog`, `POST,GET,DELETE /api/update/arm`, `POST /api/update/approve`, `POST /api/restart` |
| `about` | Version, build, diagnostics bundle, and the in-app update step-up: an agent (or the panel) ARMS an update, a human approves it. On a managed-venv install the approval is the printed host command; on a packaged desktop install the gateway holds only a nonce-free request (version, who, when) and the approval is the human's own Install click in this panel, which drives the desktop updater's existing download→install IPC — there is no gateway endpoint that installs. **Restart gateway** is `POST /api/restart` in a browser; in the desktop app it is the app's own stop-respawn-reconnect of the gateway it runs (`gateway:restart` IPC), shown only for that gateway. In a browser the standing Restart row stays on screen through the whole update lifecycle, hidden only while the installer card shows its command, since that card carries its own Restart. An **Upcoming update** block sits inline under the update controls (never a pop-up) and shows only a version announced ahead of its release (a build already on offer is the update card's to show). On a container install, which updates only by pulling a newer image, the panel names a newer release and links its notes once the gateway has confirmed that version's image on GHCR (anonymous pull token, then a manifest HEAD; only a 200 counts), with no Update button. Release channel, update check, and the changelog behind the update prompt. A terminal CLI update on a POSIX git checkout also pokes the gateway (`POST /api/update/revalidate`, sent by the CLI, not the panel) to drop its cached update verdict and re-check, so the badge reconciles without waiting for the scheduled poll; the poke sends the local secret only after proving the connected peer is this install's gateway (owner-only unix socket, or loopback TCP on Windows and TCP-only gateways), and a peer that cannot be proven gets nothing and the badge reconciles on the next scheduled check or restart | `AboutPanel.tsx`, `AboutPanelUpdateFlow.tsx` (`InAppUpdateFlow`, `AgentUpdateRequestCard`, `RestartGatewayButton`), `AboutPanelGatewayUpdate.tsx`, `AboutPanelUpcomingUpdate.tsx`, `DesktopGatewayRestartRow.tsx`, `ReportProblemCard.tsx`, `shell/updates/updateFlow.tsx` | `handlers/diagnostics.py`, `handlers/feedback.py`, `handlers/updates.py`, `handlers/_update_feed.py` (internal release-feed transport), `http_proxy.py` (shared explicit proxy selection), `handlers/_update_announce.py`, `handlers/_update_image.py` (the container image probe), `platform/update_stepup.py`, `platform/app_update_request.py`, `cli_server_update.py` (the CLI poke) | `POST /api/diagnostics/collect`, `GET /api/diagnostics/download/{filename}`, `GET /api/update/check`, `POST /api/update`, `POST /api/update/channel`, `POST /api/update/revalidate`, `GET /api/changelog`, `POST,GET,DELETE /api/update/arm`, `POST /api/update/approve`, `POST /api/restart` |
| — (cross-cutting) | Host-side backup of the browser-held settings the tabs above write, so they survive a moved dashboard port or a relocated Electron `userData`. Restores on a profile that has never reached the host; allowlist-scoped (`DURABLE_PREF_KEYS`), not every browser key | — (no panel; `lib/uiPrefs.ts` is the client) | `handlers/ui_prefs.py` | `GET,PUT /api/ui-prefs` |

Instances is deliberately not a rail row: it is set up here once and switched
Expand Down
15 changes: 9 additions & 6 deletions website/src/pages/settings/AboutPanelGatewayUpdate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,9 @@ export function AboutPanelGatewayUpdates({
// boot-time apply left, from the status frame.
const armedVersion = useAppSelector(s => s.dashboard.status?.update_armed_version) || ''
const pendingApplyError = useAppSelector(s => s.dashboard.status?.pending_apply_error) || ''
// Only the installer card with a command draws its own Restart; the in-app
// flow, the policy note and a command-less card draw none.
const cardHasRestart = showManualUpdate && !effectiveGwCanArm && !gwManagedByCommand && !!effectiveCommand
return (
<div className="flex flex-col gap-2.5">
{armedVersion && (
Expand Down Expand Up @@ -644,11 +647,11 @@ export function AboutPanelGatewayUpdates({
when needed and one that only appears when an update happens to
be offered.

Hidden while the manual-update card is on screen: that card
already renders a Restart button wired to the same mutation, and
two identical buttons a few rows apart read as two different
actions. */}
{restartControls && !showManualUpdate && (
Hidden only while the update card renders its own Restart button
wired to the same mutation: two identical buttons a few rows apart
read as two different actions. Every other update card draws no
Restart, and restarting is the next step there. */}
{restartControls && !cardHasRestart && (
<div className="flex items-center justify-between gap-3 pt-2.5 border-t border-border"
data-testid="gateway-restart-row">
{/* One label, not a title + note pair: the button already names the
Expand All @@ -675,7 +678,7 @@ export function AboutPanelGatewayUpdates({
user no feedback whatsoever. */}
{/* askAgent on: a refused restart of a standing action; nothing on
this card is a draft. */}
{restartControls && !showManualUpdate && (
{restartControls && !cardHasRestart && (
<ErrorNotice message={applyError} report={gwUpdate.applyErrorReport} askAgent testId="gateway-restart-error" />
)}
</div>
Expand Down
37 changes: 37 additions & 0 deletions website/src/test/AboutPanel.gatewayChannelRestart.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,43 @@ describe('AboutPanel gateway restart', () => {
expect(screen.queryByTestId('gateway-restart-row')).toBeNull()
})

it('keeps the standing Restart beside the in-app update flow, which draws none', async () => {
// An arm-capable install installs the new version beside the running one and
// starts it on the next restart, so restarting is the step left to take.
const posts = stubFetch()
seedStatus({
update_available: true,
update_check_status: 'succeeded',
update_can_apply: false,
update_can_arm: true,
update_channel: 'nightly',
update_latest_version: '0.14.0.dev2',
})
mountWeb()

await screen.findByTestId('in-app-update')
expect(screen.queryByTestId('gateway-restart')).toBeNull()
fireEvent.click(screen.getByTestId('gateway-restart-standing'))
fireEvent.click(screen.getByTestId('gateway-restart-standing'))
await waitFor(() => expect(posts.some(p => p.url.includes('/api/restart'))).toBe(true))
})

it('keeps the standing Restart when the installer card has no command', async () => {
stubFetch()
seedStatus({
update_available: true,
update_check_status: 'succeeded',
update_can_apply: false,
update_command: '',
update_channel: 'stable',
})
mountWeb()

await screen.findByTestId('manual-update-instructions')
expect(screen.queryByTestId('gateway-restart')).toBeNull()
expect(screen.getByTestId('gateway-restart-row')).toBeTruthy()
})

it('treats the connection drop after a restart as success, not failure', async () => {
// os.execv replaces the process image, so the POST's connection is reset by
// the very thing it asked for. Reporting that as an error would tell the
Expand Down
Loading