Skip to content

fix(web-client): always emit data-taskid so flash + expand hit working tasks - #686

Merged
sonichi merged 1 commit into
mainfrom
fix/data-taskid-always
May 14, 2026
Merged

sonichi merged 1 commit into
mainfrom
fix/data-taskid-always

Conversation

@sonichi

@sonichi sonichi commented May 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Both render paths attached data-taskid only when the task had a result. Working tasks (no result yet) got no data-taskid, so PR feat(task-expand): 1s yellow flash on expand:N target (visible feedback) #684's flash query found nothing and Chi saw "no yellow flash and no expansion".
  • Always set data-taskid; gate the click handler on a separate data-clickable attr so click-to-toggle still only fires for result-bearing tasks.

Self-verification

  • Chrome MCP, post-kickstart:
    • 30 task-items, 30 have data-taskid (was 0 before fix for working tasks).
    • document.body.dataset.taskAction = 'expand:3' → target's .task-text gets .expanded, target gets .task-flash.
  • node --check on served JS: silent.

Test plan

  • Hard-refresh; voice "expand task 3" → row 3 flashes yellow + text widens
  • Click a result-bearing task → toggles open as before
  • Click a working (no-result) task → no toggle (no data-clickable)

🤖 Generated with Claude Code

…and:N hit working tasks

Both renderers (primary line 1150, dynamic-region line 2319) only attached
`data-taskid` when `hasResult` was true. For working tasks (no result yet),
the wrapper had no data-taskid — so:

- the 1s yellow flash from PR #684 silently no-op'd (querySelectorAll
  `[data-taskid="..."]` matched nothing)
- the `.expanded` class still got added to .task-text, but that only widens
  long titles via `white-space: normal`; short titles looked unchanged

Fix:
- Always emit `data-taskid` on the .task-item wrapper, in both renderers.
- Add `data-clickable="1"` (only when hasResult) as the separate flag the
  global click handler uses — preserves "working tasks aren't clickable"
  behavior without coupling it to the flash target.

Self-verified via Chrome MCP:
- 30/30 .task-item have data-taskid
- expand:3 → target's .task-text gets .expanded AND .task-flash applied
- Click handler still only fires for clickable items.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sonichi
sonichi merged commit 47d2a07 into main May 14, 2026
1 check passed
@sonichi
sonichi deleted the fix/data-taskid-always branch May 14, 2026 03:18
liususan091219 pushed a commit to liususan091219/sutando-fork that referenced this pull request May 28, 2026
…and:N hit working tasks (sonichi#686)

Both renderers (primary line 1150, dynamic-region line 2319) only attached
`data-taskid` when `hasResult` was true. For working tasks (no result yet),
the wrapper had no data-taskid — so:

- the 1s yellow flash from PR sonichi#684 silently no-op'd (querySelectorAll
  `[data-taskid="..."]` matched nothing)
- the `.expanded` class still got added to .task-text, but that only widens
  long titles via `white-space: normal`; short titles looked unchanged

Fix:
- Always emit `data-taskid` on the .task-item wrapper, in both renderers.
- Add `data-clickable="1"` (only when hasResult) as the separate flag the
  global click handler uses — preserves "working tasks aren't clickable"
  behavior without coupling it to the flash target.

Self-verified via Chrome MCP:
- 30/30 .task-item have data-taskid
- expand:3 → target's .task-text gets .expanded AND .task-flash applied
- Click handler still only fires for clickable items.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant