[PR #2258] [MERGED] Fix preset choice option truncation #5519

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

📋 Pull Request Information

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

Base: refactor ← Head: fix/issue-2245-preset-choice-text


📝 Commits (2)

  • abe7da2 Fix preset choice option truncation
  • 7b1bd39 Refresh PR metadata checks

📊 Changes

2 files changed (+136 additions, -18 deletions)

View changed files

➕ src/features/catalog/presets/components/ChoiceSelectionModal.test.tsx (+124 -0)
📝 src/features/catalog/presets/components/ChoiceSelectionModal.tsx (+12 -18)

📄 Description

Linked issue

Closes #2245

Why this change

  • Long preset variable option text was being sliced to 150 characters and line-clamped in the choice selector, so users could not read the full option before choosing.

What changed

  • Render preset choice option values through one shared full-text preview component instead of repeating sliced, two-line-clamped snippets.
  • Added a focused regression test covering full text rendering for single-select, multi-select, and boolean toggle options, plus unchanged single-select confirmation behavior.

Refactor impact

Primary owner:

  • catalog preset UI

Impact areas reviewed:

  • src/features/catalog/presets/components/ChoiceSelectionModal.tsx
  • preset variable choice selection for single-select, multi-select, and one-option boolean toggle rows

Boundary notes:

  • Feature UI only; no engine, shared API, Rust, storage, provider, prompt assembly, dependency, schema, or release metadata changes.

Pressure points touched:

  • Shared preset variable choice modal used by chat/roleplay setup flows.

Validation

  • Matching validation command passes locally (for example pnpm typecheck, pnpm build, pnpm check:architecture, pnpm check:docs, or full pnpm check when warranted)
  • Full pnpm check passes before PR push/handoff
  • Human/manual validation completed by contributor or reviewer

Manual verification notes

  • Codex focused repro before fix: pnpm test -- src/features/catalog/presets/components/ChoiceSelectionModal.test.tsx failed the long-text rows because UNIQUE_FULL_TEXT_TAIL was absent after the 150-character slice.
  • Codex focused proof after fix: pnpm test -- src/features/catalog/presets/components/ChoiceSelectionModal.test.tsx passed 4 tests.
  • Codex lane check: pnpm typecheck passed.
  • Codex PR gate after final tracked diff: pnpm check passed.
  • Bunny local review: pass with one non-blocking draft limitation below.

Feature Discoverability

Check exactly one:

  • Updated src/features/shell/discovery/ because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.
  • N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find.

Reason:

  • Bugfix only; no new discoverable feature or workflow.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

UI evidence

  • Draft limitation: no GitHub-renderable before/after screenshots were uploaded from this local component-level repro. The core behavior is covered by the focused regression test and full pnpm check, but the PR should stay draft if reviewer-visible visual evidence is required before ready-for-review.

Summary by CodeRabbit

  • Improvements

    • Option values in the preset selection modal now display in full with text wrapping instead of truncation.
  • Tests

    • Added comprehensive test coverage for the preset choice selection modal.

🔄 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/2258 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 6/5/2026 **Status:** ✅ Merged **Merged:** 6/5/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/issue-2245-preset-choice-text` --- ### 📝 Commits (2) - [`abe7da2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/abe7da2e7cc2ed4d51a3224dd26d77e6316ae622) Fix preset choice option truncation - [`7b1bd39`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7b1bd39a61548f2ce576a41f27e61917566d6b8e) Refresh PR metadata checks ### 📊 Changes **2 files changed** (+136 additions, -18 deletions) <details> <summary>View changed files</summary> ➕ `src/features/catalog/presets/components/ChoiceSelectionModal.test.tsx` (+124 -0) 📝 `src/features/catalog/presets/components/ChoiceSelectionModal.tsx` (+12 -18) </details> ### 📄 Description ## Linked issue Closes #2245 ## Why this change - Long preset variable option text was being sliced to 150 characters and line-clamped in the choice selector, so users could not read the full option before choosing. ## What changed - Render preset choice option values through one shared full-text preview component instead of repeating sliced, two-line-clamped snippets. - Added a focused regression test covering full text rendering for single-select, multi-select, and boolean toggle options, plus unchanged single-select confirmation behavior. ## Refactor impact Primary owner: - catalog preset UI Impact areas reviewed: - `src/features/catalog/presets/components/ChoiceSelectionModal.tsx` - preset variable choice selection for single-select, multi-select, and one-option boolean toggle rows Boundary notes: - Feature UI only; no engine, shared API, Rust, storage, provider, prompt assembly, dependency, schema, or release metadata changes. Pressure points touched: - Shared preset variable choice modal used by chat/roleplay setup flows. ## Validation - [ ] Matching validation command passes locally (for example `pnpm typecheck`, `pnpm build`, `pnpm check:architecture`, `pnpm check:docs`, or full `pnpm check` when warranted) - [ ] Full `pnpm check` passes before PR push/handoff - [ ] Human/manual validation completed by contributor or reviewer ### Manual verification notes - Codex focused repro before fix: `pnpm test -- src/features/catalog/presets/components/ChoiceSelectionModal.test.tsx` failed the long-text rows because `UNIQUE_FULL_TEXT_TAIL` was absent after the 150-character slice. - Codex focused proof after fix: `pnpm test -- src/features/catalog/presets/components/ChoiceSelectionModal.test.tsx` passed 4 tests. - Codex lane check: `pnpm typecheck` passed. - Codex PR gate after final tracked diff: `pnpm check` passed. - Bunny local review: pass with one non-blocking draft limitation below. ## Feature Discoverability Check exactly one: - [ ] Updated `src/features/shell/discovery/` because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool. - [x] N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find. Reason: - Bugfix only; no new discoverable feature or workflow. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [ ] Confirmed this PR does not restore old staging/package-workspace/release claims ## UI evidence - Draft limitation: no GitHub-renderable before/after screenshots were uploaded from this local component-level repro. The core behavior is covered by the focused regression test and full `pnpm check`, but the PR should stay draft if reviewer-visible visual evidence is required before ready-for-review. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Improvements** * Option values in the preset selection modal now display in full with text wrapping instead of truncation. * **Tests** * Added comprehensive test coverage for the preset choice selection modal. <!-- 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:17:00 +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#5519
No description provided.