feat: build functional Endor start page and balance compact tabs

This commit is contained in:
2026-10-24 20:12:02 +08:00
parent 3cb44b96eb
commit 952fc2eff2
11 changed files with 205 additions and 82 deletions
+38 -3
View File
@@ -4,9 +4,9 @@ This audit follows the full conversation, including later corrections. Implement
| Requirement | Implementation | Evidence / limits |
| --- | --- | --- |
| One top row with native macOS controls | Transparent/full-size native title bar; reserved control space; 44 px tab strip | Actual Retina macOS windows viewed; native close/minimize/fullscreen controls retained |
| One top row with native macOS controls | Transparent/full-size native title bar; reserved control space; 40 px tab strip | Actual Retina macOS windows viewed; native close/minimize/fullscreen controls retained |
| Continuous left/top chrome | One neutral background; 56 px left rail; inset content panel | Actual main and detached windows viewed; no Tools label or rail launchers |
| Larger symmetric round tabs, softer active state | Common capsule bounds, measured glyph centering, no hard active stroke | Native settled UI viewed; hover and selected use the same bounds |
| Compact symmetric round tabs, softer active state | 208 px maximum width; equal 4 px vertical insets; matching icon/close slots; no hard active stroke | Native settled UI viewed; hover and selected use the same bounds |
| + and startup default page | One startup request guarded against duplicate resume; + release-inside; Cmd/Ctrl+T | Immediately after restart: pages().count = 1. Two native Cmd+T actions produced three tabs |
| New-tab motion, filled and unfilled | 200 ms cubic ease; new width grows from zero; existing bounds and + interpolate; scalar-only animation data | Real native new/close/fill operations completed; settled compression/overflow viewed. No frame-by-frame recording or Chrome timing comparison |
| Overflow and scrolling | Separate + reservation; arrows, edge dwell and hit bounds share tab viewport | Native overflow reached; + in overflow increased VM count 7 → 8. Dragging out of + kept count at 7 |
@@ -15,7 +15,7 @@ This audit follows the full conversation, including later corrections. Implement
| Four tools not default or permanently placed | No Tools menu, rail buttons or new-page tool directory; existing API/shortcut retained | Final default surfaces viewed without tool entries |
| Source reading/selection/copy | Grapheme-boundary selection, no gutter in copy, select-all/copy, Shift navigation, drag edge scrolling | Native single-line drag/copy/paste verified earlier in this change. Final keyboard copy was re-run after the chrome-focus fix: drag-copy matched the complete selected line; four Shift+Right operations copied the expected four characters; select-all copied multiline source without a gutter. Drag edge behavior compiled; exhaustive combinations remain untested |
| Clicking Console output must not jump to prompt/end | Input hit region restricted to actual prompt rows | Native reading/copy path verified earlier; no input hit over transcript-only area |
| Default page reflects Endor | Objects, code and UI share identity; persistence/model connections explicitly described as work in progress | Referenced chats read: 01a16819-28c3-7ce0-9423-0ffaa19402ce and 01a1689b-77d8-75a2-ba9e-b2fa3dce654e; actual native start surface viewed |
| Default page reflects Endor | Real Endor Page with creation, shared-object and composition actions; no persistence/model backend claims | Referenced chats read: 01a16819-28c3-7ce0-9423-0ffaa19402ce and 01a1689b-77d8-75a2-ba9e-b2fa3dce654e; actual native start surface viewed |
| Sensible source organization | Runtime/API tests separated; four page view modules; shared painter/selection; native tool Page factory; motion module | All-target Clippy compiled production and test sources. Runtime host reduced from ~7000 to ~1380 lines |
| Protect existing work | examples/README.md and examples/workspace.endor excluded; vendor/Aster untouched | git status checked before staging |
| Verification restrictions | fmt, all-target Clippy -D warnings, release build and manual native/API checks | No cargo test, smoke script, Docker, dependency test install or CI polling |
@@ -44,3 +44,38 @@ After the fix, direct system clipboard comparisons (without printing clipboard c
## Local delivery state
Implementation commits: 3220544 (runtime test-source separation), 656522e (managed workspace/chrome implementation), d3165b1 (behavior and requirement audit), followed by the chrome-focus fix commit. A push to origin/main was attempted once and rejected by automatic approval review because explicit authorization for this default-branch remote mutation was required. No alternative push route was attempted. The remote remains unchanged pending the user's approval.
## Functional start-page revision
The previous Rust-painted introduction was removed. `ui_bridge/start_page.endor`
now defines a managed Page subclass with native layout alignment, real buttons,
a shared-state counter and a composed-Blocks example. Its private module globals
do not overwrite user REPL bindings. The same factory is available as `ui.newTab()`;
legacy `ui.developerTools("New tab")` delegates to it. No developer-tool entry is
shown on the start page.
Native startup checks caught unsupported comparison syntax and unimplemented
arithmetic bytecode in initial layout drafts. Those drafts were replaced with
existing Page/Row measurement and native `mainAlign`, without changing Aster.
A subsequent layout check caught unbounded child-height centering; sizing now
belongs to the root Page, which receives the actual content constraints.
These failures were corrected locally, and are not counted as passing checks.
Final native checks for this revision: all three start-page buttons opened their
corresponding managed Pages; the blank-page return action activated its original
home Page; one native counter click changed both views from 0 to 1. Overflow
navigation was visible while these Pages were added. A direct `ui.newTab()` call
increased the live Page count from 4 to 5, confirming one Page per factory call.
The final window was also being operated by the user (reported by the UI tool),
so the pre-existing four tabs are not treated as a clean-start count measurement.
No additional restart was done after that interaction. The earlier isolated
startup count of one remains evidence for the guarded startup path; the new
factory's single-call count was checked separately.
Formatting, all-target offline Clippy with warnings denied, the release macOS
bundle and diff whitespace checks passed. No test suite or smoke script was run.
All earlier requirements were reviewed against the table above; isolated Chrome
motion comparison and the explicitly listed cross-window/DPI verification gaps
remain unverified, rather than being marked complete.