Files
ccs/ui
Tam Nhu Tran 15a1faf3ab fix(ui): handle TOML triple-quotes in arrays and AST-aware JSON keys
PR-Agent on #1248 flagged two remaining sensitive-mask edge cases:

1. The TOML array walker stepped through triple-quoted strings one
   single quote at a time. With a body containing both quotes and
   structural characters, like """abc"]xyz""", a stray `]` inside the
   string body could escape the string-skip pair and terminate the
   array scan early. Add skipTomlString that recognizes triple-quoted
   strings ("""…""", '''…''') and skips them as one unit.

2. The JSON regex matched any "...":  pattern, so substrings inside
   escaped value strings, like "description": "use \\"API_KEY\\": header",
   could mask unrelated text. Replace the JSON branch with a state-aware
   scanner that only registers a string as a key when it sits at an
   object-key position (preceded by `{` or `,`, followed by `:`).

Adds regression tests for both cases.
2026-05-14 18:10:26 -04:00
..

CCS Dashboard UI

React + TypeScript + Vite frontend for the CCS local dashboard.

This UI is served by the CCS web server and is accessed via:

ccs config

Development

From project root:

bun run dev

This starts the CCS server, opens a local browser URL, and prints bind/network details for the dashboard. If the runtime bind is reachable beyond loopback, CCS also prints an auth reminder.

For remote device access during development, run:

bun run dev -- --host 0.0.0.0

For local-only development, run:

bun run dev -- --host 127.0.0.1

From ui/ only (frontend dev server):

cd ui
bun run dev

Quality Commands

cd ui
bun run typecheck
bun run lint
bun run validate
bun run test:run

i18n

Dashboard localization uses react-i18next.

  • Main setup: ui/src/lib/i18n.ts
  • Locale helpers: ui/src/lib/locales.ts
  • Language switcher: ui/src/components/layout/language-switcher.tsx

For full architecture, conventions, and locale onboarding, see:


Notes

  • UI locale persistence uses browser localStorage key ccs-ui-locale.
  • Current supported locales are managed in ui/src/lib/locales.ts.
  • Current locales: en, zh-CN, vi.
  • Fallback locale is English (en).