Skip to content

Rendering Issues, Stagging Changes, and More#42

Merged
SatanshuMishra merged 13 commits intomainfrom
dev
Mar 17, 2026
Merged

Rendering Issues, Stagging Changes, and More#42
SatanshuMishra merged 13 commits intomainfrom
dev

Conversation

@SatanshuMishra
Copy link
Copy Markdown
Member

See specific commits for a detailed list of changes. Here is a high level summary:

  • Resolved rendering issues that caused text to get left behind between refreshes.
  • Added functionality to stage files via Labcommitr instead of requiring the use of git add.
  • Improved color usage focused on readability.
  • Migrated to use OIDC for NPM publishing.

Use physical line counting instead of logical line counting when
clearing prompt renders. Stores the full output string and
recalculates physical lines at current terminal width on every
clear, preventing stale counts after resize. Adds resize listener
to all interactive prompts for immediate re-render on width change.
Replace warm/neon label backgrounds with deep cool tones (indigo,
teal, navy, slate-blue, jade) for better white text contrast.
Update git status colors to cool variants (sage green, steel blue,
muted rose, cool aqua, cool violet) for improved readability on
dark terminal backgrounds.
Rename body input-method select label from 'body' to 'input' to
avoid duplicate labels in the commit flow. Remove excess blank
lines in preview display for tighter layout. Add trailing blank
after action prompt for visual separation.
Suppress the 'Missing required fields' diagnostic message in pure
interactive mode where no CLI parameters are given. The message now
only appears when partial parameters are provided, matching the
expected UX where interactive prompts guide the user without noise.
Add guidance for resolving E404 and expired token errors during
npm publish in both the release workflow comments and the README
publishing section.
Add ChangedFileInfo type and new git operations:
- stageFiles() for staging specific files
- getChangedFiles() for listing all unstaged/untracked files
- getFileDiff() for per-file diff output
- Export getStagedFiles, getUnstagedTrackedFiles, hasUntrackedFiles

These form the data layer for the interactive file picker.
Widen processShortcuts parameter to accept "files" prompt name
and add files mapping to ShortcutsConfigInput interface.
Custom file selection prompt for choosing which files to commit:
- Sequential hotkeys (a-z, A-Z) for fast navigation
- Pagination with n/p keys (10 items per page)
- Fuzzy search with / key to filter files
- Full-screen diff viewer with d key
- Select-all toggle with * key
- Cool-toned cyan color scheme for hotkeys and footer
- Cursor safety guard via process exit handler
Change displayStagedFiles return type to "continue" | "edit-files"
so users can re-select files after reviewing the summary. Also fix
double-rendering of newly-staged files when no already-staged exist.
Replace error exit on no-staged-files with interactive file picker.
Add edit-files loop in staged files display for re-selection.
Replace all direct execSync calls with git.ts module functions.
Replace recalculate-on-clear pattern with captured line count.
Previously, countPhysicalLines(lastOutput) was called at clear time
using the current terminal width, but content was rendered at the
previous width. This caused ghost lines on terminal resize.

Fix applied to all three prompts: select, text, multiselect.
Replace token-based npm auth with OIDC trusted publishing in
release workflow. Upgrade all GitHub Actions to v4 and Node
from 18 to 22 (required for npm >= 11.5.1 OIDC support).
Required for npm provenance attestation to correctly link
published packages to their GitHub source repository.
@SatanshuMishra SatanshuMishra requested a review from VoxelMC March 17, 2026 00:57
@SatanshuMishra SatanshuMishra self-assigned this Mar 17, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 17, 2026

🦋 Changeset detected

Latest commit: f08c9c8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@labcatr/labcommitr Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@SatanshuMishra SatanshuMishra merged commit ab5f9c3 into main Mar 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant