Files
open-design/e2e
698a17aac2 feat(web): refresh home and preview workspace controls (#6692)
* feat(web): home type-fan picker, floating account cluster, docked tab dropdown

Home hero: the 12 create-scenario types render as a fanned card carousel
above the composer (flat elliptical arc, apex card = selected, arrows /
card click switch along the arc; selected card scales about its own
center on an inner body so the outer transform stays a pure arc move).

Entry chrome: the account module leaves the nav-rail bottom and rides a
fixed top-right cluster next to the DeepSeek campaign badge — credits as
its own pill, avatar-only circular trigger, hover menu opens downward
(right-aligned, width-capped). The cluster is app-region no-drag so the
menu stays reachable in the desktop shell.

Project route: the docked workspace tab strip becomes one white dropdown
spanning the chat column (MRU order, most recent first), and the chat
collapse control lifts out of the chat card header to sit left of it.

Design files: the category tab bar drops its near-opaque sticky backdrop
strip and scrolls with content.

* feat(web): polish top-right capsule and dock controls, seed default deck chip

- Home composer seeds 幻灯片 (deck) as the default creation type on a
  fresh mount — same silent deferred-apply path as a user pick, skipped
  whenever a persisted chip draft owns the composer.
- Type fan: tighter card spacing (arc pivot 3700px → 3000px, ~128px
  between neighbours) so the hand-of-cards overlap reads again.
- Top-right chrome: credits + avatar merge into ONE capsule (pill
  material on the shared wrapper, chrome-free 24px segments inside,
  no hover fill on the credits segment).
- Project dock: the chat-collapse control gains a white seat matching
  the tab dropdown, and the dropdown drops its border (shadow only).

* test(web): align refreshed home chrome acceptance coverage

- Read account badges and member labels from the floating account menu.
- Match the default deck route, non-sticky Design Files tabs, and lifted chat control.
- Navigate projects through the visible docked Home control instead of hidden state nodes.
- Cover the affected Web suite and focused UI P0 restoration flows.

* fix(web): lock submit until default routing is ready

- Keep fresh-home sends disabled while the plugin catalog and default deck binding settle.
- Let explicit plugin handoffs supersede the default without leaving Send locked.
- Add a red-spec that holds the catalog response and verifies the routing barrier.

* test(e2e): await seeded type before picker actions

- Wait for the fresh-home deck binding before opening the creation-type menu.
- Switch to Prototype instead of clicking the already-active deck row.
- Preserve clear-selection coverage without racing menu reconciliation.

* fix(web): keep type menu open during internal scroll

- Listen for scroll only on the trigger ancestor chain and the viewport.
- Let the portaled creation-type list scroll without dismissing itself.
- Add coverage that distinguishes internal menu scroll from anchor-moving scroll.

* test(web): await routed submit readiness in legacy flows

- Wait for the Home submit control to become enabled before exercising the AMR workspace race path.
- Wait for refreshed workspace metadata and default routing to settle before submitting a community template.
- Keep the assertions aligned with the production guard that blocks submits until a deterministic default route exists.

* feat(web): replace the home type fan with a capsule pill row

The 12 create-scenario types render as ONE line of capsule pills exactly
as wide as the composer below: pills that fit render inline (8px gaps
throughout), 视频 stays pinned before the 全部 trigger, and the rest fold
into the 全部 popover. Fit is measured against an invisible probe row so
visibility never feeds back into its own measurement. 幻灯片 leads the
order (default-selected type); 网站复刻 trails so it folds first.

The fanned card carousel this replaces is fully removed (component +
styles) — selection still flows through the same onPick scenario path.

* feat(web): drop the clear-type control, cap the type menu at 6 rows

Clearing the creation type is gone (per product): the composer pill loses
its inline x (the chevron now stays in every state) and the menu loses its
leading Clear row, so a type is only ever swapped for another. TemplatePicker
no longer takes onClear.

The type menu shows exactly 6 rows and scrolls for the rest (6 x 44px row +
5 x 2px gap + 12px padding).

Specs that drove the removed control are rewritten around swapping instead:
the e2e clearHomeTemplate helper is deleted, pickHomeTemplate now observes
the pill's has-selection state, and the three clear-specific specs assert the
affordance is absent.

* feat(web): lift the GitHub star badge into the top-right cluster

The star count leaves the account menu's social row and becomes its own
chip between the campaign badge and the account capsule, sharing their
pill material. The menu's social row keeps Discord / X / mail.

* chore(web): clean up stacked EOF whitespace

- Remove the trailing blank line introduced in the home hero stylesheet.
- Keep the shared Playwright home helper free of the same EOF artifact.

* fix(web): polish preview workspace controls

* fix(web): stabilize floating comment interactions

- Treat a configured comment portal as an overlay from the first render and
  pre-mount its empty host, preventing the preview from briefly entering the
  320px local side-dock layout before the floating card appears.
- Route the floating card's close button and Escape key through one cleanup
  path, restore focus to the originating toolbar trigger, and clear board,
  create, and composer state so the card reopens with one click.
- Add red-spec coverage for the transient side-dock class, single-action
  close/reopen behavior, and focus restoration; the tests fail on the PR base
  and pass with this fix.
- Align the signed-out balance action with pill-radius controls, remove the
  redundant portal label, delete obsolete radial/reset/search/card picker CSS,
  and clean the two stacked EOF whitespace issues.
- Preserve the intended steady-state overlay behavior and validate the change
  with 389 focused tests, workspace typecheck, guard, diff checks, and Electron
  frame/focus sampling.

* test(e2e): align shared project title assertion with focus mode

- Wait for the file workspace to become visible after first-open materialization.
- Assert the canonical project-title state without requiring the intentionally hidden focus-mode dock to be visible.
- Preserve stale-title rejection and the visible catalog-title check after returning to All Projects.
- Validate with three focused repetitions, guard, workspace typecheck, and the entry-settings CI lane.

* fix(web): stabilize responsive home controls

- Recompute the Home type-pill split when localized labels or intrinsic pill widths change without a container resize.
- Observe the measured pill children and tail so late font layout cannot leave the overflow decision stale.
- Restore composer errors to the reviewed in-flow presentation instead of carrying the unrelated fixed top-chrome toast.
- Add focused coverage for locale-style rerenders and post-render width settling.

* test(e2e): await default home routing in attachment flow

- Wait for the visible deck binding before checking the Home attachment submit lifecycle.
- Use the shared long timeout so grouped CI does not race catalogue readiness.
- Preserve the production submit gate and the attachment add/remove assertions.

* feat(web): add a view-all-comments entry to the comment popover

* feat(web): cap the docked tab dropdown at six scrollable rows

* fix(web): preserve comment and tab menu interaction semantics

- Return focus to the still-open View all comments control when the floating comment panel closes.
- Include border-box borders in the six-row tab menu height so the last row is not clipped.
- Add focused regression coverage for comment focus restoration and menu sizing.

* test(web): await default routing in AMR home flows

- Wait for the cold Home composer to finish binding its default deck route before clicking Send.
- Preserve the existing AMR balance retry and auth-expiry assertions after the new readiness gate.

* fix(web): preserve explicit Home submit routes

* fix(web): defer restored Home plugin apply

* fix(web): close workspace chrome review gaps

- Clamp the Home template menu to six rows and the visible viewport, flipping it above the trigger when needed.
- Reset docked tab-menu state when its route-owned portal disappears and preserve editor-owned keyboard shortcuts.
- Scope the project header account identity, balance, and billing destination to the project workspace while retaining the ambient fallback for unbound local projects.
- Cover tall and short viewports, dock remounts, composer focus, and ambient/project workspace divergence.

---------

Co-authored-by: Cheems <94773058+itscheems@users.noreply.github.com>
Co-authored-by: Amy <1184569493@qq.com>
2026-08-13 11:16:44 +00:00
..