xiaomakuaiz f444cd61b7 feat(desktop): 本地项目支持拖动排序,一拖即固化为手动序
侧栏项目此前是纯活跃度排序:按组内最新会话的 updated_at 降序,而任何一次写
sidecar(发消息、改名、归档)都会 bump updated_at。结果是常驻的主力项目被
临时翻一下的项目挤下去,用户按不住自己的工作区布局。

排序模型选了"全序快照":第一次拖动把当时可见的顺序整体固化,此后列表不再
随活跃度浮动,新出现的项目插到最前。另外两种都排掉了——"稀疏置顶"(只固定
拖过的、其余仍自动排)把列表切成两个语义不同的区,用户得记住哪些在哪半边;
"稀疏插入"(记住每项的目标下标、其余填空隙)更糟,自动区一变动,那个下标的
左右邻居全换人,"我把它放在第 3 位"名存实亡。全序快照的代价是一拖就全手动,
但它是唯一一种"看到什么就是什么"的。

几个非显然的取舍:

- 顺序 state 留在 Sidebar 内部,没提到 App。archivedProjects 提上去是因为
  App.tsx 要用它过滤 lastDir/recentDirs;顺序没有侧栏之外的消费者,提上去
  只是徒增两个 props。App.tsx 因此零改动。
- 排序做成外挂的 applyProjectOrder 而非改 groupByProject 内部。后者被新任务
  页的"最近项目目录"复用,那里语义上就该是最近使用,不能跟着手动序走。
- 用 pointer events 而非 HTML5 DnD。tauri.conf.json 没配 dragDropEnabled,
  默认值会拦截 webview 的拖放事件;draggable 元素内拖拽在 macOS WKWebView
  上另有历史坑。pointer events 还能自己定阈值,4px 之内仍算点击,不然想折叠
  项目会变成误拖。
- 拖动全程不重排 DOM。项目行下面挂着会话行,整块跟手太重;改成起手快照一次
  各行 rect,之后只按指针 Y 与行中线比对,松手才真正重排。快照期间 DOM 不动,
  所以它全程有效。
- 落点同时写进 ref,提交以 ref 为准。pointermove 是 continuous event,它的
  setState 会被 React 批处理,pointerup 的闭包里读到的可能还是上一帧的落点——
  表现是"拖了一格却没动",且只在快速拖动时复现。
- pointerdown 要排除来自 button 的事件。快捷新建按钮只 stopPropagation 了
  click,pointerdown 照样冒泡上来;一旦在它上面 setPointerCapture,click 的
  target 就被重定向到整行,"+"按钮直接失灵。
- 搜索态不给拖。此时列表是过滤过的,提交会把没显示出来的项目从快照里冲掉。
- 不需要过期清理。每次提交写的都是当前可见的全序,已删除/已归档的项目自然
  不在其中。归档再恢复的项目因此按"新项目"处理排到最前,与直觉一致。

落点用"插到第几项之前"的缝隙下标(0..length)而不是目标行下标:后者表达不了
"排到末尾",也说不清落在被拖项自身两侧时该不该算原位。

验证:tsc --noEmit 无输出;vitest 260 passed(新增 18 条);vite build OK。
纯函数覆盖顺序固化、新项目插最前、首尾与原位落点、越界收敛、跨平台目录归一、
脏数据容错;另起一组 SSR 断言守接线面——哪些行挂了拖动锚点(单项目不挂、归档
项目不挂、普通对话不进项目树)、已存顺序有没有真的渲染出来。

遗留(未做,记在这):
- 拖动手势本身没有自动化覆盖。现有基建是 renderToStaticMarkup,没有 jsdom,
  装不了 pointer 事件。这也正是把落点计算抽成纯函数的原因,只剩手势绑定要
  人工过一遍。
- 拖到列表边缘不自动滚动。项目通常十几个,一屏内够用;项目多到要滚动时再补。
- 已归档项目区不支持排序,仍按活跃度排。
2026-07-26 11:45:15 +00:00
2026-07-26 10:39:55 +00:00
2026-04-03 18:57:03 +08:00

