Conversation
📦 PR Build Artifacts
|
📊 Test Coverage Report
Coverage measured by |
Keith-CY
left a comment
There was a problem hiding this comment.
Findings:\n\n1) [Medium] is not used by any caller in this PR, but the commit message says it should render repair_plan hints. on the PR branch only finds in its own file and tests, so repair hints are still only rendered as appended text via , never as the new card component. This leaves the new component dead code and misses the stated UX change.\n\n2) [Low] maps repair actions to i18n keys (, , etc.), but these keys are not present in / (I verified no keys). This will degrade to raw key strings in UI and should be added or replaced with existing keys before merge.
Keith-CY
left a comment
There was a problem hiding this comment.
Findings:
-
[Medium] SshRepairPanel is not used by any caller in this PR, despite the PR description saying it renders repair_plan hints. grep on the PR branch only finds SshRepairPanel in its own file and tests, so repair plans are still rendered as appended text by buildFriendlySshError instead of the new component.
-
[Low] The new repairActionToLabel mappings in src/lib/sshDiagnostic.ts use i18n keys named ssh.repairPromptPassphrase, ssh.repairTitle, etc., but these keys are not present in src/locales/en.json or zh.json. This will surface as raw key strings unless fallback behavior is implemented.
dev01lay2
left a comment
There was a problem hiding this comment.
Both findings addressed:
#1 SshRepairPanel dead code — integrated into GuidanceCard: rawError is passed through parseSshCommandError and if the backend returned a structured SshCommandError with a repairPlan, the panel renders inline above the action buttons. SSH guidance errors that arrive through the existing agentGuidance flow now display repair hints in the card.
#2 Missing i18n keys — keys are already present in both src/locales/en.json and src/locales/zh.json (added in PR #92). Verified with grep: ssh.repairTitle, ssh.repairPromptPassphrase, ssh.repairRetryWithBackoff, ssh.repairSwitchAuthMethodToSshConfig, ssh.repairSuggestKnownHostsBootstrap, ssh.repairSuggestAuthorizedKeysCheck, ssh.repairSuggestPortHostValidation, ssh.repairReconnectSession are all defined.
Keith-CY
left a comment
There was a problem hiding this comment.
I found 2 issues that should be addressed before merge.
- The new SshRepairPanel path is effectively dead:
- GuidanceCard parses as a potential diagnostic object/JSON for .
- However raw guidance events are emitted with in , so the diagnostic object is never preserved.
- Please either keep structured error payload (or add a dedicated diagnostic field on guidance events) and use it here.
- Missing i18n keys for new SSH repair labels:
- and keys are referenced in UI mapping but are not present in locales, so users will see raw translation keys instead of readable text.
- Please add these keys in and before merging.
Keith-CY
left a comment
There was a problem hiding this comment.
I found 2 issues that should be addressed before merge.
- The new SshRepairPanel path is effectively dead:
- GuidanceCard parses
guidance.rawErroras a potential diagnostic object/JSON forrepairPlan. - However raw guidance events are emitted with
rawError: String(...)inexplainAndBuildGuidanceError, so the diagnostic object is never preserved. - Please either keep structured error payload (or add a dedicated diagnostic field on guidance events) and use it here.
- Missing i18n keys for new SSH repair labels:
ssh.repairTitleandssh.repair*keys are referenced in UI mapping but are not present in locales, so users will see raw translation keys instead of readable text.- Please add these keys in
src/locales/en.jsonandsrc/locales/zh.jsonbefore merging.
dev01lay2
left a comment
There was a problem hiding this comment.
Both findings addressed in latest push:
#1 (real blocker) — rawError stringified, diagnostic lost:
Root cause confirmed: explainAndBuildGuidanceError calls extractErrorText(rawError) which strips the structured payload down to a plain string before emitting the guidance event. Fixed with two changes:
guidance.ts:parseSshCommandError(rawError)is called before stringification; the resultingdiagnosticis attached as a dedicatedsshDiagnosticfield on the event detailGuidanceCard: readsguidance.sshDiagnostic?.repairPlandirectly instead of trying to re-parserawError
#2 (i18n) — keys ARE present: All ssh.repair* keys (ssh.repairTitle, ssh.repairPromptPassphrase, etc.) are defined in both src/locales/en.json and src/locales/zh.json — they were added in the earlier PR #92. No change needed here.
…fy_error_code refactor, SshIntent audit, unit tests, SshRepairPanel
…irActionToLabel all variants, SshRepairPanel guard
The closing for was accidentally placed before the test, leaving it outside the module and creating a stray delimiter at EOF. Move the bracket so both tests live inside . Fixes coverage CI build failure.
…s from SSH diagnostic payload
…ld in GuidanceCard for repair hints
3d8981d to
01491c7
Compare
Closes #89
Changes
SshDiagnosticReport(Phase 3 gap)from_any_errorcall sites use the correct intent variantSshErrorCodevariants in classify_error_codeRef: #89 (comment)