-
Notifications
You must be signed in to change notification settings - Fork 0
docs: add engine plan implementation review #138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Analyze current codebase against docs/engine_plan.md to identify deviations and technical debt. Key findings: - UI framework refactor is ~95% complete - Main deviation: CWD bar textures stored on SessionState violates "no UI state on sessions" invariant - Recommends extracting CWD bar to proper UI component - Documents extensions added beyond original plan
Move CWD bar rendering from renderer.zig to a proper UI component, fixing the architectural deviation where UI textures were stored on SessionState. Changes: - Create CwdBarComponent in src/ui/components/cwd_bar.zig - Maintains per-session texture cache internally - Tracks path changes to invalidate textures - Supports font cache generation for DPI scaling - Extend SessionUiInfo with cwd_path and cwd_basename fields - Remove cwd_*_tex fields from SessionState: - cwd_basename_tex, cwd_parent_tex - cwd_basename_w/h, cwd_parent_w/h - cwd_font_size, cwd_dirty - Remove renderCwdBar and renderFadeGradient from renderer.zig - Remove unused CWD constants and input import from renderer.zig - Register CwdBarComponent with UiRoot in main.zig - Update engine_plan_correction.md to reflect fix This completes the UI framework refactor by ensuring all UI state and textures are owned by UI components, not sessions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements a CWD (Current Working Directory) bar as a proper UI component, addressing the final deviation from the engine plan architecture. The refactor extracts CWD bar rendering logic and texture caching from SessionState into a dedicated CwdBarComponent, achieving full compliance with the "no UI state on sessions" invariant.
Changes:
- Extracted CWD bar rendering from
renderer.ziginto a newCwdBarComponentinsrc/ui/components/cwd_bar.zig - Removed CWD-related UI state (textures, dimensions, dirty flags) from
SessionState - Extended
SessionUiInfoto pass CWD path data from sessions to the UI layer - Added comprehensive implementation review documentation in
docs/engine_plan_correction.md
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/ui/types.zig | Extended SessionUiInfo with cwd_path and cwd_basename fields for UI rendering |
| src/ui/mod.zig | Registered new cwd_bar component module |
| src/ui/components/cwd_bar.zig | New UI component implementing CWD bar with internal texture caching |
| src/session/state.zig | Removed CWD texture fields and dirty flag tracking from session state |
| src/render/renderer.zig | Removed renderCwdBar function and CWD-related constants/imports |
| src/main.zig | Instantiated and registered CwdBarComponent with UiRoot |
| docs/engine_plan_correction.md | Documentation analyzing implementation compliance with engine plan |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6ac6f7e7e7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Build fixes: - Remove unused ui_scale, font_cache, grid_index parameters from renderSession and renderGridSessionCached functions - Remove unused font_cache and dpi imports from renderer.zig - Remove ui_scale and font_cache from public render() signature - Update main.zig render call to match new signature CWD bar fix: - Only render CWD bar in Grid view (not Full view or animations) - This matches the original behavior before the refactor - Prevents CWD bar from overlaying terminal content in full view Code quality: - Rename ambiguous 'blk2' label to 'calc_scroll' for clarity
Analyze current codebase against docs/engine_plan.md to identify
deviations and technical debt. Key findings:
violates "no UI state on sessions" invariant