17 Commits
Author SHA1 Message Date
poli0981andClaude Opus 5.5 29d417ec93 feat: 2.2.0 — accessibility statement and fixes (#177)
ACCESSIBILITY.md (+ Vietnamese mirror) states the WCAG 2.2 AA goal, what works, a keyboard reference, what was tested, known limitations and how to report a barrier; new accessibility issue template. Fixes from an audit: skip link, focus after navigation and consent, visible focus everywhere incl. forced-colors, Esc-then-Tab hint and aria-invalid on the input editor, a quieter status bar, names that match visible labels, translated screen-reader strings, page zoom in the desktop apps. axe-core scan in CI. Docs synced (vi PRIVACY/dev_env, README credits, ROADMAP). Version 2.2.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 16:04:59 +07:00
poli0981andClaude Opus 5.5 14f593c7a7 chore: 2.1.1 — dependencies to their latest releases (#170)
npm (minor/patch only): react-router 8.5.1, i18next 26.7.1,
react-i18next 17.1.12, i18next-browser-languagedetector 8.3.0,
lucide-react 1.67.0, fast-xml-parser 5.12.0, cbor-x 1.6.9,
@tauri-apps/plugin-dialog 2.8.4; dev: eslint 10.14, typescript-eslint
8.72.1, globals 17.14, vitest + coverage-v8 5.1, plugin-react 6.2.1,
tailwindcss + @tailwindcss/vite 4.3.4, knip 6.44.1, wrangler 4.157,
@types/node 26.6.6. Transitive packages refreshed; Vite and Tailwind
now share one lightningcss.

Cargo: cargo update within semver (tauri-plugin-dialog 2.8.4,
tauri-plugin-single-instance 2.5.5, wry 0.57.1, tao 0.37.2, ...).

Actions: sonarqube-scan-action 8.4.1; everything else was current.

knip 6.44 sees @testing-library/user-event, so it leaves
ignoreDependencies. THIRD-PARTY.md re-synced with the lockfiles.

minimatch < 11.0.1 (GHSA-g3hv-75wg-m249) stays: eslint and
typescript-eslint pin minimatch 10, the vulnerable path needs
optimizationLevel >= 2 and both use the default 1 on our own
config patterns.

Supersedes #163, #164, #165, #166, #167, #168, #169.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 09:53:47 +07:00
poli0981andClaude Opus 5.5 e3d0e8b917 feat: 2.1.0 — JSONC → JSON (#161)
JSONC (JSON with comments) converts to standard JSON as a new input-only format: hand-written parser, comments and trailing commas removed at the same offsets, token-level output that keeps every number and key as written. Input-only formats in the framework (meta.inputOnly), reverse errors with line/column, JSONC editor highlighting and lint, a one-click hint in the JSON → direction, strings in four locales, docs and the 2.1.0 version bump.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 12:56:58 +07:00
poli0981andClaude Opus 5.5 b148f91635 docs: rate limits are approximate — measured on production (#159)
Cloudflare's Rate Limiting binding checks a locally cached count per edge
machine and syncs it in the background. On production one keep-alive
connection hits the limits almost exactly (120 pages, then 429s), but 300
requests on fresh parallel connections in 13 s all passed. Say so in
DEPLOYMENT.md and the rate-limit.ts header instead of "overshoot slightly",
and document a one-connection curl test for production.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 05:55:18 +07:00
poli0981andClaude Opus 5.5 72cb9a033d feat: 2.0.2 — rate limiting for the whole site (#157)
The Worker now runs first for every request except the content-hashed
bundles under /assets/ (run_worker_first: ["/*", "!/assets/*"]) and counts
it against a per-client limit before serving it:

- SITE_LIMITER: pages and public files, 120 requests / 60 s
- API_LIMITER: every /api/* request, 60 / 60 s
- VERIFY_LIMITER: /api/turnstile/verify on top, 30 / 60 s (unchanged)

Over the limit, pages get a plain-text 429 in the four UI languages and the
API a JSON 429 (rate_limited); both carry Retry-After: 60. Clients are keyed
on their IPv4 address or the /64 of their IPv6 address, never logged. Pages
still go through env.ASSETS.fetch(), so _headers, _redirects and the SPA
fallback apply as before. A failing limiter lets requests through. Previews
get their own counters (namespace_id 4204/4206).

Docs: DEPLOYMENT, PRIVACY (wording only, nothing new collected, no
re-consent), SECURITY, CONTRIBUTING, READMEs, CLAUDE.md, ROADMAP, CHANGELOG.
Version 2.0.2 (versionCode 20002).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 05:36:02 +07:00
poli0981andClaude Opus 5.5 46d1e53656 fix: 2.0.1 — editors scroll again and fewer console errors (#153)
- The wrapper div @uiw/react-codemirror renders now fills its panel, so the input editor and the read-only output scroll with the wheel, touch and keyboard; the read-only output's scroll container is focusable (arrow/page keys) without becoming contenteditable.
- CSP (web and Tauri) allows 'wasm-unsafe-eval' for bson's WebAssembly helper; Permissions-Policy drops browsing-topics.
- Version 2.0.1 (Android versionCode 20001); CHANGELOG and docs updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 23:43:42 +07:00
poli0981andClaude Opus 5.5 532b5cfd82 JSONPrism 2.0.0: Cloudflare Workers, TypeScript 7 and a full audit (#151)
- Web app moves to https://jsonprism.poli0981.dev on Cloudflare Workers
  (static assets + /api/turnstile/verify + /api/health), with security
  headers, redirects for the old /jsonPrism paths, previews for
  non-production branches and a production smoke workflow. GitHub Pages
  only redirects now.
- Web-only Turnstile human check (server-verified, 7-day pass) and
  cookieless Web Analytics (after consent, opt-out, off under GPC);
  Privacy Policy and Terms 2.0, consent version 2.
- Node 26, TypeScript 7 with the TS 6 API alias for typescript-eslint,
  dependencies on current majors (ends the ERESOLVE that kept main red).
- Converter fixes: CSV columns, binary ZIP entries, MySQL backslash
  escaping, RESX/XML validity, BSON size, YAML quoting and alias limits,
  TOML nulls and big integers, JSON error positions, JSONL/BOM linting.
- Web Worker conversion, faster editor, technical UI refresh with an
  Appearance menu and custom scrollbars, accessibility and i18n gaps.
- Tauri least-privilege capabilities, hardened CSP, Tauri 2.12.
- CI: SHA-pinned least-privilege workflows, SonarQube Cloud, Rust job,
  verifiable releases (SHA256SUMS + provenance); Dependabot grouping.
- 864 tests (97% line coverage), SonarCloud quality gate passing; docs,
  legal and CLAUDE.md refreshed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 23:05:14 +07:00
poli0981andClaude Opus 4.8 b1d461a18e fix(android): open external links via opener plugin (shell.open broke on Android) (#105)
The v1.7.2 global link interceptor routed external URLs through
`@tauri-apps/plugin-shell`'s `open()`, but that throws on Android:
"Scoped shell IO error: No such file or directory (os error 2)" — the
shell plugin has no native URL handler on mobile, so every tapped link
did nothing. (The earlier ConsentGate per-link shell.open from #98 had
the same flaw; it was simply never tap-tested on Android.)

Switch to `@tauri-apps/plugin-opener`'s `openUrl()`, whose `open_url` has
a real cfg(mobile) split that routes to the native Intent.ACTION_VIEW
handler. Plain `openUrl(url)` — no inAppBrowser (that option regressed
os-error-2 on Android 16, plugins-workspace#2913).

Wiring: tauri-plugin-opener crate + init, @tauri-apps/plugin-opener npm,
"opener:default" capability (its allow-open-url permits any URL). Shell
plugin removed entirely (openExternal was its only consumer) — also from
vite optimizeDeps, knip ignore, and the THIRD-PARTY/TAURI-NOTES docs.

Verified on emulator API 33 (Android 13, WebView Chromium 109): tapping
the consent-gate License link and footer X link both fire ActivityManager
START ACTION_VIEW and open Chrome; no shell error.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 18:58:28 +07:00
poli0981andClaude Opus 4.8 8bbecd14bd docs(android): add System Requirements (WebView/Android/RAM/storage) (#95)
Add a "System requirements" table to the README Android section (EN + VI):
Android 12+ (API 31), Android System WebView Chromium 111+, supported ABIs,
RAM, storage, and offline/no-network note — with guidance to update WebView
if the UI looks broken. Refresh the now-stale Android testing note in
docs/pc_spec.md (EN + VI) to reflect emulator-based build + smoke testing.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 14:57:37 +07:00
poli0981andClaude Opus 4.8 40c8c81028 feat(android): build & package a sideloadable APK (Tauri 2, Android 12+) (#90)
Add an Android target alongside the desktop bundles. Users download a signed
universal .apk and sideload it; minSdk 31 blocks Android < 12 at install time.

- tauri.conf.json: bundle.android (minSdkVersion 31, versionCode 10601)
- commit the generated src-tauri/gen/android Gradle project (source only; build
  outputs + keystore stay gitignored) with release signing wired from a
  gitignored keystore.properties (graceful unsigned fallback when absent)
- self-host fonts via @fontsource (drop Google Fonts <link>, tighten CSP) so the
  app renders fully offline
- robust native file open: basenameFromPath() recovers a filename from Android
  content:// URIs; the native-open path filters extensions leniently so opaque
  MediaStore URIs the dialog already vetted are not wrongly rejected
- npm scripts tauri:android:{init,dev,build}; android job in release.yml signs
  from secrets and uploads the APK to the same draft release
- docs: README/README.vi Android sections, TAURI-NOTES maintainer notes (incl.
  the WebView Chromium >= 111 requirement), ROADMAP phase 7

Validated on emulators: signed APK installs on Android 12+, blocked on API < 31
(INSTALL_FAILED_OLDER_SDK), launches, renders, runs converters, reads files via
the SAF picker, fully offline. New unit tests for basenameFromPath + lenient
filterByExtension; full gate green (format/typecheck/lint/knip/215 tests).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 22:54:34 +07:00
poli0981 b89d99807d feat: error pages, consent gate, installer license + web code-splitting — v1.6.0 (#65)
See PR #65 for full details.
2026-06-14 14:49:26 +07:00
poli0981andClaude Opus 4.7 6197334326 chore(release): v1.5.0 — component refactor, knip, scroll-to-top (#58)
- Refactor: decompose BatchPanel (515→289), ConverterWorkspace (314→206),
  and InputPanel (278→216) into pure utilities, leaf components, and hooks.
  Behavior-preserving; all 193 unit tests still pass.
- Tooling: integrate knip for dead-code analysis (knip.json + npm script +
  CI step). Remove orphaned useLocalStorage.ts; declare the previously
  phantom `globals` devDependency.
- Feature: scroll-to-top button on the About page (prefers-reduced-motion
  aware, i18n across all four locales).
- Docs: bump to 1.5.0; update CHANGELOG, THIRD-PARTY, ROADMAP (Phase 4 + 5),
  CONTRIBUTING.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 20:06:51 +07:00
poli0981andClaude Opus 4.7 a6caa88d9c fix(toast): close button now dismisses on click — upgrade sonner v1.7 to v2 (#52)
User report: the toast close button (×) was visible on both desktop and mobile,
but clicking/tapping it didn't dismiss the toast. Reading sonner v1.7.4's
bundled source, the toast root attaches an `onPointerDown` that calls
`r.target.setPointerCapture(r.pointerId)` unconditionally whenever the toast is
dismissible. Combined with React 19's new event delegation (root-attached
listeners instead of document-wide), this pointer capture quirk swallows the
synthetic click event on the close button — so the bundled handler that calls
`dismiss()` never runs. The bug fires on both mouse and touch because the
PointerEvent capture is API-unified.

Upgrade sonner from ^1.7.0 to ^2.0.7. Sonner v2 rewrote the pointer/swipe
handling and ships first-class React 19 support; the close-button click now
fires reliably on both desktop and mobile. The seven `toast.success/warning/
error/info` usage sites and the `<Toaster>` props (`position`, `theme`,
`richColors`, `closeButton`, `toastOptions.classNames`) are API-compatible
between v1 and v2 — typecheck and the 193 unit tests pass without changes.

Bonus: add a `::after` hit-area expansion on `[data-close-button]` (visible
size stays at sonner's 20px default; effective tap target ~36–40px) plus
`touch-action: manipulation` to eliminate the 300ms tap delay on touch
devices. Defensive — sonner v2 already fixes the underlying click issue, but
the larger hit target is a free mobile UX win.

Also adds:
- `docs/tested-viewports.md` — the manual device test matrix the maintainer
  has been verifying against (BlackBerry Z30 / Galaxy S9+ / Pixel 3/4/7 /
  iPhone SE/12/14 Pro/XR/Pro Max / iPad / BlackBerry PlayBook). Documents the
  Nokia Lumia 520 (320x533) as a known limitation below the recommended
  minimum 360x640.
- README EN + VI link to the new doc.
- THIRD-PARTY.md bumps sonner version 1.7 to 2.0.7.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 14:01:10 +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 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 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