Skip to content

feat(frontend): codex 资产页 FineTune 风(五子区)— Stage 4 (Vue 重构)#506

Open
Cmochance wants to merge 1 commit into
feat/frontend-vue-stage3from
feat/frontend-vue-stage4
Open

feat(frontend): codex 资产页 FineTune 风(五子区)— Stage 4 (Vue 重构)#506
Cmochance wants to merge 1 commit into
feat/frontend-vue-stage3from
feat/frontend-vue-stage4

Conversation

@Cmochance

Copy link
Copy Markdown
Owner

Stage 4 of the Vue 3 frontend rewrite (stacked on #505). Migrates the Codex assets half (~45% of the old app.js, L4271-7372) to Vue SFCs — functionally equivalent.

内容

  • ManagedMarkdownPanel:agents/memories/skills 参数化为单组件(per-resource 本地状态,消除旧全局态 bug 源)
  • McpPanel:servers(JSON 编辑器)/ plugins / marketplace 三 subpane,完整保留写盘前安全二次确认
  • ConversationsPanel:列表 / 详情(8 类型)/ 导出 / 删除
  • HistoryModal 共享(LCS diff + restore 分流);lib/miniMd.ts(XSS-safe markdown);useToast/ToastHost;CodexPage 5 子 tab + KeepAlive

验证

  • npm run build(vue-tsc + vite)绿;dist 零内联 script(CSP 合规);无 eval/Function
  • 本地 code-review:1 BLOCKER(conversation 详情解包)已修,其余高保真通过

合并策略

stacked,不单独 merge — 全部 stage 完成 + e2e 验收后逐个合并。

Refs MOC-254

…rsations)— Stage 4

逐字移植旧 app.js 第 4271-7372 行(~45% 旧应用)到 Vue 3 SFC,功能等价:
- ManagedMarkdownPanel 参数化 agents/memories/skills(resource prop + features + chipsFor),
  消除旧 codexDocActiveResource 全局态 bug 源;path picker/preview/edit/backup/history/reveal
- McpPanel 三 subpane(servers JSON 编辑器 + plugins + marketplace),
  完整保留 MOC-106 写盘前安全二次确认(stdio cmdline+cwd+env / http url+凭据+header)
- ConversationsPanel 列表/详情(8 item 类型)/导出(targetPath + blob/JSON 双响应)/删除(部分失败)
- HistoryModal 共享(LCS 行 diff,managed→restore-raw / mcp→servers/restore 分流)
- 共享 lib/miniMd.ts(XSS-safe markdown)+ useToast/ToastHost + i18n tFmt
- CodexPage 5 子 tab + KeepAlive 保活 + ?tab= query
- 丢弃旧 dead code(legacy row-form / skills 文件快照 / codex-skills-restore 死按钮)

Refs MOC-254

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2f6602fc09

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +477 to +478
onMounted(() => loadSubpane(subpane.value))
watch(subpane, (sub) => loadSubpane(sub))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restore the deeplink import listener

When the Vue MCP UI is active, protocol imports are now dropped because this component only loads subpane data and no code under frontend/src listens for codex-deeplink (checked with rg). The Tauri side still emits that event from src-tauri/src/main.rs, and the old frontend/js/app.js listener called codexMcpHandleDeeplink, so launching a codex-app-transfer://v1/import?... link no longer opens the confirmation/install flow.

Useful? React with 👍 / 👎.

Comment thread frontend/src/api/codex.ts
Comment on lines +223 to +228
export const deleteConversations = (sessionIds: string[]) =>
api<{ deleted?: string[]; failed?: { sessionId: string; reason: string }[] }>(
'POST',
'/api/conversations/delete',
{ sessionIds },
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve delete failure details

The conversations delete endpoint intentionally returns HTTP 200 with success:false plus a failed array when every requested session cannot be moved (checked delete_handler in src-tauri/src/admin/handlers/conversations.rs). Calling it through the generic api() wrapper throws before returning that payload, so the all-failed delete case shows only a generic request failure and skips the existing failure-detail alert/reload path; this endpoint needs raw fetch handling or a wrapper exception for this response shape.

Useful? React with 👍 / 👎.

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.

1 participant