Skip to content

Feat/tui reskin - #73

Merged
justinwilkin merged 19 commits into
feat/tui-upliftfrom
feat/tui-reskin
Mar 2, 2026
Merged

Feat/tui reskin#73
justinwilkin merged 19 commits into
feat/tui-upliftfrom
feat/tui-reskin

Conversation

@justinwilkin

Copy link
Copy Markdown
Member

This pull request introduces a comprehensive visual and functional redesign of the Forge TUI (Terminal UI), updates documentation to reflect new features and completed architecture decisions, and improves version management in the codebase. The main focus is on enhancing usability, clarity, and maintainability for both users and developers.

TUI Visual Redesign & Usability Improvements

  • Implemented a compact header bar in the TUI, showing workspace path and active model, with context-aware hints and improved separator styling (buildHeader() and related style changes in ADR-0051 and code references). [1] [2]
  • Updated input box and viewport layout logic for dynamic resizing, scroll-lock indicator, and agent activity feedback, improving the user experience for multiline drafts and session navigation. [1] [2]
  • Enhanced tips/hints bar to be state-aware, adapting to overlays, agent activity, and bash mode, using unified styling and clearer hints. [1] [2]

Documentation Updates

  • Added new guides and ADRs for TUI features (scroll-lock, clipboard copy, overlays, visual redesign), and marked previously proposed ADRs as implemented, reflecting the current state of the project. [1] [2] [3] [4] [5] [6]
  • Updated ADR references to point to implemented documents and corrected file links for coding tools and TUI executor architecture. [1] [2]

Codebase Maintenance

  • Refactored version management to use a centralized version constant from pkg/version, improving maintainability and consistency. [1] [2]

README Enhancements

  • Reorganized and expanded the Advanced Terminal UI feature list in the README to highlight new capabilities such as smart scroll-lock, compact header, clipboard copy, tool result history, and agent thinking blocks.

Style and Migration Notes

  • Updated style constants and migration instructions to ensure consistent use of colors and styles across the TUI, and clarified the retention of ASCII art functionality for CLI contexts.

Overall, these changes deliver a more polished, user-friendly TUI, better documentation, and improved code structure for future development.

entr-agent and others added 17 commits February 27, 2026 19:15
Co-authored-by: Justin Wilkin <justin@entr.net.au>
Co-authored-by: Justin Wilkin <justin@entr.net.au>
…al style

Co-authored-by: Justin Wilkin <justin@entr.net.au>
…lette refactor

Co-authored-by: Justin Wilkin <justin@entr.net.au>
…ition

Co-authored-by: Justin Wilkin <justin@entr.net.au>
Co-authored-by: Justin Wilkin <justin@entr.net.au>
Co-authored-by: Justin Wilkin <justin@entr.net.au>
Co-authored-by: Justin Wilkin <justin@entr.net.au>
Co-authored-by: Justin Wilkin <justin@entr.net.au>
Co-authored-by: Justin Wilkin <justin@entr.net.au>
… overlay

Co-authored-by: Justin Wilkin <justin@entr.net.au>
Co-authored-by: Justin Wilkin <justin@entr.net.au>
…nterface

Co-authored-by: Justin Wilkin <justin@entr.net.au>
Co-authored-by: Justin Wilkin <justin@entr.net.au>
Co-authored-by: Justin Wilkin <justin@entr.net.au>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 delivers a major reskin/refactor of the Forge Terminal UI, aligning the live UI and overlays with ADR-0051’s “flat + compact” design, improving tool-result UX (history, copy, scroll-lock), and tightening cross-component consistency (tool call IDs, central version constant) while updating the docs/ADRs to reflect the implemented architecture.

Changes:

  • Redesigned core TUI chrome (compact header, state-aware tips, Option B input zone, revised bottom/status bar) and refactored update logic into focused modules.
  • Reskinned overlays/toasts with responsive sizing helpers and updated palette/notes/help/context/settings overlay behavior.
  • Introduced stable ToolCallID plumbing end-to-end and centralized the app version in pkg/version, plus broad documentation/ADR updates.

Reviewed changes

