Repository navigation
refactor(mecatui): surface interface + soul proof-of-pattern (#555 Phase 2) - #644
Merged
Merged
Conversation
jbeda
added a commit
that referenced
this pull request
Aug 19, 2026
Five review notes; all gates green (`task build`, `task test`, `task lint`, `task test:golden`, `go run ./cmd/mecademo`). - Parents place, surfaces size: `Render` loses its width/height parameters; geometry arrives via a `Resize(width, height int)` method (the WindowSizeMsg idiom). `soulState` stores the geometry and `Render` returns the inner body only; `view.go`'s renderBody arm now calls `centerCard` on the returned body — the parent centers. - Rename `active` → `modal`: narrows the seam honestly; the stack/ tiling phase layers a stack on `modal` later. The gate (`surface_arch_test`) now asserts `TestModelHasOneModalSurfaceField`. - Move `updateInventoryMsgs` off worktrees.go to mcp.go (bad home, legacy fallback chain for unmigrated inventories; soul no longer uses it). - Generalise the design doc: `surface-migration-soul-plan.md` → `surface-migration-plan.md` — soul is the first migrator and the checklist covers the remaining six overlays. - De-churn "soul is the first" mentions in generic dispatch comments. Co-Authored-By: mecatl <[email protected]>
jbeda
marked this pull request as ready for review
August 19, 2026 04:01
jbeda
added a commit
that referenced
this pull request
Aug 19, 2026
Five review notes; all gates green (`task build`, `task test`, `task lint`, `task test:golden`, `go run ./cmd/mecademo`). - Parents place, surfaces size: `Render` loses its width/height parameters; geometry arrives via a `Resize(width, height int)` method (the WindowSizeMsg idiom). `soulState` stores the geometry and `Render` returns the inner body only; `view.go`'s renderBody arm now calls `centerCard` on the returned body — the parent centers. - Rename `active` → `modal`: narrows the seam honestly; the stack/ tiling phase layers a stack on `modal` later. The gate (`surface_arch_test`) now asserts `TestModelHasOneModalSurfaceField`. - Move `updateInventoryMsgs` off worktrees.go to mcp.go (bad home, legacy fallback chain for unmigrated inventories; soul no longer uses it). - Generalise the design doc: `surface-migration-soul-plan.md` → `surface-migration-plan.md` — soul is the first migrator and the checklist covers the remaining six overlays. - De-churn "soul is the first" mentions in generic dispatch comments. Co-Authored-By: mecatl <[email protected]>
jbeda
force-pushed
the
surface-soul-migration
branch
from
August 19, 2026 23:16
f29f9d8 to
1143803
Compare
jbeda
added a commit
that referenced
this pull request
Aug 19, 2026
…hase 2) The second surface migrator, onto the NEW deps-on-state interface (base PR #644). Multi-view enum (panel/detail), textinput filter, cursor, scroll window, epochs, four RPC message types. skillsState implements surface on pointer receivers: Render picks panel-vs-detail on s.view and re-derives the scroll clamp from the fresh width at the top (the ImGui clamp-in-Render rule — the width it caches is a view state, marked `// view cache:`); HandleKey carries the verbatim router (detail actions a/x/d/v/r + panel enter + two-stage esc + bare up/down by msg.String ONLY + pgup/pgdn/home/end + filter-feed fallthrough); HandleMsg consumes the four RPC types with requestID/generation staleness; SkillChangesMsg passes to the slim Model reducer updateSkillChangesMsg. HandleWheel scrolls the panel (NEW behavior — pre-migration the wheel fell through to the conversation viewport). Close returns nothing; the parent refocuses. Domain deps are fields on skillsState: deps (shared base), ctx, learnedLifecycle (the LearnedSkillClient), nextEpoch (Model-owned skillsEpoch closure). skillsEpoch STAYS a Model field (correlation survives close/reopen). The gate: surfaceFileHomes +skills.go (count 3), TestModelHasNoSkillsStateField, TestSurfaceDepsIsAmbientOnly (rejects the archived widening). runSkills in skills.go (one-file-owns-it). Review panel: spec/standards/security/architecture/QA landed fixes — TestSurfaceDepsIsAmbientOnly, TestSkillsWheelScrollsPanel (consume contract), TestLearnedMsgsViaUpdate (3 more RPC routing pins), TestSkillsScrollClampedInRender (ImGui clamp). Goldens byte-identical; all gates green. Stacked on PR #644. Co-Authored-By: mecatl <[email protected]>
jbeda
marked this pull request as draft
August 20, 2026 18:18
jbeda
force-pushed
the
surface-soul-migration
branch
from
August 21, 2026 03:23
1143803 to
f458f9f
Compare
Co-Authored-By: mecatl <[email protected]>
jbeda
marked this pull request as ready for review
August 25, 2026 00:08
jbeda
force-pushed
the
surface-soul-migration
branch
from
August 25, 2026 00:08
f458f9f to
938b656
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Introduce the
surfaceinterface so a modal/overlay owns its render, input, and teardown in one file, and migrate the/souloverlay onto it as the first surface. Issue #555 Phase 2 — the proof-of-pattern migrator.Final interface
Design
modal surface(nil-vs-set). Stack/tiling/focus-tree is Phase 3.m.modal.surfaceDepsis the shared ambient base (theme/keys/marks/caps), built once at Open and held as the surface'sdepsfield. Surface-specific collaborators are fields on the surface's own struct. Ambient deps immutable-after-startup (dynamic-settings flow banked, see mecatui: live-reload operator settings (keymap) without restart #456).Render(width, height)recomputes every frame from the offered args; there is NO resize event. Geometry-dependent view state (a scroll clamp) is re-derived at the top ofRenderfrom the fresh args — the ImGuiImGuiWindow.Scrollmodel. Retained view-state fields are marked// view cache:.centerCardinview.go; the surface MUST NOT callcenterCardinternally.HandleMsgowns RPC routing (consume/kill/defer); surface state created dynamically at Open.Verification
task build,task test,task lint,task test:golden(goldens byte-identical),go run ./cmd/mecademo— all green. Panel-reviewed.Out of scope
Stack, tiling/focus tree,
approvalButtoncomponent extraction, bubblezone adoption, any approval change, the stale "ADR 0108" citation fix, the dynamic-settings deps-update flow (#456).Plan:
docs/design/surface-migration-plan.md.