Review Suggestions in a Person Card App view #131

Closed
opened 2026-11-05 21:00:59 +00:00 by svc-agent-writer · 2 comments

Parent

#96

Outcome

A host that renders MCP Apps shows one Person's open Suggestions in an App view, and the Owner can accept or edit one there. The App view submits the same review.accept and review.edit Actions that #98's tool call queues, with via=app.

Context

  • The #98 grill of 2026-11-06 (Q2) split #98. #98 builds the Suggestion contract and the MCP-call path, and this issue takes the App view half.
  • The write path is already decided:
    • The glossary entry App view says it "submits the same Actions as a conversational tool call, on the host's credential".
    • ADR 0005 Amendment 1 ruling 6 records via=app and gives the Action the host token's label as Author.
    • ADR 0005 Amendment 1 ruling 12 says revisions show in App view data.
  • Mail Mind's App view lives in dev/mail-mind-mcp (local checkout /Users/piers/src/mailmind-mcp):
    • It is src/mail_mind_mcp/panel.html (7.9 KB), served as ui://mailmind/triage.html through fastmcp.apps AppConfig and UI_MIME_TYPE (src/mail_mind_mcp/server.py:30, :1345-1348).
    • That panel is read-only: its source comment says it "starts no write". So reuse covers the resource, helper and bridge pattern only. Calling a write tool from the App view is new.
  • The #98 Half-A sandbox could not read /Users/piers/src/mailmind-mcp (Operation not permitted). This issue's Half-A must be able to read that checkout.

Scope

  • Serve a People Mind App view resource for one Person's Suggestions, in the Mail Mind pattern.
  • Show the read-only, queued, applied, failed and stale-view states, with a standalone text fallback.
  • Accept and edit through the host bridge, which calls the #98 review tool with the Suggestion's expected revision, and record via=app.

Acceptance criteria

  • Reuse Mail Mind's packaged resource, structured app helper and host bridge; show read-only, queued, applied, failed and stale-view states with standalone text fallback.
  • A small card-bridge test demonstrates accept and edit through the App view.
  • An Action sent from the App view records via=app and the host token's label as Author.
  • A stale App view (Suggestion revision moved) ends conflict and shows the stale-view state (ADR 0005 Amendment 1, example "Stale App view").
  • Run the required repository checks; keep personal values out of logs and audit detail.

Blocked by

