Repository navigation
Commit 4f79ad3
fix(workspace): bot-review round 6 — isBrowserHandoffAvailable guard, gate on preCheckOk, keep err diagnostic
Three #1100-only cycle-6 findings:
- **``isBrowserHandoffAvailable`` guarded** (CR Major) — line 63 wrapped
``isConfigured()`` with ``.catch(() => false)`` but ``getCredentials()``
on line 64 was unguarded. That call can throw on corrupt credentials JSON,
Zod schema drift, or an unresolved ``${env:...}`` reference; an unhandled
rejection there would take the TUI down. Wrap the whole body in try/catch
and fail closed (treat as "handoff unavailable").
- **``link.ts`` browser option also gated on ``preCheckOk``** (Kilo suggestion)
— was ``browserAvailable && !existing``. When the pre-check itself failed
(network / 5xx), ``existing`` stays null while the project MAY be linked
server-side. Offering the browser flow then reproduces the "workspace
created + 409 on bindExisting" strand. Add ``&& preCheckOk``.
- **``void err`` no-op replaced with log** (Kilo suggestion) — the previous
``catch (err) { ... void err }`` discarded the diagnostic. Log-warn so a
regression in ``showLinkedConfirmation`` doesn't vanish silently.
Test suite: green (4072 pass, 0 fail).
Co-Authored-By: Claude Opus 4.7 <[email protected]>
Claude-Session: https://claude.ai/code/session_016H42Vt4pt5dcD7opRqckeM1 parent b265740 commit 4f79ad3
2 files changed
Lines changed: 22 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
125 | 131 | | |
126 | 132 | | |
127 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
66 | 74 | | |
67 | 75 | | |
68 | 76 | | |
| |||
525 | 533 | | |
526 | 534 | | |
527 | 535 | | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
528 | 540 | | |
529 | 541 | | |
530 | 542 | | |
531 | 543 | | |
532 | | - | |
533 | 544 | | |
534 | 545 | | |
535 | 546 | | |
| |||
0 commit comments