Skip to content

docs(smart-forms): document the page-level browser tab title - #106

Open
yevhen-porechnyi wants to merge 2 commits into
corezoid:developfrom
yevhen-porechnyi:feature/ce-15862-page-title
Open

docs(smart-forms): document the page-level browser tab title#106
yevhen-porechnyi wants to merge 2 commits into
corezoid:developfrom
yevhen-porechnyi:feature/ce-15862-page-title

Conversation

@yevhen-porechnyi

Copy link
Copy Markdown
Contributor

What

A CDU page config may now carry a root-level title, which becomes the browser tab title of the page, and appGetPage returns it alongside the rest of the Page. Without this the agent has no way to know the field exists — it would neither read it from a rendered page nor write it when authoring one.

Changes

  • appGetPage summary advertised the Page as { grid, forms[], notifications[], query, language }. title joins that list.
  • docs/user-flows/cdu-page-protocol.md — the field in the GET response shape (§2.2) and in the page model tree (§3).
  • skills/simulator-smart-forms/SKILL.md — the "Page Config Format" section had no block for the root of a config at all; it went straight from the minimal example to Grid. Adds a compact one covering the root-level keys, with title explained.

Behaviour being documented

title names the browser tab. Omit it and the host names the tab <page> - <script ref>, or the script ref alone on the index page. A Smart Form embedded into another screen (a modal, a section header) never renames the browser tab, whether a title is set or not.

pong-server resolves [[locale]] keys and {{viewModel}} values inside the title, so it can be localised or built at runtime — Order {{orderId}}.

Platform side

Shipping with control-cdu v0.51.8 plus the matching pong-server and pong-front-end changes (internal, CE-15862). The field travels through the public /papi/1.0/pages/... route, which is why the tool surface needed updating.

Checks

go build ./... and go test ./internal/tools/ pass; the drift test is unaffected, since no method, path or operationId changed.

A CDU page config may now carry a root-level `title`, and `appGetPage` returns
it alongside the rest of the Page. Without this the agent has no way to know
the field exists: it would neither read it from a rendered page nor write it
when authoring one.

- `appGetPage` advertised the Page as `{ grid, forms[], notifications[], query,
  language }`; `title` joins that list.
- The page protocol doc gains the field in the GET response shape and in the
  page model tree.
- The smart-forms skill had no section for the root of a page `config` at all —
  it went straight from the minimal example to `Grid`. Adds a compact one, with
  `title` explained: omit it and the host names the tab `<page> - <script ref>`,
  or the script ref alone on `index`; a form embedded into another screen never
  renames the browser tab either way.

Backend side: pong-server resolves `[[locale]]` and `{{viewModel}}` inside the
title, so it can be localised or built at runtime.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@gh-corezoid

Copy link
Copy Markdown
Contributor

AI Review

Adds documentation for the root-level title field in CDU page configs — updating appGetPage's summary string, the page protocol doc (GET response shape + page model tree), and the smart-forms skill's Page Config Format section.

Checklist

Check Result
U1 — Conventional commit format ✅ pass
U2 — No leaked credentials ✅ pass
U3 — No merge commits ✅ pass
U4 — PR targets correct base branch (develop) ✅ pass
U5 — Build & tests (Go) ✅ pass
U6 — Architectural & design consequences ✅ pass
S1 — No manual edits to public/ ⬜ skip — no public/ files changed
S2 — API path parameter names match papi-openapi.json ⬜ skip — no path or parameter changes
S3 — New tools have eval scenarios ⬜ skip — no new tool functions added
S4 — Discovery artifacts committed if source changed ✅ pass — ran gendiscovery; no diff produced
S5 — All six manifest files version-synced ⬜ skip — no manifest files changed
S6 — README and ARCHITECTURE updated for new tools ⬜ skip — existing tool updated, not renamed or added

Issues found

No issues found.


This review was generated automatically. A human maintainer should still make the merge decision.

The Page block added in this branch shows `query` as an object and
`notifications` as an array, which is only half the story: those values are
resolved server-side, so each may instead be a single `{{viewModel}}` or
`[[locale]]` token that arrives as an object or an array. Without saying so the
skill teaches the shape and quietly hides the mechanism.

Also names the positions that are *not* resolved — `grid.type`,
`grid.styleClass`, `grid.sideBar`, `grid.header.class` and the keys inside a
page-level `extra` — since a placeholder written there is left as literal text
with no error to explain it. Both lists come from running `renderPage` against
every position.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@gh-corezoid

Copy link
Copy Markdown
Contributor

AI Review

Re-review after synchronize: extends the title-field documentation with a new SKILL.md section explaining which page fields accept whole-value {{viewModel}}/[[locale]] placeholders and which are taken as literal text.

Checklist

Check Result
U1 — Conventional commit format ⚠️ warning (see below)
U2 — No leaked credentials ✅ pass
U3 — No merge commits ✅ pass
U4 — PR targets correct base branch (develop) ✅ pass
U5 — Build & tests (Go) ✅ pass — no Go changes in new commit; Go change from first commit verified in previous review
U6 — Architectural & design consequences ⬜ skip — docs-only, trivial
S1 — No manual edits to public/ ⬜ skip — no public/ files changed
S2 — API path parameter names match papi-openapi.json ⬜ skip — no path or parameter changes
S3 — New tools have eval scenarios ⬜ skip — no new tool functions added
S4 — Discovery artifacts committed if source changed ✅ pass — no internal/ files changed in new commit; verified in previous review
S5 — All six manifest files version-synced ⬜ skip — no manifest files changed
S6 — README and ARCHITECTURE updated for new tools ⬜ skip — existing tool updated, not renamed or added

Issues found

  • warning (U1): The second commit subject line docs(smart-forms): note that page fields accept whole-value placeholders is 72 characters, exceeding the 70-character limit. Consider trimming, e.g. docs(smart-forms): page fields accept whole-value placeholders (62 chars). Non-blocking.

This review was generated automatically. A human maintainer should still make the merge decision.

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