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.
PR-Agent on #1248 flagged that the TOML array walker did not skip
`#` line comments while balancing brackets. A sensitive array with a
comment containing `]` could terminate the scan early and leave the
real tail of the secret unmasked. Skip from `#` to the next newline at
the array's top level. Adds a regression test.
Two remaining gaps in the sensitive-value detector flagged by PR-Agent
on #1248:
1. The TOML/YAML key regex only matched bare keys, so values written
under quoted keys like `"API_KEY" = "secret"` were never masked.
Accept basic-string and literal-string quoted keys and normalize the
captured key (strip quotes, unescape) before isSensitiveKey.
2. The string-skip helper used indexOf for the next quote character, so
a value like `AUTH_TOKEN = ["a \"quoted\" value", "x"]` could
terminate scanning early and leak unrelated text or under-mask the
secret. Introduce skipString that honors backslash escapes for basic
strings and is used by both the TOML array walker and the JSON
balanced-brace walker.
Adds regression tests for both edge cases.
Extend the sensitive-key decoration to cover the full logical value, not
just the rest of the current line. Adds value-extent detection for:
- TOML triple-quoted strings (multi-line literal/basic strings)
- TOML arrays ([ ... ] across multiple lines, string-aware)
- YAML block scalars (| and > with indent-based termination)
- JSON arrays and objects (balanced braces, string-aware)
Without this, a secret value spanning multiple lines (multi-line API
key, certificate, private key) was only blurred on its opening line and
the rest stayed readable when the Eye toggle was masked.
Adds regression tests for the TOML triple-quote and array cases.
Flagged by PR-Agent review on #1248.
Replace the hand-rolled textarea+Prism overlay in CodeEditor with
CodeMirror 6. The overlay hid the textarea selection with
`selection:bg-transparent` and `WebkitTextFillColor: transparent` as a
workaround for wrap drift between the highlight layer and the textarea,
which left Ctrl+A / drag-select / Ctrl+C with no visible result.
CodeMirror handles selection, copy, undo, and wrap natively. Custom
themes match the previous prism-react-renderer github (light) and
nightOwl (dark) palettes; background is transparent so the surrounding
bg-muted/30 still shows; font, font-size, line-height, padding, and
gutter-less layout are preserved.
Public CodeEditor props are unchanged (value, onChange, language,
readonly, exactText, className, minHeight, heightMode) so all seven
call sites keep working. The sensitive-key blur is reimplemented as a
CodeMirror Decoration and stays gated behind the existing Eye toggle.
Test setup gets a Range.getClientRects polyfill so CM mounts cleanly in
JSDOM, and shared-page.test.tsx checks .cm-content text directly.
Closes#1247
- fall back to stale CLIProxy version caches instead of surfacing 500s
- remove duplicate dashboard update-check fetches and disable retry/focus refetch
- add backend and UI regressions for the degraded-path behavior
- keep raw JSON model mappings aligned with requested=upstream semantics
- block malformed mapping lines instead of coercing them on save
- render saved mappings as requested to upstream and add regression coverage
Refs #941
- add the huggingface preset and hf alias to the shared preset catalog
- default the preset to Factory Droid because the documented path is generic chat completions
- cover the CLI and dialog behavior with preset metadata and UI tests
- replace the popover list scroll area with a native overflow container
- keep keyboard navigation behavior while restoring wheel scroll in long dropdowns