Commit Graph

44 Commits

Author SHA1 Message Date
qyh15 262fdc4ad4 fix(sidebar): replace expansion icons with plain CSS triangles 2026-11-12 09:31:31 +08:00
lead 308a790412 fix(sidebar): keep the chevron slot to a single clipped glyph
A second shape was painting itself over the disclosure triangle on one project
row, so the marker read as a mush of two glyphs. Clip the 14px slot and drop any
svg that is not its first child.
2026-11-08 15:32:32 +08:00
lead 34a41d70b9 fix(sidebar): render project row glyph at a fixed 16px slot with medium stroke
The project row was the only row kind drawing a 1px Regular artwork inside a
size-less flex slot, so the folder+plus glyph got squashed into an unreadable
grey blob. Give .wgCategoryIcon an explicit 16x16 box and switch the glyph to
IconProjectAddOutlineMedium, matching every other row icon.
2026-11-08 15:27:46 +08:00
qyh15 dcc47fc0b6 feat(farm): gather a project's folders into one workspace
A session can only reach its own workspace directory, so folders spread over
several places could not be read and written by one session. The new farm
route builds one real directory whose entries are links to the user's folders
(junction on Windows, directory symlink elsewhere) and registers it as a
workspace.

Nothing is copied or moved. Removal unlinks entries only and aborts as soon as
it meets a real directory, so a farm can never take a user's folder with it.
2026-11-07 18:08:27 +08:00
qyh15 bc6a427dfe feat(tree): one row per project — folders no longer own session lists
Extra folders were rendered as their own rows with their own sessions, so a
project that carried a second directory split into two session lists. On a
cloud workspace the base row also exposed the local mirror id
(`wmvl31c7ilkuc`) as a folder name, which read as a project nested inside
itself.

Folders are now extra DIRECTORIES of one project: `applyFolders` returns the
workspace's sessions untouched, so the owner row and every member workspace
share a single list. Folders stay manageable from the workspace menu
(⋯ → 管理文件夹) where they can still be added, rooted, opened or removed.

Drops the now-unused folder-label/label-matching helpers, updates the
regression test to assert one merged row, and rewrites the CHANGELOG entry.
typecheck 0 errors, 290 tests pass, all three verifiers pass.
2026-11-07 17:53:22 +08:00
qyh15 571638b836 fix(tree): stop rendering the base directory as a folder row
A workspace with extra folders used to grow one folder row per directory,
including its own base directory. For a cloud workspace the base is the
locally generated mirror (`wmvl31c7ilkuc`), so the sidebar showed that id as
a folder name and hid every session owned by the workspace inside it — one
cloud project read as a project nested inside itself.

The base directory is now the workspace row itself: `nodes[].sessions` keeps
its sessions and only real extras become folder rows. `folderNode` no longer
takes `isBase`, so a mirror id can never be labelled as a folder again, and a
workspace without extras keeps the exact pre-folders node shape.

Adds a regression test covering the mirror case (extra folder only, base
sessions on the workspace, no `wmvl31c7ilkuc` label) and documents the change
in CHANGELOG. typecheck 0 errors, 290 tests pass.
2026-11-07 17:46:32 +08:00
qyh15 36b9cb2bc0 fix(folders): make the folder overlay crash-safe and consistent
The folder sidecar was written as a whole document with no concurrency
control, and any read failure silently degraded to an empty document, so a
later edit could erase every workspace's folder configuration. Rework the
read/write path end to end:

- Agent side: expose a content revision, require If-Match on PUT, answer
  409 with the current document, serialise read-compare-write, and fail the
  GET loudly instead of serving an empty overlay. Unknown schema versions
  are reported and never downgraded back to v1.
- Client: load/save report failure instead of fabricating an empty
  document, edits go through one serial queue with optimistic update,
  rollback on error, and reload on conflict. Editing is blocked while the
  overlay cannot be read. Creating a workspace is compensated when the
  follow-up save fails, so no orphan workspace is left behind.
- Paths: normalise NFC and lexically fold "." and "..", decide
  absoluteness by spelling instead of process.platform, share one
  implementation between core and host, and keep an existing root when a
  member is re-registered at the same path.
- Remote folders: resolve the owner root from the SSH probe instead of the
  "~" alias, and make "subfolder of this project" versus "register a new
  cloud workspace" an explicit choice in the dialog.
- Stop shipping the client source map, which embedded the full TypeScript
  sources in the published package.
- Track the SSH integration plan and cover the new behaviour with tests
  (CAS, persistence, remote path parsing).

