8000 V0-09: Add Assistance Policy and local Ollama discovery by kiran-brahma · Pull Request #29 · kiran-brahma/nodepad-app · GitHub
[go: up one dir, main page]

Skip to content

V0-09: Add Assistance Policy and local Ollama discovery - #29

Merged
kiran-brahma merged 1 commit into
mainfrom
claude/github-issue-10-dd916a2
Jul 23, 2026
Merged

kiran-brahma merged 1 commit into
mainfrom
claude/github-issue-10-dd916a2

Conversation

@kiran-brahma
Copy link
Copy Markdown
Owner

Implements #10.

What changed

  • Added assistance_policy and selected_model columns to thinking_workspaces via migration 0006.
  • New workspaces default to Manual Assistance Policy.
  • Added AssistancePolicy enum (manual / local_ai / cloud_ai) to the Rust workspace model and TypeScript client.
  • Added a stateless local Ollama provider module (src-tauri/src/ollama.rs) with:
    • Fixed host http://localhost:11434 and native /api/tags discovery.
    • Trait seam for HTTP so tests use fixtures, not a live Ollama.
    • Typed failure states: unavailable, timeout, malformed_response, empty_list.
  • Added Tauri commands: set_assistance_policy, select_model, discover_local_models.
  • Added React UI (AssistanceSection + useLocalDiscovery hook) to:
    • Switch between Manual and Local AI.
    • Refresh, search, and select discovered models.
    • Show distinct actionable states including a missing selected model.
  • Discovery responses are ignored if stale (policy/workspace changed during refresh).
  • Added Rust and React tests covering policy persistence, opaque/Unicode model identifiers, discovery failures, missing model, and the full UI flow.

Out of scope (per #10)

  • No chat/generate calls.
  • No Note content sent to any provider.
  • No custom host, credentials, or model management.
  • No direct Ollama Cloud, OpenRouter, OpenAI, or Z.ai.

Verification

  • npm run check passes (tsc, eslint, vitest 97, cargo test 32, tauri smoke).
  • npm run build produced the macOS bundle:
    • src-tauri/target/release/bundle/macos/Nodepad.app
  • Fallow scoped audit: no introduced dead code, duplication, or boundary violations; only inherited pre-existing issues remain.
  • PRD simplicity audit: PROCEED (commented on V0-09: Add Assistance Policy and local Ollama discovery #10).

Closes #10.

- Add assistance_policy and selected_model to thinking_workspaces.
- Default every new Workspace to Manual assistance.
- Add local Ollama /api/tags discovery with typed failure states.
- Add UI to switch between Manual and Local AI, refresh/search/select models.
- Show distinct states for unavailable, timeout, malformed, empty, and missing model.
- Persist policy and selected model across restart.
- No Note content sent; no chat/generate; no cloud or custom host in this slice.
@kiran-brahma
kiran-brahma merged commit 2a854d8 into main Jul 23, 2026
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.

V0-09: Add Assistance Policy and local Ollama discovery

1 participant

0