[PR #6777] [MERGED] feat: improve panel keyboard access and loading states #7326

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6777
Author: @SirAdoni
Created: 9/27/2026
Status: ✅ Merged
Merged: 9/28/2026
Merged by: @SpicyMarinara

Base: staging ← Head: contrib/6698-panel-usability


📝 Commits (10+)

  • 76cb4c5 feat: improve panel keyboard access and loading states
  • 652327d test: verify actual settings import keyboard flow
  • 774d1f2 Merge staging navigation into panel usability contribution
  • 7ada97c fix: preserve decorative avatar fallback semantics
  • 29d14ef Merge staging inventory update into panel contribution
  • c4dfc29 Merge commit '3355c32277' into repair/6777
  • 324eb55 fix(panels): preserve retries and clear search on Escape
  • 4e92471 test(panels): cover search Escape on mobile browsers
  • 00d9a5d test(panels): assert collapsed sidebar state consistently
  • 3a250db fix(panels): keep Escape within active inline edits

📊 Changes

18 files changed (+394 additions, -44 deletions)

View changed files

📝 CHANGELOG.md (+8 -0)
➕ e2e/panel-keyboard-import.e2e.ts (+140 -0)
➕ packages/client/src/components/characters/AvatarImage.tsx (+36 -0)
📝 packages/client/src/components/characters/CardLibraryPreview.tsx (+3 -1)
📝 packages/client/src/components/characters/CharacterLibraryView.tsx (+3 -1)
📝 packages/client/src/components/layout/ChatSidebar.tsx (+28 -23)
📝 packages/client/src/components/layout/RightPanel.tsx (+14 -1)
➕ packages/client/src/components/layout/use-panel-keyboard-focus.ts (+77 -0)
📝 packages/client/src/components/panels/AgentsPanel.tsx (+1 -0)
📝 packages/client/src/components/panels/CharactersPanel.tsx (+1 -0)
📝 packages/client/src/components/panels/ConnectionsPanel.tsx (+1 -0)
📝 packages/client/src/components/panels/LorebooksPanel.tsx (+1 -0)
📝 packages/client/src/components/panels/PersonasPanel.tsx (+6 -2)
📝 packages/client/src/components/panels/PresetsPanel.tsx (+1 -0)
📝 packages/client/src/components/panels/SettingsPanel.tsx (+17 -14)
➕ packages/client/src/components/ui/PanelStates.tsx (+49 -0)
📝 packages/client/src/localization/locales/en.json (+2 -0)
📝 scripts/regressions/server-signal-shutdown.regression.ts (+6 -2)

📄 Description

Linked issue

Closes #6805. Partial implementation of #6698; the umbrella issue remains open.

Why this change

Keyboard navigation and transient loading failures could make library panels close unexpectedly or appear empty.

What changed

  • Improve panel keyboard access, import focus and retry/loading states using existing panel patterns.
  • Clear chat search on Escape before closing, and keep blank rename fields from closing their parent panel.
  • Repair the Intel macOS shutdown fixture cold-start timeout using its sibling restart test allowance, preserving the existing shutdown timing checks.

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

pnpm check; focused browser suite passed seven cases with two intentional desktop-only skips; seven shell smoke cases passed. The native shutdown fixture also passed normally and with an injected nine-second cold start; full pnpm check passed on fa6f4e70e.

Valid hosted findings were fixed, including terminal error handling and Escape behavior. Local follow-up CodeRabbit review hit the shared hourly quota and remains pending; current-head hosted review and GitHub checks remain merge gates.

Manual verification

Manually verify imports, keyboard-only renaming/Escape, slow loading, retry exhaustion and recovery in the affected panels.

Automated browser evidence does not claim physical-device or manual container verification. Human checklist states are preserved.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened
  • Version/release files updated (only if this PR includes a version bump)

Added an Unreleased changelog entry. No release metadata or user-facing docs changed.

UI evidence

Browser evidence (download the HTML to view the embedded screenshots). Captions distinguish before/after captures from current feature screenshots.

Summary by CodeRabbit

  • Accessibility
    • Navigation panels receive keyboard focus when opened, close with Escape, and return focus to their opener.
    • Profile import is keyboard-accessible. Missing-avatar icons are hidden from screen readers unless they have an accessible label.
  • Bug Fixes
    • Missing character portraits now show a visible fallback.
    • Escape while renaming a folder no longer triggers unintended browser behavior; expanded folder actions and active fields handle Escape appropriately.
  • User Experience
    • Chat sidebar loading and error states are clearer, with a retry option when available. Escape can clear search text or exit activity-field focus.

Current review evidence

Published 56b3e3169 also fixes Escape from a nested action inside an expanded folder header. Its retained browser assertion failed before the two-line selector fix. Full pnpm check, the focused three-browser panel suite (7 passed, 2 intentional mobile skips), and seven shell smoke cases passed. Both combined local CodeRabbit reviews covered this fix; no follow-up finding remains in this PR. Current-head hosted review and CI remain merge gates.
Published 49e5c6210 merges staging982cbb901. The only manual conflict resolution retained both changelog blocks. All 15 feature-only files and 27 incoming staging-only files are unchanged from their respective parents; shared ChatSidebar and English catalog match the automatic merge. Fresh pnpm check and ten focused panel/sidebar plus smoke browser cases pass.

Local build and container verification

Tested commit: 7d9a1d068c. Full local pnpm check passed. The full Docker image built successfully and ran with synthetic data; HTTP readiness and embedded build commit were verified. These results do not claim completion of the remaining manual and UI edge-case checklist.

Interactive browser walkthroughs of the feature were completed against the running production container using synthetic fixtures, supported by focused automated browser checks. This was agent-operated browser interaction, not physical-device testing. The broader theme, empty-state and error-path checklist remains separate.

Completed UI verification

At 7d9a1d068c, focused browser checks passed 9/9 across desktop Chromium, mobile Chromium and mobile WebKit, including empty-folder Escape/F2 behavior, import keyboard reachability and retry after a synthetic HTTP 503. Supplemental light desktop and dark 390px-wide views passed and were inspected, with no horizontal document overflow. Production-container interaction was also verified. These were agent-operated synthetic browser checks; no physical-keyboard, physical-device or real-provider testing is claimed.


🔄 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/6777 **Author:** [@SirAdoni](https://github.com/SirAdoni) **Created:** 9/27/2026 **Status:** ✅ Merged **Merged:** 9/28/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `contrib/6698-panel-usability` --- ### 📝 Commits (10+) - [`76cb4c5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/76cb4c59181c6b3f8aa0c7fff9b05144b9b02616) feat: improve panel keyboard access and loading states - [`652327d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/652327d014f7f2f919c78558c2d3730ebb3ecd0c) test: verify actual settings import keyboard flow - [`774d1f2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/774d1f260183723e4220731a0fe0480becdb49ac) Merge staging navigation into panel usability contribution - [`7ada97c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7ada97cf445b716c234ed22d0dba4a4c65115267) fix: preserve decorative avatar fallback semantics - [`29d14ef`](https://github.com/Pasta-Devs/Marinara-Engine/commit/29d14ef572ab87ea6138763138ef20163c847efc) Merge staging inventory update into panel contribution - [`c4dfc29`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c4dfc290f8ec9946c167fa23526ec61e15b7ebd8) Merge commit '3355c32277f71d2d4aa2e4f84d4901c098047dec' into repair/6777 - [`324eb55`](https://github.com/Pasta-Devs/Marinara-Engine/commit/324eb55e7fdb5bd071233e75e55ae0def0c9741c) fix(panels): preserve retries and clear search on Escape - [`4e92471`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4e92471a782834a361ddb96b6893e017a0c5d237) test(panels): cover search Escape on mobile browsers - [`00d9a5d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/00d9a5dfa49baa909247c7caa56b5f6c57334f59) test(panels): assert collapsed sidebar state consistently - [`3a250db`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3a250db697a395f750d74f7ae934ffce8d6171b6) fix(panels): keep Escape within active inline edits ### 📊 Changes **18 files changed** (+394 additions, -44 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+8 -0) ➕ `e2e/panel-keyboard-import.e2e.ts` (+140 -0) ➕ `packages/client/src/components/characters/AvatarImage.tsx` (+36 -0) 📝 `packages/client/src/components/characters/CardLibraryPreview.tsx` (+3 -1) 📝 `packages/client/src/components/characters/CharacterLibraryView.tsx` (+3 -1) 📝 `packages/client/src/components/layout/ChatSidebar.tsx` (+28 -23) 📝 `packages/client/src/components/layout/RightPanel.tsx` (+14 -1) ➕ `packages/client/src/components/layout/use-panel-keyboard-focus.ts` (+77 -0) 📝 `packages/client/src/components/panels/AgentsPanel.tsx` (+1 -0) 📝 `packages/client/src/components/panels/CharactersPanel.tsx` (+1 -0) 📝 `packages/client/src/components/panels/ConnectionsPanel.tsx` (+1 -0) 📝 `packages/client/src/components/panels/LorebooksPanel.tsx` (+1 -0) 📝 `packages/client/src/components/panels/PersonasPanel.tsx` (+6 -2) 📝 `packages/client/src/components/panels/PresetsPanel.tsx` (+1 -0) 📝 `packages/client/src/components/panels/SettingsPanel.tsx` (+17 -14) ➕ `packages/client/src/components/ui/PanelStates.tsx` (+49 -0) 📝 `packages/client/src/localization/locales/en.json` (+2 -0) 📝 `scripts/regressions/server-signal-shutdown.regression.ts` (+6 -2) </details> ### 📄 Description ## Linked issue Closes #6805. Partial implementation of #6698; the umbrella issue remains open. ## Why this change Keyboard navigation and transient loading failures could make library panels close unexpectedly or appear empty. ## What changed - Improve panel keyboard access, import focus and retry/loading states using existing panel patterns. - Clear chat search on Escape before closing, and keep blank rename fields from closing their parent panel. - Repair the Intel macOS shutdown fixture cold-start timeout using its sibling restart test allowance, preserving the existing shutdown timing checks. ## 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` pnpm check; focused browser suite passed seven cases with two intentional desktop-only skips; seven shell smoke cases passed. The native shutdown fixture also passed normally and with an injected nine-second cold start; full pnpm check passed on fa6f4e70e. Valid hosted findings were fixed, including terminal error handling and Escape behavior. Local follow-up CodeRabbit review hit the shared hourly quota and remains pending; current-head hosted review and GitHub checks remain merge gates. ### Manual verification Manually verify imports, keyboard-only renaming/Escape, slow loading, retry exhaustion and recovery in the affected panels. Automated browser evidence does not claim physical-device or manual container verification. Human checklist states are preserved. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened - [ ] Version/release files updated (only if this PR includes a version bump) Added an Unreleased changelog entry. No release metadata or user-facing docs changed. ## UI evidence [Browser evidence](https://gist.github.com/SpicyMarinara/f0d1f4c0b4df8be42a771de41bb8e9c5) (download the HTML to view the embedded screenshots). Captions distinguish before/after captures from current feature screenshots. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Accessibility** * Navigation panels receive keyboard focus when opened, close with Escape, and return focus to their opener. * Profile import is keyboard-accessible. Missing-avatar icons are hidden from screen readers unless they have an accessible label. * **Bug Fixes** * Missing character portraits now show a visible fallback. * Escape while renaming a folder no longer triggers unintended browser behavior; expanded folder actions and active fields handle Escape appropriately. * **User Experience** * Chat sidebar loading and error states are clearer, with a retry option when available. Escape can clear search text or exit activity-field focus. <!-- end of auto-generated comment: release notes by coderabbit.ai --> <!-- maintainer-final-review --> ### Current review evidence Published 56b3e3169 also fixes Escape from a nested action inside an expanded folder header. Its retained browser assertion failed before the two-line selector fix. Full pnpm check, the focused three-browser panel suite (7 passed, 2 intentional mobile skips), and seven shell smoke cases passed. Both combined local CodeRabbit reviews covered this fix; no follow-up finding remains in this PR. Current-head hosted review and CI remain merge gates. Published 49e5c6210 merges staging982cbb901. The only manual conflict resolution retained both changelog blocks. All 15 feature-only files and 27 incoming staging-only files are unchanged from their respective parents; shared ChatSidebar and English catalog match the automatic merge. Fresh pnpm check and ten focused panel/sidebar plus smoke browser cases pass. <!-- /maintainer-final-review --> <!-- local-validation-20260928 --> ### Local build and container verification Tested commit: 7d9a1d068c471ac3b424fc481cdad4f24089011f. Full local pnpm check passed. The full Docker image built successfully and ran with synthetic data; HTTP readiness and embedded build commit were verified. These results do not claim completion of the remaining manual and UI edge-case checklist. <!-- /local-validation-20260928 --> <!-- interactive-validation-20260928 --> Interactive browser walkthroughs of the feature were completed against the running production container using synthetic fixtures, supported by focused automated browser checks. This was agent-operated browser interaction, not physical-device testing. The broader theme, empty-state and error-path checklist remains separate. <!-- /interactive-validation-20260928 --> ### Completed UI verification At 7d9a1d068c471ac3b424fc481cdad4f24089011f, focused browser checks passed 9/9 across desktop Chromium, mobile Chromium and mobile WebKit, including empty-folder Escape/F2 behavior, import keyboard reachability and retry after a synthetic HTTP 503. Supplemental light desktop and dark 390px-wide views passed and were inspected, with no horizontal document overflow. Production-container interaction was also verified. These were agent-operated synthetic browser checks; no physical-keyboard, physical-device or real-provider testing is claimed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:18:41 +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#7326
No description provided.