Copilot reviewed 59 out of 59 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
review.md Adds an implementation gap review doc for TUI v2/reskin work.
pkg/version/version.go Centralizes Forge version in a shared package.
pkg/types/event.go Adds ToolCallID to events and updates tool event constructors.
pkg/types/event_test.go Updates tests for new tool event constructor signatures.
pkg/tools/coding/search_files.go Tweaks search output markers to match new UI style.
pkg/tools/coding/list_files.go Tweaks list output markers to match new UI style.
pkg/executor/tui/viewport_height_test.go Adds viewport height regression tests for spacer/loading/scroll indicators.
pkg/executor/tui/view.go Implements compact header, state-aware tips, new input zone, updated bottom bar, overlay rendering tweaks.
pkg/executor/tui/update_overlay_fix_test.go Updates overlay closing test setup.
pkg/executor/tui/update_messages.go New file: isolates message/event handlers from main update loop.
pkg/executor/tui/update_keys.go New file: isolates key handling (scroll-lock, clipboard copy, palette toggles, etc.).
pkg/executor/tui/update_input.go New file: isolates Enter dispatch (bash/slash/agent message).
pkg/executor/tui/types/styles.go Updates overlay design language + adds overlay sizing helpers.
pkg/executor/tui/styles.go Adds new color/style tokens for separators/prompts and warning styling.
pkg/executor/tui/slash_commands.go Improves help UX (overlay), adds /thinking, adjusts toast icons, syncs settings -> runtime.
pkg/executor/tui/scroll_lock_test.go Updates scroll-lock tests for new message storage + offset checks.
pkg/executor/tui/result_display.go Sanitizes previews, improves execute_command summaries, aligns parsing with new markers.
pkg/executor/tui/overlay/tool_result.go Normalizes close-key handling via shared constants.
pkg/executor/tui/overlay/settings_test.go Updates overlay dimension expectations for responsive sizing.
pkg/executor/tui/overlay/settings.go Redesigns settings overlay layout, adds paging/scrolling and UI callback.
pkg/executor/tui/overlay/palette.go Makes command palette responsive + scrollable and updates rendering API.
pkg/executor/tui/overlay/notes.go Reskins notes overlay with responsive sizing and new header.
pkg/executor/tui/overlay/help.go Makes help overlay responsive and reskinned.
pkg/executor/tui/overlay/diff.go Reskins diff viewer to flat design + responsive sizing.
pkg/executor/tui/overlay/context.go Makes context overlay responsive + reskinned.
pkg/executor/tui/overlay/approval.go Reskins generic approval overlay + responsive sizing and separators.
pkg/executor/tui/overlay.go Adjusts toast overlay placement/alignment for new layout.
pkg/executor/tui/model.go Switches conversation storage to []DisplayMessage, adds thinking visibility state.
pkg/executor/tui/messages.go New file: message rendering/retention logic for resize-reflow.
pkg/executor/tui/messages_test.go New tests for message retention, reflow, and streaming preview behavior.
pkg/executor/tui/init.go Defers viewport sizing to WindowSizeMsg; loads show_thinking from config.
pkg/executor/tui/helpers.go Improves unicode-safe wrapping, expands ANSI stripping, adds sanitization/truncation helpers.
pkg/executor/tui/executor.go Removes debug logging noise; aligns toast icons with new style.
pkg/executor/tui/events.go Reworks streaming/rendering to use reflowable message slice; adds scroll-lock correctness; uses ToolCallID.
pkg/executor/tui/bash_commands.go Aligns prompts/toast icons with new UI and external prompt glyph rendering.
pkg/executor/tui/approval/pr.go Updates approval toast icons (PR).
pkg/executor/tui/approval/pr_test.go Updates approval toast icon expectations (PR).
pkg/executor/tui/approval/commit.go Updates approval toast icons (commit).
pkg/executor/tui/approval/commit_test.go Updates approval toast icon expectations (commit).
pkg/config/ui.go Adds persisted show_thinking UI setting.
pkg/agent/tools/tool.go Adds generated ToolCall ID field to tool call struct.
pkg/agent/tools/parser.go Generates stable UUID for each parsed tool call.
pkg/agent/tool_execution.go Emits tool events with ToolCallID for cache/overlay correlation.
gaps.md Tracks reskin gaps vs ADR/PRD and marks implemented items.
docs/product/scratch/tui-output-formatting.md Adds output sanitization + command output policy notes.
docs/product/scratch/slash-menu-discoverability.md Documents the scrollable palette redesign approach.
docs/product/scratch/overlay-toast-redesign.md Documents overlay/toast design system + responsive sizing model.
docs/how-to/use-tui-interface.md Updates end-user documentation for the new TUI layout and features.
docs/adr/README.md Marks several TUI ADRs as Implemented.
docs/adr/0052-tui-viewport-spacer-height-fix.md Adds ADR documenting spacer-height viewport fix.
docs/adr/0051-tui-visual-redesign.md Marks ADR-0051 as Implemented and aligns examples with code.
docs/adr/0033-notes-viewer-tui-command.md Marks ADR-0033 as Implemented.
docs/adr/0025-tui-package-reorganization.md Marks ADR-0025 as Implemented.
docs/adr/0012-enhanced-tui-executor.md Marks ADR-0012 as Implemented.
docs/adr/0011-coding-tools-architecture.md Fixes ADR cross-link to ADR-0012.
docs/adr/0010-tool-approval-mechanism.md Fixes ADR cross-links to ADR-0011/0012.
cmd/forge/main.go Switches CLI version source to pkg/version.
README.md Updates TUI feature list and documentation links to match new UI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/executor/tui/helpers.go
Comment thread pkg/executor/tui/helpers.go
Comment thread pkg/executor/tui/overlay/notes.go
Comment thread pkg/executor/tui/view.go
Comment thread pkg/executor/tui/overlay/help.go
Comment thread pkg/executor/tui/overlay/context.go
Comment thread pkg/executor/tui/overlay/approval.go
Comment thread pkg/executor/tui/overlay/settings.go
Comment thread pkg/executor/tui/events.go
@entrhq entrhq deleted a comment from genkino Mar 2, 2026
@justinwilkin
justinwilkin merged commit 366fcf9 into feat/tui-uplift Mar 2, 2026
@justinwilkin
justinwilkin deleted the feat/tui-reskin branch March 2, 2026 06:42
justinwilkin added a commit that referenced this pull request Mar 2, 2026
* refactor(tui): replace emoji icons with ASCII alternatives

