Repository navigation
Conversation
前端入口早已移除、后端端点与级联软删仍全量在册,且 /share 的 302 落地页 指向 BrowserRouter 不识别的 hash 路径(历史分享链接实为坏链)。按人工确认的 「全部下线」方案 A 收束这一半下线中间态: - 先解除删除图表/数据集/数据源三处级联软删对 bi_share 的依赖(否则删表会让 删除操作在事务内回滚); - 删除 handler / service / entity / model / 四份 /api/shares 端点 / /share/:token 公开视图;SetupRoutes 随之去掉仅服务该视图的 serveWebUI 形参; - 删除前端 Share.tsx / ShareView.tsx、/shares 与 /share/:token 路由、sharesApi、 store.createShare,及全部 share.* / shareView.* / nav.shares i18n 文案; - 契约同步:openapi.yaml 移除 share paths/schemas/params,重跑双端 api-gen (gen_types.go / gen_types.ts); - 迁移 00008 只给 bi_share 打 RETIRED 注释、不 DROP(保留历史行比删更安全)。 测试: - 三处 soft_delete_test 改为断言级联不再触碰 bi_share; - go test -race ./... 全绿;vitest 690 通过;biome + tsc 干净; - 真实浏览器 E2E(单进程 :24452 + PG):导航无「分享」、图表页正常、/shares 与 /share/:token 仅渲染 SPA 外壳不再出分享页、建删图表走通级联路径。
Contributor
Author
|
✅ Review Agent 复核通过:代码 review + 本地构建/单测(前后端)+ 内置浏览器端到端实测(golden path 已验证),已合并。 |
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.
做了什么
按 issue #112 人工确认的**方案 A(全部下线)**收束 bi_share「半下线」中间态:前端入口早已无、后端端点与级联软删仍全量在册,且
/share/:token的 302 落地页指向 BrowserRouter 不识别的/#/share/...(历史分享链接实为坏链)。怎么做
bi_share的UPDATE(否则删表会让删除操作在事务内报错回滚)。handler/share.go、service/share/、entity/share.go、model.Share、四份/api/shares*端点、/share/:token公开视图;SetupRoutes随之去掉仅服务该视图的serveWebUI形参。pages/Share.tsx、pages/ShareView.tsx、/shares与/share/:token路由、sharesApi、store.createShare,及全部share.*/shareView.*/nav.sharesi18n 文案(zh/en 同步,由 messages.test 守卫)。api/openapi.yaml移除 share paths/schemas/params,重跑双端 api-gen(gen_types.go/gen_types.ts)。前端生成物用仓库外openapi-typescript@7.13.0 + typescript@5.9.3跑法(仓内typescript@7缺ts.factory),并先用未改动 openapi 逐字节复现已入库生成物再套用本次改动。bi_share打RETIRED注释、不 DROP(保留历史行比删更安全,软删体系本就绝不物理删除)。测试证据
soft_delete_test改为断言级联不再触碰bi_share。go test -race ./...全绿;vitest690 passed;biome check+tsc --noEmit干净。:24452+ PG 192.168.10.70):/shares、/share/abc123仅渲染 SPA 外壳,不再出分享管理页/密码页,无应用级 console 错误;code 20000 status ok,删后20300 not found)。Closes #112