fancive_obsidian-parallel-r.../tests
fancivez d738fc120a feat(error-ui): structured CliProcessError + ErrorKind-driven UI dispatch
Replaces the single long-Notice failure UX with a kind-aware dispatcher
so users get actionable buttons instead of a wall of text.

- CliProcessError extends Error with a typed CliErrorDetails payload
  (reason / pid / elapsed / idle / bytes / tails / exitCode / signal /
  timeoutMs / idleTimeoutMs). All five runCli failure paths now throw
  the typed error; message format is preserved so existing classifier
  regex and tests still match.
- classifyGenerationError short-circuits on details.reason for the
  deterministic cases (wall/idle-timeout → timeout, spawn/startup →
  config, streams-unavailable → unknown). exit-nonzero falls through
  so stderr-derived auth/rate-limit hints still classify correctly.
  Duck-typed check avoids cli ↔ generation-job-manager circular import.
- New error-ui.ts dispatches by ErrorKind:
    timeout (with details) → TimeoutDiagnosticsModal showing cmd, pid,
      elapsed, idle, bytes, redacted stderr/stdout tail, plus copy /
      open-settings / close buttons.
    timeout (no details, e.g. API streaming) → actionable Notice.
    auth/config → Notice + "Open Settings" CTA.
    rate-limit → Notice + "Copy details".
    schema → Notice + "Copy raw output" CTA.
    unknown → unchanged legacy short Notice.
- main.ts handleGenerationError delegates to dispatcher; new
  openPluginSettings() helper uses Obsidian's app.setting.openTabById.
- 21 i18n strings (zh + en) for all new UI labels and the modal copy.
- styles.css adds error notice + diagnostics modal styling.
- 7 new test assertions cover typed details on every failure path and
  classifyGenerationError respecting structured reasons.

Change-Id: I8af46d375d92ba26d14180ffbeb6c3a6dedd89f5
2026-05-05 20:19:57 +08:00
..
anchor.test.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
architecture.test.js test: split architecture guard tests 2026-04-29 13:53:19 +08:00
cache.test.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
cards-nav.test.js refactor: split modules.test.js into 12 per-module test files 2026-04-27 15:21:03 +08:00
catalog.json feat: toggle right sidebar instead of detaching tab + component tests 2026-05-02 15:38:41 +08:00
cli.test.js feat(error-ui): structured CliProcessError + ErrorKind-driven UI dispatch 2026-05-05 20:19:57 +08:00
direct-batch.test.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
direct-cache.test.js fix: address 10 P2 behavioral and concurrency findings 2026-05-02 13:52:49 +08:00
direct-generation.test.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
direct-i18n.test.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
direct-markdown.test.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
direct-prompt.test.js fix: address 10 P2 behavioral and concurrency findings 2026-05-02 13:52:49 +08:00
direct-providers.test.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
direct-settings-extra.test.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
direct-settings.test.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
direct-streaming.test.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
direct-test-setup.js chore: integrate obsidianmd eslint plugin and fix recommended rules 2026-05-03 10:45:10 +08:00
generation-job-manager.test.js fix: address 10 P2 behavioral and concurrency findings 2026-05-02 13:52:49 +08:00
i18n.test.js fix: add cancel action to batch prompt 2026-04-29 14:13:47 +08:00
markdown.test.js refactor: split modules.test.js into 12 per-module test files 2026-04-27 15:21:03 +08:00
obsidian-mock.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
plugin-batch.test.js fix: address 10 P2 behavioral and concurrency findings 2026-05-02 13:52:49 +08:00
providers.test.js refactor: split main.test.js into focused test files 2026-04-27 19:59:46 +08:00
schema.test.js fix: address 13 review findings (security, UX, i18n) 2026-05-02 12:50:35 +08:00
scroll.test.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
settings.test.js feat(cli): enrich CLI timeout diagnostics + idle timeout + debug logging 2026-05-05 17:33:25 +08:00
streaming.test.js fix: address 10 P2 behavioral and concurrency findings 2026-05-02 13:52:49 +08:00
test-exports.test.js fix: address 10 P2 behavioral and concurrency findings 2026-05-02 13:52:49 +08:00
test-setup.js chore: integrate obsidianmd eslint plugin and fix recommended rules 2026-05-03 10:45:10 +08:00
vault-batch.test.js lint: extend Biome coverage to tests/ and scripts/ 2026-04-27 19:53:35 +08:00
view-render.test.js feat: toggle right sidebar instead of detaching tab + component tests 2026-05-02 15:38:41 +08:00