Skip to content

test(desktop): story-cover browser panel edge and navigation-failure states - #4217

Open
liuxiaocs7 wants to merge 1 commit into
apache:mainfrom
liuxiaocs7:liuxiaocs7/browser-panel-failure-states
Open

test(desktop): story-cover browser panel edge and navigation-failure states#4217
liuxiaocs7 wants to merge 1 commit into
apache:mainfrom
liuxiaocs7:liuxiaocs7/browser-panel-failure-states

Conversation

@liuxiaocs7

@liuxiaocs7 liuxiaocs7 commented Aug 29, 2026

Copy link
Copy Markdown
Member

test(desktop): story-cover browser panel edge and navigation-failure states

Ninth surface under #3944 (one surface per PR): extend the 浏览器 panel (via
Product/Session Workbar) with the reachable states the existing Browser* stories
never show. BrowserState carries no error/crashed field — a failed load re-emits
the same seven fields — so the panel has no error render branch; its only real
failure affordances are the two navigation toasts.

  • BrowserCanGoForward — the one nav-control combination never shown: forward
    enabled, not just back.
  • BrowserLongUrl — a very long URL + title at the 320px column floor, so the
    address field keeps the URL legible.
  • BrowserInvalidAddress — a non-HTTP(S) address is rejected before navigating
    and raises the "无法打开地址" toast.
  • BrowserNavigationFailed — a valid address whose navigate rejects raises the
    "浏览器导航失败" toast.

bridge() gains a browserNavigateFails option (navigate rejects) in the same
idiom as the existing task/review overrides. No error/crashed/blocked/offline
render state exists on this surface, so none is faked.

Refs #3944, #3893

Generative tooling

Claude Code contributed substantially here — it authored these Storybook stories. The human contributor of record reviewed and submitted the change, and each commit carries a Generated-by: Claude Code trailer per CONTRIBUTING.md.

Visual evidence

Storybook stories captured with Playwright (hosted on the fork's release assets).

browser-can-go-forward — normal / light · narrow / dark

browser-can-go-forward normal / light browser-can-go-forward narrow / dark

browser-long-url — normal / light · narrow / dark

browser-long-url normal / light browser-long-url narrow / dark

browser-invalid-address — normal / light · narrow / dark

browser-invalid-address normal / light browser-invalid-address narrow / dark

browser-navigation-failed — normal / light · narrow / dark

browser-navigation-failed normal / light browser-navigation-failed narrow / dark

…states

Ninth surface under apache#3944 (one surface per PR): extend the 浏览器 panel (via
Product/Session Workbar) with the reachable states the existing Browser* stories
never show. BrowserState carries no error/crashed field — a failed load re-emits
the same seven fields — so the panel has no error render branch; its only real
failure affordances are the two navigation toasts.

- BrowserCanGoForward — the one nav-control combination never shown: forward
  enabled, not just back.
- BrowserLongUrl — a very long URL + title at the 320px column floor, so the
  address field keeps the URL legible.
- BrowserInvalidAddress — a non-HTTP(S) address is rejected before navigating
  and raises the "无法打开地址" toast.
- BrowserNavigationFailed — a valid address whose navigate rejects raises the
  "浏览器导航失败" toast.

`bridge()` gains a `browserNavigateFails` option (navigate rejects) in the same
idiom as the existing task/review overrides. No error/crashed/blocked/offline
render state exists on this surface, so none is faked.

Refs apache#3944, apache#3893


Generated-by: Claude Code
@liuxiaocs7
liuxiaocs7 force-pushed the liuxiaocs7/browser-panel-failure-states branch from 264a785 to 577e2b4 Compare August 29, 2026 21:37

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Synthesis at exact head 577e2b4c82d0b5a612eb8d9844a9d3be5a5738a1 (577e2b4) — test(desktop): story-cover browser panel edge and navigation-failure states.

All findings in this comment are from @DSv4F-Qronos-AstroHan independent review at this exact head. I did not read this diff myself; I verified that the current head has not drifted and the exact-head CI status is green (test SUCCESS 20m48s, MERGEABLE per Luna re-check).

Actual change (per reviewer, 1 file +111, 4 stories)

  • bridge() adds browserNavigateFails option to simulate browser.navigate reject.
  • Stories: BrowserCanGoForward (canGoForward true → enabled), BrowserLongUrl (long URL at 320px width), BrowserInvalidAddress (mailto: → toast 无法打开地址), BrowserNavigationFailed (navigate reject → toast 浏览器导航失败).
  • Copy keys verified: browser-copy.ts:51 openFailed, :52 navigationFailed, :59 forwardAria, :65 addressAria.

Gate

  • Code: GO, no P0–P2 (1×P3 low risk: BrowserLongUrl asserts value only, not toolbar overflow; acceptable per story visual snapshot convention).
  • CI: exact-head test SUCCESS (20m48s), MERGEABLE but BLOCKED/REVIEW_REQUIRED (no prior review, branch protection requires approval, not code conflict).
  • No CONFLICTING, no prior automated APPROVED to misinterpret.

What this synthesis could not verify

  • No local Storybook run on this head by synthesizer; relied on reviewer's code-path deduction and hosted CI. Visual snapshot pipeline not re-run here.

Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/S Under 100 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants