Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the core module by replacing Pane/PaneFactory with StyledGraphemes/Widget, removes the Pane abstraction entirely, and introduces new test infrastructure (termharness, zsherio, zsh-render-parity) for validating terminal rendering behavior against real zsh.
Changes:
- Replaces
Pane/PaneFactorywith directStyledGraphemes/Widgetacross all widgets, presets, and the core renderer - Adds
termharness(PTY session harness),zsherio(scenario runner), andzsh-render-parity(integration tests comparing promkit rendering to zsh) - Updates README, Concept.md, tape files, and examples to reflect the new API and project structure
Reviewed changes
Copilot reviewed 58 out of 59 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| promkit-core/src/lib.rs | Replaces PaneFactory trait with Widget trait |
| promkit-core/src/pane.rs | Deleted — Pane abstraction removed |
| promkit-core/src/grapheme.rs | Adds from_lines, wrapped_lines, delegation methods; removes Deref/DerefMut |
| promkit-core/src/render.rs | Renderer stores StyledGraphemes instead of Pane |
| promkit-core/src/terminal.rs | draw accepts StyledGraphemes, wraps inline |
| promkit-widgets/src/*.rs | All widgets implement Widget/create_graphemes instead of PaneFactory/create_pane |
| promkit/src/preset/*.rs | All presets updated to new API |
| promkit/src/lib.rs | Adds resize-event skip in core event loop |
| termharness/ | New crate: PTY-based terminal session with screen emulation |
| zsherio/ | New crate: scenario definitions and runner for zsh testing |
| zsh-render-parity/ | New crate: integration tests + zsh-pretend binary |
| README.md, Concept.md | Documentation updated for new architecture |
| Cargo.toml, tapes/*.tape | Workspace and demo updates |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+119
to
+124
| // NOTE: For zsh_pretend/tests/resize_roundtrip_wrap_reflow.rs, skipping | ||
| // resize events here | ||
| // keeps output closer to zsh than evaluating resize as a normal input event. | ||
| if event.is_resize() { | ||
| continue; | ||
| } |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
No description provided.