Commit graph

221 commits

Author SHA1 Message Date
Flash
0f5c43ecb8
Merge pull request #18 from flash555588/codex/test-conversion-risk-coverage
test(conversion): cover cache and freecad script generation
2026-06-22 12:58:48 +08:00
flash555588
b040049a7e test(conversion): cover cache and freecad script generation
# Conflicts:
#	CHANGELOG.md
2026-06-22 12:48:38 +08:00
flash555588
283ea94d62 fix(remote-draft): bound draft request timeouts
# Conflicts:
#	CHANGELOG.md
2026-06-22 12:48:09 +08:00
flash555588
cf1976ae25 fix(knowledge): track generation marker state 2026-06-22 12:44:28 +08:00
flash555588
503b444836 fix(store): serialize plugin state saves 2026-06-22 03:36:40 +08:00
flash555588
9639fe4657 docs: add technical debt audit 2026-06-22 03:31:17 +08:00
flash555588
90ad8760e0 feat(preview): improve conversion routing and rulers 2026-06-22 03:00:35 +08:00
flash555588
b3845f0348 fix(release): sync package-lock version to 0.5.8 2026-06-20 10:50:33 +08:00
flash555588
b70b0845a4 refine(three): orthographic frustum based on model span
- Replace distance-based orthographic frustum with model-span * 1.2 for consistent sizing.

- Remove unused createOrthographicCamera helper.
2026-06-20 10:48:29 +08:00
flash555588
9108041aa5 feat(three): add setWireframe, STL config, and orthographic camera
- Add setWireframe(enabled) and refactor toggleWireframe to use it.

- Apply config.stl.color and config.stl.wireframe in Three.js preview.

- Support CameraConfig.mode='orthographic' with camera switching and frustum fitting.
2026-06-20 10:29:16 +08:00
flash555588
5226d7ed47 feat(ui): remove reset-parts toolbar button
- Delete the reset disassembled parts button from the inline preview toolbar.

- Remove unused reset-parts i18n keys and verify:obsidian step.
2026-06-20 10:00:11 +08:00
flash555588
4c386f9f5a chore(release): bump version to 0.5.8
- Update manifest.json, package.json, versions.json to 0.5.8.

- Add CHANGELOG entry noting re-release with signed artifacts.
2026-06-20 09:48:19 +08:00
flash555588
ad2422fbdf chore(release): add 0.5.7 to versions.json 2026-06-20 04:09:46 +08:00
flash555588
b71112ff64 ci(release): use npm install and sync lockfile version
- Switch release workflow from npm ci to npm install to avoid platform-specific optional dependency lockfile mismatches.

- Update package-lock.json version to 0.5.7.
2026-06-20 04:08:18 +08:00
flash555588
096bf2bbf7 chore(release): bump version to 0.5.7
- Update manifest.json and package.json to 0.5.7.

- Update CHANGELOG with recent UI changes.

- Build artifacts are up to date.
2026-06-20 03:51:48 +08:00
flash555588
77f9a7a143 fix(ui): ensure active toolbar button highlight overrides base styles
- Increase .ai3d-btn-active selector specificity to .ai3d-inline-btn.ai3d-btn-active so it wins over the later base .ai3d-inline-btn rule.
2026-06-20 03:33:30 +08:00
flash555588
9068ac31b4 feat(ui): highlight active toolbar buttons with accent background
- Change .ai3d-btn-active from accent text to filled accent background + on-accent text.

- Keep the active highlight on hover with a slight brightness boost.
2026-06-20 03:23:33 +08:00
flash555588
a9f793e38f revert(ui): restore inline secondary expansion (first version layout)
- Replace the dropdown menu with the original left/right inline expansion of secondary actions.

- Keep icon-only primary buttons and grouped toolbar layout.
2026-06-20 03:16:33 +08:00
flash555588
c053fcf18d fix(ui): use single global listener for helper dropdown
- Replace per-preview document click/keydown listeners with a single global listener to avoid performance issues with many previews.

- Refactor dropdown open/close to read state from DOM and close other menus when opening.

- Update verify:obsidian to open the dropdown before clicking reset-parts.
2026-06-20 03:11:56 +08:00
flash555588
f04ca3d308 feat(ui): replace inline secondary expansion with dropdown menu
- Move all secondary actions into a theme-styled dropdown menu triggered by the "more" button.

- Keep primary icon buttons on the toolbar: reset, wireframe, axes, bbox, focus, disassemble, measure, annotate, copy.

- Add menu sections with separators and full descriptive labels.

- Support Escape and outside-click to close the menu.

- Remove old inline .show-secondary expansion CSS.
2026-06-20 02:45:03 +08:00
flash555588
bf61fb4ebc revert(ui): remove toolbar text labels, keep grouped secondary collapse
- Remove icon+text labels from all helper toolbar buttons; keep icon-only primary actions visible.

- Preserve global secondary-button collapse behind the "more" toggle.

- Drop now-unused short-label i18n keys and labeled-button CSS.
2026-06-20 02:14:56 +08:00
flash555588
d10ed96013 feat(ui): re-layout helper toolbar with labels and secondary collapse
- Promote reset, wireframe, axes, bounding box, focus, disassemble, measure, annotate, and copy snapshot to primary icon+text buttons.

- Collapse all secondary buttons behind a global "more" toggle by default.

- Add short-label i18n keys and tighten labeled-button CSS sizing.

- Update preview verification harness to expand the more menu for secondary actions.
2026-06-20 02:06:21 +08:00
flash555588
5dca9ecb71 feat(inline): labeled primary measurement button and style
- Make the measurement tool a primary inline toolbar button with a visible text label ("测距" / "Measure").

- Add .ai3d-inline-btn--labeled styles for icon+text layout and compact sizing.

