Skip to content

003 — Settings: default audio tag values (move from .env to Settings tab) #34

Description

@PeterOnCode

Tracking issue for feature 003-settings-default-tags (branch 003-settings-default-tags).

Summary

Move the default audio-tag values (Artist, Album, Genre, Comment, Languages — never Title) out of environment configuration and into the Settings tab, persisted in-app and surviving restarts.

Clarified decision (2026-06-21)

Environment configuration is removed entirely — the NUXT_DEFAULT_TAG_* variables are no longer read; the Settings tab is the sole source. No fallback, no migration of prior env values (operators re-enter once after upgrade).

Design

  • Core (src/core/settings/default-tags.ts): store-backed getDefaultTags / setDefaultTags / clearDefaultTags over the existing app_config table via the AppConfigRepository port. Non-secret → plain JSON, no encryption / no NUXT_APP_SECRET. Title never stored; reads total (corrupt row → {}).
  • REST: GET re-sourced + new PUT / DELETE on /api/settings/defaults.
  • Web: useDefaultTags() composable + DefaultTagsSettings.vue section (Save/Clear/status); i18n en+hu.
  • Cleanup: removed NUXT_DEFAULT_TAG_* from .env.example, docker-compose.yml, README.

Tasks (all complete — see specs/003-settings-default-tags/tasks.md)

  • Phase 1 — Setup: baseline green (T001)
  • Phase 2 — Foundational: core get/set/clear + sanitize + barrel + unit test (T002–T004)
  • Phase 3 — US1 (P1, MVP): GET re-source, PUT, composable, component, Settings mount, i18n, pre-fill wording (T005–T014)
  • Phase 4 — US2 (P2): DELETE, Clear + status (T015–T019)
  • Phase 5 — Polish: env removal, README/.env/compose cleanup, grep verify, typecheck, a11y/i18n parity (T020–T024)

Verification

  • ✅ Full suite: 161 passed / 25 files (new unit test, rewritten integration over real SQLite, new Settings component test, existing pre-fill test still green)
  • nuxt typecheck and eslint clean
  • ✅ No NUXT_DEFAULT_TAG_* read anywhere (grep-confirmed); en/hu i18n parity (16 keys each)

Artifacts

  • Spec: specs/003-settings-default-tags/spec.md
  • Plan: specs/003-settings-default-tags/plan.md
  • Tasks: specs/003-settings-default-tags/tasks.md
  • Contracts: specs/003-settings-default-tags/contracts/{rest-api,core-api}.md

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions