Skip to content

Revamp pass 8: one publish bar, one set of hand-off words, the storefront split by page - #1355

Merged
teddashh merged 14 commits into
mainfrom
revamp/pass-8
Nov 16, 2026
Merged

teddashh merged 14 commits into
mainfrom
revamp/pass-8

Conversation

@teddashh

@teddashh teddashh commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Pass 8 of the platform revamp. It makes three busy screens simpler, with no new features and nothing retired:

  • the store page says once whether the store is public, what to do next, and offers one button for it;
  • every "hand this to your AI" button uses the same few words;
  • the public storefront code is split by page, so a contributor who fixes the cart opens the cart file. Buyers see no difference.

No migration. Review the merges in this order:

  1. revamp/p8-front: the storefront split (no behaviour change);
  2. revamp/p8-words: the words;
  3. 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:

State The bar shows
not public, no products 還沒公開。下一步:新增第一件商品。 + 新增商品 (focuses the add form)
not public, products, can publish 還沒公開。下一步:發布商店。 (or 已停止公開。…) + what will be published + 發布
not public, cannot publish 還沒公開。請有發布權限的成員發布。
public, no changes 已公開第 N 版。 + the last publish time + 查看公開頁 + 複製連結
public, saved changes 已公開第 N 版。有變更還沒公開。 + what will be published + 發布更新 + the links

When 發布 is disabled, the bar says why: 先儲存或取消還沒儲存的修改。 / 照片還在儲存,完成後就能發布。 / 正在確認可上架內容…

  • The tab 店面與發布 is now 店面. 停止公開 and 網址已固定。 move to 商店資料.
  • The status line at the top shows only the last action's result; the public state is in the bar.
  • 開店準備 shows once. The orders link reads 訂單.
  • Save messages no longer repeat the republish reminder: every save already reloads the preview, so the bar shows 有變更還沒公開。 The sentence about removing seller contact details keeps its warning, now naming 發布更新.
  • Removed: the unmounted HostedStoreNextSteps component and its helper. Its test now tests the bar (tests/runtime/hosted-store-publish-bar.test.ts).

2. The words

  • Agent (capital A) means the member's own agent; 聊天 AI means a web chat. Hand-off buttons read 交給我的 Agent or 交給聊天 AI.
  • Guide links read Agent 說明 ↗.
  • Keys use 建立金鑰, 換新金鑰 and 複製金鑰; instructions and tasks are 建立, not 產生 (for example 建立上傳指令, 重新建立指令, 建立任務).
  • A renamed button is renamed everywhere it is named: client and server messages, the agent upload protocol (packages/skill-upload-client/protocol.md, regenerated runtime text), the newcomer guides and the docs.
  • Kept on purpose: /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:

File Lines Holds
order-api.ts 173 the shared order API calls, patterns, error copy and parseQuantityInput
payment-alert.tsx 22 the payment alert
order-page.tsx 944 the order page (bootOrderPage)
add-to-cart.tsx 255 the add-to-cart form and the cart header link
cart-page.tsx 711 the cart page (bootCartPage)
payment-return-page.tsx 684 the payment return page
order-access-page.tsx 184 the order access page
main.tsx 21 imports zod-csp first, then starts the pages; re-exports parseQuantityInput

Only import and export lines changed; the import graph has no cycle. The built storefront.js went from 93,134 to 93,095 bytes.

4. Not in this pass

The LaunchFlow double confirmation, the two supplier screens behind supplier_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:

  • the store bar: 17 browser specs (among them hosted-store 13, storefront-offline-checkout 27, hosted-store-policies 10, hosted-supply-catalog 14, supplier-console 8) and 4 runtime tests, plus a new spec, publish bar guides a new store from first product to publication and dirty republish;
  • the words: 19 browser specs (among them skill-book-upgrade 25, newcomer-guides 24, skill-upload 14, community-journal 23) and the runtime tests agent-tokens-ui, skill-submissions, skill-submission-flow and skill-upload-instruction;
  • the split: 8 runtime tests (among them 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-console SC-E2E-01 and two hosted-shared-orders tests expected 已發布; it now reads 已上架 N 件商品,公開頁已更新。) and the category delete confirmation (storefront-cart CATEGORIES-E2E). bc004f007 updates them; a repo-wide scan found no other test string that the product no longer contains. The three spec files pass locally on the head e9b0fdc5a (20 of 20).

On the merged head 63fd8c26c (9d3e8284f adds the photo-spec fix, e9b0fdc5a the four assertions):

  • passing: typecheck, module:check (no unmapped surface), the agent contract check, check:runtime-text, contracts:build with 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);
  • the governance unit suite: 693 of 695. The two github-behavior-host cases fail only on this machine (the supervisor's dependency cap is below the local node_modules), the same as on main;
  • local CodeQL: the same 9 results as main, no new alert;
  • hosted-store-photo (needs CI's trust-auth database): 46 of 46 passed locally on 9d3e8284f, 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); 9c08c0df1 fixed them.

The full browser suite and every runtime partition run in this PR's CI.

🤖 Generated with Claude Code

teddashh and others added 10 commits November 15, 2026 22:39
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>
teddashh and others added 4 commits November 16, 2026 00:56
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 detna-vibe-coding left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 detna-vibe-coding left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@teddashh
teddashh merged commit 6ffa0d5 into main Nov 16, 2026
27 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.

2 participants