[PR #390] [MERGED] Optimize frontend shell and audit polish #4602

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/390
Author: @TheLonelyDevil9
Created: 5/4/2026
Status: ✅ Merged
Merged: 5/4/2026
Merged by: @SpicyMarinara

Base: main ← Head: codex/frontend-performance-audit


📝 Commits (5)

  • cfa2912 Optimize frontend shell and audit polish
  • 28bb023 Remove first-load font and logo weight
  • a885b6a Polish frontend shell interactions
  • 11d91ca Merge branch 'codex-tld-security-review' into codex-tld-frontend-review
  • 6df3abf Address frontend audit follow-ups

📊 Changes

23 files changed (+289 additions, -184 deletions)

View changed files

📝 packages/client/index.html (+1 -4)
📝 packages/client/package.json (+0 -1)
📝 packages/client/public/manifest.json (+0 -6)
📝 packages/client/src/components/agents/AgentEditor.tsx (+2 -0)
📝 packages/client/src/components/agents/RegexScriptEditor.tsx (+2 -0)
📝 packages/client/src/components/agents/ToolEditor.tsx (+2 -0)
📝 packages/client/src/components/chat/ChatArea.tsx (+4 -1)
📝 packages/client/src/components/chat/ChatFilesDrawer.tsx (+4 -0)
📝 packages/client/src/components/chat/ChatGallery.tsx (+13 -0)
📝 packages/client/src/components/chat/ChatGalleryDrawer.tsx (+2 -0)
📝 packages/client/src/components/chat/ChatMessage.tsx (+68 -9)
📝 packages/client/src/components/game/GameGridMap.tsx (+1 -1)
📝 packages/client/src/components/game/GameNodeMap.tsx (+1 -1)
📝 packages/client/src/components/game/GameReadableDisplay.tsx (+1 -1)
📝 packages/client/src/components/layout/AppShell.tsx (+124 -22)
📝 packages/client/src/components/lorebooks/LorebookEditor.tsx (+1 -1)
📝 packages/client/src/components/panels/CharactersPanel.tsx (+1 -1)
📝 packages/client/src/lib/markdown.tsx (+2 -0)
📝 packages/client/src/main.tsx (+43 -13)
📝 packages/client/src/stores/ui.store.ts (+4 -4)

...and 3 more files

📄 Description

Summary

  • trim the client PWA/offline footprint by excluding decorative sprites and splash assets from precache, removing an unused router dependency, and avoiding the oversized logo as an install icon
  • defer service worker registration until after first load/idle time, and treat SW registration as a progressive enhancement if the virtual module is unavailable
  • avoid persisted Zustand writes during live sidebar resizing, while keeping desktop panel open/close transitions smooth and drag movement instant
  • apply a deeper $impeccable audit pass: remove decorative gradient text and side-stripe accents in touched surfaces, add labels for obvious icon-only controls, and lazy/async decode chat/gallery imagery
  • apply $impeccable optimize: remove the render-blocking Google Fonts stylesheet from the shell and replace the empty-state 638 KiB GIF / 598 KiB logo path with the existing 34 KiB icon
  • apply $impeccable polish: add keyboard-adjustable resize separators with focus states and preserve the newer chat HTML color sanitizer allowance from the base branch

Audit / Optimize / Polish Notes

  • Audit health after this pass: 17/20 Good
  • Accessibility: 3/4, improved obvious unlabeled icon controls and desktop resize separator keyboard access; broader form labeling needs a separate targeted pass because scan output includes many custom-control false positives
  • Performance: 4/4, PWA precache is now 91 entries / ~3.27 MiB, large decorative assets are on-demand, SW work is off the initial path, live resize persistence is delayed until mouseup, and first empty-state view no longer requests the ~600 KiB logo/GIF or Google Fonts CSS
  • Responsive: 3/4, existing responsive shell remains intact; no new fixed-width mobile risks found in the edited surfaces
  • Theming: 3/4, token usage is mostly preserved; some legacy hard-coded game/theme colors remain intentional local flavor
  • Anti-patterns: 4/4, targeted polish removed decorative gradient text and >1px side-stripe accents in edited surfaces; width transitions are limited to panel open/close and disabled while dragging to avoid resize jank

Stacking

This is stacked on draft PR #387 (codex/security-hardening-v1.5.7). Review this PR after or alongside #387.

Test Plan

  • Manually verify first app load and PWA update behavior in browser
  • Manually verify the empty chat state still looks correct with the static icon and system font stack
  • Manually verify left sidebar and right panel resizing feels smooth, persists after mouseup, and works from the keyboard with Arrow/Home/End on desktop separators
  • Manually verify chat message avatars, attachments, gallery lightbox, and swipe controls remain usable with mouse and keyboard
  • Manually verify roleplay/game map/readable display visuals still look intentional after audit polish

Validation run locally:

  • pnpm check

No linked issue was provided; one should be opened before this PR is submitted, per CONTRIBUTING.md.

Summary by CodeRabbit

  • Bug Fixes

    • Enhanced accessibility by adding proper button labels and types throughout the interface.
    • Optimized image loading performance with async decoding and lazy-loading attributes.
    • Improved panel resizing with live-drag feedback for real-time width updates.
  • Style

    • Updated blockquote styling with full borders and translucent backgrounds.
    • Refined character name and gradient text styling.
    • Adjusted border widths in folder and group displays.
  • Chores

    • Updated PWA manifest icons, removing legacy logo references.
    • Removed unused dependency.
    • Deferred service worker registration for better performance.
    • Simplified PWA precaching by excluding splash assets.

🔄 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/390 **Author:** [@TheLonelyDevil9](https://github.com/TheLonelyDevil9) **Created:** 5/4/2026 **Status:** ✅ Merged **Merged:** 5/4/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `main` ← **Head:** `codex/frontend-performance-audit` --- ### 📝 Commits (5) - [`cfa2912`](https://github.com/Pasta-Devs/Marinara-Engine/commit/cfa2912f45c94e1e2d1afa59c6a38dd603c51706) Optimize frontend shell and audit polish - [`28bb023`](https://github.com/Pasta-Devs/Marinara-Engine/commit/28bb023f0cc4a1c8d5f000d1a0042717cb2f49c0) Remove first-load font and logo weight - [`a885b6a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a885b6a8fd6a088647e29d3b072f2575681eedc7) Polish frontend shell interactions - [`11d91ca`](https://github.com/Pasta-Devs/Marinara-Engine/commit/11d91cae3db3dbad1d468dafbacbfdbca59e30c8) Merge branch 'codex-tld-security-review' into codex-tld-frontend-review - [`6df3abf`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6df3abf5f926a04486f0d3a4685abab145ef4d1b) Address frontend audit follow-ups ### 📊 Changes **23 files changed** (+289 additions, -184 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/index.html` (+1 -4) 📝 `packages/client/package.json` (+0 -1) 📝 `packages/client/public/manifest.json` (+0 -6) 📝 `packages/client/src/components/agents/AgentEditor.tsx` (+2 -0) 📝 `packages/client/src/components/agents/RegexScriptEditor.tsx` (+2 -0) 📝 `packages/client/src/components/agents/ToolEditor.tsx` (+2 -0) 📝 `packages/client/src/components/chat/ChatArea.tsx` (+4 -1) 📝 `packages/client/src/components/chat/ChatFilesDrawer.tsx` (+4 -0) 📝 `packages/client/src/components/chat/ChatGallery.tsx` (+13 -0) 📝 `packages/client/src/components/chat/ChatGalleryDrawer.tsx` (+2 -0) 📝 `packages/client/src/components/chat/ChatMessage.tsx` (+68 -9) 📝 `packages/client/src/components/game/GameGridMap.tsx` (+1 -1) 📝 `packages/client/src/components/game/GameNodeMap.tsx` (+1 -1) 📝 `packages/client/src/components/game/GameReadableDisplay.tsx` (+1 -1) 📝 `packages/client/src/components/layout/AppShell.tsx` (+124 -22) 📝 `packages/client/src/components/lorebooks/LorebookEditor.tsx` (+1 -1) 📝 `packages/client/src/components/panels/CharactersPanel.tsx` (+1 -1) 📝 `packages/client/src/lib/markdown.tsx` (+2 -0) 📝 `packages/client/src/main.tsx` (+43 -13) 📝 `packages/client/src/stores/ui.store.ts` (+4 -4) _...and 3 more files_ </details> ### 📄 Description ## Summary - trim the client PWA/offline footprint by excluding decorative sprites and splash assets from precache, removing an unused router dependency, and avoiding the oversized logo as an install icon - defer service worker registration until after first load/idle time, and treat SW registration as a progressive enhancement if the virtual module is unavailable - avoid persisted Zustand writes during live sidebar resizing, while keeping desktop panel open/close transitions smooth and drag movement instant - apply a deeper `$impeccable audit` pass: remove decorative gradient text and side-stripe accents in touched surfaces, add labels for obvious icon-only controls, and lazy/async decode chat/gallery imagery - apply `$impeccable optimize`: remove the render-blocking Google Fonts stylesheet from the shell and replace the empty-state 638 KiB GIF / 598 KiB logo path with the existing 34 KiB icon - apply `$impeccable polish`: add keyboard-adjustable resize separators with focus states and preserve the newer chat HTML color sanitizer allowance from the base branch ## Audit / Optimize / Polish Notes - Audit health after this pass: **17/20 Good** - Accessibility: **3/4**, improved obvious unlabeled icon controls and desktop resize separator keyboard access; broader form labeling needs a separate targeted pass because scan output includes many custom-control false positives - Performance: **4/4**, PWA precache is now 91 entries / ~3.27 MiB, large decorative assets are on-demand, SW work is off the initial path, live resize persistence is delayed until mouseup, and first empty-state view no longer requests the ~600 KiB logo/GIF or Google Fonts CSS - Responsive: **3/4**, existing responsive shell remains intact; no new fixed-width mobile risks found in the edited surfaces - Theming: **3/4**, token usage is mostly preserved; some legacy hard-coded game/theme colors remain intentional local flavor - Anti-patterns: **4/4**, targeted polish removed decorative gradient text and >1px side-stripe accents in edited surfaces; width transitions are limited to panel open/close and disabled while dragging to avoid resize jank ## Stacking This is stacked on draft PR #387 (`codex/security-hardening-v1.5.7`). Review this PR after or alongside #387. ## Test Plan - [ ] Manually verify first app load and PWA update behavior in browser - [ ] Manually verify the empty chat state still looks correct with the static icon and system font stack - [ ] Manually verify left sidebar and right panel resizing feels smooth, persists after mouseup, and works from the keyboard with Arrow/Home/End on desktop separators - [ ] Manually verify chat message avatars, attachments, gallery lightbox, and swipe controls remain usable with mouse and keyboard - [ ] Manually verify roleplay/game map/readable display visuals still look intentional after audit polish Validation run locally: - `pnpm check` No linked issue was provided; one should be opened before this PR is submitted, per `CONTRIBUTING.md`. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Enhanced accessibility by adding proper button labels and types throughout the interface. * Optimized image loading performance with async decoding and lazy-loading attributes. * Improved panel resizing with live-drag feedback for real-time width updates. * **Style** * Updated blockquote styling with full borders and translucent backgrounds. * Refined character name and gradient text styling. * Adjusted border widths in folder and group displays. * **Chores** * Updated PWA manifest icons, removing legacy logo references. * Removed unused dependency. * Deferred service worker registration for better performance. * Simplified PWA precaching by excluding splash assets. <!-- 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-22 04:09:05 +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#4602
No description provided.