[PR #3501] [MERGED] docs(comments): fix confusing, misplaced, and wrong-pointer comments (#3490) #5966

Closed
opened 2026-10-23 04:05:43 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3501
Author: @kolacheee
Created: 7/11/2026
Status: ✅ Merged
Merged: 7/11/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/3490-confusing-comments


📝 Commits (2)

  • 2641c14 docs(comments): fix confusing, misplaced, and wrong-pointer comments (#3490)
  • ecc5935 docs(auth): clarify default bypass flags

📊 Changes

14 files changed (+36 additions, -18 deletions)

View changed files

📝 custom_components/marinara_engine/button.py (+5 -1)
📝 custom_components/marinara_engine/coordinator.py (+3 -1)
📝 packages/client/src/components/bot-browser/BotBrowserView.tsx (+5 -5)
📝 packages/client/src/components/characters/CharacterEditor.tsx (+1 -1)
📝 packages/client/src/components/chat/LocalMusicPlayer.tsx (+2 -0)
📝 packages/client/src/components/game/GameSurface.tsx (+0 -3)
📝 packages/client/src/stores/ui.store.ts (+2 -2)
📝 packages/server/src/db/migrate.ts (+3 -0)
📝 packages/server/src/middleware/basic-auth.ts (+8 -0)
📝 packages/server/src/routes/bot-browser-janny.routes.ts (+1 -1)
📝 packages/server/src/services/agents/agent-pipeline.ts (+1 -1)
📝 packages/server/src/services/prompt/merger.ts (+3 -1)
📝 packages/server/src/services/storage/chat-folders.storage.ts (+1 -1)
📝 packages/shared/src/schemas/character.schema.ts (+1 -1)

📄 Description

Linked issue

Fixes #3490

Why this change

Confusing, misplaced, or wrong-pointer comments waste reader time and produce wrong mental models. In large files, section banners are the primary map, so a banner sitting above the wrong code (or a cross-file pointer aimed 500 lines off) actively misleads. This corrects the #3490 catalogue.

What changed

14 comment/docstring corrections across 14 files, each re-verified against current code before editing:

  • CharacterEditor: the misplaced Sprites Tab banner over ~1000 lines of Gallery code is relabeled Gallery Tab (the real Sprites banner was already correct and left alone)
  • prompt/merger: the docblock now states the full merge predicate (same role AND same characterId AND compatible contextKind), not just role
  • ui.store + LocalMusicPlayer: the spotifyMobileWidget* fields are noted as shared by all three music players despite the spotify-prefixed name
  • db/migrate: runMigrations header notes it runs only for the legacy SQLite backend (gated by !isFileStorageBackend()) and never on the default file-native store
  • middleware/basic-auth: the Notes block gains the 4th auth-bypass path (isTrustedInterfaceRequest / BYPASS_AUTH_TAILSCALE / BYPASS_AUTH_DOCKER)
  • agents/agent-pipeline: corrects the returned method name to preGenerate
  • storage/chat-folders: fixes the cross-file pointer to the real libSQL Windows note location
  • bot-browser-janny: moves the avatar-proxy header to the avatar route
  • character.schema: attaches the orphaned JSDoc to generateAboutMeSchema
  • BotBrowserView: coherent strategy numbering; the DefSection banner moved to its definition
  • GameSurface: removes the orphaned "REMOVED old sidebar" changelog note that read as a placeholder to restore code
  • HA button.py / coordinator.py: correct the tool counts (23 total / 20 default-synced) and document the disable-PATCH behavior

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

Comment/docstring-only change with no runtime surface, enforced three ways: (1) an independent adversarial review of the full diff confirmed comment-only and factually correct (verdict: pass, zero issues); (2) a mechanical audit confirmed every changed .ts/.tsx line is comment text and every changed .py line is docstring/comment; (3) /* */ delimiter balance is byte-identical to staging in every file, so tokenization is unchanged. pnpm check (full typecheck + build) passes on the exact tree.

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)

(custom_components/*.py docstrings are HA-integration code comments, not user docs.)

UI evidence (if applicable)

N/A — comments only.

Summary by CodeRabbit

  • Documentation
    • Clarified Home Assistant tool synchronization options, including default exclusions and handling of previously synced tools.
    • Improved explanations for authentication bypass settings and legacy database migration behavior.
    • Updated guidance for shared music-player widget state and prompt-message compatibility rules.
    • Corrected and reorganized comments across character editing, bot browsing, game, storage, and conversation features for improved maintainability.

🔄 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/3501 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 7/11/2026 **Status:** ✅ Merged **Merged:** 7/11/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/3490-confusing-comments` --- ### 📝 Commits (2) - [`2641c14`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2641c14b7529fde0dd5b4aa9f3e5d7dace71ebda) docs(comments): fix confusing, misplaced, and wrong-pointer comments (#3490) - [`ecc5935`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ecc5935b9b16d42dd6cfc26118459ceb0ec8eb51) docs(auth): clarify default bypass flags ### 📊 Changes **14 files changed** (+36 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `custom_components/marinara_engine/button.py` (+5 -1) 📝 `custom_components/marinara_engine/coordinator.py` (+3 -1) 📝 `packages/client/src/components/bot-browser/BotBrowserView.tsx` (+5 -5) 📝 `packages/client/src/components/characters/CharacterEditor.tsx` (+1 -1) 📝 `packages/client/src/components/chat/LocalMusicPlayer.tsx` (+2 -0) 📝 `packages/client/src/components/game/GameSurface.tsx` (+0 -3) 📝 `packages/client/src/stores/ui.store.ts` (+2 -2) 📝 `packages/server/src/db/migrate.ts` (+3 -0) 📝 `packages/server/src/middleware/basic-auth.ts` (+8 -0) 📝 `packages/server/src/routes/bot-browser-janny.routes.ts` (+1 -1) 📝 `packages/server/src/services/agents/agent-pipeline.ts` (+1 -1) 📝 `packages/server/src/services/prompt/merger.ts` (+3 -1) 📝 `packages/server/src/services/storage/chat-folders.storage.ts` (+1 -1) 📝 `packages/shared/src/schemas/character.schema.ts` (+1 -1) </details> ### 📄 Description ## Linked issue Fixes #3490 ## Why this change Confusing, misplaced, or wrong-pointer comments waste reader time and produce wrong mental models. In large files, section banners are the primary map, so a banner sitting above the wrong code (or a cross-file pointer aimed 500 lines off) actively misleads. This corrects the #3490 catalogue. ## What changed 14 comment/docstring corrections across 14 files, each re-verified against current code before editing: - `CharacterEditor`: the misplaced `Sprites Tab` banner over ~1000 lines of Gallery code is relabeled `Gallery Tab` (the real Sprites banner was already correct and left alone) - `prompt/merger`: the docblock now states the full merge predicate (same role AND same `characterId` AND compatible `contextKind`), not just role - `ui.store` + `LocalMusicPlayer`: the `spotifyMobileWidget*` fields are noted as shared by all three music players despite the spotify-prefixed name - `db/migrate`: `runMigrations` header notes it runs only for the legacy SQLite backend (gated by `!isFileStorageBackend()`) and never on the default file-native store - `middleware/basic-auth`: the Notes block gains the 4th auth-bypass path (`isTrustedInterfaceRequest` / `BYPASS_AUTH_TAILSCALE` / `BYPASS_AUTH_DOCKER`) - `agents/agent-pipeline`: corrects the returned method name to `preGenerate` - `storage/chat-folders`: fixes the cross-file pointer to the real libSQL Windows note location - `bot-browser-janny`: moves the avatar-proxy header to the avatar route - `character.schema`: attaches the orphaned JSDoc to `generateAboutMeSchema` - `BotBrowserView`: coherent strategy numbering; the `DefSection` banner moved to its definition - `GameSurface`: removes the orphaned "REMOVED old sidebar" changelog note that read as a placeholder to restore code - HA `button.py` / `coordinator.py`: correct the tool counts (23 total / 20 default-synced) and document the disable-PATCH behavior ## 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 Comment/docstring-only change with no runtime surface, enforced three ways: (1) an independent adversarial review of the full diff confirmed comment-only and factually correct (verdict: pass, zero issues); (2) a mechanical audit confirmed every changed `.ts`/`.tsx` line is comment text and every changed `.py` line is docstring/comment; (3) `/* */` delimiter balance is byte-identical to staging in every file, so tokenization is unchanged. `pnpm check` (full typecheck + build) passes on the exact tree. ## 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) (`custom_components/*.py` docstrings are HA-integration code comments, not user docs.) ## UI evidence (if applicable) N/A — comments only. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Documentation** - Clarified Home Assistant tool synchronization options, including default exclusions and handling of previously synced tools. - Improved explanations for authentication bypass settings and legacy database migration behavior. - Updated guidance for shared music-player widget state and prompt-message compatibility rules. - Corrected and reorganized comments across character editing, bot browsing, game, storage, and conversation features for improved maintainability. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:05:43 +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#5966
No description provided.