Skip to content

docs: sync TODO/AUDIT with the 2026-07-28 local-AI fixes + Dependabot batch - #274

Merged
qnbs merged 6 commits into
mainfrom
docs/sync-dependabot-and-issue-60-status
Jul 28, 2026
Merged

docs: sync TODO/AUDIT with the 2026-07-28 local-AI fixes + Dependabot batch#274
qnbs merged 6 commits into
mainfrom
docs/sync-dependabot-and-issue-60-status

Conversation

@qnbs

@qnbs qnbs commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Summary

Light-touch doc sync (per this repo's own convention: CHANGELOG/TODO/AUDIT updated in the same session's PRs, not a wholesale rewrite) reflecting today's work:

No code changes — TODO.md and AUDIT.md only.

Test plan

  • pnpm run lint — clean
  • N/A — docs-only change

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Improved local AI provider discovery and connection testing for desktop, including native Ollama endpoint probing with OpenAI-compatible fallback.
    • Clearer browser-specific Ollama “Not available in browser” status messaging.
    • Live announcements for AI provider status updates.
  • Bug Fixes

    • Prevented stale in-flight connection-test results from overwriting newer status.
    • Better handling of unavailable desktop local-server/plugin scenarios with user-safe errors.
    • Fixed feature-catalog default drift and improved desktop packaged discovery behavior.
  • Security

    • Updated CI checkouts to avoid persisting authentication credentials.

@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
worldscript-studio Ready Ready Preview, Comment Jul 28, 2026 10:13am

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 11 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 00d8d1d9-93a7-456a-b093-060d23318471

📥 Commits

Reviewing files that changed from the base of the PR and between 039224d and bda1e7f.

📒 Files selected for processing (3)
  • tests/unit/commands/commandDefinitions.test.ts
  • tests/unit/listenerMiddleware.test.ts
  • tests/unit/settings/AiProviderCard.test.tsx
📝 Walkthrough

Walkthrough

The PR updates local AI provider status and endpoint discovery, replaces selected dynamic imports with static imports, applies checkout credential hardening across workflows, adjusts RTL toggle styling, and records v1.24.1 release changes.

Changes

Local-AI reliability

Layer / File(s) Summary
Provider status and endpoint discovery
components/settings/AiProviderCard.tsx, services/ollamaService.ts, tests/unit/*
Ollama browser status is shown as unavailable, stale test results are ignored, native /api/tags probing precedes /v1/models, and plugin failures receive distinct safe classification with updated tests.
Static module wiring and direction variants
app/listenerMiddleware.ts, services/commands/commandDefinitions.tsx, components/settings/SettingsShared.tsx
Selected dynamic imports become static imports, and checked toggle translation uses ltr:/rtl: variants.

Workflow and release maintenance

Layer / File(s) Summary
Checkout credential hardening
.github/workflows/*.yml
Checkout steps disable credential persistence across CI, CodeQL, Docker, mutation, Storybook, Tauri, and voice workflows; Storybook Debug also updates its pinned checkout revision.
Release and sprint records
AUDIT.md, CHANGELOG.md, TODO.md
Release records document the local-AI fixes, workflow security change, Dependabot results, and quality-gate updates.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant AiProviderCard
  participant scanLocalOpenAiCompatibleEndpoints
  participant Ollama
  User->>AiProviderCard: test local provider
  AiProviderCard->>scanLocalOpenAiCompatibleEndpoints: scan endpoint
  scanLocalOpenAiCompatibleEndpoints->>Ollama: request /api/tags
  Ollama-->>scanLocalOpenAiCompatibleEndpoints: success or failure
  scanLocalOpenAiCompatibleEndpoints->>Ollama: fallback request /v1/models
  scanLocalOpenAiCompatibleEndpoints-->>AiProviderCard: status result
  AiProviderCard-->>User: render provider status
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the documentation sync around the local-AI fixes and Dependabot batch.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/sync-dependabot-and-issue-60-status

Comment @coderabbitai help to get the list of available commands.

@codeant-ai

codeant-ai Bot commented Jul 28, 2026

Copy link
Copy Markdown

🏁 CodeAnt Quality Gate Results

Commit: 039224df
Scan Time: 2026-07-28 09:41:02 UTC

✅ Overall Status: PASSED

Quality Gate Details

Quality Gate Status Details
Secrets ✅ PASSED 0 secrets found
Duplicate Code ✅ PASSED 0.0% duplicated
SAST ✅ PASSED No security issues
Bugs ✅ PASSED Rating S: No bugs
IAC ✅ PASSED Rating B: 2 issues (2 medium)

View Full Results

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@AUDIT.md`:
- Around line 22-23: The documented locale and module counts must be corrected
consistently. Update CLAUDE.md’s locale roster and per-locale module count from
17 to 19 and 20 to 21, then align the corresponding release-history claims in
AUDIT.md lines 22-23 and TODO.md line 60 with the committed CLAUDE.md contents.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 59d68040-15d5-48d9-84bf-f9bfb237a94f

📥 Commits

Reviewing files that changed from the base of the PR and between 7201da3 and ed5afbf.

📒 Files selected for processing (2)
  • AUDIT.md
  • TODO.md

Comment thread AUDIT.md
@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
components/settings/AiProviderCard.tsx 83.33% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@qnbs
qnbs force-pushed the docs/sync-dependabot-and-issue-60-status branch from ed5afbf to f29a8f7 Compare July 28, 2026 08:04
@qnbs
qnbs changed the base branch from main to fix/ollama-browser-status-badge July 28, 2026 08:05
@qnbs

qnbs commented Jul 28, 2026

Copy link
Copy Markdown
Owner Author

@CodeAnt-AI review

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 10

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Around line 43-45: Update every actions/checkout step in
.github/workflows/ci.yml at lines 43-45, 101, 182, 270-271, 323-324, 360-361,
405-406, and 462-463 to set persist-credentials to false while preserving the
existing checkout options.

In @.github/workflows/codeql.yml:
- Line 30: Disable persisted checkout credentials by adding persist-credentials:
false to the checkout steps in .github/workflows/codeql.yml lines 30-30,
.github/workflows/docker.yml lines 26-26, .github/workflows/mutation.yml lines
66-66, .github/workflows/storybook-debug.yml lines 34-34,
.github/workflows/tauri-build.yml lines 37-37, and
.github/workflows/voice-nightly.yml lines 28-28; no authenticated Git operations
are required afterward.

In `@components/settings/AiProviderCard.tsx`:
- Around line 206-226: Add role="status" and aria-live="polite" to the status
badge span in the AiProviderCard component, preserving its existing text and
styling logic so screen readers announce changes to the provider status.
- Around line 226-228: Update the error presentation in AiProviderCard,
including the action row that renders testError, so all user-facing Ollama
errors are suppressed when ollamaUntestable is true and only sanitized UI-safe
messaging is shown; route raw transport or exception details to
services/logger.ts instead. Also make the test request completion logic ignore
stale async results so an older request cannot update testStatus or testError
after a newer state has made Ollama untestable.

In `@config/resolveViteBase.ts`:
- Line 6: 添加一行紧邻每处相关改动的 QNBS-v3 原因/影响/创意价值注释:在 config/resolveViteBase.ts
第6行说明提取并导出 Pages 基础路径;在 vite.config.ts 第7-12行说明共享 Tauri 构建标志;在
services/localServerHttp.ts 第10-15行说明日志初始化及新增失败分类;在
tests/unit/aiProviderService.test.ts 第716-760行说明原生优先与回退回归覆盖;在
tests/unit/settings/AiProviderCard.test.tsx 第161-189行说明浏览器与桌面状态覆盖。每条注释使用指定的 “//
QNBS-v3: [Grund / Impact / Kreativer Mehrwert]” 格式。

In `@services/aiProviderService.ts`:
- Around line 706-733: Standardize the QNBS-v3 annotations across all three
changed sites: add one adjacent single-line annotation for the Ollama
native-first logic in scanLocalOpenAiCompatibleEndpoints in
services/aiProviderService.ts (lines 706-733); collapse the existing multiline
annotation near AiProviderCard in components/settings/AiProviderCard.tsx (lines
43-47) into one line; and add an immediate JSX QNBS-v3 annotation beside the
changed badge rendering in components/settings/AiProviderCard.tsx (lines
206-226).
- Around line 706-733: Add the required single-line `// QNBS-v3: ...` annotation
immediately beside the changed `scanLocalOpenAiCompatibleEndpoints` logic,
adjacent to the existing JSDoc and implementation. Keep the annotation concise
and preserve the current Ollama native-first fallback behavior.

In `@services/CLAUDE.md`:
- Line 13: Update the LanguageTool documentation around languageToolService.ts
to remove the claim that network failures degrade silently to an empty result.
Document sanitized technical logging through services/logger.ts and a brief
actionable degraded state for users, while retaining silent handling only for
documented aborts; ensure the underlying async operation uses try/catch or a
Result type.

In `@services/ollamaService.ts`:
- Around line 165-170: Update the plugin_unavailable branch in the
connection-testing method to return a stable, safe localized status message
instead of exposing LocalServerError.message. Preserve the distinct failure
classification and, if existing conventions support it, include only the
normalized endpoint; rely on localServerHttp logging for detailed diagnostics.

In `@tests/unit/aiProviderService.test.ts`:
- Around line 731-747: Update the fallback URL assertion in the test for
scanLocalOpenAiCompatibleEndpoints to require the exact /v1/models path,
replacing the broader /models check while preserving the existing call-order and
success assertions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ee9a2d51-f419-448a-895a-1be21e49c03d

📥 Commits

Reviewing files that changed from the base of the PR and between ed5afbf and f29a8f7.

⛔ Files ignored due to path filters (2)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • src-tauri/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (73)
  • .github/workflows/ci.yml
  • .github/workflows/codeql.yml
  • .github/workflows/docker.yml
  • .github/workflows/mutation.yml
  • .github/workflows/scorecard.yml
  • .github/workflows/storybook-debug.yml
  • .github/workflows/tauri-build.yml
  • .github/workflows/voice-nightly.yml
  • AUDIT.md
  • CHANGELOG.md
  • CLAUDE.md
  • TODO.md
  • components/CLAUDE.md
  • components/settings/AiProviderCard.tsx
  • config/resolveViteBase.ts
  • docs/adr/0012-local-server-connectivity-tauri-http.md
  • features/lora/CLAUDE.md
  • features/plotBoard/CLAUDE.md
  • locales/ar/settings.json
  • locales/de/settings.json
  • locales/el/settings.json
  • locales/en/settings.json
  • locales/es/settings.json
  • locales/eu/settings.json
  • locales/fa/settings.json
  • locales/fi/settings.json
  • locales/fr/settings.json
  • locales/he/settings.json
  • locales/hu/settings.json
  • locales/is/settings.json
  • locales/it/settings.json
  • locales/ja/settings.json
  • locales/ko/settings.json
  • locales/pt/settings.json
  • locales/ru/settings.json
  • locales/sv/settings.json
  • locales/zh/settings.json
  • package.json
  • public/locales/ar/bundle.json
  • public/locales/de/bundle.json
  • public/locales/el/bundle.json
  • public/locales/en/bundle.json
  • public/locales/es/bundle.json
  • public/locales/eu/bundle.json
  • public/locales/fa/bundle.json
  • public/locales/fi/bundle.json
  • public/locales/fr/bundle.json
  • public/locales/he/bundle.json
  • public/locales/hu/bundle.json
  • public/locales/is/bundle.json
  • public/locales/it/bundle.json
  • public/locales/ja/bundle.json
  • public/locales/ko/bundle.json
  • public/locales/pt/bundle.json
  • public/locales/ru/bundle.json
  • public/locales/sv/bundle.json
  • public/locales/zh/bundle.json
  • services/CLAUDE.md
  • services/aiProviderService.ts
  • services/cloudSync/CLAUDE.md
  • services/copilot/CLAUDE.md
  • services/localServerHttp.ts
  • services/ollamaService.ts
  • services/proForge/CLAUDE.md
  • services/voice/CLAUDE.md
  • src-tauri/Cargo.toml
  • tests/CLAUDE.md
  • tests/unit/aiProviderService.test.ts
  • tests/unit/localServerHttpPluginUnavailable.test.ts
  • tests/unit/ollamaService.test.ts
  • tests/unit/resolveViteBase.test.ts
  • tests/unit/settings/AiProviderCard.test.tsx
  • vite.config.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • AUDIT.md
  • TODO.md

Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/codeql.yml

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 10

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Around line 43-45: Update every actions/checkout step in
.github/workflows/ci.yml at lines 43-45, 101, 182, 270-271, 323-324, 360-361,
405-406, and 462-463 to set persist-credentials to false while preserving the
existing checkout options.

In @.github/workflows/codeql.yml:
- Line 30: Disable persisted checkout credentials by adding persist-credentials:
false to the checkout steps in .github/workflows/codeql.yml lines 30-30,
.github/workflows/docker.yml lines 26-26, .github/workflows/mutation.yml lines
66-66, .github/workflows/storybook-debug.yml lines 34-34,
.github/workflows/tauri-build.yml lines 37-37, and
.github/workflows/voice-nightly.yml lines 28-28; no authenticated Git operations
are required afterward.

In `@components/settings/AiProviderCard.tsx`:
- Around line 206-226: Add role="status" and aria-live="polite" to the status
badge span in the AiProviderCard component, preserving its existing text and
styling logic so screen readers announce changes to the provider status.
- Around line 226-228: Update the error presentation in AiProviderCard,
including the action row that renders testError, so all user-facing Ollama
errors are suppressed when ollamaUntestable is true and only sanitized UI-safe
messaging is shown; route raw transport or exception details to
services/logger.ts instead. Also make the test request completion logic ignore
stale async results so an older request cannot update testStatus or testError
after a newer state has made Ollama untestable.

In `@config/resolveViteBase.ts`:
- Line 6: 添加一行紧邻每处相关改动的 QNBS-v3 原因/影响/创意价值注释:在 config/resolveViteBase.ts
第6行说明提取并导出 Pages 基础路径;在 vite.config.ts 第7-12行说明共享 Tauri 构建标志;在
services/localServerHttp.ts 第10-15行说明日志初始化及新增失败分类;在
tests/unit/aiProviderService.test.ts 第716-760行说明原生优先与回退回归覆盖;在
tests/unit/settings/AiProviderCard.test.tsx 第161-189行说明浏览器与桌面状态覆盖。每条注释使用指定的 “//
QNBS-v3: [Grund / Impact / Kreativer Mehrwert]” 格式。

In `@services/aiProviderService.ts`:
- Around line 706-733: Standardize the QNBS-v3 annotations across all three
changed sites: add one adjacent single-line annotation for the Ollama
native-first logic in scanLocalOpenAiCompatibleEndpoints in
services/aiProviderService.ts (lines 706-733); collapse the existing multiline
annotation near AiProviderCard in components/settings/AiProviderCard.tsx (lines
43-47) into one line; and add an immediate JSX QNBS-v3 annotation beside the
changed badge rendering in components/settings/AiProviderCard.tsx (lines
206-226).
- Around line 706-733: Add the required single-line `// QNBS-v3: ...` annotation
immediately beside the changed `scanLocalOpenAiCompatibleEndpoints` logic,
adjacent to the existing JSDoc and implementation. Keep the annotation concise
and preserve the current Ollama native-first fallback behavior.

In `@services/CLAUDE.md`:
- Line 13: Update the LanguageTool documentation around languageToolService.ts
to remove the claim that network failures degrade silently to an empty result.
Document sanitized technical logging through services/logger.ts and a brief
actionable degraded state for users, while retaining silent handling only for
documented aborts; ensure the underlying async operation uses try/catch or a
Result type.

In `@services/ollamaService.ts`:
- Around line 165-170: Update the plugin_unavailable branch in the
connection-testing method to return a stable, safe localized status message
instead of exposing LocalServerError.message. Preserve the distinct failure
classification and, if existing conventions support it, include only the
normalized endpoint; rely on localServerHttp logging for detailed diagnostics.

In `@tests/unit/aiProviderService.test.ts`:
- Around line 731-747: Update the fallback URL assertion in the test for
scanLocalOpenAiCompatibleEndpoints to require the exact /v1/models path,
replacing the broader /models check while preserving the existing call-order and
success assertions.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ee9a2d51-f419-448a-895a-1be21e49c03d

📥 Commits

Reviewing files that changed from the base of the PR and between ed5afbf and f29a8f7.

⛔ Files ignored due to path filters (2)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • src-tauri/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (73)
  • .github/workflows/ci.yml
  • .github/workflows/codeql.yml
  • .github/workflows/docker.yml
  • .github/workflows/mutation.yml
  • .github/workflows/scorecard.yml
  • .github/workflows/storybook-debug.yml
  • .github/workflows/tauri-build.yml
  • .github/workflows/voice-nightly.yml
  • AUDIT.md
  • CHANGELOG.md
  • CLAUDE.md
  • TODO.md
  • components/CLAUDE.md
  • components/settings/AiProviderCard.tsx
  • config/resolveViteBase.ts
  • docs/adr/0012-local-server-connectivity-tauri-http.md
  • features/lora/CLAUDE.md
  • features/plotBoard/CLAUDE.md
  • locales/ar/settings.json
  • locales/de/settings.json
  • locales/el/settings.json
  • locales/en/settings.json
  • locales/es/settings.json
  • locales/eu/settings.json
  • locales/fa/settings.json
  • locales/fi/settings.json
  • locales/fr/settings.json
  • locales/he/settings.json
  • locales/hu/settings.json
  • locales/is/settings.json
  • locales/it/settings.json
  • locales/ja/settings.json
  • locales/ko/settings.json
  • locales/pt/settings.json
  • locales/ru/settings.json
  • locales/sv/settings.json
  • locales/zh/settings.json
  • package.json
  • public/locales/ar/bundle.json
  • public/locales/de/bundle.json
  • public/locales/el/bundle.json
  • public/locales/en/bundle.json
  • public/locales/es/bundle.json
  • public/locales/eu/bundle.json
  • public/locales/fa/bundle.json
  • public/locales/fi/bundle.json
  • public/locales/fr/bundle.json
  • public/locales/he/bundle.json
  • public/locales/hu/bundle.json
  • public/locales/is/bundle.json
  • public/locales/it/bundle.json
  • public/locales/ja/bundle.json
  • public/locales/ko/bundle.json
  • public/locales/pt/bundle.json
  • public/locales/ru/bundle.json
  • public/locales/sv/bundle.json
  • public/locales/zh/bundle.json
  • services/CLAUDE.md
  • services/aiProviderService.ts
  • services/cloudSync/CLAUDE.md
  • services/copilot/CLAUDE.md
  • services/localServerHttp.ts
  • services/ollamaService.ts
  • services/proForge/CLAUDE.md
  • services/voice/CLAUDE.md
  • src-tauri/Cargo.toml
  • tests/CLAUDE.md
  • tests/unit/aiProviderService.test.ts
  • tests/unit/localServerHttpPluginUnavailable.test.ts
  • tests/unit/ollamaService.test.ts
  • tests/unit/resolveViteBase.test.ts
  • tests/unit/settings/AiProviderCard.test.tsx
  • vite.config.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • AUDIT.md
  • TODO.md
🛑 Comments failed to post (7)
components/settings/AiProviderCard.tsx (2)

206-226: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Expose the status badge as an announced status.

This text changes between ready, connected, disconnected, and browser-unavailable states but is rendered as a plain span. Add role="status" and aria-live="polite" so screen readers receive the update.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/settings/AiProviderCard.tsx` around lines 206 - 226, Add
role="status" and aria-live="polite" to the status badge span in the
AiProviderCard component, preserving its existing text and styling logic so
screen readers announce changes to the provider status.

Source: Coding guidelines


226-228: 🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

Information Disclosure (CWE-209): Generation of Error Message Containing Sensitive Information

Gate every error presentation for browser-unavailable Ollama.

This guard suppresses only the error paragraph here; the action row at Lines 598-602 still renders testError. A stale async completion can therefore expose raw transport text while ollamaUntestable is true. Apply the same guard to both paths and ignore stale request completions.

Based on learnings, raw transport or exception text must not be exposed in user-facing UI; diagnostics belong in services/logger.ts.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/settings/AiProviderCard.tsx` around lines 226 - 228, Update the
error presentation in AiProviderCard, including the action row that renders
testError, so all user-facing Ollama errors are suppressed when ollamaUntestable
is true and only sanitized UI-safe messaging is shown; route raw transport or
exception details to services/logger.ts instead. Also make the test request
completion logic ignore stale async results so an older request cannot update
testStatus or testError after a newer state has made Ollama untestable.

Source: Learnings

config/resolveViteBase.ts (1)

6-6: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add the required immediate QNBS-v3 rationale comments.

  • config/resolveViteBase.ts#L6-L6: add a one-line QNBS-v3 comment for extracting and exporting the Pages base constant.
  • vite.config.ts#L7-L12: add a one-line QNBS-v3 comment for deriving the shared Tauri-build flag.
  • services/localServerHttp.ts#L10-L15: add a one-line QNBS-v3 comment for logger initialization and the new failure classification.
  • tests/unit/aiProviderService.test.ts#L716-L760: add a QNBS-v3 comment above the new native-first/fallback regression coverage.
  • tests/unit/settings/AiProviderCard.test.tsx#L161-L189: add a QNBS-v3 comment above the browser-versus-desktop status coverage.

As per coding guidelines, “Bei jeder inhaltlich relevanten Änderung in TypeScript- oder JavaScript-Dateien einen einzeiligen Kommentar im Format // QNBS-v3: [Grund / Impact / Kreativer Mehrwert] unmittelbar bei der Änderung ergänzen.”

📍 Affects 5 files
  • config/resolveViteBase.ts#L6-L6 (this comment)
  • vite.config.ts#L7-L12
  • services/localServerHttp.ts#L10-L15
  • tests/unit/aiProviderService.test.ts#L716-L760
  • tests/unit/settings/AiProviderCard.test.tsx#L161-L189
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@config/resolveViteBase.ts` at line 6, 添加一行紧邻每处相关改动的 QNBS-v3 原因/影响/创意价值注释:在
config/resolveViteBase.ts 第6行说明提取并导出 Pages 基础路径;在 vite.config.ts 第7-12行说明共享
Tauri 构建标志;在 services/localServerHttp.ts 第10-15行说明日志初始化及新增失败分类;在
tests/unit/aiProviderService.test.ts 第716-760行说明原生优先与回退回归覆盖;在
tests/unit/settings/AiProviderCard.test.tsx 第161-189行说明浏览器与桌面状态覆盖。每条注释使用指定的 “//
QNBS-v3: [Grund / Impact / Kreativer Mehrwert]” 格式。

Source: Coding guidelines

services/aiProviderService.ts (1)

706-733: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Standardize the required QNBS-v3 annotations.

The changed TypeScript/TSX sites do not consistently use the mandated adjacent single-line QNBS-v3 comment.

  • services/aiProviderService.ts#L706-L733: add one single-line annotation beside the Ollama native-first scan change.
  • components/settings/AiProviderCard.tsx#L43-L47: collapse the multiline annotation into one line.
  • components/settings/AiProviderCard.tsx#L206-L226: add an immediate JSX QNBS-v3 annotation for the changed badge rendering.
📍 Affects 2 files
  • services/aiProviderService.ts#L706-L733 (this comment)
  • components/settings/AiProviderCard.tsx#L43-L47
  • components/settings/AiProviderCard.tsx#L206-L226
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@services/aiProviderService.ts` around lines 706 - 733, Standardize the
QNBS-v3 annotations across all three changed sites: add one adjacent single-line
annotation for the Ollama native-first logic in
scanLocalOpenAiCompatibleEndpoints in services/aiProviderService.ts (lines
706-733); collapse the existing multiline annotation near AiProviderCard in
components/settings/AiProviderCard.tsx (lines 43-47) into one line; and add an
immediate JSX QNBS-v3 annotation beside the changed badge rendering in
components/settings/AiProviderCard.tsx (lines 206-226).

Source: Coding guidelines


📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add the required single-line QNBS-v3 annotation.

This non-trivial TypeScript change uses a JSDoc block but lacks the required // QNBS-v3: ... comment immediately beside the change.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@services/aiProviderService.ts` around lines 706 - 733, Add the required
single-line `// QNBS-v3: ...` annotation immediately beside the changed
`scanLocalOpenAiCompatibleEndpoints` logic, adjacent to the existing JSDoc and
implementation. Keep the annotation concise and preserve the current Ollama
native-first fallback behavior.

Source: Coding guidelines

services/CLAUDE.md (1)

13-13: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Do not document network failures as silently swallowed.

Line 13 says LanguageTool returns an empty result silently on network failure, conflicting with the repository rule requiring async failures to be handled and not silently swallowed. Log only sanitized technical details through services/logger.ts and expose a brief actionable degraded state; reserve silent handling for documented aborts.

As per coding guidelines, async operations must use try/catch or a Result type, and silent swallowing is prohibited except for documented aborts.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@services/CLAUDE.md` at line 13, Update the LanguageTool documentation around
languageToolService.ts to remove the claim that network failures degrade
silently to an empty result. Document sanitized technical logging through
services/logger.ts and a brief actionable degraded state for users, while
retaining silent handling only for documented aborts; ensure the underlying
async operation uses try/catch or a Result type.

Source: Coding guidelines

services/ollamaService.ts (1)

165-170: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Do not forward the plugin error message to the UI.

LocalServerError is public and can carry arbitrary text; return a stable, safe status message (optionally with the normalized endpoint) instead of error.message. Detailed diagnostics are already logged by localServerHttp.

Based on learnings, connection testing must return only safe localization context rather than raw transport or exception messages.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@services/ollamaService.ts` around lines 165 - 170, Update the
plugin_unavailable branch in the connection-testing method to return a stable,
safe localized status message instead of exposing LocalServerError.message.
Preserve the distinct failure classification and, if existing conventions
support it, include only the normalized endpoint; rely on localServerHttp
logging for detailed diagnostics.

Sources: Coding guidelines, Learnings

tests/unit/aiProviderService.test.ts (1)

731-747: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Assert the exact OpenAI-compatible fallback path.

The test name promises /v1/models, but toContain('/models') also accepts an incorrect /models endpoint. Assert /v1/models so this regression test enforces the documented compatibility contract.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/unit/aiProviderService.test.ts` around lines 731 - 747, Update the
fallback URL assertion in the test for scanLocalOpenAiCompatibleEndpoints to
require the exact /v1/models path, replacing the broader /models check while
preserving the existing call-order and success assertions.

@qnbs
qnbs force-pushed the fix/ollama-browser-status-badge branch from 9c4a3c5 to c00bce6 Compare July 28, 2026 08:21
@qnbs
qnbs force-pushed the docs/sync-dependabot-and-issue-60-status branch from f29a8f7 to 6af5b9b Compare July 28, 2026 08:24
@qnbs
qnbs deleted the branch main July 28, 2026 08:36
@qnbs qnbs closed this Jul 28, 2026
@qnbs qnbs reopened this Jul 28, 2026
@qnbs
qnbs changed the base branch from fix/ollama-browser-status-badge to main July 28, 2026 08:36
… batch

Light-touch update reflecting today's session: the two remaining #266
fixes (desktop discovery build-config bug, browser status badge
reconciliation), the 13-of-18 Dependabot merge outcome with the 5
documented real blockers left open, and the Issue #60 status comment.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@qnbs
qnbs force-pushed the docs/sync-dependabot-and-issue-60-status branch from 6af5b9b to 1f55a08 Compare July 28, 2026 08:37
qnbs and others added 3 commits July 28, 2026 10:53
…(CWE-522)

None of the affected jobs push or commit after cloning, so persisting the
GITHUB_TOKEN via actions/checkout was unnecessary attack surface flagged by
zizmor/CodeRabbit. Sets persist-credentials: false on all 14 checkout steps
in ci.yml, codeql.yml, docker.yml, mutation.yml, storybook-debug.yml,
tauri-build.yml, and voice-nightly.yml.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…imports

ToggleSwitch used a malformed [dir:ltr]/[dir:rtl] arbitrary variant that
compiled to the invalid CSS pseudo-class :is(dir:ltr), producing a
lightningcss warning on every production build. Replaced with Tailwind's
built-in ltr:/rtl: direction variants, which correctly target the dir
attribute App.tsx already sets on <html>.

Also converts 3 dynamic import() calls (transientUiStore, ecoModeService,
spotlightTour) to static imports: Rolldown flagged all three as unable to
move their module into a separate chunk since each is also statically
imported elsewhere in the eager bundle, making the dynamic import dead
weight with no code-splitting benefit.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
CodeRabbit's re-review hit a GitHub API error posting inline comments and
fell back to review-body text for 10 findings; the 2 that did post
(persist-credentials) were already fixed. This addresses the 5 remaining
real findings among the 7 that never became formal review threads:

- AiProviderCard: status badge lacked role="status"/aria-live="polite" for
  a value that changes between ready/connected/disconnected/browser-
  unavailable states.
- AiProviderCard (CWE-209): a stale in-flight connection-test result could
  overwrite testError after switching to Ollama-in-browser, since handleTest
  had no guard against a superseded request completing late. Added a
  monotonic request-id ref checked before every state update, invalidated
  whenever the provider/desktop context changes. Also gated the manual-test
  action row's error span with the same !ollamaUntestable check the
  paragraph above it already used, so a stale error can't render there
  either.
- ollamaService.ts (CWE-209): the plugin_unavailable branch returned
  LocalServerError.message directly -- a public class whose message isn't
  guaranteed safe for every kind -- instead of building its own fixed
  string like the timeout/unreachable branches already do.
- aiProviderService.test.ts: tightened a scan-fallback assertion from a
  loose '/models' substring to the exact '/v1/models' path.

The remaining 2 findings (missing QNBS-v3 rationale comments on several
already-commented files; services/CLAUDE.md's LanguageTool wording) were
verified already covered by existing file-level comments or already fixed
in an earlier commit -- not re-applied to avoid redundant/stale docs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@qnbs

qnbs commented Jul 28, 2026

Copy link
Copy Markdown
Owner Author

Addressing CodeRabbit's 10-finding re-review — GitHub's API failed to post inline comments for most of them (> [!CAUTION] Inline review comments failed to post), so they only exist as review-body text, not formal threads. Went through all 10 against current code:

Already fixed (2, posted inline successfully): missing persist-credentials: false on the 7 workflow files — fixed in 434ac15, replied + resolved.

Fixed just now (5, from the review-body text that failed to post inline) — commit 1323629:

  • AiProviderCard status badge: added role="status" aria-live="polite" (a11y — the badge text changes between ready/connected/disconnected/browser-unavailable).
  • AiProviderCard (CWE-209): a stale in-flight connection test could overwrite testError after switching to Ollama-in-browser — handleTest had no guard against a superseded request completing late. Added a monotonic request-id ref, invalidated whenever provider/desktop context changes. Also gated the manual-test action row's error span with the same !ollamaUntestable check the paragraph above it already used.
  • ollamaService.ts (CWE-209): plugin_unavailable returned LocalServerError.message directly — a public class whose message isn't guaranteed safe for every kind — now builds its own fixed string, matching the timeout/unreachable branches.
  • aiProviderService.test.ts: tightened a loose /models substring assertion to the exact /v1/models path.

Verified already resolved (1): services/CLAUDE.md's LanguageTool wording — already documents sanitized log.warn logging and the status field, not "silent" degradation, from an earlier commit on this same branch.

Not applied (2, judged already adequately covered): missing standalone // QNBS-v3: comments on config/resolveViteBase.ts, vite.config.ts, services/localServerHttp.ts, services/aiProviderService.ts, and 2 test files. Checked each site — every one already has a thorough file-level or function-level QNBS-v3 rationale comment directly above/around it; adding another one-liner at the exact flagged line would just restate what's already explained a few lines up. Not re-applying to avoid redundant documentation.

Also fixed 2 unrelated real pnpm run build warnings found while verifying this PR: a malformed [dir:ltr]/[dir:rtl] Tailwind arbitrary variant (compiled to invalid CSS, lightningcss warning on every build) and 3 dynamic import() calls Rolldown flagged as ineffective (already statically imported elsewhere) — commit ac48b4d.

All targeted tests + full lint + typecheck pass locally; fresh CI running on these commits now.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/tauri-build.yml (1)

147-147: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Prefer the runner’s gh release over a redundant third-party action.

gh is already used in the following step; using gh release create here too would remove an unnecessary action and keep release creation/upload in one authenticated path.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/tauri-build.yml at line 147, Replace the
softprops/action-gh-release step with the runner’s existing gh-based release
flow, using gh release create to create the release and upload its assets
through the same authenticated path. Preserve the current release metadata and
asset behavior while removing the third-party action.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/listenerMiddleware.ts`:
- Around line 570-571: Before each affected change, add a JSX comment marker in
the required bracketed QNBS-v3 format, using SettingsShared.tsx syntax:
app/listenerMiddleware.ts lines 570-571 for direct transient-store access, 6 for
the static eco-mode import, 22 for the static transient-store import, and
597-598 by replacing the existing nonconforming rationale;
services/commands/commandDefinitions.tsx lines 8 and 636 for the static
spotlight-tour import and synchronous command call; and
components/settings/SettingsShared.tsx line 66 immediately above the changed
span.

---

Nitpick comments:
In @.github/workflows/tauri-build.yml:
- Line 147: Replace the softprops/action-gh-release step with the runner’s
existing gh-based release flow, using gh release create to create the release
and upload its assets through the same authenticated path. Preserve the current
release metadata and asset behavior while removing the third-party action.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5b011b12-d3f5-4460-a53c-5214ea58cd30

📥 Commits

Reviewing files that changed from the base of the PR and between f29a8f7 and 1323629.

📒 Files selected for processing (17)
  • .github/workflows/ci.yml
  • .github/workflows/codeql.yml
  • .github/workflows/docker.yml
  • .github/workflows/mutation.yml
  • .github/workflows/storybook-debug.yml
  • .github/workflows/tauri-build.yml
  • .github/workflows/voice-nightly.yml
  • AUDIT.md
  • CHANGELOG.md
  • TODO.md
  • app/listenerMiddleware.ts
  • components/settings/AiProviderCard.tsx
  • components/settings/SettingsShared.tsx
  • services/commands/commandDefinitions.tsx
  • services/ollamaService.ts
  • tests/unit/aiProviderService.test.ts
  • tests/unit/ollamaService.test.ts
🚧 Files skipped from review as they are similar to previous changes (5)
  • services/ollamaService.ts
  • tests/unit/ollamaService.test.ts
  • components/settings/AiProviderCard.tsx
  • AUDIT.md
  • tests/unit/aiProviderService.test.ts

Comment thread app/listenerMiddleware.ts
…fixes

CodeRabbit's re-review correctly flagged the previous commit's changes
(ac48b4d) as missing the repo's required single-line rationale comment on
non-trivial changes. Adds one at each real change site explaining why the
dynamic import was ineffective and safe to convert to static.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@qnbs

qnbs commented Jul 28, 2026

Copy link
Copy Markdown
Owner Author

One nitpick from the latest re-review, deliberately not applied now: tauri-build.yml#L147 — CodeRabbit suggests replacing softprops/action-gh-release with gh release create since gh is already used later in the same job. Rated Trivial by CodeRabbit itself, and this PR is about to be used to cut the actual v1.24.1 release within the hour — swapping the release-creation mechanism right before depending on it is a real behavior change with non-trivial risk (asset globbing, release-notes generation, error handling) for a stylistic consolidation. Deferring to a dedicated follow-up rather than risk the release step during the release it needs to perform.

Adds targeted coverage for the 3 lines Codecov flagged as uncovered:

- commandDefinitions.test.ts: invokes help-tour's run() and asserts
  startSpotlightTour is called, covering the static-import call site.
- listenerMiddleware.test.ts: exercises the binder-node pin reconciliation
  listener end-to-end (clears a stale pin when its node is removed, leaves
  it untouched when the node still exists) -- previously untested even
  before this session's dynamic-to-static import change.
- AiProviderCard.test.tsx: a dedicated regression test for the CWE-209
  stale-request guard -- queues connection-test resolvers, switches to
  Ollama-in-browser mid-flight, and asserts a late-resolving stale result
  never surfaces once the newer context supersedes it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@qnbs
qnbs merged commit 90c4276 into main Jul 28, 2026
19 checks passed
@qnbs
qnbs deleted the docs/sync-dependabot-and-issue-60-status branch July 28, 2026 10:30
@coderabbitai coderabbitai Bot mentioned this pull request Jul 28, 2026
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant