Document core modules with clarifying comments#3
Merged
Conversation
forketyfork
added a commit
that referenced
this pull request
Jan 5, 2026
This commit addresses all review comments from Copilot and fixes the GitHub Actions build failure:
Build Fix:
- Made cwd.zig macOS-only with comptime check to prevent Linux build failures
- Added conditional import of cwd_mod in state.zig (struct{} for non-macOS)
- Added early return in updateCwd for non-macOS platforms
Review #1 - Ping-pong animation:
- Replaced sawtooth animation with smooth ping-pong pattern
- Animation now includes forward scroll, backward scroll, and idle at both ends
- Eliminates jarring jump back to start
Review #2 - Fade conditions:
- Fixed inverted fade logic
- fade_left now correctly triggers when scroll_offset > 0
- fade_right now correctly triggers when scroll_offset < scroll_range
Review #3 - Documentation:
- Added documentation clarifying cwd_basename is a subslice of cwd_path
- Documents lifetime dependency between the two fields
Review #4 & #5 - Silent failure logging:
- Added log warnings for basename buffer overflow
- Added log warnings for parent path buffer overflow
- Helps debugging when paths exceed buffer limits
Review #6 - Remove unused field:
- Removed cwd_marquee_offset field (animation uses current_time instead)
- Cleaned up unused code
All fixes tested with:
- zig build: Success
- zig build test: All tests pass
- zig fmt src/: Code formatted
6 tasks
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.
Summary
Testing