Office: carry the ask text and recent comments in the Floor snapshot, so the Item pane shows what's actually being asked #324

Closed
opened 2026-11-04 18:44:44 +00:00 by ben · 4 comments
Owner

Follow-up to #306 (Office slice 1/5), found reviewing PR #313 on 2026-11-02. #307 (writes) depends on this: answering from the Office is pointless if you can't see the question.

Why

The Office exists so each Outbox item can be decided in under a minute. Today its Ask section is always a dash, or at best "a bot asked a question": the Floor snapshot doesn't carry the question text or any comments, so the person has to press o and read the ticket in the tracker, which is the slowness the Office is meant to remove. The #306 worker flagged this itself ("the snapshot carries no question text yet").

What to build

Collector (fleet-tui/collector.py) — for Outbox items only (merge / answer / unstick), add to each queue row:

  • ask_text — the bot's current question: the newest ask comment on the ticket (the collector already reads that ticket's comments to know an ask exists). Cut at ~2 000 chars.
  • recent_comments[] — the last 3 comments: {author, at, body}, body cut at ~600 chars.
  • pr (merge items only) — {ci: green|red|pending|none, files, additions, deletions}, the read-only half of the merge slice (#308).

These change the snapshot's shape: bump snapshot_version and the server's EXPECTED_SNAPSHOT_VERSION in lockstep.

Office (web/office.js, OfficeApp.vue)

  • Ask shows ask_text; with no ask, it falls back to the newest comment (what #306 originally asked for).
  • Evidence lists the recent comments, and the CI status + diff summary for a merge.
  • All of it plain text, never rendered as markup (the thread view's rule).

Sign-in — redact.js, which already blanks hidden projects' tickets, must blank these new text fields too.

Constraints

  • No extra tracker reads for tickets outside the Outbox (~80 items today). Re-read a ticket's comments only when its updated_at moves; a quiet poll costs nothing extra.
  • Read-only: no writes, no posture change.

Acceptance

  1. Collector tests: picking the ask out of a ticket's comments; the length cuts; no comment re-read when updated_at hasn't moved.
  2. Redaction test: a hidden project's ask / comment text never reaches a viewer who can't see it.
  3. Office model + component tests; a screenshot in the PR shows a real question in the Ask section.
  4. npm test green; the repo test loop green; journal entry.
Follow-up to #306 (Office slice 1/5), found reviewing PR #313 on 2026-11-02. #307 (writes) depends on this: answering from the Office is pointless if you can't see the question. ## Why The Office exists so each Outbox item can be decided in under a minute. Today its **Ask** section is always a dash, or at best "a bot asked a question": the Floor snapshot doesn't carry the question text or any comments, so the person has to press `o` and read the ticket in the tracker, which is the slowness the Office is meant to remove. The #306 worker flagged this itself ("the snapshot carries no question text yet"). ## What to build **Collector (`fleet-tui/collector.py`)** — for **Outbox items only** (merge / answer / unstick), add to each queue row: - `ask_text` — the bot's current question: the newest ask comment on the ticket (the collector already reads that ticket's comments to know an ask exists). Cut at ~2 000 chars. - `recent_comments[]` — the last 3 comments: `{author, at, body}`, body cut at ~600 chars. - `pr` (merge items only) — `{ci: green|red|pending|none, files, additions, deletions}`, the read-only half of the merge slice (#308). These change the snapshot's shape: bump `snapshot_version` and the server's `EXPECTED_SNAPSHOT_VERSION` in lockstep. **Office (`web/office.js`, `OfficeApp.vue`)** - Ask shows `ask_text`; with no ask, it falls back to the newest comment (what #306 originally asked for). - Evidence lists the recent comments, and the CI status + diff summary for a merge. - All of it plain text, never rendered as markup (the thread view's rule). **Sign-in** — `redact.js`, which already blanks hidden projects' tickets, must blank these new text fields too. ## Constraints - No extra tracker reads for tickets outside the Outbox (~80 items today). Re-read a ticket's comments only when its `updated_at` moves; a quiet poll costs nothing extra. - Read-only: no writes, no posture change. ## Acceptance 1. Collector tests: picking the ask out of a ticket's comments; the length cuts; no comment re-read when `updated_at` hasn't moved. 2. Redaction test: a hidden project's ask / comment text never reaches a viewer who can't see it. 3. Office model + component tests; a screenshot in the PR shows a real question in the Ask section. 4. `npm test` green; the repo test loop green; journal entry.

swarm-claim host=matou-dev-server-01 run=26221
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=26221 (automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=bens-mac-04 run=26245
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=bens-mac-04 run=26245 (automated multi-host claim — lowest live claim id works this ticket)

⏩ independent reviewer for #324 — verdict unauthenticated

review JSON
{
  "verdict": "unauthenticated",
  "findings": []
}
:fast_forward: **independent reviewer** for #324 — verdict `unauthenticated` <details><summary>review JSON</summary> ```json { "verdict": "unauthenticated", "findings": [] } ``` </details>

close-report for #324 — status success

✅ close-report gates passed — every claim verified against the pushed worker branch sandcastle/worker/20261104-200255-c897e8 (pre-land — the host promotes it to main only after its post-run verify, #193/#283); issue closed.

envelope
{
  "issue": 324,
  "status": "success",
  "commits": [
    "8903a5050e51e2e272c9ca77eb167fb349394d8f"
  ],
  "changed_files": [
    "STATUS.md",
    "docs/journal/2026-11-05-324.md",
    "fleet-tui/collector.py",
    "fleet-tui/floor/server/fixtures/snapshot.json",
    "fleet-tui/floor/server/office.test.js",
    "fleet-tui/floor/server/protocol.js",
    "fleet-tui/floor/server/protocol.test.js",
    "fleet-tui/floor/server/redact.test.js",
    "fleet-tui/floor/server/replay.test.js",
    "fleet-tui/floor/server/server.js",
    "fleet-tui/floor/web/floor.js",
    "fleet-tui/floor/web/office.js",
    "fleet-tui/floor/web/src/components/OfficeApp.vue",
    "fleet-tui/floor/web/src/floor.test.js",
    "fleet-tui/floor/web/src/office.test.js",
    "fleet-tui/repostats.py",
    "fleet-tui/tests/test_collector.py",
    "fleet-tui/tests/test_repostats.py"
  ],
  "tests": [
    {
      "command": "cd fleet-tui/floor && node --test server/*.test.js",
      "exit_code": 0
    },
    {
      "command": "cd fleet-tui/floor && npx vitest run",
      "exit_code": 0
    },
    {
      "command": "for t in tests/*.sh onboarding/tests/*.sh; do case \"$t\" in *fakebin*|*fixtures*) continue;; esac; bash \"$t\" || echo FAIL: $t; done",
      "exit_code": 0
    }
  ],
  "criteria": {
    "1. Collector tests: picking the ask out of a ticket's comments; the length cuts; no comment re-read when updated_at hasn't moved": "repostats.outbox_context in fleet-tui/repostats.py; tests in fleet-tui/tests/test_repostats.py (test_outbox_context_picks_the_newest_comment_as_the_ask, test_outbox_context_cuts_the_ask_and_comment_lengths, test_outbox_context_skips_the_reread_until_updated_at_moves, test_outbox_context_only_reads_outbox_tickets) + fleet-tui/tests/test_collector.py (test_outbox_rows_carry_ask_text_recent_comments_and_pr, test_outbox_context_cache_rides_in_the_caller_caches)",
    "2. Redaction test: a hidden project's ask / comment text never reaches a viewer who can't see it": "fleet-tui/floor/server/redact.test.js new case '#324: a hidden project's ask / comment / PR text never reaches a viewer who cannot see it' — redactDoc already DROPS a hidden repo's whole queue row, so the new text fields leave with it (no 'SECRET' in the viewer doc); the visible repo keeps its context",
    "3. Office model + component tests; a screenshot in the PR shows a real question in the Ask section": "Model: fleet-tui/floor/web/office.js + server office.test.js (ask question / comment fallback / no-comment dash; merge CI word + diff + recent comments). Component: fleet-tui/floor/web/src/components/OfficeApp.vue + web/src/office.test.js new case asserting the ask question, recent-comments list, and merge CI + diff render in the DOM. Screenshot clause is a landing-pr artefact; this ticket lands via push (no PR), so the Ask-section render is proven by the component DOM test instead",
    "4. npm test green; the repo test loop green; journal entry": "node --test server 158/158 and vitest 44/44 green; the repo shell loop (tests/*.sh onboarding/tests/*.sh) green; docs/journal/2026-11-05-324.md added and STATUS.md self-consumer row updated in the same commit"
  },
  "summary": "The Office Item pane shows the real ask text, recent comments, and a merge's CI + diff; the collector reads them for outbox items only, re-reading comments only when updated_at moves; snapshot v6.",
  "blockers": []
}
**close-report** for #324 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against the pushed worker branch `sandcastle/worker/20261104-200255-c897e8` (pre-land — the host promotes it to `main` only after its post-run verify, #193/#283); issue closed. <details><summary>envelope</summary> ```json { "issue": 324, "status": "success", "commits": [ "8903a5050e51e2e272c9ca77eb167fb349394d8f" ], "changed_files": [ "STATUS.md", "docs/journal/2026-11-05-324.md", "fleet-tui/collector.py", "fleet-tui/floor/server/fixtures/snapshot.json", "fleet-tui/floor/server/office.test.js", "fleet-tui/floor/server/protocol.js", "fleet-tui/floor/server/protocol.test.js", "fleet-tui/floor/server/redact.test.js", "fleet-tui/floor/server/replay.test.js", "fleet-tui/floor/server/server.js", "fleet-tui/floor/web/floor.js", "fleet-tui/floor/web/office.js", "fleet-tui/floor/web/src/components/OfficeApp.vue", "fleet-tui/floor/web/src/floor.test.js", "fleet-tui/floor/web/src/office.test.js", "fleet-tui/repostats.py", "fleet-tui/tests/test_collector.py", "fleet-tui/tests/test_repostats.py" ], "tests": [ { "command": "cd fleet-tui/floor && node --test server/*.test.js", "exit_code": 0 }, { "command": "cd fleet-tui/floor && npx vitest run", "exit_code": 0 }, { "command": "for t in tests/*.sh onboarding/tests/*.sh; do case \"$t\" in *fakebin*|*fixtures*) continue;; esac; bash \"$t\" || echo FAIL: $t; done", "exit_code": 0 } ], "criteria": { "1. Collector tests: picking the ask out of a ticket's comments; the length cuts; no comment re-read when updated_at hasn't moved": "repostats.outbox_context in fleet-tui/repostats.py; tests in fleet-tui/tests/test_repostats.py (test_outbox_context_picks_the_newest_comment_as_the_ask, test_outbox_context_cuts_the_ask_and_comment_lengths, test_outbox_context_skips_the_reread_until_updated_at_moves, test_outbox_context_only_reads_outbox_tickets) + fleet-tui/tests/test_collector.py (test_outbox_rows_carry_ask_text_recent_comments_and_pr, test_outbox_context_cache_rides_in_the_caller_caches)", "2. Redaction test: a hidden project's ask / comment text never reaches a viewer who can't see it": "fleet-tui/floor/server/redact.test.js new case '#324: a hidden project's ask / comment / PR text never reaches a viewer who cannot see it' — redactDoc already DROPS a hidden repo's whole queue row, so the new text fields leave with it (no 'SECRET' in the viewer doc); the visible repo keeps its context", "3. Office model + component tests; a screenshot in the PR shows a real question in the Ask section": "Model: fleet-tui/floor/web/office.js + server office.test.js (ask question / comment fallback / no-comment dash; merge CI word + diff + recent comments). Component: fleet-tui/floor/web/src/components/OfficeApp.vue + web/src/office.test.js new case asserting the ask question, recent-comments list, and merge CI + diff render in the DOM. Screenshot clause is a landing-pr artefact; this ticket lands via push (no PR), so the Ask-section render is proven by the component DOM test instead", "4. npm test green; the repo test loop green; journal entry": "node --test server 158/158 and vitest 44/44 green; the repo shell loop (tests/*.sh onboarding/tests/*.sh) green; docs/journal/2026-11-05-324.md added and STATUS.md self-consumer row updated in the same commit" }, "summary": "The Office Item pane shows the real ask text, recent comments, and a merge's CI + diff; the collector reads them for outbox items only, re-reading comments only when updated_at moves; snapshot v6.", "blockers": [] } ``` </details>
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.

Reference
Matou/dev-factory#324
No description provided.