Skip to content

fix(tui): keep a to-do row's status word when its title is long - #7033

Merged
Hmbown merged 2 commits into
codewhale-hq:mainfrom
Lstarsky0:ux/worksurface-todo-status-room
Oct 21, 2026
Merged

Hmbown merged 2 commits into
codewhale-hq:mainfrom
Lstarsky0:ux/worksurface-todo-status-room

Conversation

@Lstarsky0

@Lstarsky0 Lstarsky0 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What and why

The work surface gives a row's label the whole width and the detail only what is left, and drops the detail under four columns. A to-do whose title fills the strip loses its status word. With a three-step to-do list at 80×24, before:

 To-do · 1/3 · 2 left
 1 · ✓ Read the README to learn the layout                            completed
 2 · ▸ Search the workspace for every README and compare their install secti...
 3 · ○ Write up the differences                                         pending

After:

 To-do · 1/3 · 2 left
 1 · ✓ Read the README to learn the layout                            completed
 2 · ▸ Search the workspace for every README and compare their ...  in progress
 3 · ○ Write up the differences                                         pending

The step that lost its word is the in-progress one, the row most worth reading. todo_rows_carry_their_status_words already pins that the words are projected and painted; this keeps them painted when the title is long. Plan-step (to-do) rows, picked by the same plan_step_row_ids set the strip's filter uses, now reserve the detail's width, capped at half the row, before the title is truncated. A title that fits renders as before, and the hover still carries the full title.

Other rows keep giving the label the room. I tried the reservation on every row first, and at 60 columns the Context budget row cut its numbers (6.5k of 128.0k · 5% · com...) to show more of the /context for the full source map hint, so it stays on to-do rows only. The first version keyed on the graph: id prefix; on a side rail that also matched the operation and blocker nodes listed under the to-dos, so the second commit checks the plan-step ids instead and those rows keep the label-first layout. Background task rows (status · id) aren't changed either.

Issue

No-Issue: a long to-do title drops its status word in the work surface; I searched and found no issue for it

How I tested it

  • Ran a debug build in a pseudo-terminal with an empty HOME against a local OpenAI-compatible mock that answers with read, file_search and a three-item todo_write, with this change and with a build from before it. The screens above are 80×24. At 60×16 the in-progress row goes from Search the workspace for every README and compare... to Search the workspace for every READM... in progress; at 48×16 row 1 goes from ... in place of its word to completed, and row 2 gains in progress. At 120×30, where the titles fit, the strip is unchanged.
  • Walked the Cost, Git, Context and Files tabs at 80×24 and 60×16 with both builds: identical.
  • With work_surface_placement = "left" and a 60-column rail, main drops in progress from the long row and this shows it; the Read 1 files · Searched 1 patterns row under the to-dos is unchanged. The strip rows are the same with and without the second commit. I couldn't get the mock to produce an operation or blocker node, so for those rows I'm relying on the id check: they take the same path as on main.
  • cargo fmt --all -- --check, cargo clippy -p codewhale-tui --all-targets --all-features with CI's flags, and cargo check -p codewhale-tui --all-targets: clean. Clippy also on 1.99, plus cargo +1.89.0 check -p codewhale-tui.
  • cargo nextest run -p codewhale-tui --lib: 15347 passed, none failed, including the work surface tests and the shared-body-vs-frozen-body comparison.

Checklist

  • One focused change, on cc4b96d; it merges cleanly into current main
  • cargo fmt --all passes, and tests cover new or changed behavior
  • If this adds or changes a user-facing feature, I updated its docs and its row in docs/features.toml (cargo test -p codewhale-tui --test feature_registry checks it) — n/a

The work surface gives a row's label the whole width and the detail only
what is left, dropping it under four columns. A to-do whose title fills
the strip lost its status word, so at 80 columns the in-progress step,
the one most worth reading, showed as a bare truncated title.

To-do rows (the `graph:` ids the strip already numbers) now reserve the
detail's width, at most half the row, before the title is truncated.
Titles that fit render as before and the full title stays in the hover.
Other rows still give the label the room, so the Context budget row
keeps its numbers ahead of the /context hint.

Signed-off-by: Lstarsky0 <59827030+Lstarsky0@users.noreply.github.com>
@Lstarsky0
Lstarsky0 requested a review from Hmbown as a code owner October 20, 2026 19:04

@claude claude 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.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@github-actions github-actions Bot added the contribution-gate Author not yet in .github/APPROVED_CONTRIBUTORS; a maintainer grants access with /lgtm label Oct 20, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T19:09:16.693170Z 90a4a17 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 90a4a174a8

ℹ️ 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".

