[PR #3694] [MERGED] Consolidate client helpers and improve tracker keyboard navigation #6054

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

📋 Pull Request Information

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

Base: staging ← Head: chore/client-cleanups


📝 Commits (3)

  • c8a63f2 refactor: consolidate client helpers and toolbar navigation
  • 205c64b Merge remote-tracking branch 'origin/staging' into chore/client-cleanups
  • 3ec3a5f Address CodeRabbit review feedback

📊 Changes

6 files changed (+70 additions, -75 deletions)

View changed files

📝 packages/client/src/components/bot-browser/BotBrowserView.tsx (+1 -8)
📝 packages/client/src/components/chat/ChatArea.tsx (+1 -13)
📝 packages/client/src/components/chat/HomeCreditsModal.tsx (+5 -2)
📝 packages/client/src/features/tracker-panel/components/TrackerSidebarHeader.tsx (+52 -27)
📝 packages/client/src/features/tracker-panel/lib/tracker-stat-layout.ts (+5 -6)
📝 packages/client/src/hooks/use-generate.ts (+6 -19)

📄 Description

Linked issue

No linked issue yet. Per CONTRIBUTING.md, one should be opened before this draft is marked ready for review.

Why this change

  • Keep message metadata and embedded-lorebook detection on their canonical parsing rules instead of maintaining duplicate implementations.
  • Remove an identity layout helper that exposed a second name for the same calculation.
  • Make tracker toolbar keyboard navigation use stable semantic slots and return focus to the settings trigger when Escape closes the toolbar.

What changed

  • Reused parseMessageExtraRecord in chat rendering and generation-cache merging.
  • Reused hasLorebookEntries in Bot Browser imports and downloads.
  • Removed personaStatStackHeight and called trackerStatStackHeight directly.
  • Added stable tracker toolbar item identifiers, roving focus navigation, and Escape focus restoration.
  • Named the Font Awesome source and CC BY licence URLs used by the credits modal.

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

Automated evidence: pnpm check passed locally after rebasing onto the latest origin/staging. Focused TypeScript, ESLint, and isolated code reviews also passed. Checkboxes remain unchecked for human verification per repository policy.

Manual verification notes

  • Manual browser verification was not performed.
  • The UI smoke lane was inconclusive because its local web server terminated during the run; this did not produce a confirmed product failure.
  • Manually verify ArrowLeft/ArrowRight/Home/End navigation and Escape focus restoration in the tracker toolbar before marking the PR ready.

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)

No user-facing documentation or release metadata changes are required for this internal client cleanup.

UI evidence (if applicable)

No screenshots or recordings were captured. Add tracker-toolbar keyboard/focus evidence before marking the PR ready.

Summary by CodeRabbit

  • Accessibility

    • Improved keyboard navigation and focus management in the tracker toolbar, including clearer movement between controls and settings.
  • Bug Fixes

    • Improved consistency when processing chat message details during generation, rewrites, and saving.
    • Improved embedded lorebook detection when importing characters.
  • Documentation

    • Updated third-party asset attribution links in the credits modal.

🔄 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/3694 **Author:** [@Xelvanis](https://github.com/Xelvanis) **Created:** 7/16/2026 **Status:** ✅ Merged **Merged:** 7/16/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `chore/client-cleanups` --- ### 📝 Commits (3) - [`c8a63f2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c8a63f2c423fa41210cc817c62ae5e795b84eb96) refactor: consolidate client helpers and toolbar navigation - [`205c64b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/205c64b66fae8557613586556b938c4bc6b8b4ab) Merge remote-tracking branch 'origin/staging' into chore/client-cleanups - [`3ec3a5f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3ec3a5fd5af9f7c3682f1a693c26f0d97c645116) Address CodeRabbit review feedback ### 📊 Changes **6 files changed** (+70 additions, -75 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/bot-browser/BotBrowserView.tsx` (+1 -8) 📝 `packages/client/src/components/chat/ChatArea.tsx` (+1 -13) 📝 `packages/client/src/components/chat/HomeCreditsModal.tsx` (+5 -2) 📝 `packages/client/src/features/tracker-panel/components/TrackerSidebarHeader.tsx` (+52 -27) 📝 `packages/client/src/features/tracker-panel/lib/tracker-stat-layout.ts` (+5 -6) 📝 `packages/client/src/hooks/use-generate.ts` (+6 -19) </details> ### 📄 Description ## Linked issue No linked issue yet. Per `CONTRIBUTING.md`, one should be opened before this draft is marked ready for review. ## Why this change - Keep message metadata and embedded-lorebook detection on their canonical parsing rules instead of maintaining duplicate implementations. - Remove an identity layout helper that exposed a second name for the same calculation. - Make tracker toolbar keyboard navigation use stable semantic slots and return focus to the settings trigger when Escape closes the toolbar. ## What changed - Reused `parseMessageExtraRecord` in chat rendering and generation-cache merging. - Reused `hasLorebookEntries` in Bot Browser imports and downloads. - Removed `personaStatStackHeight` and called `trackerStatStackHeight` directly. - Added stable tracker toolbar item identifiers, roving focus navigation, and Escape focus restoration. - Named the Font Awesome source and CC BY licence URLs used by the credits modal. ## Validation - [x] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [ ] 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` Automated evidence: `pnpm check` passed locally after rebasing onto the latest `origin/staging`. Focused TypeScript, ESLint, and isolated code reviews also passed. Checkboxes remain unchecked for human verification per repository policy. ### Manual verification notes - Manual browser verification was not performed. - The UI smoke lane was inconclusive because its local web server terminated during the run; this did not produce a confirmed product failure. - Manually verify ArrowLeft/ArrowRight/Home/End navigation and Escape focus restoration in the tracker toolbar before marking the PR ready. ## 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) No user-facing documentation or release metadata changes are required for this internal client cleanup. ## UI evidence (if applicable) No screenshots or recordings were captured. Add tracker-toolbar keyboard/focus evidence before marking the PR ready. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Accessibility** * Improved keyboard navigation and focus management in the tracker toolbar, including clearer movement between controls and settings. * **Bug Fixes** * Improved consistency when processing chat message details during generation, rewrites, and saving. * Improved embedded lorebook detection when importing characters. * **Documentation** * Updated third-party asset attribution links in the credits modal. <!-- 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:06:38 +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#6054
No description provided.