Filed under: operator word "Accept" (people-mind-mcp #98 grill, 2026-11-06, Q2 and Q13)

## Parent https://git.groupthink.asia/dev/people-mind-mcp/issues/96 ## Outcome A host that renders MCP Apps shows one Person's open Suggestions in an App view, and the Owner can accept or edit one there. The App view submits the same `review.accept` and `review.edit` Actions that #98's tool call queues, with `via=app`. ## Context - The #98 grill of 2026-11-06 (Q2) split #98. #98 builds the Suggestion contract and the MCP-call path, and this issue takes the App view half. - The write path is already decided: - The glossary entry App view says it "submits the same Actions as a conversational tool call, on the host's credential". - ADR 0005 Amendment 1 ruling 6 records `via=app` and gives the Action the host token's label as Author. - ADR 0005 Amendment 1 ruling 12 says revisions show in App view data. - Mail Mind's App view lives in `dev/mail-mind-mcp` (local checkout `/Users/piers/src/mailmind-mcp`): - It is `src/mail_mind_mcp/panel.html` (7.9 KB), served as `ui://mailmind/triage.html` through `fastmcp.apps` `AppConfig` and `UI_MIME_TYPE` (`src/mail_mind_mcp/server.py:30`, `:1345-1348`). - That panel is read-only: its source comment says it "starts no write". So reuse covers the resource, helper and bridge pattern only. Calling a write tool from the App view is new. - The #98 Half-A sandbox could not read `/Users/piers/src/mailmind-mcp` (`Operation not permitted`). This issue's Half-A must be able to read that checkout. ## Scope - Serve a People Mind App view resource for one Person's Suggestions, in the Mail Mind pattern. - Show the read-only, queued, applied, failed and stale-view states, with a standalone text fallback. - Accept and edit through the host bridge, which calls the #98 review tool with the Suggestion's expected revision, and record `via=app`. ## Acceptance criteria - [ ] Reuse Mail Mind's packaged resource, structured app helper and host bridge; show read-only, queued, applied, failed and stale-view states with standalone text fallback. - [ ] A small card-bridge test demonstrates accept and edit through the App view. - [ ] An Action sent from the App view records `via=app` and the host token's label as Author. - [ ] A stale App view (Suggestion revision moved) ends `conflict` and shows the stale-view state (ADR 0005 Amendment 1, example "Stale App view"). - [ ] Run the required repository checks; keep personal values out of logs and audit detail. ## Blocked by - https://git.groupthink.asia/dev/people-mind-mcp/issues/98 Filed under: operator word "Accept" (people-mind-mcp #98 grill, 2026-11-06, Q2 and Q13)
Collaborator

⏸ SVD architect gate: dev/people-mind-mcp#131 review-suggestions-in-a-person-card-app-view

Status: CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity standard · dispatch effort medium

Run: 20261105T220113Z-b50d576e

Held because: CLEAN but 3 open risk(s) (2 verification · 1 decision) — HOLD-ALL parks everything. The risks, verbatim:

Open risks:

  1. via=app is recorded because the call came through the app-only tool people_card_review. It is not cryptographically bound to an App view. ADR 0005 r6 says the service records only what it can verify. Question: is the tool name an acceptable via signal, as this lean assumes? The only signal available is whether the host honours visibility ["app"], and a host _meta hint would be no more verifiable. [decision]
  2. The card.html bridge JS does not run in CI. Post-merge, open a People Card in an MCP Apps host (the one that renders Mail Mind's triage panel) and check five things: (1) the view loads the Person from ui/notifications/tool-input or tool-result; (2) Accept and Edit answer applied or queued; (3) 'Check again' resolves a queued Action; (4) a Suggestion bumped between load and click shows the stale-view state; (5) people_actions shows via=app with the host token's label. [verification]
  3. This Half-A sandbox again could not read /Users/piers/src/mailmind-mcp (Operation not permitted), despite the issue's request, so the lean mirrors the DD note's quote of dev/mailmind-mcp@99b976c. At dispatch or integrate, if the checkout is readable, diff src/mail_mind_mcp/panel.html and server.py:29-34 and :1338-1410 against 99b976c. Confirm the handshake protocolVersion and the message-listener bridge are unchanged. [verification]

Change: Mirror Mail Mind's triage panel, using the DD note's quote of dev/mailmind-mcp@99b976c (panel.html; server.py:29-34 and :1338-1410). Changes by file:

  • server.py: serve the packaged ui://peoplemind/card.html resource with UI_MIME_TYPE and AppConfig(prefers_border=True). Bind people_card to it with AppConfig(resource_uri=CARD_URI).
  • server.py: add the app-only read tool people_card_suggestions with AppConfig(visibility=["app"]). It goes through @_render and returns one line of JSON text with person_id, display_name, writable and suggestions carrying each revision.
  • server.py: add the app-only write tool people_card_review, registered in build_app only when write tokens exist (server.py:372-383). It shares a new _review helper with people_review (server.py:278-300). _queue (server.py:223-243) gains via: Literal["tool","app"]="tool".
  • views.py: extract the suggestion loop in views.card (views.py:240-274) into _suggestion_items, so the text Card stays byte-identical and the new card_suggestions dict reuses it.
  • card.html: reuse the post, request, notify and element (textContent only) bridge from Mail Mind's panel.html. Read the person id from ui/notifications/tool-input or the Card's first tool-result row. Map answers to states: state=applied to applied, state=queued to queued with a same-key "Check again" resend (ADR r9, actions.py:41-47), state=conflict to stale view, failed or Error to failed, and writable=false or grant-missing to read-only.

Files: src/people_mind_mcp/server.py · src/people_mind_mcp/views.py · src/people_mind_mcp/card.html · tests/test_card_app.py · tests/test_server.py · tests/test_actions.py · README.md

Decision: accept the 3 open risk(s) above and dispatch this spec (svd:go), or park (svd:skip) / re-spec (svd:respec)?

Your call (when this issue is held at the gate via svd:hold):

  • add label svd:go — approve; Half-B dispatch accepts exactly this spec (open risks accepted)
  • add label svd:fire beside svd:go — approve AND authorise the Half-B fire from the phone; never on its own
  • add label svd:skip — park it; dispatch refuses it and the issue stays for a human
  • add label svd:respec — discard this spec; the next Half-A run re-produces it with this record as prior-attempt context

Spec: /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-05-review-suggestions-in-a-person-card-app-view.md — next: codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-05-review-suggestions-in-a-person-card-app-view.md

### ⏸ SVD architect gate: dev/people-mind-mcp#131 review-suggestions-in-a-person-card-app-view **Status:** CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity `standard` · dispatch effort `medium` **Run:** `20261105T220113Z-b50d576e` **Held because:** CLEAN but 3 open risk(s) (2 verification · 1 decision) — HOLD-ALL parks everything. The risks, verbatim: **Open risks:** 1. via=app is recorded because the call came through the app-only tool people_card_review. It is not cryptographically bound to an App view. ADR 0005 r6 says the service records only what it can verify. Question: is the tool name an acceptable via signal, as this lean assumes? The only signal available is whether the host honours visibility ["app"], and a host _meta hint would be no more verifiable. [decision] 2. The card.html bridge JS does not run in CI. Post-merge, open a People Card in an MCP Apps host (the one that renders Mail Mind's triage panel) and check five things: (1) the view loads the Person from ui/notifications/tool-input or tool-result; (2) Accept and Edit answer applied or queued; (3) 'Check again' resolves a queued Action; (4) a Suggestion bumped between load and click shows the stale-view state; (5) people_actions shows via=app with the host token's label. [verification] 3. This Half-A sandbox again could not read /Users/piers/src/mailmind-mcp (Operation not permitted), despite the issue's request, so the lean mirrors the DD note's quote of dev/mailmind-mcp@99b976c. At dispatch or integrate, if the checkout is readable, diff src/mail_mind_mcp/panel.html and server.py:29-34 and :1338-1410 against 99b976c. Confirm the handshake protocolVersion and the message-listener bridge are unchanged. [verification] **Change:** Mirror Mail Mind's triage panel, using the DD note's quote of dev/mailmind-mcp@99b976c (panel.html; server.py:29-34 and :1338-1410). Changes by file: - server.py: serve the packaged ui://peoplemind/card.html resource with UI_MIME_TYPE and AppConfig(prefers_border=True). Bind people_card to it with AppConfig(resource_uri=CARD_URI). - server.py: add the app-only read tool people_card_suggestions with AppConfig(visibility=["app"]). It goes through @_render and returns one line of JSON text with person_id, display_name, writable and suggestions carrying each revision. - server.py: add the app-only write tool people_card_review, registered in build_app only when write tokens exist (server.py:372-383). It shares a new _review helper with people_review (server.py:278-300). _queue (server.py:223-243) gains via: Literal["tool","app"]="tool". - views.py: extract the suggestion loop in views.card (views.py:240-274) into _suggestion_items, so the text Card stays byte-identical and the new card_suggestions dict reuses it. - card.html: reuse the post, request, notify and element (textContent only) bridge from Mail Mind's panel.html. Read the person id from ui/notifications/tool-input or the Card's first tool-result row. Map answers to states: state=applied to applied, state=queued to queued with a same-key "Check again" resend (ADR r9, actions.py:41-47), state=conflict to stale view, failed or Error to failed, and writable=false or grant-missing to read-only. **Files:** `src/people_mind_mcp/server.py` · `src/people_mind_mcp/views.py` · `src/people_mind_mcp/card.html` · `tests/test_card_app.py` · `tests/test_server.py` · `tests/test_actions.py` · `README.md` **Decision:** accept the 3 open risk(s) above and dispatch this spec (`svd:go`), or park (`svd:skip`) / re-spec (`svd:respec`)? **Your call** (when this issue is held at the gate via `svd:hold`): - add label `svd:go` — approve; Half-B dispatch accepts exactly this spec (open risks accepted) - add label `svd:fire` **beside** `svd:go` — approve AND authorise the Half-B fire from the phone; never on its own - add label `svd:skip` — park it; dispatch refuses it and the issue stays for a human - add label `svd:respec` — discard this spec; the next Half-A run re-produces it with this record as prior-attempt context <sub>Spec: `/Users/piers/.local/state/exhaust/groupthink/specs/2026-11-05-review-suggestions-in-a-person-card-app-view.md` — next: `codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-05-review-suggestions-in-a-person-card-app-view.md`</sub>
Collaborator

spec-verify-dispatch Half B for dev/people-mind-mcp#131 review-suggestions-in-a-person-card-app-view completed integration verify.

  • PR: #133
  • Branch: feat/svd-dev-people-mind-mcp-131-review-suggestions-in-a-pers-63a17d95
  • Commit: c087e3ece6
  • Build: none
  • Test: green
  • Reader audit clean: True
  • Spec fidelity: True
  • Ready for merge: True
  • Check ci/woodpecker/pr/validation: green https://ci.groupthink.asia/repos/73/pipeline/85/1
  • Checks: required ci/woodpecker/pr/validation resolved pass by CI-wait poll
  • Warning: Host App bridge checks (card.html JS in a real MCP Apps host) remain post-merge verification, as the spec states.
  • Warning: Remote CI ci/woodpecker/pr/validation still pending at verification time.
  • CI wait: ci/woodpecker/pr/validation -> pass
  • Decision: review the PR and merge? (codex-svd ship --run-id 20261105T223534Z-63a17d95 --confirm-merge)
spec-verify-dispatch Half B for dev/people-mind-mcp#131 review-suggestions-in-a-person-card-app-view completed integration verify. - PR: https://git.groupthink.asia/dev/people-mind-mcp/pulls/133 - Branch: feat/svd-dev-people-mind-mcp-131-review-suggestions-in-a-pers-63a17d95 - Commit: c087e3ece647e74e947ecf9e5b2d7e1fc80dc161 - Build: none - Test: green - Reader audit clean: True - Spec fidelity: True - Ready for merge: True - Check ci/woodpecker/pr/validation: green https://ci.groupthink.asia/repos/73/pipeline/85/1 - Checks: required ci/woodpecker/pr/validation resolved pass by CI-wait poll - Warning: Host App bridge checks (card.html JS in a real MCP Apps host) remain post-merge verification, as the spec states. - Warning: Remote CI ci/woodpecker/pr/validation still pending at verification time. - CI wait: ci/woodpecker/pr/validation -> pass - Decision: review the PR and merge? (`codex-svd ship --run-id 20261105T223534Z-63a17d95 --confirm-merge`)
svc-svd-writer 2026-11-05 22:53:21 +00:00
  • closed this issue
  • removed the
    svd:go
    label
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dev/people-mind-mcp#131
No description provided.