Verification: both tsconfigs typecheck clean, 288 tests pass, build
succeeds, and all three ad-hoc verifiers pass.
2026-11-07 17:29:57 +08:00
qyh15 efac404c1a chore(release): 1.3.0 2026-10-31 19:25:14 +08:00
qyh15 2386f8b912 chore(release): 1.1.0 2026-10-31 17:54:30 +08:00
qyh15 f47bd65310 feat: add cloud folders for remote workspaces 2026-10-31 17:26:54 +08:00
qyh15 47227d33c2 docs: install from this fork instead of the upstream repository
The published fork now carries the bundle, so the installation and
uninstallation snippets point at newbieQQ/dsh-better-workspace-group and
the dependency name it installs as (workspace-groups-local).
2026-10-28 21:12:09 +08:00
qyh15 63c193bca1 chore(release): 1.2.0
Ships the docked workspace area: the default workspace and the
not-classified bucket move into a fixed bottom dock with their own
shares and independent scrolling, plus the science icon set, the grouped
icon picker and the single trailing row slot.
2026-10-28 21:06:57 +08:00
qyh15 362e3e13fb fix: give the dock regions their own share of the sidebar
The bucket and the expanded session list now stop growing at about a
quarter of the viewport each and scroll from there, so with the tree, the
bucket and the default workspace all expanded no single region can push the
other two out of view.
2026-10-28 20:55:01 +08:00
qyh15 932e652bad fix: let the docked bucket keep its height so it can expand
A shrinkable bucket stayed one row tall however far it was expanded, which
reads as "cannot expand". The bucket no longer gives up height; it scrolls
past its cap, and the expanded default-workspace list below absorbs the
shrink instead.
2026-10-28 20:52:45 +08:00
qyh15 a119358fb3 fix: restore the dock height cap that swallowed the tree
A min-content floor outweighs max-height, so the dock grew to the full
session list: the tree was squeezed to nothing and the dock ran past the
sidebar's bottom edge, which is what read as the workspace row overlapping
the bucket. The floor is a fixed length again (84px), the bar clips its own
content, and the bucket may shrink only down to one row.
2026-10-28 20:46:45 +08:00
qyh15 49ffe318f3 fix: stop the dock from squeezing the not-classified bucket
The bucket was allowed to shrink inside the capped dock, so an expanded
default workspace squeezed it below one row and left a halved row above the
bar. The bucket now keeps its height (it scrolls on its own past its cap),
the dock never shrinks below its own rows, and the expanded session list is
the only child that gives up height.
2026-10-28 20:43:45 +08:00
qyh15 a97644d08c fix: bound the bottom dock so the expanded default workspace cannot leak
The dock was an unbounded flex item: a long default-workspace session list
grew past the sidebar, got clipped by the root, and a partial row showed
through at the edge. The dock is now a capped, opaque, self-clipping panel
with its expanded session list in its own scroll area, so the workspace row
stays put and every row is either fully shown or scrolled.
2026-10-28 20:38:25 +08:00
qyh15 5544f82ccd feat: dock the not-classified bucket above the default workspace
The 'not classified yet' bucket (???/???/???/???/???/Uncategorized)
now leaves the scrolling tree and shares the bottom dock with the pinned Host
default workspace, above a divider. It keeps its category row, children,
menus and drag behaviour; the dock caps its height and scrolls it on its own,
so a large bucket never swallows the tree. Search results never repeat the
bucket (matches are shown in the dock instead), and the rail hides the dock.
2026-10-28 20:34:09 +08:00
newbieQQ f7a9f08ac4 docs: rename repository to dsh-better-workspace-group
Updates the README titles, the NOTICE repository identifiers and the package.json repository/homepage/bugs URLs. The npm package name stays workspace-groups-local so installed plugin ids and profile registrations keep working.
2026-10-28 20:26:29 +08:00
newbieQQ 283c31c9f3 docs: fork attribution, NOTICE and 1.1.0 metadata
Adds the upstream credit section to both READMEs, a bilingual NOTICE.md open-source statement, and repoints repository/homepage/bugs at the fork while keeping the MIT (c) 2026 zcol notice untouched.
2026-10-28 20:19:26 +08:00
qyh15 fe455421c5 feat: science icons, pinned default workspace and one trailing row slot
- add 28 hand-drawn "materials & lab" glyphs (lab operations, materials,
  characterization, devices) to the group icon set and expose them as their own
  sections in the appearance picker; identical 16x16 line style, bilingual
  labels, old ids untouched
- make the appearance dialog scroll inside the host modal so the footer and the
  pin button never collide with the icon grid
