aaif-goose / aaif-goose/goose

skills list can split a grapheme when truncating a table row

Offen
#12,039 0 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @michaelneale Auf GitHub ansehen
Vorherrschende Sprache
Rust
Sterne
54.2k
Forks
6.2k
Ø Merge
3 T. 2 Std.
Gemergte PRs (30 T.)
262

Beschreibung

**Describe the bug**

💡 Before filing, please check common issues:
https://goose-docs.ai/docs/troubleshooting

📦 To help us debug faster, attach your **diagnostics zip** if possible.
👉 How to capture it: https://goose-docs.ai/docs/troubleshooting/diagnostics-and-reporting/

The skills list table measures its columns by display width, but
`truncate_to_display_width` walks individual Unicode scalar values. A row can
therefore end in the middle of an extended grapheme. In particular, a rainbow
flag is printed as `🏳...`, leaving the white-flag code point without its
variation selector, ZWJ, or rainbow component.

**To Reproduce**

From this report directory, run:

```sh
bash attachments/repro.sh
```

The attached fixture contains only two local skills and needs no provider or
network access. The Unicode fixture description is:

```text
👩‍💻 á rainbow 🏳️‍🌈 世界
```

Run the real Goose skills list binary in an 80-column terminal. The rendered
row includes:

```text
unicode-surface | 👩‍💻 á rainbow 🏳... | 16 | 13 | ...
```

The source-level and PTY output are recorded in
[attachments/evidence.log](attachments/evidence.log). The fixture and runtime
details are listed in
[attachments/environment.txt](attachments/environment.txt).

**Expected behavior**

Truncation should stop before a cluster that cannot fit, or include the whole
cluster. It should never emit a partial ZWJ sequence, combining sequence, or
flag. The ASCII fixture should continue to render unchanged.

**Screenshots**

No screenshots were captured. The attached PTY output records the rendered row
as text.

**Please provide the following information**

- **OS & Arch:** See [attachments/environment.txt](attachments/environment.txt).
- **Interface:** CLI.
- **Version:** 1.50.0.
- **Extensions enabled:** None; the fixture uses local skill files only.
- **Provider & Model:** None; no network or model request is made.

**Additional context**

The audited source revision is
`50666ae0b9a51e260b52b7efbab2e4e020346e94`, the public Goose `main`
revision checked on 2026-09-12.

The command first obtains the terminal width and builds rows from installed
skills:

[skills.rs](https://github.com/aaif-goose/goose/blob/50666ae0b9a51e260b52b7efbab2e4e020346e94/crates/goose-cli/src/commands/skills.rs#L32-L57)

Column sizing and row formatting use console display-width measurements:

[skills.rs](https://github.com/aaif-goose/goose/blob/50666ae0b9a51e260b52b7efbab2e4e020346e94/crates/goose-cli/src/commands/skills.rs#L65-L120)

When the row is finally constrained to the terminal width, the helper checks
the total display width but then appends one scalar at a time:

[skills.rs](https://github.com/aaif-goose/goose/blob/50666ae0b9a51e260b52b7efbab2e4e020346e94/crates/goose-cli/src/commands/skills.rs#L138-L179)
[skills.rs](https://github.com/aaif-goose/goose/blob/50666ae0b9a51e260b52b7efbab2e4e020346e94/crates/goose-cli/src/commands/skills.rs#L201-L223)

For a rainbow flag, the loop can accept the base white flag and then stop
before the later zero-width variation selector and ZWJ components can make up
the complete cluster. The mismatch is in the truncator, not in the table
column calculation.

I searched the existing Goose issues and did not find a report for this
skills-list grapheme split. This is separate from the shell preview byte-bound
work in [PR #10992](https://github.com/aaif-goose/goose/pull/10992) and the
sidebar-title issue in [#10648](https://github.com/aaif-goose/goose/issues/10648).

The report artifacts are:

- [repro.sh](attachments/repro.sh)
- [evidence.log](attachments/evidence.log)
- [environment.txt](attachments/environment.txt)
- [attachments.zip](attachments.zip)

Do not begin implementation until the issue reaches **Ready** on the
[Goose Issues board](https://github.com/orgs/aaif-goose/projects/1).

[attachments.zip](https://github.com/user-attachments/files/32144083/attachments.zip)

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.