diff options
| author | Tommaso Negri <me@tommasongr.com> | 2026-10-14 21:58:57 +0200 |
|---|---|---|
| committer | Tommaso Negri <me@tommasongr.com> | 2026-10-14 21:58:57 +0200 |
| commit | f802039757d5da01a2b7cb7d1b15c692f137d91f (patch) | |
| tree | 86c328bda63b0d566eb56c8d0c83409fcc9b8b8c /tasks/20261014-191457 | |
| parent | e6b4d0cb69809ea3d742ba03f4a0586cbbb3d1b3 (diff) | |
| download | bar-f802039757d5da01a2b7cb7d1b15c692f137d91f.tar.gz bar-f802039757d5da01a2b7cb7d1b15c692f137d91f.zip | |
add tasks
Diffstat (limited to 'tasks/20261014-191457')
| -rw-r--r-- | tasks/20261014-191457/TASK.md | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tasks/20261014-191457/TASK.md b/tasks/20261014-191457/TASK.md new file mode 100644 index 0000000..82d5686 --- /dev/null +++ b/tasks/20261014-191457/TASK.md @@ -0,0 +1,15 @@ +# Use positional cell identity and current hover content + +- STATUS: OPEN +- PRIORITY: 50 +- TAGS: review,bug,ui + +Files: Sources/bar/Models/Cell.swift, Sources/bar/Models/Block.swift, Sources/bar/Views/BlockView.swift. + +Problem: Cell.id combines text and highlight. Identical lines, including repeated blank cells, have duplicate ForEach IDs. Content changes also replace view identity. hoveredCell stores a value snapshot that can become stale after a refresh. + +Approach: Use line position as identity because shell output is an ordered list with no semantic IDs. This can be supplied during parsing or through indexed rendering; choose the clearest small implementation. Track the hovered position and resolve its current cell when handling events. Reject a hover index that no longer exists. Update identity comments and check hover exit behavior when views disappear or output changes. + +Completion checks: Repeated identical text and blank lines render as distinct cells without duplicate-ID warnings. Text/highlight updates retain positional identity. Clicking after a refresh sends the current text in CELL; shrinking output or removing a hovered cell cannot trigger an unrelated or stale action. Manually check multiple bar windows and hover transitions. + +Design constraint: Follow README.md: keep source-based configuration, no dependencies or plugin framework, and use the smallest readable change that makes the existing behavior reliable. This is a suggestion for individual review, not a deadline. Findings were recorded on 2026-10-14; re-check the current code before implementing. |
