Skip to content

console: the public form thank-you panel fills its record field tokens from the submit answer (#28005 ui half) #28444

Closed

Description

@objectstack-fleet

domain:spec#1 · os-tesla · session_01L9qibwb6hBqszPTYJobitm

Filing gate: ③ maintainer-ruled split. #28005 was ruled B by the maintainer at 2026-10-31 15:10Z (ruling record 6545210989): spec first, then server, then ui. This is the ui step.
Reach: the web-to-case visitor, who sees their case number on the thank-you panel instead of the literal token text.
Blocked-by: #28440 (spec half) and #28443 (server half) (the submit answer carries fields).

Wanted

  • ui/apps/console/src/components/FormPage.tsx: the thank-you panel's title / message replace each {{record.field_name}} token with fields[field_name] from the submit answer, read through the spec's PublicFormSubmitResponseSchema.
  • A token with no value in the answer renders as empty, never as the literal token text.
  • Values are inserted as text and never as HTML.
  • Use the same token reading as the spec. thankYouRecordFieldNames and the spec's token regex are the one grammar, so do not write a second regex.

Riders

Tests

  • A message with {{record.case_number}} shows the answer's value.
  • A missing value renders empty.
  • HTML in a value is shown as text.
  • Ablation: dropping the fill reds the test.

Activity

  1. objectstack-fleet commented on Oct 31, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#1 · os-tesla · session_01L9qibwb6hBqszPTYJobitm

    Ruling-ref: 6548758413 (#28440) · 2026-10-31T20:33Z

    The maintainer said 「同意」 at 2026-10-31T20:29Z. That approves the four spec names as proposed, and this half reuses them as written: PublicFormSubmitResponseSchema / PublicFormSubmitResponse (@objectstack/spec/api, with fields beside id), thankYouRecordFieldNames (@objectstack/spec/ui), and lint rule thank-you-record-field.

  2. objectstack-fleet commented on Nov 1, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#1 · os-tesla · session_01L9qibw2uhdSeHYfnZdAf4V

    Claim: PM loop round 1 · 2026-11-01T00:18Z
    Session: session_01L9qibw2uhdSeHYfnZdAf4V (seat; implementation by card thread session session_01L9qibySWZrcTi5MPXZ61kx, mode:thread)
    Account: os-tesla (the seat's linked user as GET /user answers it; the card's assignee)
    Branch: claude/project-thread-cdb4cc
    Worktree: objectstack-issue-28444
    Domain: domain:ui
    Seat: domain:ui#1
    File surface: ui/apps/console/src/components/FormPage.tsx and its tests, the public-form submit path in ui/packages/data-objectstack/** only if the answer's fields is measured dropped there, content/docs/ui/public-data-collection.mdx and content/docs/ui/forms.mdx (the card's Skills-docs rider), root changeset (stop on breach; explain in the report)
    Container & model: M, mode:thread, model: default (dispatch-gates --tier: no path-derived mandate), effort: high
    Clause-②: no
    Metadata-protocol: semantic (a declared slot starts to render; measured from the diff)
    Responsibility: n/a — not a defect card
    Thread-read: 6548786624
    Premise: holds (Blocked-by: #28440 and #28443 both closed; server PR #28479 merged 93c0a639)
    Serial constraints cleared: no live claim or open PR touches ui/apps/console/src/components/FormPage.tsx at this read.
    Order: /mnt/project-files/ui-seat-1/r2026-10-31b/dispatch-28444.md. Rulings: #28005 ruling B (6545210989); Ruling-ref 6548758413 (spec names reused as written).

  3. objectstack-fleet commented on Nov 1, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#1 · os-tesla · session_01L9qibySWZrcTi5MPXZ61kx
    os-dev-report

    {
     "issue": 28444,
     "status": "done",
     "branch": "claude/project-thread-cdb4cc",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/28493",
     "session": "session_01L9qibySWZrcTi5MPXZ61kx",
     "premise_still_valid": true,
     "summary": "FormPage.tsx: readThankYouAnswerFields parses the public submit answer through PublicFormSubmitResponseSchema; fillThankYouPanel takes the token names from thankYouRecordFieldNames and splits each literal record token out of title/message with String.split (no regex in the Console for this token); a name with no value fills empty, a filled value is not re-read, output is a React text child. The submit switch gets its own thank-you arm that stores the answer fields on the public route only. Docs: one sentence plus example in content/docs/ui/forms.mdx and public-data-collection.mdx. Changeset @object-ui/console minor. data-objectstack untouched (submitPublic is a direct apiFetch returning the bare body; fields not dropped). PM assumption 'stop if the token pattern is not exported' disproved: the pattern is not exported, but the fill needs none beyond the extractor's names.",
     "tests": "head b88d54a9: pnpm --dir ui exec vitest run apps/console/src/components/ -> 55 files, 594 passed (new FormPage.thankYouRecordFields-28444.test.tsx: 9 tests). After merging origin/main 8c3f9d93 (head 60fc7181): same run 55 files 594 passed. pnpm --filter @object-ui/console type-check -> exit 0, 0 errors (after full dts build). Ablation via scripts/ablation-replace.mjs (fillThankYouPanel call in render -> raw panel): 4 failed / 5 passed (all render pins red, helper unit pins green); restored, blob a4ac3681 == HEAD, git diff HEAD empty. No build needed for the ablation: the test imports ./FormPage from source.",
     "gates": "dispatch-gates --commands (b88d54a9): 66 families, all exit 0 (incl. check-sdui-manifest + self-test, check:test-source-alias, check:cross-package-test-inputs, check:undeclared-dep-imports, check:doc-authoring, check:docs-transcript-drift, check-changeset-no-major, spec check:docs, ui vitest scripts/ 171 files 4901 passed 2 skipped). check:query-options-erasure exit 124 under a 280 s per-gate timeout in the first sweep, exit 0 on re-run without one. --ran: 66 derived, 66 run, 0 NOT-MEASURED. ui check:new-line-citations: 0 new. PR check-runs: in_progress at report time.",
     "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
     "line_budget": "n/a — no skills/** path touched",
     "deviations": [
      "none in file surface: FormPage.tsx, new test file, two docs pages, root changeset",
      "shared files touched: none of the neighbours' declared files"
     ],
     "files_changed": [
      ".changeset/28444-thank-you-record-fields.md",
      "content/docs/ui/forms.mdx",
      "content/docs/ui/public-data-collection.mdx",
      "ui/apps/console/src/components/FormPage.thankYouRecordFields-28444.test.tsx",
      "ui/apps/console/src/components/FormPage.tsx"
     ],
     "mcp_calls": "4 — reads only: issue_read x3 (get, get_comments x2), pull_request_read x1 (get #28490); 0 writes",
     "api_writes": "2 — fleet-write relay pr_create (#28493); post-stamped os-dev-report comment on #28444",
     "open_questions": [
      {
       "question": "Internal-route thank-you panel with record tokens now renders them empty (its answer is CreateDataResponse, refused by the strict public schema). Fill it from the internal answer's record?",
       "options": [
        "A leave as is (card scope: public answer only)",
        "B new card: internal panel fills from CreateDataResponse.record"
       ],
       "recommendation": "A, because the slot is ruled for the anonymous public answer and the internal path defaults to landing on the record"
      }
     ],
     "out_of_scope_findings": [
      "carrier: none · noted, not filed: translated panel text naming a field the base text does not renders that token empty (server fills base-text names only; measured by reading form-routes.ts, not live)"
     ]
    }
  4. objectstack-fleet commented on Nov 1, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#1 · os-tesla · session_01L9qibw2uhdSeHYfnZdAf4V

    Landed · 2026-11-01T01:36Z · PR #28493 merged through the merge queue as 1d201b06 at 2026-11-01T01:34:17Z, on the first pass. Record: ACCEPT 6551653340 (head 60fc7181); no contract record owed (Clause-②: no, no contract face touched).

    probe on ui/apps/console/src/components/FormPage.tsx before (1d201b06~1) now (origin/main)
    function readThankYouAnswerFields 0 1
    function fillThankYouPanel 0 1
    thankYouRecordFieldNames 0 3

    The card closed on Fixes; pm:dispatched comes off in the same stroke as this note. content/docs/ui/forms.mdx and public-data-collection.mdx carry the token sentence and example; the Skills-docs: rider rode the PR body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions