v0.4.0 — Shell Intelligence & Extensibility - #116
Merged
Merged
Conversation
…foundation v0.4 settings and glyph foundation
v0.4 continuous session journal and resume browser
v0.4 reusable task progress for Starship installs
v0.4 Starship module configuration
Add Powerlevel10k configurator handoff in /prompt Backs up ~/.p10k.zsh and .zshrc before launching the official p10k configure wizard, hands the real TTY to it, and reports which files changed on return. Closes #93.
Preserve compatible zsh precmd/preexec hooks from user config Compose with add-zsh-hook instead of overwriting precmd_functions/ preexec_functions after sourcing the user's real .zshrc, so tools like zoxide (direct array append) and Atuin (add-zsh-hook) keep working. Reblank PROMPT/RPROMPT on every precmd cycle so a foreign prompt plugin can't repaint over NMSh's own prompt. Human-validated in Ghostty with the reporter's real shell config. Closes #16.
Make panel Esc navigation return to /settings, not the composer Prompt/Transcript/Keyboard panels always closed straight to the composer on Esc, even when opened from /settings, because none of them tracked where they were opened from. Add a panelOrigin field and a returnFromPanel() helper that every panel root's Esc handler calls. Also fixes Escape decoding for the Kitty keyboard protocol (CSI 27 u), which Ghostty uses: Escape was falling through to the generic "unknown CSI sequence" branch and being silently dropped, making Esc appear broken in Ghostty specifically while working in Terminal.app. Human-validated in both Terminal.app and Ghostty. Closes #100.
* Add tabbed settings browser and shared panel shell * Refine /settings into an inline-editable tabbed settings editor Styled one-row tab strip with overflow windowing, a real search field with focus states and highlighted matches, a typed row model (enum/boolean/child/action/planned) with inline Left/Right/Space editing that persists to the prompt config, and contextual muted key hints. Esc clears search before closing; panel-origin Esc navigation is unchanged. * Rebuild /settings as a shared Settings / Status / Config panel /settings and /config open the Config view and /status opens Status, all in one panel. Left/Right switch views, with a filled lavender block marking the active one. Config is a compact aligned list with a bordered search field that only / focuses; Left/Right or Enter/Space change the selected value and save it immediately. Settings holds entry points to the richer panels and lists planned v0.4 areas. Status shows read-only build, shell, prompt, and journal facts from in-memory state. Panel-origin Esc navigation still returns to the view it came from. * Color the selected Config row with the NMSh accent The selected label is now bold lavender and its value lavender, tied to the pointer. Search matches gain an underline so they stay distinct from the selected-row style.
Powerlevel10k moves its precmd hook to the end of precmd_functions each cycle, so after #99 it ran after NMSh's blanking hook and repainted PROMPT/RPROMPT. zsh then printed p10k's two-line prompt, including its right-side status (checkmark or exit code), into command output, where it read as a foreign history header. NMSh's hook now re-appends itself last each cycle and re-disables prompt_cr/prompt_sp. A probed, genuinely clean working tree now adds a one-glyph wedge after the branch using the theme's success role. Unknown status (no repo, failed or timed-out probe) never shows as clean.
Git state renders one semantic segment per state (staged, modified, untracked, conflict, ahead, behind, diverged, operation, clean) through the shared powerline renderer, so every state follows the Main Prompt geometry. The clean marker is now a compact generic segment, not a fixed glyph. A Rich Git color mode (Semantic default, Follow theme, Grayscale) decides state colors; the branch keeps following the theme. Connector fade adds an optional one-cell blended transition between joined segments. It follows the Connector shape by default, accepts a fixed override, and can be turned off. Start/End fades are unchanged. /prompt gains Main Prompt and Rich Git views on the shared view bar, with Rich Git state in the theme gallery and a dedicated showcase. Snapshots record the Git color mode, connector fade, and compact segments. Older configs and snapshots normalize to their previous rendering.
Rich Git gains Enabled (Off keeps the plain branch and skips the status probe), editable Geometry (Follow main prompt or a fixed shape for Git state segments), and its own Connector fade (Follow main prompt, Follow Rich Git geometry, Off, or a shape). Git segments carry geometry and fade as generic block metadata; a boundary takes the entering block's override, else the leaving block's, else the prompt's. Connector fade now colors the first gap cell between separated segments with a shade glyph in the previous segment's color over the next one's, and shapes the caps around it. It replaces a gap cell, so width never changes; joined segments keep plain connectors. The blended-join path is removed. The showcase lists every state, dims itself while Rich Git is off, and reacts to each setting. Snapshots record the Rich Git settings and each segment's resolved geometry; older configs and snapshots normalize to their previous rendering.
The fade shape replaced both caps, so Connector stopped mattering, and its gap cell was a shade glyph mixing both segments. Now Connector shapes the closing cap, the fade shapes only the opening cap, and one darker step of the left segment's color sits behind both caps and every gap cell. Compact fades through its touching caps; Flat + Compact has no cells and adds none. Off and Gap Off render exactly as before.
Rows now carry their owning command block's startId, derived from command records. The sticky owner is the block that owns the top visible row once its real command row has scrolled above; it renders as a one-row, ANSI-safe truncated overlay, jumps to the real header on click, and is suppressed while panels or passthrough own the screen. Presentation only: nothing enters transcript, journal, or copy data.
Fade colors picks which neighbor supplies the darker transition zones: the exit cap belongs to the previous segment, the entry cap to the next. Gap cells now always stay terminal background, so Normal visibly differs from Compact. Defaults to Previous; old configs and snapshots normalize to it.
…ound Compact is unchanged. Normal no longer inserts a blank cell: the exit cap (Connector) and entry cap (Connector Fade) sit on the default terminal background, colored per Fade colors (Previous: darker-A / B, Next: A / darker-B, Mixed: darker-A / darker-B). Wide is Normal plus one terminal cell. Flat + Flat with no cap glyphs falls back to 0 / 1 / 2 cells. Gap is stored as width 0 / 1 / 2; legacy widths above 2 read as Wide.
…rough terminal Normal adds one split bridge cell between the darkA/darkB regions (no terminal-background hole); Wide replaces it with darkA/terminal and terminal/darkB cells. Mixed is valid only for Normal and Wide: Gap changes, config normalization, and snapshots resolve Compact/Off + Mixed to Previous, and the Fade colors row cycles Previous/Next there.
New and default configs start with Connector fade Off. An explicitly saved Connector fade value is preserved on load; only a missing or invalid value reads as the default.
Show richer Git state in native prompt
…mand-headers # Conflicts: # src/app/TerminalApp.ts
…-headers Sticky command headers while scrolling the transcript
Add a central syntax style resolver (token type + syntax settings + Native palette -> terminal style), persisted syntax settings (Highlighting On/Off, Colors Follow prompt theme / Choose theme / Grayscale), and a /syntax panel with live preview rows, also reachable from /settings. The default keeps the existing Lavender Native editor colors exactly. Submitted commands keep the style captured at submission, including late semantic resolution; PTY output and /copy are unaffected. Refs #68
…hting Theme-aware syntax highlighting and /syntax
Git status, Toolchains, and Exit status can move to a right-aligned context area in /prompt (P). The left prompt is fitted first; right context drops block by block on narrow terminals and never truncates or overlaps the left prompt or the editor. One-line composers show it at the end of the first input row while the text leaves room. Rich Git state becomes its own gitStatus module; saved configurations gain it immediately after the branch with the branch's visibility, so existing prompts render unchanged. Snapshots record right placement and history headers render it after the divider.
One central path-display policy (src/prompt/pathDisplay.ts) replaces the ad-hoc HOME substitution. The live prompt tries shortening levels in order and uses the first whose full prompt fits: parents above the repository abbreviate to their shortest unambiguous sibling prefix, then directories inside the repository, then runs collapse to an ellipsis, then only the final directory remains. The repository name and final directory stay whole, HOME stays ~, and prompt snapshots keep the full width-independent path. Abbreviations are resolved asynchronously alongside the prompt context; nothing changes the cwd.
…tening Intelligent, width-aware directory shortening
A new onCommand module condition shows a module only while the command in the editor is one it is about. The buffer is tokenized into command words (past assignments and precommands) and matched against fixed trigger lists; nothing typed is executed or inferred. New Kubernetes and Docker context modules default to on command; their values come from a cache that reads kubeconfig and the Docker CLI config asynchronously and never blocks typing. Toolchains can switch to on command, showing only the toolchains the command concerns. Prompt snapshots record what was shown at submission.
/update reads the public latest-release endpoint and reports current and available versions with a short release summary and the exact plan; /update apply installs only the release /update offered. Only the real install method is automated: a clean source checkout whose origin is the official repository. The release tag is fetched, checked against the commit GitHub reports, and applied only as a fast-forward, then npm install, npm run build, and a build-identity check. Failures restore the previous commit with git reset --keep and rebuild it; anything unsupported gets manual steps, never a guess. Settings, transcripts, and shell profiles are never touched. Opt-in background checks (Update checks: Off, Daily, Weekly) show one quiet line per newly seen release, with state kept outside user configuration.
Show-on-command prompt modules (Kubernetes, Docker, toolchains)
Update discovery and safe /update
…wcase Placement is no longer pinned for Project, Path, and Git branch: every module can sit left or right, and an empty left prompt is valid. When the path itself is on the right, it shortens to keep the right area. The powerline renderer now paints a list of cells instead of a string. Normal orientation serializes to exactly the previous bytes; the new mirrored orientation is the horizontal reflection of rendering the blocks in reverse, so module order and colors are kept, Start shapes the anchored right edge, End the free left edge, glyphs reflect, and Previous/Next keep their meaning along the flow. Mirror right side is a persisted option (default On) toggled with M in /prompt -> Modules, and snapshots record it; older snapshots render unmirrored. The Modules, layout, and appearance previews render a deterministic showcase context with every module type through the real renderer, so they follow P, M, geometry, theme, order, and layout without reading the live directory or probing any tool.
Completion folding moves out of the live classifier into a central, deterministic FoldPolicy. The classifier keeps live presentation (INLINE, LIVE, PASSTHROUGH) and now only reports stream facts. The policy never folds a failed command or output of 30 lines or less, and otherwise scores the finished output: repetition, progress rewrites, sustained streaming, install/build/test chatter, and size push toward folding; error-like lines (a near-veto), stack traces, compiler diagnostics, diffs, and varied text push toward visibility. The command name is a small hint only. Low confidence stays expanded. A collapsed block now shows its first 3 and last 5 lines around the hidden-lines row. Stored output is untouched, so Ctrl+O, /copy, the journal, and /resume keep everything; manual toggles stay authoritative. Output folding: Smart (default) or Never in Config.
Right-side prompt context with per-module placement
Smart output folding preserves useful command results
Bump the package version to 0.4.0 and finalize the CHANGELOG as [0.4.0] - 2026-09-26, organized by feature with known limitations. v0.4 entries that had been appended to the released [0.3.0] section move to 0.4.0, restoring 0.3.0 to its shipped text, and shipped work that was missing (sticky headers, Gap Wide and fade colors, the Powerlevel10k configurator handoff, zsh hook preservation, Esc fixes) is now listed. README covers the right-side prompt, show-on-command modules, path shortening, smart output folding, and sticky headers. ROADMAP records v0.4.0 as released, names #79 interaction layout modes as the next direction, and moves unscheduled issues to a separate backlog.
Prepare v0.4.0 release
Update release status in CONTRIBUTING and AGENTS for v0.4.0
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.
Promotes the validated v0.4.0 release candidate from
devto stablemaster.Highlights
/syntax./settingswith a shared panel shell and consistent Esc/back navigation; a continuous session journal and advanced/resume; a persisted glyph compatibility choice; reusable task progress; a Starship module editor and Powerlevel10k configurator handoff; preserved zsh hooks; update discovery and safe/update.Full notes are in the
[0.4.0]section of CHANGELOG.md.Release checklist
0.4.0; the package remains private.[0.4.0] - 2026-09-26, with known limitations (Configured-zsh completion parity and fzf-tab interoperability #52 completion/fzf-tab parity, notifications not included, P10k left prompt only).needs-human-testremaining. The milestone stays open until publication.npm run build,npm run typecheck,npm test(427/427), andgit diff --checkpass on21822ae.v0.4.0tag and publish the GitHub release (pending after approval).No npm publication is part of this release.