Skip to content

fix: reject media smart fields as text sources [ANK-38]#158

Open
piazza-bot wants to merge 1 commit into
mainfrom
codex/ank-38-reject-tts-text-dependency
Open

fix: reject media smart fields as text sources [ANK-38]#158
piazza-bot wants to merge 1 commit into
mainfrom
codex/ank-38-reject-tts-text-dependency

Conversation

@piazza-bot

Copy link
Copy Markdown
Collaborator

Summary

  • Filter TTS/image Smart Fields out of valid prompt source fields, including unsaved prompt-map state, persisted Smart Fields, global Smart Fields, and non-canonical field casing.
  • Reject invalid media-field prompt references at local-server Smart Field save time.
  • Reject invalid typed media-field prompt references in the custom text prompt helper before generation.
  • Preserve deck-specific target override behavior by letting target-field callers opt out of global source filtering.

Verification

  • source .venv/bin/activate && ./scripts/build.sh check
  • source .venv/bin/activate && python -m pytest (139 passed)
  • Targeted: source .venv/bin/activate && python -m pytest tests/test_prompt_helpers.py tests/test_local_server.py (62 passed)
  • Automated review-agent loop: initial passes found direct local-server/custom-prompt gaps, global filtering semantics, TTS default-source selection, and casing issues; after fixes, the final pass returned there are no issues.
  • Anki sandbox startup: ./scripts/build.sh sandbox-local launched Anki 25.07.5 with this branch loaded; Smart Notes loaded, migrations ran, and the local server started on 127.0.0.1:8766.
  • Local server health check: curl -s http://127.0.0.1:8766/ping returned { "ok": true }.

No screenshot included because the change is validation/list filtering behavior rather than a visual layout change; it is covered by targeted UI-helper unit tests and the Anki startup smoke.

Agent session metadata

  • Working directory: /Users/michaelpiazza/development/smart_notes_all
  • Session ID: 019e9d01-400c-7552-8264-a71ce3a12be5

@linear

linear Bot commented Jun 6, 2026

Copy link
Copy Markdown

ANK-38

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.

2 participants