[PR #996] [MERGED] fix: clear TTS credentials when clearing connections #4876

Closed
opened 2026-10-22 04:11:22 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/996
Author: @NeoKazuya
Created: 5/19/2026
Status: ✅ Merged
Merged: 5/19/2026
Merged by: @cha1latte

Base: staging ← Head: fix/clear-tts-credentials-with-connections


📝 Commits (1)

  • 1e68e0d fix: clear TTS credentials with connections

📊 Changes

2 files changed (+94 additions, -2 deletions)

View changed files

📝 packages/server/src/routes/admin.routes.ts (+5 -2)
➕ packages/server/test/admin-routes.test.ts (+89 -0)

📄 Description

Linked issue

Closes #995

Why this change

TTS appears in the Connections panel and stores a provider API key, but its config is stored in app_settings instead of normal api_connections.

Clearing Connections and Clear All Data removed normal API connections while leaving the saved TTS key behind. That meant TTS could still show a saved key and use the old provider credential after the user cleared connection data.

What changed

  • Clear saved TTS credential material when Connections data is cleared.
  • Cover Clear All Data through the same cleanup.
  • Keep normal API connection cleanup behavior unchanged.
  • Leave unrelated app settings unchanged.
  • Add a server regression test for clearing saved TTS settings through both affected clear paths.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • pnpm --filter @marinara-engine/server exec tsx --test test/admin-routes.test.ts passed.
  • pnpm --filter @marinara-engine/server exec tsx --test test/*.test.ts passed.
  • pnpm --filter @marinara-engine/server lint passed.
  • pnpm --filter @marinara-engine/server build passed.
  • The internal testing suite check also passed: after both clear paths, TTS no longer reported a saved key and post-clear speech requests did not send the old Authorization bearer token.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/996 **Author:** [@NeoKazuya](https://github.com/NeoKazuya) **Created:** 5/19/2026 **Status:** ✅ Merged **Merged:** 5/19/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `staging` ← **Head:** `fix/clear-tts-credentials-with-connections` --- ### 📝 Commits (1) - [`1e68e0d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1e68e0d6b314cf9e2f7367f364716005cad8eb83) fix: clear TTS credentials with connections ### 📊 Changes **2 files changed** (+94 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/server/src/routes/admin.routes.ts` (+5 -2) ➕ `packages/server/test/admin-routes.test.ts` (+89 -0) </details> ### 📄 Description ## Linked issue Closes #995 ## Why this change TTS appears in the Connections panel and stores a provider API key, but its config is stored in `app_settings` instead of normal `api_connections`. Clearing Connections and Clear All Data removed normal API connections while leaving the saved TTS key behind. That meant TTS could still show a saved key and use the old provider credential after the user cleared connection data. ## What changed - Clear saved TTS credential material when Connections data is cleared. - Cover Clear All Data through the same cleanup. - Keep normal API connection cleanup behavior unchanged. - Leave unrelated app settings unchanged. - Add a server regression test for clearing saved TTS settings through both affected clear paths. ## Validation - [x] `pnpm check` passes locally - [x] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [x] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes - `pnpm --filter @marinara-engine/server exec tsx --test test/admin-routes.test.ts` passed. - `pnpm --filter @marinara-engine/server exec tsx --test test/*.test.ts` passed. - `pnpm --filter @marinara-engine/server lint` passed. - `pnpm --filter @marinara-engine/server build` passed. - The internal testing suite check also passed: after both clear paths, TTS no longer reported a saved key and post-clear speech requests did not send the old Authorization bearer token. ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:11:22 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#4876
No description provided.