[PR #5540] [MERGED] Let the Local Model card header toggle in every state #6805

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5540
Author: @kolacheee
Created: 8/25/2026
Status: ✅ Merged
Merged: 8/25/2026
Merged by: @kolacheee

Base: staging ← Head: fix/5538-local-model-card-expand


📝 Commits (3)

  • cbfc0bc fix(connections): let the Local Model card header toggle in every state
  • 9ea2bd9 fix(connections): announce the Local Model card's expanded state properly
  • c475571 fix(connections): only reference the card body id while it is rendered

📊 Changes

2 files changed (+21 additions, -4 deletions)

View changed files

📝 CHANGELOG.md (+4 -0)
📝 packages/client/src/components/panels/ConnectionsPanel.tsx (+17 -4)

📄 Description

Linked issue

Closes #5538

Why this change

The Connections panel's Local Model card only expanded on a header click while the model was not downloaded (if (!isDownloaded) setExpanded(true), introduced in 08583a7e7). Once the download finished, the card body — including the "Use local model for all tracker agents" action — was reachable only through the small chevron. That hid the action from exactly the users who can use it: a user in the report behind #5537 concluded the button had been removed from the app and reassigned every agent's connection by hand.

What changed

One conditional in SidecarCard (packages/client/src/components/panels/ConnectionsPanel.tsx): the header click now toggles expansion unconditionally (setExpanded((current) => !current)), matching what the chevron already does, and the cursor-pointer class is applied in every state. A comment records why the gate must not come back.

Safety of the wider click target: both header buttons (settings, chevron) already call event.stopPropagation(), and the expanded body is a sibling of the header div, not a child — so clicks on body controls never reach the new handler. The chevron is unchanged and keeps its aria/title behavior.

The existing e2e helper (openExpandedLocalModel in e2e/core-flows.e2e.ts) clicks the header while collapsed and expects the body — a first click still expands under the toggle, so it keeps passing.

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

Automated, from this branch: client ESLint passes; the touched file is Prettier-clean (--end-of-line auto; repo-wide format:check fails pre-existing on CRLF Windows checkouts).

Manual steps for whoever ticks the boxes:

  • With the local model downloaded: click anywhere on the Local Model card header (not the buttons) → body expands; click again → collapses.
  • Click the settings gear and the chevron → they still do their own thing and do not double-toggle.
  • With the model not downloaded: header click still expands (previous behavior preserved, now also collapses on second click).
  • Confirm the "Use local model for all tracker agents" button is now reachable without knowing about the chevron.

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 (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

CHANGELOG entry added under [Unreleased] → Fixed. No user-facing docs describe this card, so no docs/ or docs-i18n impact.

Summary by CodeRabbit

  • Bug Fixes
    • The Local Model card in the Connections panel can now be expanded or collapsed by clicking its header in any state.
    • Tracker assignment remains accessible after the model has finished downloading.
    • Improved accessibility for the card’s expansion controls, including clearer expanded and collapsed states.
    • Expansion behavior is now consistent before, during, and after model download.

🔄 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/5540 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 8/25/2026 **Status:** ✅ Merged **Merged:** 8/25/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `fix/5538-local-model-card-expand` --- ### 📝 Commits (3) - [`cbfc0bc`](https://github.com/Pasta-Devs/Marinara-Engine/commit/cbfc0bc0e192ed063708ca42011d2220e7f4fef0) fix(connections): let the Local Model card header toggle in every state - [`9ea2bd9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9ea2bd94a83b525b49e30a6bf6460a7a39d814a0) fix(connections): announce the Local Model card's expanded state properly - [`c475571`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c47557134e75d4c09b6c37e4519f1cf9f730735f) fix(connections): only reference the card body id while it is rendered ### 📊 Changes **2 files changed** (+21 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+4 -0) 📝 `packages/client/src/components/panels/ConnectionsPanel.tsx` (+17 -4) </details> ### 📄 Description ## Linked issue Closes #5538 ## Why this change The Connections panel's Local Model card only expanded on a header click while the model was **not** downloaded (`if (!isDownloaded) setExpanded(true)`, introduced in `08583a7e7`). Once the download finished, the card body — including the **"Use local model for all tracker agents"** action — was reachable only through the small chevron. That hid the action from exactly the users who can use it: a user in the report behind #5537 concluded the button had been removed from the app and reassigned every agent's connection by hand. ## What changed One conditional in `SidecarCard` (`packages/client/src/components/panels/ConnectionsPanel.tsx`): the header click now toggles expansion unconditionally (`setExpanded((current) => !current)`), matching what the chevron already does, and the `cursor-pointer` class is applied in every state. A comment records why the gate must not come back. Safety of the wider click target: both header buttons (settings, chevron) already call `event.stopPropagation()`, and the expanded body is a **sibling** of the header div, not a child — so clicks on body controls never reach the new handler. The chevron is unchanged and keeps its `aria`/title behavior. The existing e2e helper (`openExpandedLocalModel` in `e2e/core-flows.e2e.ts`) clicks the header while collapsed and expects the body — a first click still expands under the toggle, so it keeps passing. ## Validation <!-- These are human tasks. Never tick a box for a check that was not actually performed. --> - [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` ### Manual verification notes Automated, from this branch: client ESLint passes; the touched file is Prettier-clean (`--end-of-line auto`; repo-wide `format:check` fails pre-existing on CRLF Windows checkouts). Manual steps for whoever ticks the boxes: - With the local model **downloaded**: click anywhere on the Local Model card header (not the buttons) → body expands; click again → collapses. - Click the settings gear and the chevron → they still do their own thing and do not double-toggle. - With the model **not** downloaded: header click still expands (previous behavior preserved, now also collapses on second click). - Confirm the "Use local model for all tracker agents" button is now reachable without knowing about the chevron. ## Docs and release impact - [ ] No docs changes needed - [x] 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 (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) CHANGELOG entry added under `[Unreleased] → Fixed`. No user-facing docs describe this card, so no `docs/` or `docs-i18n` impact. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * The Local Model card in the Connections panel can now be expanded or collapsed by clicking its header in any state. * Tracker assignment remains accessible after the model has finished downloading. * Improved accessibility for the card’s expansion controls, including clearer expanded and collapsed states. * Expansion behavior is now consistent before, during, and after model download. <!-- 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:13:52 +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#6805
No description provided.