[PR #1083] [MERGED] Fix local model settings scroll reset #4911

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1083
Author: @cha1latte
Created: 5/21/2026
Status: ✅ Merged
Merged: 5/21/2026
Merged by: @cha1latte

Base: staging ← Head: fix/issue-1070-custom-model-scroll


📝 Commits (2)

  • 701d733 Fix local model settings scroll reset
  • 9413003 Use explicit modal scroll ref

📊 Changes

4 files changed (+29 additions, -5 deletions)

View changed files

➕ docs/pr-evidence/issue-1070/after.png (+0 -0)
➕ docs/pr-evidence/issue-1070/before.png (+0 -0)
📝 packages/client/src/components/modals/ModelDownloadModal.tsx (+23 -2)
📝 packages/client/src/components/ui/Modal.tsx (+6 -3)

📄 Description

Linked issue

Closes #1070

Why this change

  • The Local AI Model runtime settings modal could keep a stale scroll position after the custom-model/setup content changed, leaving the inference settings panel positioned awkwardly with empty scroll space until refresh.

What changed

  • Track the Local AI Model modal content container and reset its scroll position when Runtime Settings opens or setup visibility changes.
  • Keep the fix scoped to ModelDownloadModal so other shared modal behavior is unchanged.

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

  • Codex ran node scratch\issue-1070-cdp.mjs --install-flow before the fix. The repro opened the Local AI Model modal, expanded Runtime Settings, scrolled the longer custom-model content, then simulated the setup state that shrinks the modal content. Before the fix, the modal remained at scrollTop: 351.
  • Codex ran node scratch\issue-1070-cdp.mjs --install-flow --after after the fix. The same transition reset to scrollTop: 0, keeping the runtime settings panel in a normal position instead of preserving the stale lower scroll.
  • Codex ran pnpm check; it passed.
  • Raw evidence URLs were checked with curl.exe -I and returned HTTP 200.
  • No human-only verification blockers remain for the core claim.

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:

Before

After:

After

Summary by CodeRabbit

  • Bug Fixes
    • Model Download modal now automatically scrolls to the top when runtime setup changes or when opening runtime settings for the first time.

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/1083 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/21/2026 **Status:** ✅ Merged **Merged:** 5/21/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `staging` ← **Head:** `fix/issue-1070-custom-model-scroll` --- ### 📝 Commits (2) - [`701d733`](https://github.com/Pasta-Devs/Marinara-Engine/commit/701d7331319605bea15759fa75e28c4e5206bd01) Fix local model settings scroll reset - [`9413003`](https://github.com/Pasta-Devs/Marinara-Engine/commit/94130032a7fa544b45049d11576599d692aefaab) Use explicit modal scroll ref ### 📊 Changes **4 files changed** (+29 additions, -5 deletions) <details> <summary>View changed files</summary> ➕ `docs/pr-evidence/issue-1070/after.png` (+0 -0) ➕ `docs/pr-evidence/issue-1070/before.png` (+0 -0) 📝 `packages/client/src/components/modals/ModelDownloadModal.tsx` (+23 -2) 📝 `packages/client/src/components/ui/Modal.tsx` (+6 -3) </details> ### 📄 Description <!-- Target branch: `staging`. The default base in this UI is `main` (release branch). --> <!-- Change the base to `staging` before submitting unless this is a maintainer-approved mainline change. --> <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue <!-- Every PR should reference a feature request or issue report. If there isn't one yet, open one first to gather opinions: --> <!-- https://github.com/Pasta-Devs/Marinara-Engine/issues/new/choose --> Closes #1070 ## Why this change <!-- What user problem, bug, or goal does this solve? --> - The Local AI Model runtime settings modal could keep a stale scroll position after the custom-model/setup content changed, leaving the inference settings panel positioned awkwardly with empty scroll space until refresh. ## What changed <!-- List the key changes in this PR --> - Track the Local AI Model modal content container and reset its scroll position when Runtime Settings opens or setup visibility changes. - Keep the fix scoped to `ModelDownloadModal` so other shared modal behavior is unchanged. ## Validation <!-- Required: include commands run and/or manual checks performed --> - [ ] `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 <!-- Describe exactly what you tested in a real browser/app, step by step. --> <!-- ⚠️ If an AI agent filled out or ticked these boxes for you, treat them --> <!-- as a TO-DO LIST, not as proof the work is done. Verify each item yourself --> <!-- before submitting. If you haven't verified it, untick the box. --> - Codex ran `node scratch\issue-1070-cdp.mjs --install-flow` before the fix. The repro opened the Local AI Model modal, expanded Runtime Settings, scrolled the longer custom-model content, then simulated the setup state that shrinks the modal content. Before the fix, the modal remained at `scrollTop: 351`. - Codex ran `node scratch\issue-1070-cdp.mjs --install-flow --after` after the fix. The same transition reset to `scrollTop: 0`, keeping the runtime settings panel in a normal position instead of preserving the stale lower scroll. - Codex ran `pnpm check`; it passed. - Raw evidence URLs were checked with `curl.exe -I` and returned HTTP 200. - No human-only verification blockers remain for the core claim. ## 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: ![Before](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/701d7331319605bea15759fa75e28c4e5206bd01/docs/pr-evidence/issue-1070/before.png) After: ![After](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/701d7331319605bea15759fa75e28c4e5206bd01/docs/pr-evidence/issue-1070/after.png) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Model Download modal now automatically scrolls to the top when runtime setup changes or when opening runtime settings for the first time. <!-- review_stack_entry_start --> [![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/1083?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- 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:11:40 +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#4911
No description provided.