Skip to content

feat: targeted feedback — pin console comments to panes/elements (spec + implementation)#220

Merged
ivanmkc merged 7 commits into
masterfrom
docs/targeted-feedback-spec
Jul 4, 2026
Merged

feat: targeted feedback — pin console comments to panes/elements (spec + implementation)#220
ivanmkc merged 7 commits into
masterfrom
docs/targeted-feedback-spec

Conversation

@ivanmkc

@ivanmkc ivanmkc commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Targeted feedback: pin a console comment to a specific pane or UI element, delivered to the listening agent with structured, spec-level context. Spec + full implementation (TDD: every unit red→green; e2e-verified end to end).

UX

No mode toggle or buttons — double-click / double-tap an element (or ~500ms touch long-press, or c while hovering) opens an inline composer popover anchored there, with the target pre-resolved as a chip (📌 pane "Latency" › flow-node api-gw). Enter sends, Esc cancels, click-away closes. Gated by the existing console beta flag; console transcript rows show the pin chip.

Wire format

POST /inbox messages accept a bounded optional target:
{ kind: pane|flow-node|component|checklist-item|heading, panePath?, paneTitle?, id?, label?, excerpt?, seq? }
— validated/capped server-side (strings ≤200, excerpt ≤400, panePath ≤8; 400 on actions/malformed; unknown keys stripped). target.seq is reserved; the v1 viewer omits it.

Agent side

termchart inbox prints an indented pin-context line (📌 pane[1,0] "Latency" › flow-node api-gw ("API Gateway")); --json passes target through. status-state.md + inbox-watch SKILL.md teach agents to resolve panePath/id against termchart pull, with the stale-pin fallback to label/paneTitle/excerpt.

Also in here

  • Markdown h1–h4 get GitHub-style slug ids (pinnable + deep-linkable sections).
  • Checklist data-item moved from the checkbox input to the wrapper row: on read-only lists the input is disabled and disabled controls swallow mouse events, so the item was unreachable by any pointer interaction (found by the e2e).

Verification

  • 538 viewer + 175 CLI unit tests green (37 new: server target validation, CLI rendering, heading slugs, DOM target resolution, composer gestures, console send-path).
  • e2e 115/115 across rich/board-sort/template/responsive, incl. a new flow: dblclick checklist item → composer → Enter → GET /inbox returns the structured target.

Design doc: docs/superpowers/specs/2026-07-03-targeted-feedback-design.md. Rollout when merged: viewer deploy + npm CLI publish + plugin bump (all three channels touched).

…ine, markdown heading slugs

Targeted feedback wire format per docs/superpowers/specs/2026-07-03-targeted-feedback-design.md:
POST /inbox accepts a bounded { kind, panePath, paneTitle, id, label, excerpt, seq } target on
message events (400 on actions/malformed, unknown keys stripped); termchart inbox renders it as
an indented pin-context line; markdown h1-h4 gain GitHub-style slug ids so sections are
addressable.
… comments to elements

Double-click/double-tap, ~500ms touch long-press, or 'c' over the hovered element opens a
popover anchored to the resolved target (comment-target.ts: flow node / component id /
checklist item / heading slug / enclosing pane with excerpt). Enter delivers it through the
console's inbox POST with the structured target; transcript rows show a pin chip. Gated by
the console beta flag.

checklist: data-item moved to the Checkbox wrapper row — on the input it was unreachable
(disabled controls swallow mouse events on read-only lists).
…h) + spec touch-up

The inbox event's optional target — shape, CLI pin line, and how a listening agent resolves
panePath/id against termchart pull (with the stale-pin fallback to label/paneTitle/excerpt).
Spec: target.seq is reserved; the v1 viewer omits it (board version isn't tracked client-side).
ivanmkc pushed a commit that referenced this pull request Jul 4, 2026
… works, journey selection still the gap

#219 (push --type validation) merged into master. Re-ran journeys: agents now
get an actionable error on an invalid --type and retry with a VALID type every
time (no more silently-stored unrenderable boards — finding #2 fixed). Scores
stay ~1/5 because agents retry to a valid-but-wrong type (Claude falls back to
mermaid); picking the RIGHT journey is a recipe-activation gap, not validation.
…s with the new key conventions

Union the viewer.ts imports; guard the 'c' gesture like master's 'b' hotkey (skip in #scopes
type-ahead and under modal overlays); stop Esc/Enter propagation from the composer so the new
window-level Escape cascade doesn't also close the console.
@ivanmkc ivanmkc merged commit 5a671f5 into master Jul 4, 2026
5 checks passed
@ivanmkc ivanmkc deleted the docs/targeted-feedback-spec branch July 4, 2026 02:02
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.

2 participants