Feature 151/task view multilines #154

Open
noe.trevino wants to merge 3 commits from feature-151/task-view-multilines into main
Owner

Checklist

  • Read CONTRIBUTING.md
  • Ran tests (go test ./... -race) locally
  • Formatted and linted with gofmt -w . and golangci-lint run ./... respectively
  • Added tests if necessary (significant changes/complex logic)
  • Updated documentation if applicable
  • Updated README.md if applicable

Summary

## Checklist - [x] Read `CONTRIBUTING.md` - [x] Ran tests (`go test ./... -race`) locally - [x] Formatted and linted with `gofmt -w .` and `golangci-lint run ./...` respectively - [x] Added tests if necessary (significant changes/complex logic) - [x] Updated documentation if applicable - [x] Updated `README.md` if applicable ## Summary <!-- What does this PR change and/or fix? Examples: Closes: 54 Fixes: 67 -->
claude[bot] (Migrated from github.com) reviewed 2026-06-23 13:21:24 -05:00
claude[bot] (Migrated from github.com) commented 2026-06-23 13:21:24 -05:00

len(m) returns the byte length of the match, not the terminal column width. For the • marker (U+2022), len("• ") is 4 (3 UTF-8 bytes + 1 space) but its visual width is 2 columns. This means:

  1. hang becomes 4 spaces instead of 2 — continuation lines are indented 2 columns past where the bullet text actually starts.
  2. limit - len(hang) narrows the wrap budget by 4 columns instead of 2 — lines wrap unnecessarily early.

• is explicitly documented as a supported marker in SKILL.md (line ~184), so this is a guaranteed rendering defect for any wrapped bullet item using that character.

Fix: use uniseg.StringWidth (or xansi's own width helper if one is exposed) to measure m in terminal columns instead of bytes.

`len(m)` returns the **byte** length of the match, not the terminal column width. For the `•` marker (U+2022), `len("• ")` is 4 (3 UTF-8 bytes + 1 space) but its visual width is 2 columns. This means: 1. `hang` becomes 4 spaces instead of 2 — continuation lines are indented 2 columns past where the bullet text actually starts. 2. `limit - len(hang)` narrows the wrap budget by 4 columns instead of 2 — lines wrap unnecessarily early. `•` is explicitly documented as a supported marker in SKILL.md (line ~184), so this is a guaranteed rendering defect for any wrapped bullet item using that character. Fix: use [`uniseg.StringWidth`](https://pkg.go.dev/github.com/rivo/uniseg#StringWidth) (or `xansi`'s own width helper if one is exposed) to measure `m` in terminal columns instead of bytes.
claude[bot] (Migrated from github.com) reviewed 2026-06-23 13:21:26 -05:00
@ -11,0 +13,4 @@
// be hang-indented under the marker's text. Covers "- ", "* ", "• ", checkbox
// "[ ] "/"[x] ", and numbered "1. "/"1) " markers, with optional leading
// whitespace.
var listMarkerRe = regexp.MustCompile(`^(\s*(?:[-*•]|\[.?\]|\d+[.)])\s+)`)
claude[bot] (Migrated from github.com) commented 2026-06-23 13:21:27 -05:00

The outer group is a capturing group (…) but the only call site uses FindString, which returns the full match and ignores sub-captures. The group should be non-capturing to avoid an unnecessary tracking allocation.

var listMarkerRe = regexp.MustCompile(`^(?:\s*(?:[-*•]|\[.?\]|\d+[.)])\s+)`)
The outer group is a capturing group `(…)` but the only call site uses `FindString`, which returns the full match and ignores sub-captures. The group should be non-capturing to avoid an unnecessary tracking allocation. ```suggestion var listMarkerRe = regexp.MustCompile(`^(?:\s*(?:[-*•]|\[.?\]|\d+[.)])\s+)`) ```
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feature-151/task-view-multilines:feature-151/task-view-multilines
git switch feature-151/task-view-multilines

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff feature-151/task-view-multilines
git switch feature-151/task-view-multilines
git rebase main
git switch main
git merge --ff-only feature-151/task-view-multilines
git switch feature-151/task-view-multilines
git rebase main
git switch main
git merge --no-ff feature-151/task-view-multilines
git switch main
git merge --squash feature-151/task-view-multilines
git switch main
git merge --ff-only feature-151/task-view-multilines
git switch main
git merge feature-151/task-view-multilines
git push origin main
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
noe.trevino/paso!154
No description provided.