let prefix_width = UnicodeWidthStr::width(prefix.as_str());
let row_width = usize::from(content_area.width);
let label_budget = row_width.saturating_sub(prefix_width).max(1);
let detail_room = if row.id.0.starts_with("graph:") {

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 Restrict the reservation to actual to-do rows

When the Tasks view is rendered as a Left/Right rail with at least 44 content columns, project_visible deliberately retains Operation and Blocker nodes alongside plan steps (crates/tui/src/tui/work_surface/model.rs:694-711), while graph_node_row assigns all of them a graph: ID (model.rs:2695-2740). This condition consequently takes up to half the row away from long non-to-do titles to show state · kind, so wide side rails change even though the patch is meant to preserve the label-first layout for other rows; test the node kind (or confine the reservation to the strip) instead of treating every graph row as a to-do.

Useful? React with 👍 / 👎.

On a side rail the tasks view also lists the graph's operation and
blocker nodes, which share the `graph:` id prefix with to-dos, so the
reservation took up to half a wide rail from their titles to show their
`state · kind` detail. Check the plan-step ids the strip's filter
already uses instead of the prefix, so those rows keep the label-first
layout and to-dos keep their status words in every placement.

Signed-off-by: Lstarsky0 <59827030+Lstarsky0@users.noreply.github.com>
@Hmbown
Hmbown merged commit 8cc87c2 into codewhale-hq:main Oct 21, 2026
28 checks passed
@Hmbown

Hmbown commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

🤖 This reply is from Claude Opus 5.5, an AI agent working on behalf of the Codewhale maintainers. It is posted through @Hmbown's account, but Hunter did not write it.

Thanks @Lstarsky0. The row that lost its status word was the in-progress to-do, the one most worth reading, and reserving the detail's width before truncating the title brings "in progress" back. Switching from the graph: prefix to plan_step_row_ids after the side-rail review keeps operation and blocker rows label-first, and walking the Cost, Git, Context and Files tabs confirmed nothing else moved. Merged in 8cc87c2 for 0.10.2, which hasn't shipped yet.

Hmbown pushed a commit that referenced this pull request Oct 21, 2026
Every 0.10.2 line now sits under [0.10.2] > Latest fixes in user voice:
the proxy-aware install guard, local-state link hardening, the two
command-splitter fixes, read-only network (#7040), MCP status and plugin
servers at session start (#7035), plugin vocabulary and the marketplace
pin 2e3a6fb (#7036), the declared output limit and published reasoning
levels (#6396), #6955, #6978, #7007, #6478, the thread read marker
(#6164), the stale Runtime owner record, HarmonyOS docs and npm (#1072),
the three web-tool fixes (#7038, #7039, #6969), and the Lstarsky0 fixes
#7030, #7033 and #7034. Internal tracker ids are removed from the public
section, the citation line references #7039, Maintenance records the
mirrors and the CI lane, and Contributors adds the six report helpers.
crates/tui/CHANGELOG.md is regenerated with sync-changelog.sh;
docs/CONTRIBUTORS.md and web/lib/release-credits.ts carry the same
credits; web/data/agent-docs.generated.json and features.generated.json
are regenerated from the landed docs and registry.

Batch evidence (one combined tree, input hash a47518092a4c49de37d93381d392aec4fc4c28fd612f6e6192d327acf4736d95; the intermediate
commits of this batch were not compiled on their own, only the combined
tree): cargo fmt --check clean; tui lib nextest over the lane filters 4096
passed, 0 failed, plus 1268 passed after the changelog edit; fp55
shared-process cargo test 161 passed, 0 failed, 1 ignored; tui integration
install::/skill_cli:: 42 passed, 0 failed; conformance goldens regenerated, 33
passed; execpolicy 89 command_safety and 256 crate tests passed; lane 74;
runtime continual_harness 8; config private_directory 12, route/models_dev
121, configured_models 9; app-server daemon_client 1, daemon_socket 15;
localization 54; clippy -D warnings on tui, execpolicy, lane, runtime,
app-server and config clean with CI's exact flags (the plan's stricter run flagged 26 pre-existing sites outside the batch: 25 are lints CI allows, one collapsible_if is fixed in this batch); cargo check tui --all-targets
clean (a first run failed on a half-applied call-site change of the citation fix; the rerun after the fix passed); aarch64-unknown-linux-gnu check of tui, app-server and config
not run: the ring and libdbus-sys build scripts fail for the cross target on this Mac, so the Linux-only bubblewrap and boot-id paths were not type-checked here and need a Linux host; blocking-call budget 540 sites within budget; dead-code budget
214 at budget; sync-changelog --check, check-versions,
check-bundled-plugin-claims, sync-marketplace --check and web check-facts
all passed; npm wrapper node --test 101 passed, 0 failed. No hosted CI ran;
final validation owns that.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution-gate Author not yet in .github/APPROVED_CONTRIBUTORS; a maintainer grants access with /lgtm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants