fancive_obsidian-parallel-r.../src
fancivez 76d2e8050a fix: address 10 P2 behavioral and concurrency findings
Findings from the original review (P2):
- streaming: flush unterminated final SSE event at EOF (some providers
  close the stream without a trailing blank line, dropping the last delta)
- cache-manager: validate entry shape on load — drop entries where
  cards is not an array, anchor is not a string, or bullets is not an
  array. Tolerates missing optional fields (treated as cache miss).
- view: card edit/delete now check cacheReplaceCards return and surface
  failures via a localized Notice instead of pretending success
- main: clear-current / clear-all / file-menu-clear refresh open view
  via renderEmpty so stale UI does not display deleted data
- prompt + settings-tab: card count is normalized via a single helper
  used by buildPrompts and onChange. Prompt and fingerprint stay in sync.
  UI value is written back to the textbox after clamping.
- generation-job-manager: global concurrency limit (default 3) with a
  cancellable wait queue. Race-safe slot accounting via a reserved
  counter so resolved-but-not-yet-set waiters are visible to fast-path
  start() callers.
- runForFile: now returns RunForFileResult; accepts preloadedContent +
  silentView + skipEditConfirm options used by batch (and reflected on
  the PluginHost interface).
- batch: avoid double file read, do not steal UI focus, classify
  results correctly (generated / cached / already-running / empty / ...)

Follow-up from the 1.0.11 review:
- generationFingerprint: codex backend excludes settings.model from the
  hash. Codex ignores --model; previously editing model spuriously
  invalidated all codex cache.

Codex review pass:
- generation-job-manager: race fix — releaseSlot's resolve microtask
  and a synchronous start() fast-path could briefly overshoot
  maxConcurrent. Reserve the slot synchronously inside the wrapped
  resolve to close the window.
- cache-manager: anchor type validation in addition to bullets.

NOTE: Codex backend users will see a one-time "stale cache" banner on
existing notes due to the fingerprint change; regenerate to refresh.

Change-Id: I7721c7dfe51dea3f51b0215764f721523c2f6806
2026-05-02 13:52:49 +08:00
..
anchor.ts refactor: enable noImplicitAny and add type annotations 2026-04-26 08:58:41 +08:00
batch.ts fix: address 13 review findings (security, UX, i18n) 2026-05-02 12:50:35 +08:00
cache-manager.ts fix: address 10 P2 behavioral and concurrency findings 2026-05-02 13:52:49 +08:00
cache.ts refactor: make cache entry updates immutable 2026-04-26 06:12:55 +00:00
cards.ts refactor: extract resolveCardAnchors and confirmRegenerateEditedCards from main.ts 2026-04-27 14:11:36 +08:00
cli.ts fix: address 13 review findings (security, UX, i18n) 2026-05-02 12:50:35 +08:00
generation-job-manager.ts fix: address 10 P2 behavioral and concurrency findings 2026-05-02 13:52:49 +08:00
generation.ts refactor: extract generation orchestration 2026-04-26 17:45:43 +08:00
i18n-strings.ts fix: address 10 P2 behavioral and concurrency findings 2026-05-02 13:52:49 +08:00
i18n.ts refactor: extract i18n translation strings to dedicated i18n-strings.ts 2026-04-27 15:13:31 +08:00
markdown.ts feat: add Biome for lint and format 2026-04-25 23:47:49 +08:00
modal.ts fix: confirm before overwriting exports 2026-04-29 13:56:36 +08:00
navigation.ts refactor: add TypeScript interfaces for core types 2026-04-25 23:34:45 +08:00
prompt.ts fix: address 10 P2 behavioral and concurrency findings 2026-05-02 13:52:49 +08:00
provider-bodies.ts refactor: extract body builders and types to src/provider-bodies.ts 2026-04-27 14:11:37 +08:00
provider-parsers.ts fix: address 13 review findings (security, UX, i18n) 2026-05-02 12:50:35 +08:00
provider-presets.ts refactor: extract API_PROVIDER_PRESETS to provider-presets.ts 2026-04-27 15:15:23 +08:00
provider-request.ts fix: address CR findings — test runner, CI dedup, error cause 2026-04-27 16:04:03 +08:00
providers.ts refactor: extract provider HTTP helpers to provider-request.ts 2026-04-27 15:41:28 +08:00
schema.ts fix: address 13 review findings (security, UX, i18n) 2026-05-02 12:50:35 +08:00
scroll.ts refactor: replace magic numbers in scroll.ts with named constants 2026-04-27 14:11:37 +08:00
settings-tab.ts fix: address 10 P2 behavioral and concurrency findings 2026-05-02 13:52:49 +08:00
settings.ts fix: address 10 P2 behavioral and concurrency findings 2026-05-02 13:52:49 +08:00
streaming.ts fix: address 10 P2 behavioral and concurrency findings 2026-05-02 13:52:49 +08:00
test-exports.ts fix: address 10 P2 behavioral and concurrency findings 2026-05-02 13:52:49 +08:00
types.ts fix: address 10 P2 behavioral and concurrency findings 2026-05-02 13:52:49 +08:00
ui-helpers.ts fix: address all required issues from Obsidian plugin review bot 2026-04-26 15:57:16 +08:00
vault.ts chore: improve engineering quality and hardening 2026-04-27 11:15:35 +08:00
view.ts fix: address 10 P2 behavioral and concurrency findings 2026-05-02 13:52:49 +08:00