--story=135788934 旧 UI 接入构建链与双前端产物#610
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 157f4fb15e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| //go:embed ui/dist | ||
| var frontendAssets embed.FS | ||
|
|
||
| //go:embed ui_old/dist |
There was a problem hiding this comment.
Add ui_old/dist to the build workflow
With this new embed pattern, the Go compiler now requires ui_old/dist to exist. I checked .github/workflows/build.yml: the build-bscp job still creates only ui/dist before running make build_bscp, unlike the updated lint workflow. On every push/PR from a clean checkout, that job will fail on the missing embed pattern before it can compile; update the build workflow or build both frontends before make build_bscp.
Useful? React with 👍 / 👎.
| if body := renderBody(FrontendNew); !strings.Contains(body, "new-ui") { | ||
| t.Errorf("new variant index body = %q, want contain %q", body, "new-ui") | ||
| } | ||
| if body := renderBody(FrontendOld); !strings.Contains(body, "old-ui") { | ||
| t.Errorf("old variant index body = %q, want contain %q", body, "old-ui") |
There was a problem hiding this comment.
Assert on real rendered markers
These assertions make the new package test fail with the actual frontend inputs: RenderIndexHandler returns only the embedded index.html, and a repo-wide search shows new-ui/old-ui exist only in this test, not in the UI templates that are rendered. Anyone running go test after generating the dist directories will get false failures even when variant selection works; assert on a deterministic fixture/config difference instead.
Useful? React with 👍 / 👎.
157f4fb to
1fb58fa
Compare
No description provided.