Repository navigation
test(ui): pin the direct-URL record form save and nav CEL visibility in Live E2E UI - #28034
Merged
Merged
Conversation
…cs to Live E2E UI A full-page edit form opened by direct URL saves, toasts and lands on the record inside the app, with the stored value read back; a nav entry's bare-string visible is read as CEL, shown when true and hidden when false. list-row-action-cel.spec.ts moves from the nightly allowlist to the ci one. Claude-Session: https://claude.ai/code/session_01Utp6CaJoinvGQSbHeDaWBe Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
domain:ui#3 · os-bill · session_01Utp6CaJoinvGQSbHeDaWBe 席位核对ACCEPT · head
Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Bill · project thread
Fixes #27555
Clause-②: no
Metadata-protocol: none
维护者速读
Live E2E UI多了两个场景:按 URL 直接打开整页编辑表单、改标题、保存,要看到保存提示、留在应用内的记录页、经 API 回读到新值(console: a full-page record form opened by direct URL saves silently and then leaves the app for /_console/home #27454);应用导航项的裸字符串visible按 CEL 求值,为真显示、为假隐藏且不报错(console: a bare-string CEL predicate (navvisible, pagevisibleWhen) runs on the legacy evaluator and fails, though the spec defines a bare string as CEL shorthand #27457)。list-row-action-cel.spec.ts从夜间清单移入必过清单。ui/package.json的两条脚本清单,不改产品代码。本地Run the live e2e specs步骤从约 35 秒变成约 40 秒,远低于 [devx] Live E2E UI skips every server-only PR: widen its gate to the server packages the Console runs against, and pin the spec-time budget #27550 的 2 分钟预算。回滚 = 把两个文件名移回test:e2e:live:nightly(新文件删掉即可)。ui/e2e/live/record-form-direct-url.spec.ts;ui/e2e/live/list-row-action-cel.spec.ts的第二个用例;ui/package.json两条脚本。Live E2E UI检查日志,Run the live e2e specs步骤应列出 15 条全部通过,其中 3 条来自这两个文件,步骤耗时在 2 分钟内。What changes
ui/e2e/live/record-form-direct-url.spec.ts(console: a full-page record form opened by direct URL saves silently and then leaves the app for /_console/home #27454). The test creates its ownshowcase_taskthrough the data API (on a seeded project,status: backlog), opens/apps/com.example.showcase/showcase_task/record/ID/editwithpage.goto(a fresh page, so the only earlier history entry isabout:blank, the direct-URL entry the defect needs), renames the title, clicks Save and asserts: the save request answered 2xx; the toastTask "NEW TITLE" updatedis visible; the URL path is exactly the record's detail path, inside the app; the form page is gone;GET /api/v1/data/showcase_task/IDreturns the new title. The task is deleted infinally. A new file rather than an extension ofaction-modal.spec.ts: that file is about the modal transport, and a full-page form by URL is a different surface.ui/e2e/live/list-row-action-cel.spec.tsgains a navigation case (console: a bare-string CEL predicate (navvisible, pagevisibleWhen) runs on the legacy evaluator and fails, though the spec defines a bare string as CEL shorthand #27457). It authors its own package and app through the metadata API the way Studio's menu-entry inspector writes VISIBLE WHEN (a bare string): one entry'org_owner' in current_user.positions, one'e2e_no_such_position' in current_user.positions, publishes the drafts, opens the app and asserts the first entry is shown, the second is absent, and nopredicate could not be evaluatedline reached the browser console (hidden because false, not because it faulted closed).inis CEL-only syntax, so on the legacy evaluator both entries are hidden. The test first asserts the seeded admin'sget-sessionpositions containorg_owner, and deletes the package infinally. The existing row-action case is unchanged.ui/package.json:record-form-direct-url.spec.tsandlist-row-action-cel.spec.tsjointest:e2e:live:ci;list-row-action-cel.spec.tsleavestest:e2e:live:nightly. Both passed the promotion rule (readings below). Both headers say they are in the:ciallowlist since this card, the waystudio-editor.spec.tssays it.ui/package.json, the private workspace root (object-ui-monorepo,"private": true); no published package changes.Acceptance notes
Finding, for the seat to file (class a). console: a full-page record form opened by direct URL saves silently and then leaves the app for /_console/home #27454's fix holds only when the form is opened on the app's package-id address. Opened on the app's NAME alias (
/apps/showcase_app/showcase_task/record/ID/editor/apps/showcase_app/showcase_task/new, the address every other live spec uses and the form old bookmarks carry), the console first moves the URL to the package-id address with areplacenavigation (canonicalAppPathnameeffect inAppContent.tsx, from console: one app's sidebar opens pages under two app ids — /apps/clm/… for contracts, /apps/app.objectstack.hotclm/… for obligations and the approvals inbox #26183). That navigation gives the entry a generatedlocation.key, soRecordFormPage'shasInAppHistory = location.key !== 'default'reads true andgoBackrunsnavigate(-1), out of the document. Measured on this branch's stack, one fresh page per row:history.state.keyafter loadshowcase_app(alias)about:blankshowcase_app(alias)about:blankcom.example.showcasecom.example.showcaseIn a real tab the alias rows land on whatever page the tab showed before, as in console: a full-page record form opened by direct URL saves silently and then leaves the app for /_console/home #27454. This spec opens the package-id address, the one the console's own links and the address bar carry, so it pins the fix as delivered; an alias-URL case would be red today and is not added. Dedupe words:
RecordFormPage goBack location.key,canonical app pathname replace history,direct URL alias save leaves app.Page block
visibleWhen(console: a bare-string CEL predicate (navvisible, pagevisibleWhen) runs on the legacy evaluator and fails, though the spec defines a bare string as CEL shorthand #27457's reproduction B) is not added live: the card asks for one navigation case. The jsdom acceptance testSchemaRenderer.bareCelVisibleWhen-27457.test.tsxcovers it..github/workflows/ci.yml'slive-e2e-uicomment still says "the four allowlisted live specs", andexamples/app-showcase/test/console-live-specs.live.test.tssays "Four of its specs are the requiredLive E2E UIjob"; both counts were already stale and are now further off (eight files).ci.ymlis out of bounds for this card and the test file is outside its file surface; neither count is read by a gate (the test reads the nightly script by name, now 13 specs).The project attribution link in the first two lines names this card thread, as the harness requires of a PR the thread opens.
Verification
All runs: this branch's workspace backend (
ui/e2e/live/ci/start-backend.sh,objectstack dev --seed-admin --freshonexamples/app-showcase, port 4110) and the Console production build (VITE_BASE_PATH=/ vite build) served byvite previewon 5290 withDEV_PROXY_TARGET, theLive E2E UIjob's stack step for step after its turbo build filters;--retries 0; one long-lived backend across all runs (the CI job boots a fresh one per run, so this is the harder condition). Shared container, 4 cores.pnpm run test:e2e:live:ci(the 5/5)Per-test time over the 5 pair runs (min–max)
visiblepredicates are CEL-evaluated (unchanged)visibleread as CEL (new)Budget: about +5 s on the step locally (incumbent 34.8 s, enlarged 38.5–40.3 s). The job comment in
ci.ymlmeasured the incumbent four-spec step at 14–24 s on CI; this PR's ownLive E2E UIrun is the first CI reading of the eight-file step, projected well inside the 120 s budget.Ablations (one per scenario, through scripts/ablation-replace.mjs under the verify lock, Console rebuilt per leg)
Both specs ran in each leg, so each leg also shows the other scenario's test staying green.
RecordFormPage.tsxanchorconst hasInAppHistory = location.key !== 'default';replaced withconst hasInAppHistory = window.history.length > 1;(the pre-fix test). Mutation landed (anchor 1 to 0, replacement 0 to 1, blob dd43d8e6 to 70c521b1); the rebuilt bundle carrieshistory.length>1once (0 before). Result:record-form-direct-urlred (Task "…" updatedtoast not found: the page went Back toabout:blank), the two CEL tests green.visible, pagevisibleWhen) runs on the legacy evaluator and fails, though the spec defines a bare string as CEL shorthand #27457:ExpressionEvaluator.tsanchorif (!unwrappedEnvelope) {replaced with a branch that never takes the CEL route for a bare string and carries a string marker. Mutation landed (blob 484f34de to 4ac105fe); the rebuilt bundle carries the marker once. Result: the nav case red (CEL Shown Entrynot visible), the row-action case and the record-form test green.git diff HEADempty (the tool's own verdict), the Console rebuilt from HEAD, both markers 0 in the bundle, and every reading above was taken after that.Gate lines (command :: exit code)
node scripts/pm/dispatch-gates.mjs --commandsderived 31 families from the three changed paths; each ran locally, plusnode scripts/check-sdui-manifest.mjs,pnpm --dir ui run type-check:e2e(the program lists both changed spec files) andpnpm --dir ui check:new-line-citations: 34 lines, every one exit 0.--ranreconciliation: 31 derived, 31 run, 0 NOT-MEASURED. CI runs the rest (the repo-wide scans,Live E2E UIitself).All readings on head
2b1c6d27.Generated by Claude Code