Skip to content

feat: add an optional conversation task-tree canvas userscript - #2128

Draft
Songjun113 wants to merge 1 commit into
BigPizzaV3:mainfrom
Songjun113:feat/conversation-canvas
Draft

feat: add an optional conversation task-tree canvas userscript#2128
Songjun113 wants to merge 1 commit into
BigPizzaV3:mainfrom
Songjun113:feat/conversation-canvas

Conversation

@Songjun113

Copy link
Copy Markdown

Problem and behavior

Long Codex conversations make it difficult to recover which approaches were attempted, abandoned or selected. This adds an opt-in userscript under tools/conversation-canvas/: a conversation-header entry opens a tree canvas across the conversation area, with pan/zoom, foldable branches, node details and links back to source messages.

Users can organize the available history through a background Codex task or an OpenAI-compatible API. History is paginated and split into complete text fragments; each batch must pass source-coverage and tree-structure validation before its checkpoint commits. Subsequent runs process new text, while failed batches can resume. The API path supports SSE progress, bounded transient-error retries and an optional DeepSeek V4 non-thinking mode.

Scope

This is an optional tool contribution, following the existing tools/ layout. It includes readable source modules, a dependency-free build, a generated userscript, tests and a synthetic browser fixture. It does not enable itself or change manager/Rust behavior. The release build explicitly excludes local conversation annotations.

The current native adapters target Windows Codex Desktop 26.901.6511 / Codex++ 1.2.56 and use private, versioned desktop module exports. I am opening this as a draft to discuss the contribution location and adapter maintenance before proposing built-in integration.

Validation

From tools/conversation-canvas/:

npm test                          # 63 passing tests
npm run build
node --check public/canvas.user.js

Tests cover long-message coverage, history paging, batch persistence and resume, invalid/invented sources, background task isolation, SSE framing, cancellation/retry boundaries, 10,000-node layout and exclusion of private annotations from builds. The strict-CSP synthetic browser fixture verified canvas interaction and one-click recovery from a 503 response to a complete five-message tree.

Earlier testing on the target Windows desktop verified background organization, persistence and source navigation. The latest streaming/fast-mode changes were verified with synthetic API responses; live provider speed and cross-version compatibility have not been established. Upstream Rust workspace tests and clippy have not been run for this optional JS-only addition.

Review points

  • Is tools/conversation-canvas/ an appropriate initial home for this opt-in tool?
  • Would stable Codex++ host APIs for paginated history, background tasks, HTTP and source navigation be preferred over the current desktop adapters?

No personal conversation data, API keys, logs, backups or extracted desktop bundles are included. Contributions use the repository's AGPL-3.0-only license.

@BigPizzaV3

Copy link
Copy Markdown
Owner

@Songjun113 催一下:这条还是 draft 状态,等你标 Ready for review 我们再开始审查。

@BigPizzaV3

Copy link
Copy Markdown
Owner

看到这条还是 draft,我先不阻塞。等你标 Ready to review 后我会做完整审查(含对当前 main 的合并测试和 relay_config/model_suffix 相关回归验证)。

给你两点预检建议(基于我处理同类 PR 的经验):

  1. 它改的是端侧 userscript 注入,尽量保持与 assets/inject/renderer-inject.js 的现有结构对齐——最近有两条 PR(fix: update Codex compatibility and renderer performance #2050/fix: align Dream Skin runtime with Codex 26.825 #1712)在这个文件上互相冲突,合并时如果 canvas 与那两条的实现重叠会出冲突。
  2. 标 Ready 前先 git rebase origin/main 一次,现在 main 因 feat: 聚合供应商支持按模型路由 #1780/fix(windows): re-resolve Codex Desktop path after updates (#2094, #2095) #2097/fix: align Dream Skin runtime with Codex 26.825 #1712 合并已经推进,你 fork 分叉点较早。

Ready 后我会第一时间跑完整测试 + CI 看板。

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