Repository navigation
Tap a task card to open that card's agent - #150
Merged
Merged
Conversation
longzhi
force-pushed
the
claude/touchscreen-cards
branch
2 times, most recently
from
October 15, 2026 03:10
7fb9ce0 to
35fa3a6
Compare
longzhi
force-pushed
the
claude/touchscreen-cards
branch
2 times, most recently
from
October 21, 2026 02:54
308680b to
0d548fa
Compare
The daemon gives each item in `tasks` an `id`: eight hex digits of FNV-1a
over the activity's key, the same for as long as the activity lasts. On a
box with a touchscreen, a tap on a card sends
{"version":1,"event":"focus","task":"<id>"}, and the daemon opens that
activity's source the way K2 opens its choice. An activity that has ended
or has no source opens nothing. Cards without an id, from an older daemon,
send nothing (ADR-0017, #148).
Two cards with the same title that swap places now redraw the box, since
their ids moved; the CI test that saw no event there expects it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
longzhi
force-pushed
the
claude/touchscreen
branch
from
October 21, 2026 02:58
ceffa54 to
48653e8
Compare
longzhi
force-pushed
the
claude/touchscreen-cards
branch
from
October 21, 2026 02:58
0d548fa to
e06f2e7
Compare
longzhi
marked this pull request as ready for review
October 21, 2026 04:18
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 2 of #148, stacked on #149: review that one first. Once #149 is merged, this PR's base becomes
main.What changes
daemon/src/activity.rs,main.rs):tasksgets anid: eight hex digits of FNV-1a over the activity's key. It stays the same for as long as the activity lasts.focusevent from the box names a card; the daemon opens that activity's source throughsource_opener::open, the same path K2 uses.idit came with. Only short alphanumeric ids are accepted, so the id can go back out in a JSON line as is.{"version":1,"event":"focus","task":"<id>"}.protocol.md(theidfield and thefocusevent),device-menu.md, and both READMEs.One side effect
Two cards with the same title that swap places now send the box a redraw, because their ids moved. Before, the two snapshots were identical and deduplicated. The box needs the new order, or a tap could open the wrong agent. The CI test
parallel_workflows_each_report_their_own_endnow expects thattask.start.task.startis silent. A redrawn needs-input screen keepssuppress_audioas before.Mac and Linux
Opening a source lives in the shared daemon, so a card tap works wherever K2 works, on macOS and Linux alike. Neither App changes.
Testing
cargo test --workspacepasses.a_tapped_card_leads_to_its_own_activity(the id, the card's own source rather than K2's choice, and an unknown id) anda_focus_event_names_the_tapped_card.a_tapped_card_asks_for_its_agentanda_card_from_an_older_daemon_or_with_an_odd_id_names_nothing.30:ED:A0:A4:0D:08(2026-10-15): with three cards sent over serial carrying ids, taps on the top, middle and bottom card sentfocuswithaaaa0001,bbbb0002andcccc0003in turn.opened a tapped card's source link=codex://threads/…, and Codex came to the front on that thread.🤖 Generated with Claude Code