Skip to content

fix(minimap): count soft-wrapped terminal rows - #7

Merged
JSUYA merged 1 commit into
mainfrom
agent/minimap-soft-wrap-rows
Aug 18, 2026
Merged

fix(minimap): count soft-wrapped terminal rows#7
JSUYA merged 1 commit into
mainfrom
agent/minimap-soft-wrap-rows

Conversation

@JSUYA

@JSUYA JSUYA commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • count VTE soft-wrapped output as terminal screen rows in the minimap
  • keep both styled HTML and plain-text fallback previews aligned to terminal columns
  • add GTK regression coverage for a logical line spanning four terminal rows

Root cause

VTE omits newline characters between soft-wrapped screen rows. The minimap parser treated those rows as one logical line, so long or high-volume grep output collapsed in the preview while the terminal scroll adjustment continued to count every screen row.

Impact

Long wrapped output now occupies the same number of rows in the minimap and terminal, keeping the viewport indicator and click navigation aligned.

Validation

  • cargo build -p flowmux
  • xvfb-run -a dbus-run-session -- cargo test -p flowmux -- --nocapture — 620 passed
  • live verification in a separate flowmux instance with grep -r flowmux ., including wrapped output and minimap midpoint navigation

@JSUYA
JSUYA marked this pull request as ready for review August 18, 2026 06:54
@JSUYA
JSUYA merged commit 8d582f0 into main Aug 18, 2026
2 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a16ed91b18

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +203 to +205
if column.saturating_add(width) > columns {
rows.push(Vec::new());
column = 0;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Measure grapheme clusters before inserting wraps

When output contains multi-code-point emoji such as repeated ZWJ or skin-tone sequences, VTE renders each grapheme as one terminal cluster, but this parser advances column once per Unicode scalar via terminal_cell_width. A two-emoji ZWJ cluster is therefore counted as four cells even though it occupies two, so this new condition inserts rows before VTE actually wraps and the minimap viewport/click mapping drifts. Calculate widths using the same grapheme semantics as VTE, and apply that calculation to the plain-text fallback as well.

Useful? React with 👍 / 👎.

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