Skip to content

Canvas: links from a card's whole edge, readable far view, live sync - #325

Merged
lbx154 merged 1 commit into
devfrom
fix/canvas-edges
Oct 24, 2026
Merged

lbx154 merged 1 commit into
devfrom
fix/canvas-edges

Conversation

@lbx154

@lbx154 lbx154 commented Oct 24, 2026

Copy link
Copy Markdown
Owner

Smooths four rough edges of the map canvas (design/canvas.md; experience rules 1, 3, 5).

What changes

  1. Links start anywhere on a card's edge. ConnectSource (CanvasNodes.tsx) adds four invisible edge strips as React Flow source handles on person and task cards. Each strip is about 14 screen px wide at any zoom (rimWidth, stepped zoom) and never more than a fifth of the card. Handles carry nodrag, so the middle of a card still drags, and a plain click still reaches the card. Hovering a card tints its edge, and the strip under the pointer is darker. The old dot is still there. connectOnClick={false} stops a click on an edge from starting a half-made link. MacroTaskNode only swaps its single dot Handle for <ConnectSource> (a one-line change).
  2. Person cards can be read at overview zoom. When a card's body text would be smaller than 12 px on screen, the card drops its header and size line. Instead it shows its text (or file name) as a bold two-line label sized for about 14 px on screen, kept inside the card (farLabelFont). It switches back to the full card when zoomed in, and also while editing.
  3. Other windows see canvas changes within a second. Every accepted canvas write appends project.canvas.updated {revision, change} to the project's event log. That log is the live websocket stream the web client already reads. App.tsx takes the newest announced revision, and refreshCanvas refetches only when that revision is ahead of the window's cached copy, so the window that made the write does not refetch. The new event type is in the catalog, the payload schema, eventCatalog.ts and the generated fixtures, and the shared renderer hides it from the feed.
  4. The Manager sees the canvas on team reports too. manager_team_report (the /manager/team-turn push path) now appends manager_canvas_context() to its turn. The chat router's manager_turn path on dev already included it. domain_intake is unchanged: adding it there would mean argus/manager importing from webapi.

Verified

  • Real browser on a private state copy (port 8996, token dev, no model calls), with two windows open on one project:
    • A card added in window A showed up in window B after 0.2–0.4 s.
    • Dragging from a card's top edge onto a task card opened the link-kind menu, and the link was saved.
    • Dragging from the middle of a card moved it 35 px and did not open a link.
    • Clicking on an edge did not open a link.
    • At overview zoom (0.157), person-card labels measured 13.9 px on screen. At 0.076 they measured 13.9 px (idea cards) and 8.6 px (file cards, held back by the two-line fit).
  • Web vitest: 1426 passed. tsc: clean. TUI node tests: 299 passed, 0 failed.
  • pytest: tests/webapi, tests/core, tests/life, tests/release_tools and the architecture invariants all pass except one: test_private_modules_are_not_imported_across_packages (webapi -> argus.life.delivery._referenced_path_candidates). It fails the same way on unchanged dev, so this PR did not cause it.
  • ruff: clean. Release artifacts rebuilt with build_release.

🤖 Generated with Claude Code

- Links start anywhere on a card's edge: four invisible edge strips (about
  14 screen px at any zoom, at most a fifth of the card) are link sources on
  person and task cards; the middle still drags and clicks reach the card.
  Hovering a card tints its edge; the dot stays. connectOnClick is off so a
  click on an edge never starts a half-made link.
- Person cards at overview zoom: once their words would be under 12 px on
  screen they drop the header and show the text (or file name) as a bold
  two-line label sized for ~14 px, within the card.
- Canvas writes put project.canvas.updated (new revision) on the project's
  live stream; other open windows refetch the canvas when it is ahead of
  theirs (seen in ~0.2-0.4 s instead of up to 30 s). The event is catalogued
  and hidden from the feed.
- The Manager's team-report turn (the /manager/team-turn push path) now gets
  the canvas context block too; the chat router already had it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lbx154
lbx154 merged commit 0617029 into dev Oct 24, 2026
4 of 5 checks passed
@lbx154
lbx154 deleted the fix/canvas-edges branch October 24, 2026 17:26
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