Repository navigation
Revamp pass 8: one publish bar, one set of hand-off words, the storefront split by page - #1355
Conversation
apps/portal-web/src/storefront/main.tsx held every buyer page in 2,920 lines. It now only starts the pages; each page is its own file: - order-api.ts: request helpers, patterns, error copy, parseQuantityInput - payment-alert.tsx: the payment alert - order-page.tsx, add-to-cart.tsx, cart-page.tsx, payment-return-page.tsx, order-access-page.tsx: one page each, with its boot function Code moved unchanged (only import and export lines differ), the import graph has no cycle, zod-csp stays the first import, and the Vite entry and the built assets/storefront.js keep their names. Buyers see no difference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"Agent" now always means the member's own agent and "聊天 AI" a web chat. Hand-off buttons read 交給我的 Agent or 交給聊天 AI, guide links read Agent 說明 ↗, keys use 建立金鑰 / 換新金鑰, and generated instructions and tasks use 建立 instead of 產生. Only visible words change; /development/* server pages and task Markdown an agent reads keep their wording. The page-tools idea button keeps 交給 Agent 送出 because the dialog's Agent section button now reads 交給我的 Agent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The store page said whether the store was public, and offered the publish action, in three places, plus a 開店步驟 checklist and about twenty "重新發布後才會更新" sentences. One bar above the tabs (公開狀態) now holds the state, the next step and its one button: 新增商品, 發布 or 發布更新, with 查看公開頁 and 複製連結 once published. - The 店面與發布 tab is now 店面; 停止公開 and 網址已固定。 move to 商店資料. - 開店準備 shows once; 預留訂單 reads 訂單. - Save messages no longer repeat the republish reminder; every save already reloads the preview, so the bar shows 有變更還沒公開。 - Store specs follow the bar; a new spec walks a new store from its first product to a dirty republish. Nothing is retired: every action stays, in one place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…state The status line at the top of the store page repeated the public state (已發布・第 N 版・<time>, 尚未發布) right above the new bar. It now shows only the last action's result; the bar shows the state and, once published, the last publish time (上次發布 ...). - The seller-information hint keeps its warning: removing a phone number changes the public page only after 發布更新. - The supplier-material notice drops its republish reminder. - The unmounted HostedStoreNextSteps component and its helper are removed; their test now tests the bar (tests/runtime/hosted-store-publish-bar.test.ts) and the module descriptor maps the bar. - Store specs read the public state from the bar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Messages, the agent upload protocol, the newcomer guides and the docs still named buttons by their old labels; a member told to press 「重新產生指令」 found no such button. - 「重新建立指令」 in client and server messages and in packages/skill-upload-client/protocol.md (runtime text regenerated). - The agent upload panel heading matches its button: 用我的 Agent 上傳. - The newcomer guides name 下載開店包 and 交給我的 Agent. - The shop-kit notice says 交給你使用的 AI, like the page help beside it. - The trial kit and the agent-commerce READMEs describe the 公開狀態 bar, the 店面 tab and the 訂單 link. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…vamp/pass-8 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mp/pass-8 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The notice is now 已更新店面草稿。; the bar shows the unpublished change. Seven multi-line assertions and one negative check still expected the old sentence (found by a local trust-auth run of hosted-store-photo). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…blish bar The status line now shows only the last action's result, so after 發布 it reads 已上架 N 件商品,公開頁已更新。 instead of 已發布・第 N 版. The category delete confirmation no longer says 發布更新後,. CI on #1355 failed on these four assertions (supplier-console SC-E2E-01, two hosted-shared-orders tests, storefront-cart CATEGORIES-E2E). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
detna-vibe-coding
left a comment
There was a problem hiding this comment.
Source review completed for 9d3e828: publication digest/version, dirty/unknown-operation guards and permissions remain intact. Independently checked 57 extracted storefront declarations against the base; bodies are unchanged apart from exports/whitespace. Runtime partitions and aggregate are green, but Verify 43814605102 is not green: UI shards 2 and 4 have four deterministic stale-copy assertions.
- tests/e2e/hosted-shared-orders.spec.ts:133 and :234, plus tests/e2e/supplier-console.spec.ts:265: still expect
已發布in.hosted-store > [role="status"]. Actual successful command text is已上架 1/2 件商品,公開頁已更新。; publication state now belongs to the公開狀態region. Assert that region's published revision (and retain the following behavior checks). - tests/e2e/storefront-cart.spec.ts:1324: confirmation still expects
商品會保留在全部商品;發布更新後,這個分類的舊連結將無法使用。; actual new copy is商品會保留在全部商品;這個分類的舊連結將無法使用。. Update only this copy assertion; preserve the frozen-before-republish / 404-after-republish checks at :1326.
Evidence: jobs 133124053793 and 133124053798 in https://github.com/FreeTWAI/freedom-platform/actions/runs/43814605102 . Shard 1 is still running; please collect its final outcome before batching the test-only fix. No rerun requested and no formal approval submitted while required CI is failing.
detna-vibe-coding
left a comment
There was a problem hiding this comment.
Approved e9b0fdc after completing the incremental review on top of the source review recorded at 9d3e828.
The entire delta from that reviewed head is four copy assertions in three test files. The three publication assertions use the successful command status (公開頁已更新。) rather than the published-revision region I suggested. This is acceptable here: their subsequent real buyer reservation, supplier isolation, API and inventory checks remain intact, and hosted-store.spec.ts separately verifies the public-state region's revision 1, saved dirty state and revision 2 after republishing. The category test retains both frozen content before republish and 404 after republish. No product logic or behavioral assertions were removed by this fix.
Verified latest CI run 43820645836: all 21 Verify jobs passed, including the final verify job; CodeQL passed. Runtime aggregate reports 12,158 tests passed. Browser aggregate reports 2,798 tests across 266 files, all six passes successful, bound to base edc54e0, head e9b0fdc and candidate fecf76f. Rechecked that the PR is ready, open and still on the same head. This review is not a production deployment or live acceptance claim.
Pass 8 of the platform revamp. It makes three busy screens simpler, with no new features and nothing retired:
No migration. Review the merges in this order:
revamp/p8-front: the storefront split (no behaviour change);revamp/p8-words: the words;revamp/p8-store: the publish bar.1. The store page: one 公開狀態 bar
Before, the publish action, the public link and the "republish" reminder repeated across tabs: three publish places, three public links, a 開店步驟 checklist and about twenty "重新發布後,公開頁才會更新" sentences. Now one bar above the tabs (
HostedStorePublishBar.tsx, region 公開狀態) holds them:When 發布 is disabled, the bar says why: 先儲存或取消還沒儲存的修改。 / 照片還在儲存,完成後就能發布。 / 正在確認可上架內容…
HostedStoreNextStepscomponent and its helper. Its test now tests the bar (tests/runtime/hosted-store-publish-bar.test.ts).2. The words
packages/skill-upload-client/protocol.md, regenerated runtime text), the newcomer guides and the docs./development/*server pages, and task Markdown an agent reads, keep their words. The page-tools idea button keeps 交給 Agent 送出, because the dialog's Agent section button now reads 交給我的 Agent.3. The storefront split
apps/portal-web/src/storefront/main.tsx(2,920 lines) held every buyer page. It is now:order-api.tsparseQuantityInputpayment-alert.tsxorder-page.tsxbootOrderPage)add-to-cart.tsxcart-page.tsxbootCartPage)payment-return-page.tsxorder-access-page.tsxmain.tsxzod-cspfirst, then starts the pages; re-exportsparseQuantityInputOnly import and export lines changed; the import graph has no cycle. The built
storefront.jswent from 93,134 to 93,095 bytes.4. Not in this pass
The
LaunchFlowdouble confirmation, the two supplier screens behindsupplier_console_enabled, narrower runtime CI, and CODEOWNERS and the ruleset.5. Verification
Each builder ran every spec and runtime test that asserts a changed string, each alone, all passing:
hosted-store13,storefront-offline-checkout27,hosted-store-policies10,hosted-supply-catalog14,supplier-console8) and 4 runtime tests, plus a new spec,publish bar guides a new store from first product to publication and dirty republish;skill-book-upgrade25,newcomer-guides24,skill-upload14,community-journal23) and the runtime testsagent-tokens-ui,skill-submissions,skill-submission-flowandskill-upload-instruction;zod-csp-probe,buyer-journey,storefront-cart-pages) and 9 storefront browser specs.CI on
9d3e8284f: every runtime partition passed, and two browser shards failed on four assertions that still expected the old wording: the status line after 發布 (supplier-consoleSC-E2E-01 and twohosted-shared-orderstests expected已發布; it now reads已上架 N 件商品,公開頁已更新。) and the category delete confirmation (storefront-cartCATEGORIES-E2E).bc004f007updates them; a repo-wide scan found no other test string that the product no longer contains. The three spec files pass locally on the heade9b0fdc5a(20 of 20).On the merged head
63fd8c26c(9d3e8284fadds the photo-spec fix,e9b0fdc5athe four assertions):typecheck,module:check(no unmapped surface), the agent contract check,check:runtime-text,contracts:buildwith no diff, the launchpad status test,git diff --check,npm run check:pr, the selector unit suite, and the deploy tests (1,094 of 1,094);github-behavior-hostcases fail only on this machine (the supervisor's dependency cap is below the localnode_modules), the same as onmain;main, no new alert;hosted-store-photo(needs CI's trust-auth database): 46 of 46 passed locally on9d3e8284f, with a password on the fixture role instead of trust. The first local run found 5 failures, all one missed notice (已更新店面草稿,發布店面後才會生效。in multi-line assertions);9c08c0df1fixed them.The full browser suite and every runtime partition run in this PR's CI.
🤖 Generated with Claude Code