11 Commits
Author SHA1 Message Date
poli0981andClaude Opus 4.7 58ef7e739a fix(tauri): port batch extension filter to native drag-drop (v1.3.2) (#24)
The v1.3.0/v1.3.1 desktop bundles accepted any file dropped from File
Explorer / Finder / Nautilus into the workspace, because
`ConverterWorkspace.handleMultiFileDrop` (called by `useTauriDragDrop`
on `tauri://drag-drop` events) ran `batchStore.addFiles` directly and
skipped the `direction × format` extension whitelist that the
`react-dropzone` path in `BatchPanel` / `InputPanel` enforced. Files
like `.cs` / `.py` leaked into the queue with no `wrong_format` toast.

Extract `src/lib/file-filter.ts` exposing `getAllowedExtensions`,
`extOf`, and `filterByExtension` so all three drop entry points share
one implementation. The web `react-dropzone` paths keep their previous
behavior; the Tauri callback now filters + toasts before calling
`addFiles`.

Bump package / Cargo / Tauri version to 1.3.2.

7 new unit tests cover the helper. Total: 190.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
v1.3.2
2026-05-13 20:05:44 +07:00
poli0981andClaude Opus 4.7 4bf239e089 fix(workflow): announce-discussion unbound var + literal $VAR text (#21)
Two bugs in `.github/workflows/announce-discussion.yml` surfaced when
v1.3.1 published:

1. `DEPLOY_URL: unbound variable` when triggered by `release` event.
   `${{ github.event.workflow_run.* }}` evaluates to null on a release
   event, and the resulting env-var assignment leaves the variable
   unset (not empty), which `set -u` then trips on. Guard every
   dynamic value with `|| ''` so each env var is always at least an
   empty string.

2. Body strings used `$'...'` ANSI-C quoting (which expands backslash
   escapes but NOT variables), so the discussion body would have
   contained literal `$RELEASE_TAG` text. Rewrite to plain double-quoted
   strings, using `$'\n'` only for embedded newlines.

Also pass dynamic values (REPO_ID / CAT_ID / TITLE / BODY) into the
Create Discussion step through env vars instead of literal `${{ ... }}`
substitution — protects against titles/bodies containing quotes or
other shell-special characters that would otherwise break the command
line.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 18:32:59 +07:00
poli0981andClaude Opus 4.7 6b9cc64331 chore(release): v1.3.1 (#19)
Same feature set as v1.3.0 (Đợt 2 + 3 + 4) plus two fixes:

- GitHub Pages 404 — Vite base / React Router basename / all repo URLs
  rebased from `/jsonprism/` to `/jsonPrism/` to match the existing
  repo name case.
- Release workflow — macOS Intel runner replaced with a universal2
  build on macos-14, since macos-13 runners no longer pick up jobs.

v1.3.0 was drafted but never published.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
v1.3.1
2026-05-13 17:38:24 +07:00
poli0981andClaude Opus 4.7 50521881f0 fix(release): GH Pages 404 + macOS Intel runner unavailable (#18)
GitHub Pages serves at /jsonPrism/ (case-sensitive, mirrors the repo
name `poli0981/jsonPrism`). Our Vite `base` was set to `/jsonprism/`
(lowercase), so index.html referenced `/jsonprism/assets/*.js` and
every asset 404'd — the deployed page rendered blank. Rebase all
GitHub URLs / Vite base / React Router basename to match the existing
repo case `jsonPrism`. Renaming the repo to all-lowercase is the
cleaner long-term fix, but that's a user-side action.

GitHub Actions `macos-13` runners no longer pick up jobs (the macOS
Intel build sat queued for >18 min, then was cancelled). Replace the
two-entry matrix (macos-14 ARM + macos-13 Intel) with a single
universal2 build on `macos-14` using `--target universal-apple-darwin`.
The resulting `.app` / `.dmg` runs on both Apple Silicon and Intel.

Storage keys, package name, Tauri identifier remain lowercase
(`jsonprism`) — unaffected.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 17:26:20 +07:00
poli0981andClaude Opus 4.7 27c438de09 chore(release): v1.3.0 (#17)
Bump package.json + src-tauri/tauri.conf.json + src-tauri/Cargo.toml
from 1.0.0 → 1.3.0. CHANGELOG.md gains entries for v1.1.0, v1.2.0,
v1.3.0 covering Đợt 2 / 3 / 4 (binary converters + reverse + dep
upgrades; Tauri fixes + workflow + docs + JP/ZH-CN; editor UX + batch
hygiene + workspace persistence + TERMS).

No code changes — verification (typecheck / lint / 183 tests / build)
all green at 1.3.0.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
v1.3.0
2026-05-13 16:46:40 +07:00
poli0981andClaude Opus 4.7 315a6f0b92 feat: editor UX, batch hygiene, workspace persistence, TERMS (#16)
Đợt sửa lỗi 4 — single PR.

Code Editor (Input):
- Reverse mode now picks the closest CodeMirror language pack:
  yaml → @codemirror/lang-yaml, xml/resx → @codemirror/lang-xml,
  csv/tsv/toml/jsonl/markdown/sql/bson/cbor/msgpack → plain.
- Input wrapper gets `min-h-0` so a long paste scrolls inside the editor
  instead of pushing past the status bar.
- New `.scrollbar-hide` utility class in globals.css. Applied to
  .cm-scroller via CodeEditor's theme block, OutputPanel scroll
  container, and the About page wrapper. Window scrollbar untouched
  (a11y preserved).

Batch:
- Description / drop_idle / empty strings now take {{from}}+{{to}} and
  {{format}} placeholders. In reverse mode the drop zone reads e.g.
  "Drop YAML files here", description reads "Process multiple YAML
  files into JSON".
- batchStore dedup by (filename + size + lastModified). Re-dropping
  the same files reports a warning toast with i18n `batch.toast.duplicate`.
- Extension filter in InputPanel (single-file + Tauri native dialog +
  hidden input) and BatchPanel (handleAddFiles + onDropRejected).
  Wrong-extension files are skipped with a warning toast.

Workspace persistence:
- New src/stores/workspaceStore.ts. Owns input/format/direction/options.
  Convert → About → Convert no longer wipes the editor.
- ConverterWorkspace rewritten to consume the store; in-component state
  reduced to modal open/close + actionsRef.
- 6 new unit tests for the store; existing batchStore test count: 10.

UI/UX:
- About page wrapped in `flex-1 min-h-0 overflow-y-auto` so its content
  scrolls inside `<main>` instead of overflowing onto the footer.

Docs:
- New root-level TERMS.md (ToS / EULA): acceptance, GitHub ToS,
  Apache 2.0 inheritance, no warranty, user data ownership, acceptable
  use (incl. anti-malware-PR clause), trademarks, modifications,
  termination, contact. Linked from README.md and README.vi.md.

Deps:
- @codemirror/lang-yaml + @codemirror/lang-xml (both MIT, fall into the
  existing `codemirror` manualChunk).

Verification:
- typecheck / lint / 183 tests pass / build OK (Vite 8 / Rolldown 695ms).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 15:37:30 +07:00
poli0981andClaude Opus 4.7 1f5c4e092d feat: reverse UX batch + docs suite + expanded About page (#15)
Đợt sửa lỗi 3 — PR-B (features).

Reverse UX:
- InputPanel accept list + file picker + editor label are now driven by
  the active format when direction='reverse'. Label switches from
  "Input JSON" to "Input <Format>". Loads-sample button hidden in
  reverse (the sample is JSON).
- BatchPanel mirrors the dynamic accept + filename suffix. Per-row
  shows `→ .json` in reverse mode.
- batch-processor gained a `direction` parameter. Reverse mode skips
  parseJsonInput entirely and routes through converter.reverse(); zip
  outputs use `.json` extension regardless of source format.

Docs suite (root):
- PRIVACY.md — offline-first, localStorage inventory.
- SECURITY.md — vulnerability reporting + supported versions.
- DISCLAIMER.md — 1-person + AI-assisted, translation disclaimer.
- MAINTAINERS.md — single-maintainer indie project notes.
- THIRD-PARTY.md — categorized canonical dep list with version/license/link.
- CODE_OF_CONDUCT.md — Contributor Covenant v2.1 by reference.

Docs suite (operational):
- docs/pc_spec.md + docs/dev_env.md — maintainer hardware + toolchain.
- docs/i18n/vi/{pc_spec,dev_env}.md — VI mirrors.

CONTRIBUTING + README updates:
- README + README.vi: new "Project docs" table, Acknowledgements,
  Sponsorship sections.
- CONTRIBUTING: "Auto-ignored cases" rules (suspicious code, off-topic
  preamble, etc.). Updated translation section to list all four locales
  and disclose AI-translation.

About page expansion:
- Donate grid (5 channels from .github/FUNDING.yml).
- Third-party categorized summary (UI / Editor / Parsers / Build / Tauri / i18n)
  linking to THIRD-PARTY.md.
- Build info: version, commit SHA (linked to commit), build date —
  injected via Vite define from git rev-parse.
- Links: repo, issues, discussions, demo, license.
- Disclaimer footer with translation note.
- All sections wired with new about.* i18n keys in en/vi/ja/zh-CN.

Verification:
- typecheck / lint / 175 tests pass / build OK.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 14:00:06 +07:00
poli0981andClaude Opus 4.7 bb7ee3c53b feat: Tauri fixes + workflow hygiene + JP/ZH-CN locales (#2)
Đợt sửa lỗi 3 — PR-A (fix + low-risk infra).

Tauri build:
- Fix black screen: introduce build-time `__IS_TAURI_BUILD__` Vite define
  so React Router uses basename '/' in Tauri bundles and '/jsonprism' on
  GH Pages. Previously `import.meta.env.PROD` was true in both, breaking
  Tauri routes.
- Single-instance plugin: tauri-plugin-single-instance added; second
  launches focus the existing window instead of spawning a new process.
  Registered first per Tauri 2 best practice; desktop-only.

Workflows:
- Bump actions/checkout v4 → v6, actions/setup-node v4 → v6 (Node 24 LTS).
- Reduce skip noise: notify-ci-failure and notify-release-pipeline drop
  `workflows: ["*"]` catch-all in favor of specific workflow names.
- New announce-discussion.yml: auto-create a Discussion post when a
  release publishes or Deploy to GH Pages succeeds. Requires Discussions
  enabled + "Announcements" category (manual prerequisite, mentioned in
  the workflow file).

Community files:
- .github/dependabot.yml — weekly npm + actions + cargo updates, grouped.
- .github/PULL_REQUEST_TEMPLATE.md — summary, test plan, AI-assist disclosure.
- .github/ISSUE_TEMPLATE/config.yml — block blank issues, route to
  Discussions / Security Advisory / live demo.

i18n:
- New locales/ja.json, locales/zh-CN.json (AI-translated; disclaimer key
  added to all four locales).
- LanguageSwitcher + i18n.supportedLngs updated.

Verification:
- typecheck / lint / 175 tests pass / build OK.
- `cargo check` in src-tauri builds clean with the new plugin.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 13:43:15 +07:00
poli0981andClaude Opus 4.7 9c6b6d3f65 feat: hygiene, dep upgrades, Tauri, binary formats, reverse conversion (#1)
* feat: hygiene, dep upgrades, Tauri, binary formats, reverse conversion

Đợt sửa lỗi 2 — five phases landed together:

1. Build & type hygiene: fix 8 TS strict errors (override, exactOptional,
   Uint8Array<ArrayBuffer> for Blob), switch `typecheck` to `tsc -b
   --noEmit`, refactor ThemeToggle to click-outside + Escape (replaces
   the racy onBlur close), fix 10 pre-existing test failures.
2. Dep upgrades: jsdom 25→29, vite 6→8 (Rolldown), @vitejs/plugin-react
   4→6, engines.node >=22.11, manualChunks converted to function form.
3. Tauri process hygiene: explicit RunEvent::ExitRequested +
   WindowEvent::CloseRequested cleanup; docs/TAURI-NOTES.md captures
   the WebView2 GDI leak (upstream).
4. Binary converters: BSON, CBOR, MessagePack with base64/hex display
   encoding; OutputPanel decodes back to raw bytes on download.
5. Reverse conversion: Converter.reverse() interface, JSONL/CSV/YAML/
   TOML/RESX → JSON impls, DirectionToggle UI, FormatPicker disables
   non-reversible formats in reverse mode.

175 tests pass (was 137). Build clean. CI scripts now meaningful.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore: apply prettier + ignore src-tauri/target in eslint

CI's format:check stage caught 24 files that didn't match the project's
prettier config. Run `npm run format` to normalize. Also widen the
eslint ignore list to skip cargo build output under src-tauri/target so
local Rust builds don't pollute the lint run.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(build): switch minifier to oxc for Vite 8 / Rolldown compat

Vite 8 deprecated `transformWithEsbuild`; selecting `minify: 'esbuild'`
now requires esbuild as a separate install. CI didn't have it (we don't
list it as a dep), so the production build failed with
`Cannot find package 'esbuild'`. Switching to oxc — the Rolldown-native
minifier already included with Vite 8 — fixes the build with no new deps.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 12:21:23 +07:00
poli0981 fb506baba2 demo basic 2026-05-13 09:43:37 +07:00
poli0981 e4cdfc3bec Initial commit 2026-05-12 19:58:14 +07:00