26bb583f10
Keep Settings navigation independent while preserving shell actions and destination-specific state. Add the reviewed chat, run-entry, layout, and regression-test updates needed by the destination behavior.
3.5 KiB
3.5 KiB
Rail top strip and empty top-right island
Two shell chrome defects on the wide layout (run 20261112-1022).
Causes
- White strip above the rail (96x8 at y=0). On a wide window
WindowMarginsaddswideExtraTop(16 - 8 = 8 px) toMediaQuerytop padding.ShellNavigationRailpads its rail by that top inset with a plainPadding, so the 8 px above the rail's Material surface was never painted and showed the canvas behind it (white in both themes). - Empty circular pill (top right of Search and Settings).
pipelines_app.dartputWindowsMenuButtoninbarActionson every tab. The button returnsSizedBox.shrink()with no open window, butSegmentedBarcounted it as an action, so the trailing island was drawn around nothing.
Changes (app/)
lib/shell/navigation_rail.dart: the rail is wrapped in aColoredBox(keyshell.navigation-rail.surface) in the theme surface, and theNavigationRailgets the samebackgroundColor. The top inset still moves the rail's content down; the inset itself is painted.lib/shell/windows/windows_menu_button.dart: new staticWindowsMenuButton.hasWindows(manager), the single predicate for "a window is listed".lib/shell/adaptive_shell.dart: new optionalwindowManagerparameter. The shell adds the Windows button to the bar's actions only whenhasWindowsis true, and merges the manager into the top bar's listenable so the island appears and disappears with windows.lib/application/pipelines_app.dart: the Windows button is no longer inbarActions;windowManager: _windowsis passed to the shell instead.
Tests (focused, run through tool/memwatch/full.sh)
Paths: test/shell/navigation_rail_surface_test.dart,
test/shell/shell_bar_empty_actions_test.dart,
test/shell/navigation_rail_test.dart (existing, affected by the rail
change), test/shell/windows/window_conveniences_test.dart (existing, uses
WindowsMenuButton directly).
- Result:
PASS: 28 passed, 0 failed, 0 skipped; peak 1128 MB; 4s; exit 0. - Rail surface, light and dark: the cover is at y=0, its colour equals the theme surface, the rail's background equals it, the rail content starts at the 8 px inset, and the strip above it is inside the cover.
- Action island: Search, Settings and Pipelines at 1000 px and 430 px draw no
segmented.actionsisland with no window; a shell with no window manager draws none; the Windows button is the island only while a window is open and goes away when it closes.
tool/analyze.sh: clean, exit 0.
Not run: the land gate and the full app suite (owned by the gate stage). Pre-existing failures listed in the memory note were not checked here.
Affected UI states (for ui-review to capture)
- Wide window (1600x1000), light and dark: rail top (should now be the surface colour, not white), on every tab and on Settings.
- Wide and narrow (430x900), Search and Settings: no empty pill at top right.
- Wide window with one or more floating windows open: the Windows button is shown in the top-right island.
Before-captures exist in /tmp/ui-review/ (base-dark-1600x1000/12-settings.png,
base-light-430x900/11-search.png, and others). No after-captures were
taken in this stage, per the stage rules; ui-review owns capture.
Limitations
- The "rail top colour equals rail surface" check is a widget-tree check (colour and rect), not a pixel read from a rendered frame.
WindowMargins(the source of the 8 px) is untouched; the fix is at the rail, so the rail's content position is unchanged.