MonkeyCode

MonkeyCode

Service Images Client Release License: AGPL-3.0

Try Online · Self-Hosted Deployment · Discord · 中文

What Is MonkeyCode?

MonkeyCode is an open-source enterprise-grade AI development platform with built-in development environment management, AI model management, AI task management, and project requirement management. Unlike typical vibe coding tools, MonkeyCode is designed as an AI assistant for professional engineering teams.

  • You can deploy MonkeyCode inside your enterprise network and share it with your R&D team, so developers can start development tasks quickly while engineering leaders manage AI development workflows centrally.
  • You can also use our online environment directly. It includes managed development environments, built-in large language models, and native mobile support, so you can use leading AI agents anywhere.

Screenshots

MonkeyCode AI task workspace
AI Task Workspace
MonkeyCode cloud terminal and task execution
Cloud Terminal and Task Execution
MonkeyCode project collaboration and file management
Project Collaboration and File Management
MonkeyCode mobile task and file management
Mobile Task and File Management

Features

You do not need to assemble tools, set up environments, or jump between workflows. Give MonkeyCode a requirement and it carries the work from development to validation, turning AI coding into a sustainable workflow.

  • Free to start: No client download and no local environment setup. Open the browser, create an account, and start your first AI development task in seconds.
  • Cloud development environments: No dependency on a local development machine. Every task runs behind a real server-side environment, with build, test, and preview workflows completed in the cloud.
  • Broad model support: GLM, Kimi, MiniMax, Qwen, DeepSeek, and other mainstream models are integrated. You can switch by task type or select a model manually.
  • Native mobile support: Deep iOS and Android support keeps PC and mobile data in sync, so agents can continue running tasks while you are away from your desk.
  • Fully open source: The core code is public on GitHub. Anyone can audit, fork, and extend it while keeping control over technical choices and security policies.
  • Private offline deployment: Enterprises and teams with strict data privacy requirements can deploy MonkeyCode inside their own networks and keep data local.

Usage

Online

Open MonkeyCode Online to get started:

https://monkeycode-ai.net/

Self-Hosted Deployment

Recommended configuration:

  • MonkeyCode console: at least 2C / 4 GB / 40 GB
  • Development environment host: at least 8C / 16 GB / 100 GB

Online installation:

bash -c "$(curl -fsSL 'https://monkeycode-ai.com/online/install')"

For more deployment methods, configuration details, and operations guidance, see the deployment documentation.

Comparison

Dimension MonkeyCode Cursor Claude Code Codex
Online usage 🟢 🟢 🟢 🟢
Local IDE 🔴 🟢 🟢 🟢
Local CLI 🔴 🟢 🟢 🟢
Requirement and SPEC management 🟢 🔴 🔴 🔴
Cloud development environment 🟢 🟡 🟡 🟡
Code completion 🔴 🟢 🔴 🔴
Automated PR / MR code review 🟢 🟡 🟡 🟡
Team collaboration 🟢 🔴 🔴 🔴
China model support 🟢 🔴 🔴 🔴
Private deployment 🟢 🔴 🔴 🔴
Open source 🟢 🔴 🔴 🔴

Community and Support

Join the community to discuss MonkeyCode usage, deployment, and development with other developers.


WeChat Group

Feishu Group

DingTalk Group

You can also get support through:

Star History

Star History Chart

License

MonkeyCode is open source under the GNU Affero General Public License v3.0.

S
Description
企业级 AI 编程助手,支持私有化离线部署,兼容第三方及本地化大模型,具备企业级管理面板,具备代码安全功能。
Readme AGPL-3.0
220 MiB
0 Stars 1 Watchers 0 Forks
Languages
TypeScript 42.1%
Go 40.2%
Rust 10.9%
JavaScript 3.1%
PLpgSQL 1%
Other 2.6%