- Verified with typecheck, lint, unit tests, preview harness, and Obsidian vault install.
2026-06-20 01:15:11 +08:00
flash555588
6b98a67dd5 feat(ui): promote measurement button to primary toolbar 2026-06-20 00:33:18 +08:00
flash555588
3915ff4d86 fix(annotations): reduce label jitter during camera rotation 2026-06-19 22:37:10 +08:00
flash555588
7eaa4f7b21 fix(annotations): disable label avoidance during camera motion to prevent jitter 2026-06-19 22:16:25 +08:00
flash555588
312d641430 fix(preview): replace Obsidian-only appendText with standard DOM API 2026-06-19 21:33:15 +08:00
flash555588
0f8aa7c2d6 refactor(P2): complete PluginStore actions and migrate knowledge-note 2026-06-19 20:59:17 +08:00
flash555588
5752738b9c chore(build): regenerate main.js after P2-5 2026-06-17 22:02:25 +08:00
flash555588
d5a59d12ec refactor(store): encapsulate profile mutations in typed actions and fix js-yaml audit 2026-06-17 22:02:18 +08:00
flash555588
b43b5f0803 refactor(P2): extract heading-pin observer into view module 2026-06-15 17:16:54 +08:00
flash555588
8a0fb38057 refactor(P2): split settings display() into section builders 2026-06-15 17:09:02 +08:00
flash555588
1fd3061369 docs(P2): add TODO/debt conventions and mark known debt 2026-06-15 17:05:54 +08:00
flash555588
93e235c091 chore(P2): add .editorconfig 2026-06-15 17:01:26 +08:00
flash555588
69ac33d719 chore(P2): normalize line endings, add .editorconfig, run lint in CI, sync docs 2026-06-15 17:01:17 +08:00
flash555588
83251a78bd chore(build): regenerate main.js after P1 fixes 2026-06-15 16:32:51 +08:00
flash555588
6a90d50887 test: add Vitest, escape-html/conversion tests, and data-testid attributes
- Install vitest and @vitest/coverage-v8; add npm test script.
- Extract remote-draft normalizer to pure module for testability.
- Add tests for escapeHtml, remote draft sanitization, and ConversionManager
  timeout/deduplication.
- Add data-testid to toolbar buttons via setAction().
2026-06-15 16:32:47 +08:00
flash555588
00e3f12f75 perf(bundle): remove unused Babylon packages
- Drop @babylonjs/gui, @babylonjs/materials, @babylonjs/serializers.
- Keeps @babylonjs/core and @babylonjs/loaders which are actually imported.
2026-06-15 16:32:40 +08:00
flash555588
b23ce8ea78 perf(rendering): pause Babylon loops, cache grid renders, and cap pins
- Pause Babylon preview render loop when canvas leaves viewport.
- Track dirty state in Babylon 3dgrid and skip unchanged cells.
- Cap annotation pins at 200 and batch DOM reads/writes in label avoidance.
2026-06-15 16:32:32 +08:00
flash555588
b0ee3a87cd fix(stability): handle WebGL context loss in Three/Babylon previews and grid
- Listen for webglcontextlost/restored on canvas and stop/restart loops.
- Stop Babylon grid render loop on context loss and resume on restore.
- Add stat() helper to node-shim for file type validation.
2026-06-15 16:32:20 +08:00
flash555588
164dd41844 fix(stability): log swallowed errors and add conversion/command timeouts
- Replace empty .catch(() => {}) on vault.createFolder with warn logs.
- Add ConversionTimeoutError and outer timeout in ConversionManager.convert().
- Wrap async command callbacks in main.ts with Notice-on-error handler.
2026-06-15 16:32:13 +08:00
flash555588
f4870a3a61 chore(build): regenerate main.js after P0 fixes 2026-06-15 12:21:01 +08:00
flash555588
003bd3dee9 fix(security): validate converter command paths and reject shell metacharacters
- Rejects converter commands containing shell metacharacters in both inspection
  and execution paths.
- Verifies that configured absolute paths point to regular files, not directories.
- Adds stat() helper to node-shim for desktop environments.
2026-06-15 12:20:58 +08:00
flash555588
c75a5dac3d fix(security): sanitize remote draft output and model-derived metadata in notes
- Adds shared escapeHtml() utility.
- Remote draft fields (title, summary, sections, tags, warnings, model) are
  HTML-escaped and capped at 8k chars before being written to vault notes.
- Model-derived strings (part names, material names, heading refs, annotation
  labels, registered-match names) are HTML-escaped when inserted into generated
  Markdown in knowledge-note.ts and preview/report.ts.
2026-06-15 12:20:50 +08:00
flash555588
01fca91e29 fix(stability): flush pending plugin store state on unload
- PluginStore.dispose() now triggers a final persist so annotations,
  registered parts, and last-generation metadata are not lost when the
  plugin unloads within the 500ms debounce window.
- main.ts onunload awaits ps.save() to ensure the flush starts before
  Obsidian tears down the plugin.
2026-06-15 12:20:45 +08:00
flash555588
9a5b85016f fix(release): align package-lock version to 0.5.5 and upgrade esbuild to 0.28.1
- Fixes package-lock.json staying at 0.4.3 while manifest/package.json were 0.5.5,
  which blocked release verification.
- Upgrades esbuild to resolve GHSA-gv7w-rqvm-qjhr (npm audit high severity).
2026-06-15 12:20:40 +08:00
Flash
53a5be538e
Update README.zh-CN.md 2026-06-08 21:04:59 +08:00
Flash
e583b4237b
Update README.md 2026-06-08 21:04:42 +08:00
Flash
b574bf7680
Update README.zh-CN.md 2026-06-08 20:41:32 +08:00
Flash
83cc561450
Update README.md 2026-06-08 20:40:47 +08:00