Co-authored-by: Justin Wilkin <justin@entr.net.au>

* fix(tui): correct viewport height reservation for scroll-lock indicator

Co-authored-by: Justin Wilkin <justin@entr.net.au>

* refactor(tui): redesign overlays with responsive sizing and flat visual style

Co-authored-by: Justin Wilkin <justin@entr.net.au>

* docs(tui): add slash menu discoverability redesign scratch doc and palette refactor

Co-authored-by: Justin Wilkin <justin@entr.net.au>

* feat(tui): add command palette scrolling and adjust toast overlay position

Co-authored-by: Justin Wilkin <justin@entr.net.au>

* feat(tui): execute selected command immediately on enter

Co-authored-by: Justin Wilkin <justin@entr.net.au>

* feat(tui): dynamically adjust textarea height based on terminal size

* feat(tools): add unique ID to tool calls and related events

Co-authored-by: Justin Wilkin <justin@entr.net.au>

* feat(tui): simplify context summarization by removing progress tracking

* feat(tui): improve output formatting, sanitization, and error display

Co-authored-by: Justin Wilkin <justin@entr.net.au>

* feat(tui): add collapsible thinking blocks with elapsed time indicator

Co-authored-by: Justin Wilkin <justin@entr.net.au>

* fix(tui): remove extra newlines in summarization status rendering

Co-authored-by: Justin Wilkin <justin@entr.net.au>

* feat(tui): add show thinking toggle setting to UI config and settings overlay

Co-authored-by: Justin Wilkin <justin@entr.net.au>

* style(tui): normalize whitespace and simplify overlay code

Co-authored-by: Justin Wilkin <justin@entr.net.au>

* docs(readme): update TUI feature list and add guides for redesigned interface

Co-authored-by: Justin Wilkin <justin@entr.net.au>

* feat(tui): redesign header bar and centralize version constant

Co-authored-by: Justin Wilkin <justin@entr.net.au>

* fix(tui): account for visual spacer line in viewport height calculation

Co-authored-by: Justin Wilkin <justin@entr.net.au>

* refactor(tui): simplify message rendering and improve scroll logic

Co-authored-by: Justin Wilkin <justin@entr.net.au>

* feat(tui): update user icon style color from salmon pink to coral pink

---------

Co-authored-by: anvxl <anvxl@entr.net.au>
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.

3 participants