# Navigation Tools And History Table Implementation Plan > **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. **Goal:** Move shell utilities into the navigation rail and make every shared export-history table compact and filler-free. **Architecture:** `MainWindow` owns only header composition and passes the existing settings action into `NavigationRail`. `NavigationRail` owns a visually separated bottom utility box. `ExportHistoryPane` owns one semantic column specification in which only the file column is resizable. **Tech Stack:** Java 17, JavaFX 17, JUnit 5, Maven 3.8.6, existing Feather/Ikonli icon layer. ## Global Constraints - Do not use subagents; execute this plan in the current task. - Do not modify master or its untracked files; work only on `codex/table-layout-optimization`. - Use TDD: observe the required test fail before changing production code. - The header must create neither MENU nor SETTINGS buttons. - Navigation bottom tools are ordered SETTINGS then collapse, with collapse last. - The history table has exactly six semantic columns and no filler/empty column. - Fixed widths are action 150px, index 64px, query 140px, count 88px, time 180px; file is the sole resizable column with min width 220px. --- ### Task 1: Move shell utilities into the navigation rail **Files:** - Modify: `src/test/java/com/example/workutils/system/ui/MainWindowArchitectureTest.java` - Modify: `src/test/java/com/example/workutils/system/ui/shell/NavigationRailTest.java` - Modify: `src/main/java/com/example/workutils/system/ui/MainWindow.java` - Modify: `src/main/java/com/example/workutils/system/ui/shell/NavigationRail.java` - Modify: `src/test/java/com/example/workutils/system/ui/NativeUiVisualAcceptanceFixture.java` **Interfaces:** - `NavigationRail(List, Consumer, Runnable openSettings)` requires the existing settings callback. - `selectSettings()` selects the utility entry and clears business navigation selection. - [ ] Write tests asserting a four-child header (brand, chevron, title, spacer), no `#menu-button`/`#settings-button`, bottom tool ordering, collapsed settings discoverability, settings route, and bottom-only collapse. - [ ] Run `mvn -q -o -Dtest=MainWindowArchitectureTest,NavigationRailTest test` and confirm failures reference the existing header buttons/missing rail settings entry. - [ ] Remove both header buttons, add the bottom settings toggle, preserve the existing embedded settings callback, and keep plugin/settings selections mutually exclusive. - [ ] Update the safe visual fixture constructor call for the explicit settings callback. - [ ] Re-run the focused tests and commit with message `优化导航底部工具区`. ### Task 2: Apply semantic widths to the shared history table **Files:** - Create: `src/test/java/com/example/workutils/system/ui/history/ExportHistoryPaneLayoutTest.java` - Modify: `src/main/java/com/example/workutils/system/ui/history/ExportHistoryPane.java` **Interfaces:** - Existing constructors remain unchanged for API, Scanner, and MyBatis consumers. - `table()` remains the test/accessibility entry point. - [ ] Add JavaFX tests that build a real `ExportHistoryPane`, assert exactly six titled columns, assert all five fixed sizes/resizable flags, and assert only the file column grows when the table widens. - [ ] Run `mvn -q -o -Dtest=ExportHistoryPaneLayoutTest test` and confirm the old equal-width behavior fails. - [ ] Apply constrained resize with five non-resizable semantic columns and one resizable file column using the exact global widths. - [ ] Run `ExportHistoryPaneLayoutTest,SharedPaneAccessibilityTest` and verify all consumers still use the unchanged shared constructor. - [ ] Commit with message `统一导出历史表格列宽`. ### Task 3: Visual and cumulative verification **Files:** - Modify if required: `src/test/java/com/example/workutils/system/ui/NativeUiVisualAcceptanceFixture.java` - Output (ignored): `.superpowers/sdd/2026-08-01-navigation-tools-and-history-table/visual-acceptance/` **Interfaces:** - Reuse the opt-in JavaFX visual fixture; do not add business side effects. - [ ] Generate real Scene screenshots at 1440x900 and 1024x768 for expanded/collapsed/selected states including the bottom tools. - [ ] Put the user screenshot and generated screenshots in the same visual comparison input and check header, bottom tool order, collapsed discoverability, table widths, and filler removal. - [ ] Run `mvn -q -o test`, `mvn -q -o -DskipTests compile`, and `git diff --check master..HEAD`. - [ ] Self-review the full branch for API-specific hacks, empty columns, duplicated actions, stale tests, and unrelated changes. - [ ] Commit any fixture-only adjustment separately as `补充公共表格视觉验收`.