Skip to content

release: v7.0.1 - #70

Merged
code-crusher merged 7 commits into
mainfrom
release/v7.0.1
Oct 10, 2026
Merged

code-crusher merged 7 commits into
mainfrom
release/v7.0.1

Conversation

@code-crusher

Copy link
Copy Markdown
Member

What's new

Release 7.0.1 — seven focused commits covering the 7.0.1 changes.

Changes

  • feat(ui): render markdown tables as bordered grids — the markdown renderer now detects table blocks and lays them out as box-drawing grids with per-column alignment, cell word-wrapping, and column fitting; the user block is left-aligned with the assistant marker; exports markdownRowCount for viewport height estimation.
  • feat(ui): add translucent backdrop and spacing to popover overlays — new backdrop scrim color in both themes painted behind centered popups, plus a blank line between popover content and its dim footer hint.
  • feat(sessions): expose git branch and size for resume picker entries — sessions record their git branch and file size; the resume picker shows a second, dim detail line per entry.
  • fix(ui): interrupt only on Esc when the composer is empty — Esc that clears draft text no longer aborts the running turn; only an empty-prompt Esc reaches the agent.
  • fix(tools): return actionable errors for invalid file targets — file_write / multi_file_edit explain missing-path and directory-target errors instead of surfacing raw EISDIR.
  • feat(tools): add prompt parameter to web_fetch for section extraction — required prompt lets the backend return the most relevant sections of a long page within the token budget.
  • chore(release): bump version to 7.0.1 and add string-width dependency — grapheme-aware width measurement dependency, new markdown-table test registered in test:ui.

Verification

  • npm run typecheck — clean
  • npm run test:ui / test:compaction — markdown-table, session-picker, ui-viewport, and files tests included

Detect table blocks (runs of pipe rows whose second line is a delimiter
row) in the markdown renderer and lay them out as box-drawing grids with
per-column alignment parsed from the delimiter row, cell word-wrapping,
and column fitting when the grid would overflow the available width.
Left-align the user block with the assistant marker and pass the
available width to the renderer. Export markdownRowCount so the viewport
estimator can predict the rendered height of markdown rows. Adds
test/markdown-table.test.tsx covering natural, wide, and overflow cases.
Add a backdrop scrim color to both themes (#000000B3 dark, #66
light) and paint it behind centered popups so the conversation dims while
a picker is open. Give every popover a blank line between its content and
its dim footer hint so the hint no longer crowds the list.
Record the active git branch on each saved session and compute the
session file size when listing. The resume picker now shows a second,
dim line per entry with the idle time, branch, and file size instead of
the message count, and drops to six visible rows to fit the taller
entries.
Esc previously aborted the running turn even when the composer held
draft text. Clearing the draft (including paste chips) now consumes the
Esc; only an Esc on an empty prompt reaches the agent as an interrupt,
and a double Esc still opens the rewind picker.
file_write and multi_file_edit failed with a raw EISDIR when file_path
was empty or named a directory. Return an isError result that names the
problem instead: a missing path explains that the call arguments were
likely truncated past the output limit, and a directory target says
file_path must name a file.
Long fetched pages are cut to a token budget. A required prompt
describing what the caller is looking for lets the backend return the
most relevant sections instead of the top of the page; without it the
fetch returns the beginning of the page.
Depend on string-width for grapheme-aware width measurement in the
markdown table renderer, register the new markdown-table test in the
test:ui script, and bump the package version to 7.0.1.
@matterai-app

matterai-app Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Code Quality

Summary By MatterAI MatterAI logo ### 🔄 What Changed Version bump to 7.0.1, robust markdown table rendering in the TUI, git branch and file size tracking in session persistence, enhanced file path validation (targetPathError), web fetch prompt parameter support, and consistent keyboard shortcut helper hints across all TUI modals and pickers. ### 🔍 Impact of the Change Significantly improves TUI rendering capabilities for markdown tables and lists, prevents common file system errors (EISDIR, missing paths) by providing actionable model feedback, enhances session state introspection with git branch and size metadata, and polishes the user experience with clear shortcut guides. ### 📁 Total Files Changed
Click to Expand