- give every row kind one right-aligned trailing slot: the member count or the
  session time sits flush with the row's right edge and yields to the "+" / "..."
  buttons on hover or keyboard focus without any reflow; all rows now order them
  "+" then "..."
- move the host default workspace out of the tree into a pinned bottom bar with
  the full workspace row capabilities, deduplicated from groups, top level and
  search results
- add tools/verify-row-layout.mjs: vitest cannot start in this checkout, so the
  layout invariants are asserted over the stylesheet and the row markup
2026-10-28 20:08:18 +08:00
qyh15 2fb87d1904 release: workspace-groups-local 1.0.0 2026-10-28 18:44:51 +08:00
qyh15 fe3b9b0503 chore: standalone local plugin identity (workspace-groups-local) 2026-10-28 16:05:29 +08:00
qyh15 79b9fcbbc6 chore: repair mangled package description 2026-10-28 16:02:15 +08:00
qyh15 a17f2ef153 fix(folders): keep a remote terminal for sessions in mirror subfolders
remote-ssh resolves a session's remote side by reading .remote-ssh.json at the session cwd and never walks up, so a session started in <mirror>/sub silently fell back to a local terminal. The folders route gained POST, which stamps the workspace's connection record into the new subfolder with remotePath adjusted to the matching remote directory; remote-ssh always excludes that file from sync. The client asks for the stamp right after adding such a folder.
2026-10-28 15:33:52 +08:00
qyh15 d166d4a872 fix(folders): remote-ssh projects only take mirror subdirectories
@zhangfengshun/dsh-remote-ssh registers a remote workspace as an ordinary workspace whose directory is a local mirror of the remote root. The folder picker would have accepted any local directory for such a project, and sessions started there would never sync. The host now reports the mirror base alongside the overlay, the dialog swaps the picker for a relative-path field for mirror-backed projects, and joinSubpath refuses absolute input and .. escapes so a typo cannot leave the mirror.
2026-10-28 15:21:04 +08:00
qyh15 9ac682c06e chore: release 0.6.0 (multi-root workspaces) 2026-10-28 00:42:03 +08:00
qyh15 0db6e06ccf feat(sidebar): multi-root workspaces (extra folders + one root per project)
A DSH workspace owns exactly one canonical directory, so the folder layer is a plugin-side overlay instead of a core change: \/workspace-groups.folders.json stores extra folders and the chosen root per workspace id (strict on write, tolerant on read). The tree gains a folder row only when a project actually has extras, and sessions are partitioned by their recorded cwd with the most specific folder winning. A folder row can start a session in its own directory through sessions.create({workspaceId, cwd}); the base folder keeps the platform gesture so repeated clicks reuse the blank session. Folders start expanded so attaching one never hides rows that were already visible.
2026-10-28 00:41:51 +08:00
qyh15 15976d7e51 feat(sidebar): keep only the bloom, drop the branch stem and per-row dots
The dashed ghost route, the grown stroke and the dot on every row read as a stray black line down the sidebar, and depth is already carried by the 16px indent step. FlowerBranch now measures rows as before but renders just the bloom on the active row (spinning while that session works); the stroke and dot CSS is gone. branch.ts keeps computing the full geometry and stays unit-tested, so the stem can come back without re-deriving it.
2026-10-27 20:35:45 +08:00
qyh15 7c6d8c2a0d fix(sidebar): uniform 16px nesting step and one type scale for group/project/session
The session row started at 40px (+20 for the status slot = 60) while its project label sat at 58, so depth 2 and depth 3 looked flush. Sessions now start at 54 (title 74), giving 42/58/74 for the three levels. Project labels drop the mono face and weight 600 so all rows share one 12px scale, with depth carried by the indent and a 600/500/400 weight ramp.
2026-10-27 20:26:00 +08:00
qyh15 133b54d69d feat: pinned tabs, tab context menu and group appearance (0.5.0)
Tab strip: pinned block, drag reorder with cross-boundary pin flip, middle-click close, double-click tab rename (never rewrites the session), context menu (close / others / right / pin / rename), responsive overflow; persistence v2 keeps pinned+title and still reads v1.

Sidebar: per-group colour and icon (20 presets or 1-4 char glyph) plus pinning, stored in the manual overlay 'appearance' map with strict-write/tolerant-read validation; animated group folding with the flower-branch overlay suppressed while rows move.

Tests: pure-logic suites for tabs, appearance partition and overlay parsing; verified by tools/verify-tabs.mjs and tools/verify-appearance.mjs (vitest cannot spawn in this sandbox).
2026-10-27 20:11:32 +08:00
qyh15 7e79aad9f5 docs: 补 DEVELOPMENT.md(结构/构建/扩展指引),build 脚本去掉嵌套 pnpm
- DEVELOPMENT.md:源码来源与对齐校验、模块职责表、构建与装回 DSH 的命令、
  平台外置模块/purity gate/CSS 虚拟模块三条硬约束、常见扩展动作、已知坑
- package.json:build 里 `pnpm build:types` 改为直接 tsc,verify 同理,
  避免在只把 node 放进 PATH 的环境(如 DSH 沙箱)里因为找不到 pnpm 而失败
2026-10-27 17:06:01 +08:00
qyh15 b30f771aeb feat: 以已安装 0.4.2 版本源码重建工作树(顶部会话标签条 / 快切面板 / 分支视图)
仓库 HEAD(942babe, package 版本仍是 0.1.0) 只有侧栏分组浏览器,缺少用户
实际运行的 0.4.2 构建中的会话标签条等模块。本次以
profiles/desktop 中已安装的 @dsh-xhl/workspace-groups@0.4.2 的
lib/client.js.map(内联 sourcesContent)为准重建完整 client 源码树,
并补齐宿主侧 host-tabs.ts 与 /workspace-groups/tabs 路由。

重建结果与安装构建逐字节对齐:
- 宿主产物 lib/index.js 与安装版 diff 行数 0
- 客户端产物 lib/client.js 仅 1 行差异(CSS 虚拟模块内联的绝对路径)
- lib/types 下 27 个 .d.ts 与安装版完全一致

相对仓库 HEAD 新增:SessionTabs / QuickPanel / FlowerBranch / open-folder /
subagent-lineage / store-hook / tab-* 模块,tsdown 平台外置模块补充
@deepseek-ai/dsh-client-store,package 版本对齐 0.4.2。
2026-10-27 17:04:10 +08:00
zcol 942babe9ed fix: 侧栏收起图标对齐 + 有项目时不再误显“还没有工作区”
- Bug1 侧栏(rail)收起时图标飘逸:wgRail 改为 12px 轨距、SectionHeader 垂直堆叠、
  IconButton 放大为 36px 圆、TreeBody 隐藏,对齐官方 36px 中轴轨距
- Bug2 空状态误判:原仅判断 groups.length===0,导致无分组但有项目时仍顶置“还没有工作区”
  改为 groups.length===0 && topLevel.length===0 && !topLevelDropActive(拖拽出组显示插入线而非空提示)

参考 docs/BUGFIX_侧栏与空状态_20250824.md,构建与 68 项测试通过
2026-08-24 18:39:40 +03:00
zcol fcaf221ac0 feat(v0.7): 顶层拖放落点改为插入横线 + 顶层项目可排序
- 顶层落点 = 插入横线(去掉整块高亮/虚线落点区):顶层项目行上下半 →
  .wgInsertBefore/.wgInsertAfter(可排序);顶层行下方空白 → 末尾横线;
  顶层为空 → 最后分组行下方独立横线(.wgTopLevelEmpty)
- 自动归顶层:落点不在任何分组内 → assignments[wsid]=null + 写入
  workspaceOrder[__topLevel__] 位置(moveBefore/moveAfter)
- 顶层项目可排序:deriveTopLevel 按 __topLevel__ 手动顺序(缺省 host 顺序)
- 修复两个 bug:
  - host 校验(validateManualGroups)拒绝 workspaceOrder[__topLevel__],
    导致拖出/顶层排序 PUT 400 静默失败 → 放行该保留 key
  - 拖到两行之间却落在上一行上面:moveWorkspaceTo 顶层分支用 __topLevel__
    存量(只含已排序项目)作为排序基准,其他顶层项目未进列表被排到后面 →
    改为取当前全部顶层项目全集定位
- 验证脚本:新增'拖到顶层行下半=after'断言、cat1 按 DOM 选非空分组、
  groupName 防重名、展开时序容错;真机 46/46 全过
- README 中英双语同步 v0.7(横线落点 + 顶层排序 + 验证记录 46/46)
2026-08-22 21:37:55 +03:00
zcol 3e494b0cfa feat: 顶层项目行模型 + 按级别收起恢复 + 顶层整区落点与图标区分
- v0.5: 删除「未分类」桶,不归组项目渲染为顶层项目行;null 覆盖=强制顶层;
  删除分组成员回顶层;拖拽/菜单移出分组(树中无未分类桶)
- v0.6: 拖动只收起被拖级别(拖项目收项目行、分组行不收;拖分组收分组行、
  项目行不收),dragend 恢复 dragstart 展开快照
- v0.6.1: 整个顶层区域为移出落点(拖拽中整区高亮 / 空顶层文字落点区,
  行间空白可 drop);项目行改用项目符号图标与分组文件夹区分;
  行 drop stopPropagation 防重复移出
- 验证脚本:按级别收起/恢复、图标区分、顶层区域空白 drop 断言(42/42);
  排序/拖出测试改用手动分组,对用户环境成员数变化健壮
- README 中英双语同步 v0.6.1,替换截图
2026-08-22 02:57:51 +03:00
zcol 61717b2be9 fix: 项目可从分组拖出(未分类桶为空时拖拽中也显示 + 菜单移出对规则分类项目开放)
- 根因:未分类桶空时不渲染(无拖拽目标)+ 菜单「移到未分类」仅对有
  assignment 的项目显示 → 规则分类项目两条移出路径全断
- tree.ts 新增 withDraggingUncategorized:拖拽中未分类桶缺失时临时渲染
  折叠空桶作移出落点,dragend/drop 即隐藏;单测 3 例
- 菜单移出条件改为 resolveCategory !== undefined(任何分组内项目可用,
  未分类桶内不显示),hasOverride 改名 canMoveOut
- 验证脚本:cat2 改用手动分组、规则分类按 hidden 过滤(用户环境已隐藏
  「个人项目」),新增拖出断言 4 项;确认 manualSaving 防重入正常
- 单测 68/68,真机 CDP 34/34,零侵入 + 现场恢复
2026-08-22 01:49:03 +03:00
zcol 226e21f7a1
Update README to remove example scenarios
Removed typical scenario examples from README.
2026-08-22 01:38:15 +03:00
zcol b382a15e11 docs: README 多语言(英文 README.md + 简体中文 README_ZH.md)+ DeepSeek Harness plugin 标
- README.md 改为英文版,README_ZH.md 简体中文版,顶部语言切换链接
- 两版均新增 DeepSeek Harness plugin shields 标(与 dsh-agent-teams 一致)
2026-08-22 01:36:33 +03:00
zcol 1d08cc46cf docs: README 修复过期内容 + 截图缩小一半
- 截图从 558px 缩至 280px(内联 img width)
- 目录结构:docs 模块名更新为 001-数据层/002-管理面/003-展示面;
  注明 docs 与 AGENTS.md 不入仓库;补 tests/store.test.ts
- 验证记录:移除指向 docs/ 的失效链接(GitHub 上不存在),改为内联结论
- 收录标签:dsh.bundle.patch 修正为 cordis.patch.yml
- package.json description 更新为完整分组管理工具定位
2026-08-22 01:29:32 +03:00
zcol a14e341f33
Update README.md 2026-08-22 01:24:46 +03:00
zcol 26c816ea58 docs: 更新项目介绍与特性总览(完整的分组管理工具)
- 定位从三层树插件升级为完整工作区分组管理工具
- 特性按能力重组:三层树浏览 / 分组管理生命周期 / 拖拽归类与排序 /
  搜索与操作 / 持久化与零侵入
- 覆盖 v0.1~v0.4 全部能力(建组/重命名/删除、拖拽移入移出、项目与分组
  双向排序、插入位置指示线、未分类置底、树形搜索、overlay 持久化、零侵入)
2026-08-22 01:22:09 +03:00
zcol e08c4ed1e8 v0.4: 拖拽插入位置指示 + 上下半落点判定(修复分组向下拖逻辑)
- 根因:分组排序仅支持 moveBefore(插到目标行前),向下拖想放目标后
  却落在其前;且无任何插入位置指示
- 新增 core/matcher.ts moveAfter(与 moveBefore 对称,目标缺失=追加)
- 拖拽按行上下半判定落点:上半=行前 / 下半=行后;2px 插入指示线
  .wgInsertBefore / .wgInsertAfter 实时显示落点,drop 按事件坐标即时重判
- 分组与项目排序均支持前/后双向;拖到未分类=追加末尾(恒最末)
- 更新展示截图 screenshot.png
- 单测 65/65,真机 CDP 30/30(含向下拖 6 项新断言),零侵入+现场恢复
2026-08-22 01:20:12 +03:00
zcol b56507bcf1 chore: package dsh-workspace-groups v0.1.0 for GitHub distribution
- MIT license, README with install/uninstall + screenshot, .gitignore
- keywords + docs for dsh-plugin topic collection
- commit lib/ so git install needs no build scripts
2026-08-21 23:22:57 +03:00