Skip to content

feat(planning): close-out polish and no state versioning on the shared page - #8605

Merged
kyle-sexton merged 23 commits into
mainfrom
feat/shared-closeout-polish
Oct 20, 2026
Merged

kyle-sexton merged 23 commits into
mainfrom
feat/shared-closeout-polish

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

No related issue: close-out PR D of 4 for the planning plugin's shared interview page, from the owner-approved close-out plan.

Summary

Close-out polish, owner-set guest pop-up defaults, and no more state versioning:

  • Rounds never stall (follow-up 33): the lane docs (skills/interview/context/lane-shared.md, gotchas.md) say ack-round always goes in the same apply as open-round or close-round. While a round waits, the owner reads "Claude may already be reading it; you can still cancel", and "Waiting for Claude · N min" appears after 2 minutes. A cancel that beats the combined apply makes it fail as a whole, and Claude re-reads instead of retrying. No SKILL.md text moved.
  • Host view "behind" (follow-up 34, feat(planning): show who is behind in the shared-session Host view #7852): each row says "N to answer this round", and a Behind chip shows while anyone owes an answer.
  • Goal on return visits (follow-up 39): a dismissible one-line goal, not shown to waiting or removed people.
  • In-app browsers (follow-up 45): Facebook, Instagram and Messenger get a non-blocking "Open in Safari/Chrome" banner. Its button opens the device panel with its "Keep this private" warning, and the owner never sees it.
  • About you (follow-up 46): an optional card in the guest's own card, visible only to the owner.
  • Per-device answers (follow-up 47): the page never sent the device, so the server refused every answer to a device-scoped question. Answers now carry the device kind, classified by the screen's short side so a rotated phone stays a phone.
  • Hidden filters (follow-up 52): the rail says when a filter hides rounds or questions, with Show all.
  • Guest pop-up defaults: the owner sets which pop-ups guests start with (settings.guestPopups), and a guest's own switches win.
  • No state versioning: the feature has shipped schema versions up to 7. migrate.py and its chain, the prototype import (share.py --import, server.py --initial-state), the schemaVersion checks and the version reload path are gone. The build-hash reload stays. A state file at version 7 loads as is; its schemaVersion key is dropped on the first write. A file below 7 is refused with a clear message, and the README says how to go back to an earlier build.

Fix

The state schema loses schemaVersion and gains the optional settings.guestPopups. Six old fixtures stay for now, because scripts/affected-tests-live.sh still lists them. Automation Lanes lands that list change and their deletion after this merges.

Verification

Run locally because CI runners skip the browser suites (#8498):

  • On 78dffbe: ui.test.sh exit 0 (40 suite files, 1449 checks, 0 failed), align.test.sh 502/502, Python discover 956 OK, plugins/planning/tests/interview-defenses.test.sh 172/0.
  • On 8f0f81b (fixtures and script restored): Python discover 956 OK, ui.test.sh 1449/0, scripts/affected-tests-live.sh 41/0.
  • test_a_state_the_v7_build_wrote_loads_with_nothing_lost loads a v7 file with draft, carried and loose uploads and checks nothing changes but the dropped key.
  • The live session's state was rehearsed and migrated to v7 under main (feat(planning): pictures and display primitives on the shared page #8546's migration) before this PR.
  • Fresh-context code and security reviews; their findings are fixed in 78dffbe.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01J3iPeJuMen4T3ryPGScwq9

kyle-sexton and others added 22 commits October 19, 2026 15:40
…ed page

Follow-up 29: the asker of an ask on a choice, pick-many or ranking
question gets "Use as my answer" on Claude's answer. It opens their own
option (Something else) holding Claude's summary, editable before they
save it through the existing pick path, and asks before replacing a pick
they already made.

One composer(field, {send, counterFrom, escape, mentions, draftKey})
helper now runs every writing field: Enter sends chat, Ctrl or Cmd +
Enter sends elsewhere with its hint, one near-the-limit counter, Escape
cancels inline edits, and the @ picker covers the Discussion, comment,
request, lock, own-option and host answer edits, with Claude first in
chat and the Discussion. Chat, Discussion, Ask Claude, Suggest and Pass
text is kept per question and across a reload (B1, B3, F1, F2,
follow-ups 22 and 31).

Follow-up 26: a poll or pick-many comment can be written before the pick
and goes in with it in one request. Follow-up 28: a field scrolls itself
into view only while the person types or the keyboard changes, never on
a repaint.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Pictures and attach:
- Offer file in the attach picker attaches the offer to the draft at once,
  as paste does; the uploader's file row shows the thumbnail made in their
  browser (B5).
- A received picture offered on a question and carried by no record shows
  in a strip under that question through attNode/fillAtts, under the
  picture-approval rule: everyone once approved; before then the owner
  (Approve picture, Remove) and the uploader (Remove). Snapshots carry it in
  a new optional questionPics field; no schema version change (32).
- Report a problem and Your reports pick or paste one screenshot into an
  attachment chip, keeping the data: URL send path (F3).

Display primitives:
- Core.since()/Core.span() give one time phrase ("just now", "5 min ago")
  everywhere, proto.js included; no more "now ago" (B2).
- The round-ready note compares cids, not names (B7).
- whoLine() draws avatar, name and time; avatar sizes come from one set;
  avatars outside buttons are focusable and open the person card; "You" is
  the one self label (F14).
- One class each for the unread dot, inline link button, counter and empty
  state; danger buttons share one rule (F15).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01J3iPeJuMen4T3ryPGScwq9
Security review:
- S1: unsent drafts carry who wrote them (owner or pid) and come back
  only once the server says who the page is and it matches; Switch to
  another personal link drops them instead of saving.
- S2: the server refuses "Claude" (any case, trimmed) as a person's
  name at join and rename (reserved-name). The two server tests of a
  person already called Claude seed that name in state, as a session
  from before the refusal.
- S3: no "Use as my answer" on a result taken down, or on one's own
  Claude's answer the host has not shared.

Code review:
- C1: Save before the pick in the phone sheet closes the sheet and
  keeps the comment, so the options show.
- C2: files attached before the pick go in with it; the draft clears.
- C3: text typed while that pick is on its way stays in the box.
- C5: the pasted self-answer field has no maxLength; Post says how
  much to shorten it.
- C6: Ctrl or Cmd + Enter with the @ list open closes it and sends.
- C7: list rows made before start-up leave the composer kit's set once
  their row is gone.
- C8, C9: the follow-up 28 check asserts the field is out of view
  first; the mention check reads Bo's token in the stored comment.
- C10: drop the unused .vf-rep-count rule.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01J3iPeJuMen4T3ryPGScwq9
…red-pictures-display

# Conflicts:
#	plugins/planning/shared/web/app.css
#	plugins/planning/shared/web/app.js
One surface model (openSurface: placement, one close x named for the
surface, one focus trap, one 720 px breakpoint) and one menu model for
Help and More, with guest Settings in desktop Help. Shared builders for
person, proposal, request and result actions, one message menu for chat
and Discussion comments, one copy path, one device and browser source,
and every hard-to-undo action through confirmAct. Toasts honor the
Inbox mute and per-person pop-ups, with guest pop-up switches. The tour
gains guest and host steps. A waiting guest sees one centered card, and
the full-screen Inbox uses two columns from 1100 px.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01J3iPeJuMen4T3ryPGScwq9
…strip

Review round 1 on the shared page's pictures:
- S1/C2: an upload offered from a form is a draft until a record carries
  it, and a draft never shows under its question or reads back to anyone
  but its uploader and the owner.
- S2: the first record that carries an upload marks it carried for good,
  so clearing, deleting or editing a hidden answer or comment no longer
  brings its picture back as loose for everyone.
- S3/C1: a draft chip's x decides from the server's carried mark on my
  own uploads, not from files, and removes the uncarried upload again.
- The marks are server-set only: state.schema.json gains optional draft
  and carried, so older states load; no version change.
- C3: picking a screenshot moves focus from the hidden button to its chip.
- C5: dots keep the margins and sizes they had (6 px down by default,
  7 px on answer cards and question rows).
- C6: a screenshot still shrinking when the form clears or a newer one is
  picked is dropped.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01J3iPeJuMen4T3ryPGScwq9
The .vf-cm-new rule (6 px, no margin) never applied on main, where the
later .vf-ndot rule won: the comment dot showed at 8 px, 6 px down. Moving
.vf-ndot earlier let it apply. Drop it, so the dot looks as on main, and
check its size and margin with the other dots.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01J3iPeJuMen4T3ryPGScwq9
A session file main wrote has uploads with neither draft nor carried, and
main records the qid of a form's pasted picture, so after an upgrade an
owner's unsent paste would show under its question and read back to
every guest, and a picture whose hidden record was cleared would return.

schemaVersion 6 -> 7 marks every upload carried except an offer whose
server-set `at` is before 5026be8 (#8420), when forms began attaching
pictures, and that no `attachments` list anywhere names. An upload
records no origin, so its `at` decides; a missing, non-numeric or later
one is carried. Loose now reads only the marks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01J3iPeJuMen4T3ryPGScwq9
# Conflicts:
#	plugins/planning/shared/web/app.js
…idth

From 1100 px the switches sit open beside the messages with no button, so the
bell-mute state no longer needs the button there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01J3iPeJuMen4T3ryPGScwq9
…d page

State versioning: migrate.py, its version chain (the prototype import and
steps 1 to 7), the schemaVersion key, checks and fixtures, share.py
--import, server.py --initial-state and the prototype pages' outdated
reload banner are gone. Load drops a schemaVersion an earlier build wrote
and accepts every field the v7 build writes (state-v7-live.json pins it).
The build-hash reload stays. Deploy only onto a state already at v7.

Guest pop-ups: the owner sets the ones a guest starts with (guestPopups,
under Guests start with in Notifications); a guest's own switches win.

Polish: ack-round goes with the next open or close in one apply (lane
docs), and the working step says how long after two minutes; the Host
view shows each guest's behind count with a Behind chip; a return-visit
goal line; an in-app browser banner; About you in the guest's card, read
on the owner's Host view; device-scoped questions answer from the page
and prompt on a new device; the rail says when a filter hides rounds;
question-shape.md gains the "Which device are you on right now?" example.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01J3iPeJuMen4T3ryPGScwq9
…actions

# Conflicts:
#	plugins/planning/shared/tests/ui_composer.js
#	plugins/planning/shared/web/app.js
…and close review gaps

- The message menu and React pop-up open beside the control that opened them;
  they had no surface kind, so openSurface never placed them.
- A waiting person gets no Help: the button is hidden and ? does nothing.
- Read-only people get no Ask Claude about this in a message or comment menu.
- The Approve new joins setting says waiting people see the title and Why
  you're here; the confirm rule says a round asks only while questions are open.
- ui_surfaces checks the person and Help menus against the spec's lists, and
  that Escape on the send confirm sends nothing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01J3iPeJuMen4T3ryPGScwq9
…screen

A waiting person never sees the return-visit goal line (explicit guard), and
the waiting-screen check now covers the goal line and an Instagram browser.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01J3iPeJuMen4T3ryPGScwq9
…polish

# Conflicts:
#	plugins/planning/shared/tests/ui_inbox_page.js
#	plugins/planning/shared/tests/ui_moderation.js
#	plugins/planning/shared/web/app.js
- deviceKind classifies a touch device by its screen's short side, so a phone
  in landscape stays a phone and edits its own card (ui_per_device: landscape
  and tablet cases).
- While a round is sent, the owner reads that Claude may already be reading it
  (Cancel stays), and after two minutes the step says how long it has waited;
  gotchas.md says a cancel that beats the one-apply ack and open fails it with
  wrong-status, and Claude re-reads instead of retrying.
- Load refuses a state file below schemaVersion 7 (state-too-old) with how to
  recover; the README says how to go back to an earlier build and no longer
  calls the feature unreleased.
- The goal line stays off for a removed person.
- The in-app browser banner is never the owner's, and for a guest it opens the
  device panel with its Keep this private warning instead of copying the link;
  Android Messenger (FB_IAB/Orca-Android) is named Messenger.
- Drop a server test of a removed feature, reword the rewritten fixtures'
  docstrings, and point the state schema at session.py MENTION.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01J3iPeJuMen4T3ryPGScwq9
scripts/affected-tests-live.sh still lists old-page-defaults, state-v0-prototype,
state-v2-mentions, state-v3, state-v4 and state-v5, and this PR may not change a
script, so the script and those fixtures (with the prototype's gitleaks lines)
stay as main has them; no test reads them. The list change and their deletion
land separately.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01J3iPeJuMen4T3ryPGScwq9
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 20, 2026 11:34
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T11:37:45.337323Z 8f0f81b Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 6d3a793bc369f6a233ef27625754fee45bd1ae42: 0 finding(s), 0 as inline comments.

Security review: incremental, 6d3a793

I found no security issues in the changes since 8f0f81b. I read the 96-line incremental diff in full.

  • plugins/planning/shared/web/core.js: adds Core.myRecord(qid), which returns the caller's own answer record. On a per-device question it returns only this device's record. myAnswer and the "has the user engaged" check now use it. It is a client-side lookup that filters by the caller's own cid and device kind. It makes no requests and parses no input. It does not touch authorization, since the server's checks are not part of this diff.
  • plugins/planning/shared/web/app.js: myRec and the device-note visibility now call Core.myRecord. This is a UI read-path change. Nothing is written to the DOM through innerHTML, and no new data crosses a trust boundary.
  • plugins/planning/shared/tests/ui_per_device.js: adds a Playwright test for the per-device choice question with hard-coded fixtures. It has no secrets, no external input and no shell execution.

The diff does not delete or soften any standing instruction (CLAUDE.md, rules, skill bodies, hook allowlists), so the instruction-exception register was not needed.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8f0f81bc0c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/planning/shared/web/core.js Resolved
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 6d3a793bc369f6a233ef27625754fee45bd1ae42: 0 finding(s), 0 as inline comments.

Incremental review of 6d3a793 against 8f0f81b: no findings.

What changed. Core.myRecord is new in core.js. On a per-device question it returns only this device's own record. myAnswer, the hasAnswered check, the devNote visibility test in app.js and the answered check at core.js:506 now read through it. app.js myRec also delegates to it.

Checks I did (by reading the code only).

  • myRec previously ignored the device, so on a per-device question a phone could read the computer's pick as its own and send nothing. That is the bug the change fixes.
  • Every myRec and myAnswer caller (composer, sheet, format panel, pick and clear paths) now sees the same device-scoped record. This matches what scopeOf(qid) sends with the answer.
  • The optimistic patchPick already keys cards by device ((c.device || "") === (device || "")). The local patch and the new read therefore agree.
  • The core.js:506 rewrite keeps its meaning. The old test was "any non-hidden own record" and the new one is "the own record, if any, is not hidden". On a non-device question there is at most one own record, so these are the same. On a device question the new one correctly looks only at this device's record.

Tests. I did not run ui_per_device.js here. One weakness to know about: the assertion "the computer's pick is not shown as this device's" runs without waiting for the phone's own snapshot to contain the computer's Q2 card. If the phone has not yet received that card, myRecord is empty with or without the fix, so the assertion can pass without the fix. The three taps before it make that unlikely but do not rule it out. The later assertion, that the phone's own card is stored with the pick, is the one that fails without the fix. It is not a blocking issue.

No closing-issue criteria were evaluated against this incremental diff beyond the above.

…-device questions

Core.myRecord is the one own-record lookup, with the device predicate on a
question asked once per device; myAnswer, tookPart, app.js myRec (picks,
multi/rank/scale state, cites, attachments, the kept comment) and the
new-device prompt all read it. Before, a phone opening a choice the computer
answered took the computer's pick as its own and refused to send the same pick,
and could carry the computer record's comment or attachments.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01J3iPeJuMen4T3ryPGScwq9
@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 20, 2026
Merged via the queue into main with commit d166ddf Oct 20, 2026
33 checks passed
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