File ChangeLog
Version Bump package.json Updated version to 7.0.1, added UI test script and new dependencies (read-excel-file, string-width).
Agent State src/core/agent.ts Added gitBranch observation to agent context.
Session Persistence src/core/sessions.ts Added gitBranch and sizeBytes fields to session data and updated listing logic.
File Executor src/tools/executors/files.ts Added targetPathError helper to validate file write/edit targets and prevent EISDIR/missing path failures.
Web Tool src/tools/executors/web.ts & src/tools/schemas/web_fetch.ts Updated web_fetch schema and executor to accept optional filtering prompts.
TUI App src/ui/App.tsx & src/ui/theme.tsx Added markdown row counting, backdrop theme tokens, and Esc key handling for aborting turns.
UI Components src/ui/components/*.tsx Added keyboard shortcut hint footers across all modal pickers, prompts, and dialogs.
Markdown Renderer src/ui/markdown.tsx Implemented full markdown table parsing, column fitting, border generation, and cell wrapping.
Test Suite test/*.test.tsx? Added comprehensive unit tests for markdown tables, file path error handling, viewport Esc behavior, and session pickers.
### 🧪 Test Added/Recommended #### Added - `test/markdown-table.test.tsx`: Comprehensive tests for markdown table grid rendering, column fitting, alignment markers, and wrapping. - `test/files.test.ts`: Added tests verifying correct handling of missing `file_path` and directory targets (`EISDIR`) during file write/edit operations. - `test/ui-viewport.test.tsx`: Added tests verifying Esc clears typed text before interrupting active turns. - `test/session-picker.test.tsx`: Updated tests verifying relative time, git branch, and file size formatting in session lists. #### Recommended - Add fuzz testing for malformed markdown tables streamed incrementally. ### 🔒Security Vulnerabilities No security vulnerabilities detected. All file operations remain contained within workspace path resolution constraints.

⏳ Estimated code review effort

HIGH (~30 minutes)

Tip

Quality Recommendations

  1. Add input sanitization for prompt arguments in web fetch executor

  2. Ensure session file size calculation handles potential permission errors gracefully

♫ Tanka Poem

Terminal views gleam bright,
Tables grid with bordered grace,
Branches tracked in code,
Errors caught before they strike,
Version seven stands complete.

Sequence Diagram

sequenceDiagram
    participant User
    participant TUI as TUI / App
    participant Agent
    participant Files as File Tool
    
    User->>TUI: Enter command / query
    TUI->>Agent: runTurn()
    Agent->>Files: fileWrite / fileEdit
    Files->>Files: targetPathError(rawPath, filePath)
    
    alt Missing Path or Directory Target
        Files-->>Agent: Return ToolResult with isError: true & rich message
        Agent-->>TUI: Display recovery guidance to model
    else Valid File Target
        Files-->>Agent: Success
        Agent-->>TUI: Stream response & render Markdown table
    end
Loading

@matterai-app matterai-app Bot 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.

🧪 PR Review is completed: Solid release PR: the new markdown table renderer (delimiter/alignment parsing, column fitting, cell wrapping) checks out against its tests, the session-picker metadata and Esc-to-interrupt flows are correct, and targetPathError gives the model recoverable errors. Two findings: the new popover backdrop is likely missing the shouldFill prop required for OpenTUI background painting, and markdownRowCount measures lines in code units instead of display width. Reviewed src/tools/executors/files.ts: no issues found. Reviewed src/ui/components/InputBox.tsx: no issues found. Reviewed src/ui/components/McpMigrationPicker.tsx: no issues found. Reviewed src/ui/components/McpPicker.tsx: no issues found. Reviewed src/ui/components/RewindPicker.tsx: no issues found. Reviewed src/ui/components/SessionPicker.tsx: no issues found. Reviewed src/ui/components/rows.tsx: no issues found. Reviewed test/files.test.ts: no issues found. Reviewed test/markdown-table.test.tsx: no issues found. Reviewed test/session-picker.test.tsx: no issues found. Reviewed test/ui-viewport.test.tsx: no issues found.

Skipped files
  • package-lock.json: Skipped file pattern
⬇️ Low Priority Suggestions (2)
src/ui/App.tsx (1 suggestion)

Location: src/ui/App.tsx (Lines 2803-2803)

🟠 UI Rendering

Issue: The fullscreen popover overlay sets backgroundColor={theme.backdrop} but omits shouldFill. Everywhere else in this codebase that paints a background pairs it with shouldFill — PopoverBox (whose doc comment says its background is "painted for every cell it owns" because of that prop) and the inner popover panel a few lines below (backgroundColor={theme.panel} shouldFill). Without shouldFill, the translucent scrim behind centered popovers most likely never renders, silently defeating the new theme.backdrop feature added in this PR.

Fix: Add shouldFill to the overlay Box, matching the existing pattern used by PopoverBox and the popover panel.

Impact: The backdrop scrim actually displays behind popovers in both dark and light themes.

-            backgroundColor={theme.backdrop}
+            backgroundColor={theme.backdrop}
+            shouldFill
src/ui/markdown.tsx (1 suggestion)

Location: src/ui/markdown.tsx (Lines 335-335)

🔵 Estimate Accuracy

Issue: markdownRowCount estimates wrapped rows using block.lines[0].length (UTF-16 code units), while the rendering path added in this PR is display-width aware — stringWidth drives every table width/padding calculation and the terminal wraps on display columns. For CJK content one code unit renders as two columns, so the code-unit count underestimates the wrapped height and the viewport's row-height estimate can be shorter than what actually renders (risking clipped/jumping virtualized rows). For emoji-heavy text it overestimates.

Fix: Measure the line with stringWidth (already imported at the top of this file) so the estimate matches the display-width-aware renderer.

Impact: Row-height estimates stay accurate for wide (CJK/emoji) assistant output, keeping the virtualized transcript scroll in sync with what is rendered.

-  		const length = block.lines[0].length + (index === 0 ? prefix : 0)
+  		const length = stringWidth(block.lines[0]) + (index === 0 ? prefix : 0)

@code-crusher
code-crusher merged commit 74ea61e into main Oct 10, 2026
1 check passed
@code-crusher
code-crusher deleted the release/v7.0.1 branch October 10, 2026 17:42
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