Skip to content

chore(release): prepare 0.17.3#576

Merged
benvinegar merged 3 commits into
0.17.xfrom
chore/release-0.17.3
Jul 19, 2026
Merged

chore(release): prepare 0.17.3#576
benvinegar merged 3 commits into
0.17.xfrom
chore/release-0.17.3

Conversation

@benvinegar

Copy link
Copy Markdown
Member

Summary

Verification

  • bun run typecheck
  • bun run lint
  • bun run format:check
  • bun test (1,095 passed, 14 skipped)
  • bun run test:integration (52 passed)
  • bun run test:tty-smoke (9 passed)
  • bun run ./scripts/check-release-version.ts v0.17.3
  • git diff --check

This PR description was generated by Pi using OpenAI GPT-5.3

@greptile-apps

greptile-apps Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This is a maintenance release PR (0.17.3) that backports two targeted bug-fix patches from main into the 0.17.x branch. The CHANGELOG, version, source changes, and tests are all consistent and narrow in scope.

  • Terminal-cell-aware wrapText (agentPopover.ts): replaces UTF-16 length comparisons with measureTextWidth/sliceTextByWidth calls so CJK characters and ZWJ emoji clusters are wrapped at grapheme boundaries rather than code-unit boundaries, preventing silent content truncation.
  • Row-background fill for host panels (staticDiffPager.ts): adds fillRemainingLine which appends a background-color + \x1b[K (EL) escape after each stack-mode diff row, extending the background to the host panel edge (e.g. LazyGit) without assuming a fixed panel width.

Confidence Score: 5/5

Safe to merge — both patches are narrow, well-tested, and touch only their target code paths.

The wrapText rewrite correctly replaces UTF-16 length arithmetic with cell-width helpers throughout; edge cases (width narrower than one grapheme cluster, ZWJ sequences, surrogate pairs) are all explicitly tested and handled gracefully. fillRemainingLine is scoped to stack rows only and degrades to an empty string when no background color is configured. No unrelated features from main are pulled in.

No files require special attention.

Important Files Changed

Filename Overview
src/ui/lib/agentPopover.ts Replaces UTF-16 length arithmetic in wrapText with terminal-cell width helpers; logic is correct including the edge-case escape hatch for widths narrower than one grapheme cluster.
src/ui/staticDiffPager.ts Adds fillRemainingLine (bg + \x1b[K + reset) appended to each stack-line row; correctly scoped to stack rows only; split rows are unaffected since they already pad to a fixed width.
src/ui/lib/ui-lib.test.ts Adds CJK, emoji, ZWJ-cluster, and narrow-width edge-case tests for wrapText; coverage is thorough and matches the documented behaviour changes.
src/ui/staticDiffPager.test.ts Renames stripColorSgr to stripIntentionalAnsi and extends its regex to cover \x1b[K; adds a background-fill end-of-line assertion; security stripping logic is correctly updated.
CHANGELOG.md New 0.17.3 section accurately describes both patch changes with matching commit hashes.
package.json Version bumped from 0.17.2 to 0.17.3; no other changes.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["wrapText(text, width)"] --> B{width <= 0?}
    B -- yes --> C["return ['']"]
    B -- no --> D["sanitize + normalize text\nsplit into words"]
    D --> E{for each word}
    E --> F["measureTextWidth(word)"]
    F --> G{wordWidth > width?}
    G -- yes --> H["sliceTextByWidth loop\n(cell-aware chunks)"]
    H --> I{chunk.width <= 0?}
    I -- yes --> J["push remainder; break"]
    I -- no --> K["push chunk\noffset += chunk.width"]
    K --> H
    G -- no --> L{nextWidth <= width?}
    L -- yes --> M["append to current line"]
    L -- no --> N["pushCurrent; start new line"]
    M --> E
    N --> E
    E -- done --> O["pushCurrent; return lines"]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A["wrapText(text, width)"] --> B{width <= 0?}
    B -- yes --> C["return ['']"]
    B -- no --> D["sanitize + normalize text\nsplit into words"]
    D --> E{for each word}
    E --> F["measureTextWidth(word)"]
    F --> G{wordWidth > width?}
    G -- yes --> H["sliceTextByWidth loop\n(cell-aware chunks)"]
    H --> I{chunk.width <= 0?}
    I -- yes --> J["push remainder; break"]
    I -- no --> K["push chunk\noffset += chunk.width"]
    K --> H
    G -- no --> L{nextWidth <= width?}
    L -- yes --> M["append to current line"]
    L -- no --> N["pushCurrent; start new line"]
    M --> E
    N --> E
    E -- done --> O["pushCurrent; return lines"]
Loading

Reviews (1): Last reviewed commit: "chore(release): prepare 0.17.3" | Re-trigger Greptile

@benvinegar
benvinegar merged commit 94c27ef into 0.17.x Jul 19, 2026
12 of 13 checks passed
@benvinegar
benvinegar deleted the chore/release-0.17.3 branch July 19, 2026 19:53
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.

2 participants