[PR #685] [MERGED] Fix mobile tracker text preview clipping #4731

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/685
Author: @Xelvanis
Created: 5/11/2026
Status: ✅ Merged
Merged: 5/11/2026
Merged by: @Xelvanis

Base: main ← Head: fix/mobile-thoughts-popover-clipping


📝 Commits (2)

  • efcd6db Fix mobile tracker text preview clipping
  • 26bf95b Use passive scroll listener for tracker preview

📊 Changes

1 file changed (+122 additions, -6 deletions)

View changed files

📝 packages/client/src/components/chat/RoleplayHUDPanels.tsx (+122 -6)

📄 Description

Linked issue

No linked issue. Reported via mobile screenshot/manual bug report.

Why this change

  • Mobile users can tap tracked character fields like Thinks to preview the full text, but the preview was rendered inside the tracker popover scroll container and could be clipped by the top of that window.
  • This made longer thought text hard to read on phones, especially when the field sat near the top of the tracker panel.

What changed

  • Rendered the roleplay tracker inline text preview through a fixed document.body portal instead of nesting it inside the scrollable tracker popover.
  • Added viewport-aware positioning so the preview can move below the tapped field when there is not enough room above it.
  • Kept the existing tap behavior, desktop title tooltip, and double-tap-to-edit flow intact.

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

  • AI-run validation: pnpm check passed locally.
  • AI self-review: git diff --check passed, and the final diff is limited to packages/client/src/components/chat/RoleplayHUDPanels.tsx.
  • Manual TEST pass: branch was synced to TEST, then checked on mobile after local host binding was corrected. Reporter said the issue appears fixed.
  • Remaining reviewer task: confirm the mobile tracker preview in a browser and attach before/after evidence if desired.

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)

UI evidence (if applicable)

  • Before evidence was provided in the bug report screenshot.
  • No reviewer-visible after screenshot is attached yet.

Summary by CodeRabbit

Release Notes

  • Improvements
    • Enhanced inline preview tooltips with improved positioning and viewport handling for better visibility
    • Added accessibility improvements with enhanced screen reader support for edit controls

Review Change Stack


🔄 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/685 **Author:** [@Xelvanis](https://github.com/Xelvanis) **Created:** 5/11/2026 **Status:** ✅ Merged **Merged:** 5/11/2026 **Merged by:** [@Xelvanis](https://github.com/Xelvanis) **Base:** `main` ← **Head:** `fix/mobile-thoughts-popover-clipping` --- ### 📝 Commits (2) - [`efcd6db`](https://github.com/Pasta-Devs/Marinara-Engine/commit/efcd6dbdd90882c104c181fb70a2a467a67933c2) Fix mobile tracker text preview clipping - [`26bf95b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/26bf95b16fcf5657277a84e456f4d07421445d89) Use passive scroll listener for tracker preview ### 📊 Changes **1 file changed** (+122 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/chat/RoleplayHUDPanels.tsx` (+122 -6) </details> ### 📄 Description ## Linked issue No linked issue. Reported via mobile screenshot/manual bug report. ## Why this change - Mobile users can tap tracked character fields like `Thinks` to preview the full text, but the preview was rendered inside the tracker popover scroll container and could be clipped by the top of that window. - This made longer thought text hard to read on phones, especially when the field sat near the top of the tracker panel. ## What changed - Rendered the roleplay tracker inline text preview through a fixed `document.body` portal instead of nesting it inside the scrollable tracker popover. - Added viewport-aware positioning so the preview can move below the tapped field when there is not enough room above it. - Kept the existing tap behavior, desktop title tooltip, and double-tap-to-edit flow intact. ## Validation - [x] `pnpm check` passes locally - [ ] 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 - AI-run validation: `pnpm check` passed locally. - AI self-review: `git diff --check` passed, and the final diff is limited to `packages/client/src/components/chat/RoleplayHUDPanels.tsx`. - Manual TEST pass: branch was synced to TEST, then checked on mobile after local host binding was corrected. Reporter said the issue appears fixed. - Remaining reviewer task: confirm the mobile tracker preview in a browser and attach before/after evidence if desired. ## 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) ## UI evidence (if applicable) - Before evidence was provided in the bug report screenshot. - No reviewer-visible after screenshot is attached yet. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **Improvements** * Enhanced inline preview tooltips with improved positioning and viewport handling for better visibility * Added accessibility improvements with enhanced screen reader support for edit controls [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/Pasta-Devs/Marinara-Engine/pull/685) <!-- 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:10:11 +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#4731
No description provided.