Repository navigation
feat(frontend): redesign host key dialog, auth prompt, connecting and unusable-server panels, toasts - #1432
Conversation
… unusable-server panels, toasts (#1384) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Review
Verdict: changes requested
Review level: elevated (review-level flags HostKeyDialog.tsx)
Blocking
- Before/after screenshots are missing (AC 1, AC 3, Technical Notes). The issue asks for before/after screenshots in both themes (
SCREENSHOT_LABEL=before|after,e2e/support/screenshots.ts). AC 1 ("matches the HostKeyDialog part ofDeskDialogs.png") and AC 3 ("render in the new style") can only be checked with them. The PR body says "not produced in this run", and no test can stand in for them. The same finding was raised on PR #1426. Please attach before (develop) and after shots in light and dark for: host-key mismatch, host-key unknown, auth prompt, connecting tab (running and failed, including awarningstep), unusable-server panel, toasts (error/info/success) and the feature-locked dialog. ConnectProgressList.tsx/ConnectStepLog.tsx:75: no mono durations (Requirement "Connecting tab and progress list … mono durations"). The assumption "durations are not part ofConnectStepSnapshot" narrows a Requirement line, so it can't be non-blocking. Durations do exist on the failed tab:ConnectStepRecord.durationMsis shown inConnectStepLogviaformatDuration, but intext-fg-subtleand not in mono, and that file is untouched. Please (a) render the existing durations in mono, and (b) for the live list, either carry the duration through the snapshot, or write in the PR the exact question for the maintainer (e.g. "live list without durations, durations only in the step log?") so it can be decided. Don't drop it silently.- AC 4: no axe scan for the auth prompt or the feature-locked dialog. Existing axe coverage: host key unknown/changed, connecting tab and failed connect tab (
e2e/tests/accessibility.spec.ts), toasts (app-shell-review.spec.ts:119), unusable server (server-management-review.spec.ts). I found noexpectNoSeriousA11yViolationscall that opensAuthPromptDialogorFeatureLockedDialog. AC 4 covers "these dialogs and panels", so please add entries for both toSCREENSinaccessibility.spec.ts. - AC 6: only
HostKeyDialog.test.tsxwas updated. AC 6 namesApp.hostKeyPrompt.test.tsx, theAuthPromptDialogtests,ToastHost.test.tsx,extensions/FeatureLockedDialog.test.tsxand the e2e specshost-key-prompt.spec.ts,connecting-tab.spec.ts,narrow-dialogs.spec.tsandlong-content-dialogs.spec.ts. None of them changed. Nothing checks the new behaviour there:- toasts: square corners, status-tone rule,
shadow-offset-sm, icon-onlyxclose button with its accessible name; - the
warnicon for awarningstep in the progress list (previously anx); - the lock icon in the auth prompt and feature-locked dialog;
- the
warnblock in the unusable-server panel; - in e2e, the mismatch header band and rows, and reject still first and focused.
- toasts: square corners, status-tone rule,
- Spec 0112 §"Der Tab-Inhalt …" (line 43) no longer matches. The spec lists the status symbols as "läuft: Ladesymbol, gelungen: Haken, gescheitert: Kreuz". With this PR a
warningstep (outdated algorithms) shows a warning triangle instead of the cross (ConnectProgressList.tsx:71). That is a visible change the spec doesn't describe. Please update 0112: add "Warnung: Warndreieck" to that sentence. HostKeyDialog.tsx:117: unknown variant shows "Offered Now", but the Requirement asks for "Offered" ("unknown variant: Offered and Key type"). The assumption reusesofferedNowto avoid new strings, but the issue expects new strings ("New strings in all 25 locales"). Please add ahostKeyDialog.offeredkey in all 25 locales, or tell us where the maintainer agreed to "Offered Now".
Non-blocking
HostKeyDialog.tsx:137(unsure): "Trust anyway" isvariant="ghost"plusclassName="text-danger-fg".ghostalready setstext-fg-muted, so which colour wins depends on the CSS order. The after screenshot will show it; if the text isn't red, adanger-ghost style would be clearer.
Verified
- files read: 8/8 logic files (full diff, read:
git diff origin/develop...HEAD) - counter-proof:
HostKeyDialog.test.tsx"renders label/value rows and the danger header band only for the mismatch", "shows the key type of the offered key" and "unterscheiden sich in Rolle, Titel, Farbe und Schaltflächen": withHostKeyDialog.tsxfrom develop, 5 tests fail; with the PR they all pass, 41/41 (executed:git checkout origin/develop -- src/components/HostKeyDialog.tsx && npx vitest run src/components/HostKeyDialog.test.tsx, then restored) - edge cases:
- mismatch without
keyType→ no Key type row (read); - unknown variant → no header band and no ticks (read + test);
- narrow layout → rows go to one column, ticks hidden (read);
- Escape / double decision → still
decide("reject")behind thedecidedRefguard, unchanged (read)
- mismatch without
- callers checked:
DialogFramebare(3 callers: HostKeyDialog, SettingsScreen, NarrowHeaderNav; only HostKeyDialog passestone/ticks) → ok (read) - tests run locally:
npx vitest runHostKeyDialog, App.hostKeyPrompt, AuthPromptHost, ToastHost, FeatureLockedDialog, ConnectingTabView, UnusableServerPanel, ConnectStepLog,components/ui→ 14 files, 244 passed (executed) - UI:
host-key-prompt,connecting-tab,narrow-dialogs,long-content-dialogs→ 76 passed;accessibility,app-shell-review,server-management-review→ 169 passed (executed locally,-c e2e/playwright.config.ts --reporter=line). No spec changed, so no--repeat-eachrun. - CI: all checks green (executed:
gh pr checks 1432) - data: not touched
Timing analysis
- 1 test file analysed (
HostKeyDialog.test.tsx): no timing dependency found. All new assertions are synchronous afterrender.
Spec
- visible behaviour changed:
- restyle of all listed dialogs and panels;
- unknown host-key dialog now shows the fingerprint and key type as rows, and no longer has corner ticks;
- a
warningstep in the progress list shows a warning icon instead of a cross; - toast close button is icon-only.
- spec searched:
rg -n -i "streif|rot|primary|ticks|Schlüsseltyp" docs/specs/0100-host-key-dialog-keyboard.md,rg -il "toast|benachrichtigung" docs/specs/,rg -n -i "symbol|icon|dauer|✓|✗" docs/specs/0112*.md,rg -il "ConnectProgress|Schrittliste|Statussymbol" docs/specs. Specs covering it: 0100 §1 ("rot gestaltet", reject first: still holds), 0112 line 43 (status symbols: no longer holds). - verdict: missing, blocking. Propose
update 0112for thewarningsymbol. The rest is a restyle with no spec statement.
Security checks
- Host-key decision path (elevated, loosening check against develop):
rolealertdialog/dialog unchanged;initialFocusRefstill the reject button;onClose→decide("reject");decidedRefsingle-decision guard unchanged;- no backdrop handler;
- reject button still first in both variants (test
buttonsorder). - No weaker check found. The removed test path for ticks in the unknown variant matches the Requirement (ticks only for the mismatch).
- Bypass attempts (read):
- Enter right after opening → reject has focus;
- Escape twice → guard;
- new event while open →
resetKey/decidedRefreset (unchanged); - long fingerprint/host →
break-all, rows scroll inside the body, footer staysshrink-0; - narrow layout → buttons reachable (
narrow-dialogs.spec.tspassed).
- No AI context, logs, credentials or command paths touched. "Threat model: no change – presentation-only restyle" holds.
Follow-ups
None.
…e for connect dialogs (#1384) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Review points: 1 screenshots — fixed in 398c077 (links in PR body, both themes; shown at 1280x800). 2 durations — fixed in 398c077 ( |
There was a problem hiding this comment.
Review
Verdict: changes requested
Review level: elevated (review-level flags HostKeyDialog.tsx and crates/core/src/ssh/connect_log.rs)
Follow-up round: I checked only the delta b8d32940..398c0770.
Blocking
-
The before/after screenshots cover only three of the screens the issue names (AC 1, AC 3, Technical Notes). This is the second round on this point. The screenshots branch (
b4074df5) has before/after shots in both themes for three screens: host-key mismatch, auth prompt and connect-failed. These screens have none:- the unknown host-key dialog;
- the running connecting tab with progress rows (check / warn / spinner icons, mono durations);
- the unusable-server panel;
- toasts (error / info / success);
- the feature-locked dialog.
The
connect-failedafter shot also shows no step list or step log. It doesn't show the redesigned progress rows at all. AC 3 ("render in the new style") can't be checked without these shots. Please add before (develop) and after shots in light and dark for each of them. The connecting tab needs at least one shot with awarningstep and a finished step that shows a duration. -
HostKeyDialog.tsx"Trust anyway" renders grey, not as a danger/ghost button. This breaks the Requirement ("'Trust anyway' as ghost/danger") and AC 1 (the design shows a red "TRUST ANYWAY"). The new after screenshotafter/hostkey-mismatch-light-open-1280x800.pngshows it in the muted foreground colour. My earlier non-blocking note (ghost'stext-fg-mutedwins overtext-danger-fg) is now confirmed. Please give the button a real danger-ghost style, and add an assertion for the danger text class. -
ConnectStepLog.tsx:75: durations in the step log are still not mono (previous finding 2a, not addressed). The Requirement asks for "mono durations" in the connecting tab. The failed tab shows durations only in the step log, and there they are stilltext-fg-subtlewithoutfont-mono. That file is unchanged in this round. Please render them in mono and add a test assertion.
Non-blocking
connect_log.rssnapshot_carries_duration_only_for_finished_steps: the "running → None" half would also hold without theif runningguard, because a running record has no duration yet. Only the "finished → Some" half has a counter-proof.
Verified
- files read: 8/8 logic files in the delta (read:
git diff b8d32940..HEAD) - counter-proof (executed, each restored afterwards;
git statusclean):snapshot_carries_duration_only_for_finished_steps: fails when the snapshot setsduration_ms: None.HostKeyDialog.test.tsx"labels the fingerprint row 'Offered Now' … 'Offered' …": fails (unknown branch) when the dialog always usesofferedNow.ConnectingTabView.test.tsx"… mono durations only for finished steps": fails when the duration span is removed.- All three pass with the PR code.
- edge cases (read):
- running step → no duration;
- host-key step waiting for a decision → mapped to running, so no duration;
warningstep → warn icon plus duration (unit test);- multi-hop → the duration sits after the hop and detail text (
ml-auto).
- callers checked (read):
ConnectStepSnapshot.durationMs, a new field,rg -n "ConnectStepSnapshot|snapshotStep". All TS construction sites were updated: e2econnecting.ts,ServerForm.testDialog,useSessionTabs.connect,ConnectingTabView. Generatedipc.tsmatches the Rust struct → ok. - tests run locally (executed):
cargo test -p ssh-manager-core --lib connect_log→ 17 passed. Run on the stable toolchain, because the pinned 1.99.1 could not be installed in the container.npx vitest runwith HostKeyDialog, ConnectingTabView, ToastHost, AuthPromptHost, UnusableServerPanel, FeatureLockedDialog, ServerForm.testDialog, useSessionTabs.connect, App.hostKeyPrompt and ConnectStepLog → 10 files, 98 passed.
- UI (executed locally,
-c e2e/playwright.config.ts --reporter=line):host-key-prompt,connecting-tab,accessibilitywith--repeat-each=5→ 630 passed, no flake;narrow-dialogs,long-content-dialogs→ 38 passed.
- CI: 10 pass, 1 skipped (executed:
gh pr checks 1432) - data: not touched. A new optional IPC field is not stored.
Timing analysis
- 10 test files analysed (unit, e2e, one Rust test): no timing dependency found. New e2e assertions are web-first; the unit tests use
findBy/act.
Spec
- visible behaviour changed in the delta:
- mono durations in the live step list;
- "Offered" label for unknown host keys;
- warning icon for warning steps.
- spec searched:
rg -n -i "symbol|dauer|Warndreieck" docs/specs/0112-verbindungsfortschritt-und-abbruch.md,rg -il "host.?key|Fingerabdruck" docs/specs/. Specs covering it: 0112 §4, 0100 §1. - verdict: spec change present and matches the code. 0112 §4 now lists the warning triangle and says finished steps show their duration in a monospace font, while a running step shows none. The "Offered" label is below spec level.
Security checks
- Host-key decision path (delta) changed only the label key of the unknown variant. Role, initial focus, reject-first order, Escape → reject and the
decidedRefguard are untouched. No loosening. connect_log.rs: adds a read-onlyduration_msto the progress snapshot. No status mapping changed, no new data leaves the process, and no secrets, AI context or command path are involved. "Threat model: no change" holds, and CIthreat-model-notepasses.
Previous findings
- screenshots missing → partly fixed in 398c077 (3 of 8 screens); still open, see Blocking
- mono durations → live list fixed in 398c077 (snapshot carries
durationMs, mono span, unit and e2e tests); step log (ConnectStepLog.tsx:75) still open - axe for auth prompt / feature-locked → fixed in 398c077 (
accessibility.spec.ts) - AC 6 test assertions → fixed in 398c077 (ToastHost, AuthPromptHost, FeatureLockedDialog, UnusableServerPanel, ConnectingTabView, host-key-prompt, connecting-tab)
- spec 0112 warning symbol → fixed in 398c077
- "Offered" label → fixed in 398c077 (new key in 25 locales, test with counter-proof)
- (non-blocking) "Trust anyway" colour → confirmed by screenshot, now blocking
Follow-ups
None.
…iew screenshot spec (#1384) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Review follow-up:
|
There was a problem hiding this comment.
Review
Verdict: approved
Review level: elevated (review-level flags HostKeyDialog.tsx and crates/core/src/ssh/connect_log.rs)
This is a follow-up round. I checked only the delta 398c0770..2a30f1ab: three files, all of them frontend.
Blocking
None.
Non-blocking
-
HostKeyDialog.test.tsxandConnectStepLog.test.tsxhave no new assertions for the two fixes in this round:- "Trust anyway" is now
variant="danger"; - step-log durations are now
font-mono.
Both fixes can be seen in the after screenshots. Still, a class assertion such as
toHaveClass("text-danger-fg")/font-monowould keep a later restyle from turning the button grey again unnoticed. Last round asked for these assertions. - "Trust anyway" is now
-
The screenshots show only the error toast; there are no info or success toasts. The styling code is shared by all toast tones and is covered by
ToastHost.test.tsx, so I don't block on this. -
e2e/tests/connect-dialogs-screenshots.spec.ts:51-53:getAttribute("open")is read once and then decides whether to click. If the<details>opened after that read, the click would close it again. This spec only captures review screenshots and is skipped unlessSCREENSHOT_LABELis set. My 5× run was stable.
Verified
-
files read: 3/3 logic and test files in the delta (read:
git diff 398c0770..HEAD) -
counter-proof: not applicable. The delta is a restyle (button variant, mono class) plus a screenshot-only spec, and adds no regression test.
-
edge cases:
- unknown variant still uses
primaryfor "Trust" (read); - mismatch "Trust anyway" uses
danger, which has a transparent background and danger text and border (read:ui/Button.tsx:22). It is not filled, so it does not compete with the primary reject button (seen in the after screenshot); - step-log durations for failed and ok rows are mono (seen in the
connect-failedafter screenshot).
- unknown variant still uses
-
callers checked: no exported API changed in the delta → ok
-
tests run locally (executed):
npx vitest run src/components/HostKeyDialog.test.tsx src/components/ConnectStepLog.test.tsx src/components/ConnectingTabView.test.tsx src/components/ToastHost.test.tsx→ 56 passed
-
UI (executed locally):
npx playwright test -c e2e/playwright.config.ts e2e/tests/host-key-prompt.spec.ts e2e/tests/connecting-tab.spec.ts --reporter=line→ 38 passed;- new spec:
SCREENSHOT_LABEL=… npx playwright test -c e2e/playwright.config.ts e2e/tests/connect-dialogs-screenshots.spec.ts --repeat-each=5→ 160 passed, no flake. I removed the output afterwards;git statusis clean.
-
screenshots (read): the commit
ddba754donissue-1384-screenshotshas before and after shots in light and dark for all 8 screens the PR lists. I looked at these:- mismatch: danger band, ticks, Known / Offered now / Key type rows in mono, reject first in primary, red "Trust anyway";
- running connecting tab: check and warn icons, a running step, mono durations;
- connect-failed: step log with mono durations;
- unusable-server: warn block;
- toast in dark: square, rule in the danger tone, warn icon,
xbutton; - feature-locked: lock icon.
They match the Requirements and the design sheet; the button order is the one spec 0100 §1 requires.
-
CI (executed:
gh pr checks 1432): 10 checks pass and 1 is skipped. The skipped one is real-app startup, for which no path is affected. -
data: not touched
Timing analysis
- 1 test file analysed (
connect-dialogs-screenshots.spec.ts). :45, flagged "likely": the spec might capture the progress list before its steps render. I dismissed this:ConnectingTabViewrendersconnect-progress-listonly whenprogress.length > 0, and oneemitProgresscall delivers all four steps at once.:53,:63, enter animations, toast auto-dismiss: possible, non-blocking. The spec is a skipped helper that only captures screenshots.
Spec
- visible behaviour changed in the delta:
- "Trust anyway" is shown as a danger button;
- durations in the step log are mono.
- spec searched:
rg -n -i "dauer|monospace|rot gestaltet" docs/specs/0112-verbindungsfortschritt-und-abbruch.md docs/specs/0100-host-key-dialog-keyboard.md - specs covering it: 0112 §4 (finished steps show their duration in a monospace font, updated in the previous round) and 0100 §1 (the mismatch dialog is styled red, reject comes first).
- verdict: not needed beyond the earlier 0112 update. The delta is styling within what is already specified.
Security checks
- Host-key decision path (elevated, delta compared with
398c0770): only the trust button'svariant/classNamechanged. Unchanged:onClick → decide("trust");- the order (reject first);
initialFocusRefon reject;- Escape → reject;
- the
decidedRefguard; role="alertdialog".
- No loosening. Making "Trust anyway" red makes the dangerous action look more dangerous, not less.
- The screenshot spec runs only against the fake backend and adds no new IPC names or network access.
- "Threat model: no change" holds.
Previous findings
- screenshots missing for unknown host key, running connecting tab, unusable-server, toasts, feature-locked → fixed in
ddba754d(screenshots branch, produced by the new spec in 2a30f1a). All 8 screens have before and after shots in both themes, and connect-failed now shows the step log. - "Trust anyway" grey → fixed in 2a30f1a (
variant="danger", red in the screenshot). The assertion is still missing (non-blocking, see above). ConnectStepLog.tsx:75durations not mono → fixed in 2a30f1a. The assertion is still missing (non-blocking, see above).
Follow-ups
None.
Closes #1384
Summary
Host-key dialog on the foundation
DialogFrame(danger tone and ticks, danger header band with warn icon, mono address, label/value rows); auth prompt and feature-locked dialog with lock icons; progress list as ruled rows with status icons (incl. warn); unusable-server warning block; square toasts with status-tone rule,shadow-offset-smand icon close button.DialogFramebare mode now rendersticks/tone.Acceptance Criteria
hostKeyDialog.offeredin all 25 locales; localeKeyParity.test.ts passes.Assumptions
hostKeyDialog.offered(25 locales) for the unknown-host row.ConnectStepSnapshotgetsdurationMs(finished steps; null while running), generatedipc.tsupdated; the progress list shows it in mono.Spec: updated 0112 (warning icon, durations in the step list)
Threat model: no change – presentation-only restyle, decision logic of the dialog untouched.
Manual test steps
Follow-ups
None.
Screenshots (chromium, 1280x800; 'Trust anyway' is now a danger button, step durations are mono)
Screenshots come from
e2e/tests/connect-dialogs-screenshots.spec.ts(SCREENSHOT_LABEL,SCREENSHOT_SCHEME).🤖 Generated with Claude Code