Skip to content

feat(browser): v2 controls under the new layout #62

Closed

Description

@trmosala

What to build

Under the new layout, browser controls match the native v2 component family: v2 icon buttons, v2 buttons and v2 menus. The classic layout keeps its classic components.

This slice starts with a human decision. Choose between swapping components per layout and overriding classic components with v2 styling, then record the decision on this issue before implementation. The decision should account for the v2 button's physical icon padding in RTL.

Acceptance criteria

  • The swap-versus-override decision, including its RTL handling, is recorded on this issue before implementation.
  • Under the new layout, toolbar and panel icon buttons match native v2 icon buttons in size, radius, muted icon colour and pressed state.
  • Under the new layout, text buttons match native v2 buttons.
  • Under the new layout, the browser and accounts menus match native v2 menus in surface, elevation, row metrics and shortcut slot.
  • With the new layout off, the panel looks identical to before.
  • Button and menu behaviour, accessible names and keyboard navigation are unchanged.
  • LTR and RTL both render correctly.
  • Scoped lint passes. Package typecheck passes where dependencies are installed.
  • Before/after screenshots are attached for both layouts.

Blocked by

Context

Source: browser panel native-styling audit, 2 October 2026. Coordinate with ongoing browser changes in #37–#48. Operation, busy, error and recovery states belong to #43 and are out of scope. Another agent owns the tab-strip alignment; do not restyle the strip in this slice.

Implementation clarification: the user requested left-aligned browser/accounts menu text, left icons and right shortcuts in both layouts, including RTL. Classic RTL menu alignment is therefore an intentional exception to the appearance criterion. See the closure evidence comment for verification and before/after images.

Activity

  1. added
    enhancementNew feature or request
    HITLRequires human validation or interaction
    ready-for-agentScoped work with acceptance criteria and recorded blockers
    on Oct 2, 2026
  2. trmosala commented on Oct 2, 2026

    @trmosala
    OwnerAuthor

    Implementation checkpoint saved; remaining acceptance work stays open.

    No component-family implementation was made. The required human swap-versus-override decision remains pending. Preferred approach remains component swaps per layout with logical RTL padding.

    Local commit: 7f746e8fcb7d2ad819b107aac2c0d7d9462d1361 on branch browser-gaps. This commit has not been pushed, merged or released.

    Fresh checkpoint validation: 410 tests / 6,620 assertions pass; all five affected package typechecks and the browser plugin build pass; native navigation and leave-confirmation reruns pass; scoped lint has 0 errors and 356 style warnings; formatting and whitespace checks pass. Earlier native fixture results are documented in the committed cm-browser README. These checks do not qualify authenticated Teams, macOS or a packaged app.

    Native UI screenshot and validation archive. No installed app/server was restarted and no real account data was modified.

  3. trmosala commented on Oct 2, 2026

    @trmosala
    OwnerAuthor

    Proceeding with component swaps per layout for #62 following the user's request to tackle this issue and the previously recommended approach.

    Classic layout keeps the existing Button, IconButton and DropdownMenu components. New layout uses native ButtonV2, IconButtonV2 and MenuV2 components through small browser-local adapters, preserving one set of action handlers, labels, disabled states and keyboard behavior.

    RTL handling: preserve the shared Icon's arrow mirroring; keep shortcut hints LTR inside RTL menus; scope logical button padding to browser v2 buttons rather than changing shared component styling. Native v2 menu shortcut slots will be used. Tab-strip alignment CSS and operation/recovery states are outside this slice.

  4. trmosala commented on Oct 2, 2026

    @trmosala
    OwnerAuthor

    Implemented and pushed in ec2b9b79b8 on browser-gaps.

    The new layout now uses actual IconButtonV2, ButtonV2 and MenuV2 components. Classic mode keeps its original component family. Native button padding uses logical inline padding in the browser. The browser and accounts menus have left-aligned text, leading icons on the left and shortcuts on the right in both LTR and RTL, as requested by the user during implementation. This is an intentional exception to exact classic RTL menu appearance. Toolbar/page direction still follows the selected language.

    The component-swap decision was recorded before implementation. The tab strip and operation/recovery UI are unchanged.

    Validation:

    • Mounted UI: 15 tests passed, 539 assertions, including reactive layout switches, disabled actions, labels, pressed state and shortcut slots.
    • Real Chrome: 8 keyboard/alignment cases passed across both layouts, LTR/RTL and Windows/macOS shortcuts; Find selection, Escape focus restoration and synthetic saved-account selection preserve their commands.
    • 168 tooltip checks passed without page errors or native viewport overlap.
    • 76 classic screenshot pairs were byte-identical; RTL browser/accounts menu pairs were excluded because the user explicitly requested their alignment change.
    • Native Electron rendering smoke passed retention, resizing, mounted paint, modal hide and restoration. Its dialog fixture now declares aria-modal=true, consistent with the existing overlay contract.
    • App and desktop typechecks passed; pre-push workspace check completed 31 successful tasks.
    • Scoped lint: 0 errors, 25 existing warnings. Prettier and staged diff checks passed.

    Review evidence is published separately at 31ad4a6, including 336 before/after review captures and JSON verification reports. These use synthetic records and a disposable fixture, not live credentials or a restarted installed app.

    Menu case Before After
    Classic, light, LTR Before After
    New, light, LTR Before After
    Classic, dark, RTL Before After
    New, dark, RTL Before After

    Additional pairs: classic buttons before / after; new buttons before / after; new RTL accounts before / after.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    HITLRequires human validation or interactionenhancementNew feature or requestready-for-agentScoped work with acceptance criteria and recorded blockers

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions