Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
42a0bbb
style(webview): clean IDE-tool look with softer chrome
AliceJump Oct 9, 2026
4830cbc
chore: remove dead box-panel legacy
AliceJump Oct 9, 2026
6f730bf
feat(l10n): unify view names and split settings into categories
AliceJump Oct 9, 2026
35a872f
fix(commands): openAnnotationEditor and openResourcePublisher do what…
AliceJump Oct 9, 2026
2cba67d
feat(commands): console commands, view title menus, executor status b…
AliceJump Oct 9, 2026
047cd69
feat(ui): replace emoji/Unicode glyph icons with codicons
AliceJump Oct 9, 2026
d64ad78
feat(console): responsive side nav and denser task list
AliceJump Oct 9, 2026
ab7fa56
feat(ui): honest empty states and inline errors with next-step actions
AliceJump Oct 9, 2026
7dbb25c
feat(annotation): undo for the annotation swap
AliceJump Oct 9, 2026
bab2b84
feat(ui): one gesture model for thumbnail cards, keyboard access, del…
AliceJump Oct 9, 2026
c2b24f3
feat(console): move the character & skill manager entry to the Config…
AliceJump Oct 9, 2026
963654f
docs: README (zh/en) and parity audit for the P0 UI polish
AliceJump Oct 9, 2026
0826439
test: command contract (declared ↔ registered ↔ nls ↔ menus/when)
AliceJump Oct 9, 2026
85309a1
fix(console): keep task-card actions and status bar inside narrow sid…
AliceJump Oct 9, 2026
418820e
refactor(run): extract types, python helpers and status labels from c…
AliceJump Oct 10, 2026
9a31753
feat(run): TreeView model, params host, publish-diff & diagnostics he…
AliceJump Oct 10, 2026
5768d34
feat(ia): single ok-script activity bar — Run / Parameters / Resources
AliceJump Oct 10, 2026
c2077b9
feat(annotation): source image strip + selection inspector shell
AliceJump Oct 10, 2026
b10d2e5
docs: README and parity notes for the P1 information architecture
AliceJump Oct 10, 2026
59ee840
feat(hover): trusted command links on template hovers (reveal / find …
AliceJump Oct 10, 2026
136a653
feat(resources): find template references, reveal in Resources, image…
AliceJump Oct 10, 2026
4fc5824
l10n: name the image context command '用标注编辑器打开'
AliceJump Oct 10, 2026
8bc6f3f
feat(publish): read-only publish preview before writing
AliceJump Oct 10, 2026
5919949
fix(resources): list drafts by template name, compare draft/published…
AliceJump Oct 10, 2026
ba8e8b6
test: activation smoke test with a mocked vscode module; document limits
AliceJump Oct 10, 2026
a175201
docs: JetBrains parity checklist for UI P2 (docs only)
AliceJump Oct 10, 2026
2fd64db
docs(readme): references, hover links, explorer menu, publish preview
AliceJump Oct 10, 2026
67b82af
test(publish): host contract covers the preview step and Esc-writes-n…
AliceJump Oct 10, 2026
4bee3d5
fix(screenshot): unify Ctrl+Alt+S into Resources inbox after rebase o…
AliceJump Oct 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 44 additions & 28 deletions README.en.md

Large diffs are not rendered by default.

73 changes: 44 additions & 29 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/box-resources.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Side and wide previews support Template / Rect / Point modes and name/expression

Single click inserts; double click copies. Buttons expose the same actions and annotated source previews. Without a Python editor, the reference is copied with an explanation. Template previews never fill an absent runtime library with unpublished authoring data. Rect / Point hints follow current authoring data without requiring publication first.

Both hosts use `Ctrl+Alt+T` for resource previews and `Ctrl+Alt+S` for capture into annotation management; macOS uses the corresponding `Cmd+Alt` combinations. Publication belongs to annotation management, with no separate publishing chain in previews.
Both hosts use `Ctrl+Alt+T` for resource previews and `Ctrl+Alt+S` for capture into the Resources inbox (VS Code keybinding and the Windows global hotkey share this destination); macOS uses the corresponding `Cmd+Alt` combinations. Publication belongs to annotation management, with no separate publishing chain in previews.

## Unified Publication

Expand Down
2 changes: 1 addition & 1 deletion docs/box-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Rect / Point 名称至少包含两个由句点分隔的 Python 标识符,例

单击插入,双击复制;按钮提供相同动作和带位置提示的原图查看。没有 Python 编辑器时复制引用并说明原因。Template 预览不会用尚未发布的工作标注填充运行时库;Rect / Point 提示跟随当前工作标注,编辑后不需要先发布才能得到代码提示。

两端 `Ctrl+Alt+T` 打开资源预览,`Ctrl+Alt+S` 截图到标注管理;macOS 使用相应的 `Cmd+Alt` 组合。发布入口位于标注管理,资源预览不提供另一个发布链。
两端 `Ctrl+Alt+T` 打开资源预览,`Ctrl+Alt+S` 截图到资源收件箱(VS Code 键位与 Windows 系统级热键同一终点);macOS 使用相应的 `Cmd+Alt` 组合。发布入口位于标注管理,资源预览不提供另一个发布链。

## 统一发布

Expand Down
11 changes: 8 additions & 3 deletions docs/design-system.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[简体中文](design-system.md) | [English](design-system.en.md)

> This is the authoritative UI specification for the entire project. All webview panels (console / templatePanel / templateAssetPanel / tempScreenshots / annotationPanel / characterManager / boxPanel) must follow it.
> This is the authoritative UI specification for the entire project. All webview panels (console / templatePanel / templateAssetPanel / tempScreenshots / annotationPanel / characterManager) must follow it.
> Implementation sources: `media/shared/tokens.css` (design tokens) and `media/shared/controls.css` (shared controls).
> **Pages compose these classes; they must not independently redefine visual rules.**

Expand Down Expand Up @@ -55,7 +55,7 @@ Buttons of the same kind share height (`--control-h-sm/md/lg`), padding (`--spac

## 4. Shared Size Scale

- Spacing: `--space-xs(4) / sm(6) / md(10) / lg(14) / xl(20)`.
- Spacing: `--space-xs(4) / sm(8) / md(12) / lg(16) / xl(24)`.
- Control height: `--control-h-sm(24) / md(30) / lg(34)`.
- Radius: `--radius-sm(5) / md(8) / lg(11) / pill`.
- Font size: `--font-xs(11) / sm(12) / md(13) / lg(15)`; weights only `--weight-regular(400)` / `--weight-medium(500)`.
Expand Down Expand Up @@ -95,8 +95,13 @@ media/shared/tokens.css Colors · Typography · Spacing · Radius · Border
media/shared/controls.css Button(primary/secondary/mini/ghost/icon) · Input · Select · Checkbox/Switch
· Tag · Card · Toolbar · SectionTitle · Empty/Broken/Hint · Divider
· Clickability rules ([role=button], actual-button/clickable-row categories)
· .has-codicon / .is-icon-only (icon button alignment and size)
media/shared/codicons/ @vscode/codicons 0.0.36 (codicon.css + codicon.ttf, vendored unchanged)
media/shared/icons.js OkIcons.icon / label / iconOnly — the single way panels create icons
```

**Icon rule (2026-10-09):** UI icons always use codicons (the same set as native VS Code UI). Emoji and Unicode glyphs (`▶ ⚙ ⇄ ⟲ + 👁 × ↻` and similar) are no longer used: they drift with the font and screen readers read out the symbol names. Icon-only buttons must have both `title` and `aria-label` (`OkIcons.iconOnly` handles this). One meaning, one icon: sync defaults `sync`, restore factory defaults `discard`, swap annotations `arrow-swap`, delete `trash`, view original `go-to-file` / `eye`. Panel HTML must load `__SHARED_CODICONS_URI__` and `__SHARED_ICONS_URI__`, and the CSP must include `font-src __CSP_SOURCE__`.

Connect a new panel in **three steps; omitting any step silently breaks styling**:

1. In `index.html`, load `__SHARED_TOKENS_URI__` → `__SHARED_CONTROLS_URI__` → panel styles in that order. This is cascade precedence; panel styles may override the shared layer.
Expand All @@ -122,7 +127,7 @@ Connect a new panel in **three steps; omitting any step silently breaks styling*

## Implementation Progress

2026-10-01 addendum: box panels/galleries share `media/boxPanel`, connected through `src/boxPanels.ts` and included in the static audit. The table and six-panel record below describe the 2026-09-23 migration baseline, not a reason to omit newer panels.
2026-10-09 addendum: the standalone box panel/gallery (`media/boxPanel`, `src/boxPanels.ts`) was folded into the unified annotation editor and resource preview and has been removed; the position-preview helpers used by hover and completion now live in `src/positionPreview.ts`. The table and six-panel record below describe the 2026-09-23 migration baseline; new panels must still be registered in the static audit.

| Stage | Work | Status |
|---|---|---|
Expand Down
16 changes: 13 additions & 3 deletions docs/design-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[简体中文](design-system.md) | [English](design-system.en.md)

> 本文件是全项目 UI 的唯一权威规范。所有 webview 面板(console / templatePanel /
> templateAssetPanel / tempScreenshots / annotationPanel / characterManager / boxPanel)必须遵循。
> templateAssetPanel / tempScreenshots / annotationPanel / characterManager)必须遵循。
> 实现真源:`media/shared/tokens.css`(Design Tokens)+ `media/shared/controls.css`(共享控件),
> **页面只负责组合这些类,不得自行重定义视觉规则。**

Expand Down Expand Up @@ -59,7 +59,7 @@ Dialog·Modal / 状态提示 / Loading / 空状态 / 错误状态。同类组件

## 4. 统一尺寸体系

- 间距:`--space-xs(4) / sm(6) / md(10) / lg(14) / xl(20)`
- 间距:`--space-xs(4) / sm(8) / md(12) / lg(16) / xl(24)`
- 控件高度:`--control-h-sm(24) / md(30) / lg(34)`
- 圆角:`--radius-sm(5) / md(8) / lg(11) / pill`
- 字号:`--font-xs(11) / sm(12) / md(13) / lg(15)`;字重仅 `--weight-regular(400)` / `--weight-medium(500)`
Expand Down Expand Up @@ -106,8 +106,18 @@ media/shared/tokens.css Colors · Typography · Spacing · Radius · Border
media/shared/controls.css Button(主/次/迷你/幽灵/图标) · Input · Select · Checkbox/Switch
· Tag · Card · Toolbar · SectionTitle · Empty/Broken/Hint · Divider
· 可点击性硬规范([role=button]、真按钮/行级区分层清单)
· .has-codicon / .is-icon-only(图标按钮的对齐与尺寸)
media/shared/codicons/ @vscode/codicons 0.0.36(codicon.css + codicon.ttf,原样内置)
media/shared/icons.js OkIcons.icon / label / iconOnly —— 面板里生成图标的唯一入口
```

**图标规范(2026-10-09)**:界面图标一律用 codicon(与 VS Code 原生 UI 同源),
不再用 emoji 或 Unicode 符号(`▶ ⚙ ⇄ ⟲ + 👁 × ↻` 等字形随字体漂移、读屏会念出符号名)。
仅图标的按钮必须同时有 `title` 与 `aria-label`(`OkIcons.iconOnly` 自动处理)。
同一语义只用一个图标:同步默认值 `sync`、恢复出厂 `discard`、交换标注 `arrow-swap`、删除 `trash`、
查看原图 `go-to-file` / `eye`。面板 HTML 需引入 `__SHARED_CODICONS_URI__` 与 `__SHARED_ICONS_URI__`,
CSP 需含 `font-src __CSP_SOURCE__`。

新增面板接入方式(**三步,缺一步样式就静默失效**):

1. `index.html` 按顺序引入 `__SHARED_TOKENS_URI__` → `__SHARED_CONTROLS_URI__` → 面板自身样式
Expand Down Expand Up @@ -138,7 +148,7 @@ media/shared/controls.css Button(主/次/迷你/幽灵/图标) · Input · Se

## 落地进度

2026-10-01 补充:框面板与框画廊共用 `media/boxPanel`,由 `src/boxPanels.ts` 接入共享层,静态审计已包含此目录。下表与“六个面板”记录的是 2026-09-23 的迁移基线,不能据此漏掉新增面板。
2026-10-09 补充:独立的框面板 / 框画廊(`media/boxPanel`、`src/boxPanels.ts`)已并入统一标注编辑器与资源预览并被移除;悬停与补全使用的位置预览逻辑移到 `src/positionPreview.ts`。下表与“六个面板”记录的是 2026-09-23 的迁移基线,新增面板仍须登记进静态审计。

| 阶段 | 内容 | 状态 |
|---|---|---|
Expand Down
11 changes: 11 additions & 0 deletions docs/feature-parity.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,14 @@ Business projects load published files. The plugin provides current declarations
- Confirmed code differences are closed, and the main PR gitlink pins the companion child PR commit. Merge child PR #30 first, then confirm or update the gitlink to a commit reachable from child `main` and verify main CI before merging the main PR. Unmerged code is not released functionality.

No actual IDE interaction, game screenshot or business-project runtime acceptance was performed. Full Plugin Verifier API compatibility was not run; build, structure checks and automated regression do not replace those checks.

## UI P2 parity checklist (done in VS Code, pending in JetBrains; no JetBrains UI changes this round)

| Item | VS Code (`ui/p2-polish`) | Suggested JetBrains approach | Status |
| --- | --- | --- | --- |
| Image context menu "Open with Annotation Editor" | `explorer/context`, only `.png/.jpg/.jpeg/.webp` | Project View `AnAction`, visibility by extension in `update()` | Pending |
| Find template references | `findTemplateReferences`: `fL.x` / `self.pos.x` / `"x"` → QuickPick → jump | `ReferencesSearch` / custom Find Usages searcher with the same regexes | Pending |
| Command links in template hover | `MarkdownString.isTrusted.enabledCommands` allowlist of two commands | Links in `DocumentationProvider` | Pending |
| Publish preview | Read-only list of files + template add/overwrite/remove (by name) before writing | Read-only list before the publish dialog; write semantics unchanged | Pending |
| Resources drafts listed by template name | Fixed: draft cards use the annotation category name, matching `fL.<name>` | Same in the resource list | Check |
| Activation smoke test | `scripts/test_activation_smoke.js` (mocked vscode module) | `gradlew test` exists; could add an action-registration check | Optional |
11 changes: 11 additions & 0 deletions docs/feature-parity.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,14 @@
- 本轮代码差异已补齐,主仓 PR 的 gitlink 指向子仓 PR 的配套提交。必须先合并子仓 PR #30,再确认或更新 gitlink 到子仓 `main` 可达的提交并核对主仓 CI,最后合并主仓;未合并代码不作为已发布功能。

没有执行真实 IDE 交互、真实游戏截图或业务项目运行验收,也未执行完整 Plugin Verifier API 兼容性检查;构建、结构和自动回归的成功不代替这些验收。

## UI P2 对齐清单(VS Code 已做,JetBrains 待办;本轮不改 JetBrains UI)

| 项 | VS Code(`ui/p2-polish`) | JetBrains 建议做法 | 状态 |
| --- | --- | --- | --- |
| 图片右键「用标注编辑器打开」 | `explorer/context`,仅 `.png/.jpg/.jpeg/.webp` | Project View `AnAction`,`update()` 按扩展名显隐 | 待办 |
| 查找模板引用 | `findTemplateReferences`:`fL.x` / `self.pos.x` / `"x"` → QuickPick 跳转 | `ReferencesSearch` 或 Find Usages 自定义 searcher,复用同一正则 | 待办 |
| 模板悬停命令链接 | `MarkdownString.isTrusted.enabledCommands` 白名单两条命令 | `DocumentationProvider` 里用 `psi_element://` / 自定义 action 链接 | 待办 |
| 发布预览 | 写盘前只读列出文件 + 模板新增/覆盖/移除(按名字比较) | 发布对话框前插入只读列表;不改写入语义 | 待办 |
| 资源视图草稿按模板名列出 | 修正:草稿卡片按标注类别名,与 `fL.<名字>` 对齐 | 资源列表同样按类别名 | 核对 |
| 激活冒烟测试 | `scripts/test_activation_smoke.js`(模拟 vscode 模块) | 已有 `gradlew test`,可补 action 注册检查 | 可选 |
5 changes: 4 additions & 1 deletion docs/interaction-parity-audit.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ This report compares the pages actually registered in the baseline source, cover

This is a source audit, without interactive or screenshot verification in either IDE. “No corresponding entry in the current page” does not mean that no implementation exists elsewhere in the plugin. Theme, scaling, focus, and keyboard behavior still need real IDE verification. Shared Python code, formats, or passing tests do not establish interaction parity.



> P1 (2026-10-11): VS Code now uses a single activity-bar container with Run TreeView / Parameters / Resources. JetBrains toolWindow merge and Tree parity remain pending (plan.md §11).
## 1. Registered entry points and organization

| ID | Item | VS Code | JetBrains | User-visible difference |
Expand All @@ -27,7 +30,7 @@ Sources: [parent registration](../package.json), [VS Code task page](../media/co
| 06 | Template / Rect / Point modes | Three adjacent buttons, with the active mode highlighted | Mode combo box | All modes are immediately visible on one side; the other requires opening a dropdown |
| 07 | Insert, copy, source buttons | Three persistent buttons at the bottom right of every thumbnail, directly bound to that card | Insert/copy/open in the top toolbar operate through `selectedValue`; no buttons inside the card | Direct target-card actions versus selecting a target and then using the toolbar |
| 08 | Selection and target feedback | No list selection state used by these buttons; each button captures its resource | Single-selection `JBList`; renderer changes background, text, and border for selection | Persistent selection and toolbar dependence differ |
| 09 | Single/double-click timing | Delayed single-click insertion, double-click copy, fixed 500 ms window; card buttons execute immediately | Same basic gestures, using system `awt.multiClickInterval` or a 500 ms fallback; insertion also checks that selection still matches the clicked item | Gesture results broadly match, but timing and selection dependencies differ |
| 09 | Single/double-click timing | (Since 2026-10-09) click = select, double-click / Enter = insert, Ctrl+C = copy, no delay window; card buttons execute immediately; all three thumbnail grids share these gestures and support arrow keys | Still click-to-insert and double-click copy, using system `awt.multiClickInterval` or a 500 ms fallback; insertion also checks that selection still matches the clicked item | **Needs sync**: VS Code moved to "click selects / double-click or Enter runs the primary action"; JetBrains `ThumbnailActions.kt` has not followed yet |
| 10 | Grid and card geometry | Responsive CSS grid, 118 px minimum column width, 96 px thumbnail area, left-aligned names | `JList.HORIZONTAL_WRAP`, fixed cell width of 120 plus scaled margins, scaled 72 thumbnail height, centered 10 pt bold names truncated by character count | Density, space usage, alignment, and truncation differ; values are source constants rather than measured screen pixels |
| 11 | Counts, empty/loading states | Filter/total counts, successful/failed thumbnail counts, explicit empty/no-match messages | Current preview component contains only toolbar, search, and list; failed loading results become an empty collection without equivalent count/empty/failure widgets | Empty data and loading failure are less distinguishable in this page; this does not assess every lower-level error path |

Expand Down
5 changes: 4 additions & 1 deletion docs/interaction-parity-audit.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

这是源码核对,未启动两个 IDE 做交互或截图验收。源码明确没有的入口写为“当前页面无对应入口”;不能据此推断整个插件没有任何实现。主题、缩放、焦点与键盘的实际表现仍需真实 IDE 验证。共享 Python、数据格式或测试通过,也不代表交互一致。



> P1(2026-10-11):VS Code 已合并为单一活动栏「ok-script」+ 运行 TreeView / 参数 / 资源工作台。JetBrains 端 toolWindow 合并与 Tree 对齐仍待同步(见 plan.md §11)。
## 1. 实际入口与页面组织

| 编号 | 对照项 | VS Code | JetBrains | 用户可感知的差异 |
Expand All @@ -27,7 +30,7 @@
| 06 | Template / Rect / Point 切换 | 三个并排按钮,当前模式按钮突出显示 | 下拉框选择模式 | 一端直接可见三个模式,另一端需要打开下拉框 |
| 07 | 插入、复制、原图按钮 | 每张缩略图右下角常驻三个按钮,直接操作该卡片 | 顶部工具栏的插入、复制、打开按钮,通过 `selectedValue` 操作选中项;卡片内无按钮 | 直接点目标卡片按钮,与先选目标再点顶部按钮,两条操作路径不同 |
| 08 | 选中反馈与目标 | 卡片无用于这些按钮的列表选中态;每个按钮闭包绑定自身资源 | `JBList` 单选;渲染器按选中态改变背景、文字和边框 | 另一端有持续选中项,顶部按钮依赖它;操作目标的表达方式不同 |
| 09 | 单击/双击判定 | 卡片单击延迟插入,双击复制;统一使用 500 ms;卡片按钮立即执行 | 同样单击插入、双击复制,但等待系统 `awt.multiClickInterval`,不可用时才是 500 ms;插入还要求当前选中项与点击项相同 | 单击/双击结果大体相同,但时序与选中依赖不同 |
| 09 | 单击/双击判定 | (2026-10-09 起)单击 = 选中、双击 / Enter = 插入、Ctrl+C = 复制,无延迟窗口;卡片按钮立即执行;三处缩略图同一套手势并支持方向键 | 仍是单击插入、双击复制,等待系统 `awt.multiClickInterval`,不可用时才是 500 ms;插入还要求当前选中项与点击项相同 | **待同步**:VS Code 已改为「单击选中 / 双击或 Enter 主操作」,JetBrains 端 `ThumbnailActions.kt` 尚未跟进 |
| 10 | 网格与卡片规格 | CSS 自适应网格,最小列宽 118 px;缩略图区域 96 px;名称靠左 | `JList.HORIZONTAL_WRAP`,固定格宽为 120 加缩放边距;缩略图 72 加宿主缩放;名称居中,10 pt 粗体,按字符截短 | 排列密度、空间利用、标题对齐和截断方式不同;数值来自源码,非实测像素 |
| 11 | 计数、空态、缩略图状态 | 展示筛选数/总数、加载成功/失败数;无资源、无匹配有明确文字 | 当前预览组件只有工具栏、搜索和列表;加载结果异常回退为空集合,没有同等计数、空态和失败统计控件 | 空列表与加载失败更难从页面区分;这里未判断全部底层错误处理 |

Expand Down
Loading