Skip to content

test(native-chat): split structured question fixtures - #19924

Merged
brennanb2025 merged 1 commit into
mainfrom
brennanb2025/fix-native-chat-structured
Sep 10, 2026
Merged

brennanb2025 merged 1 commit into
mainfrom
brennanb2025/fix-native-chat-structured

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​6 $\color{#cf222e}{\Huge{\mathbf{−}}}$​63 $\color{#cf222e}{\Huge{\mathbf{−}}}$​57
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​66 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​66

Summary

  • move structured question prompt data into a focused test-fixtures module
  • bring NativeChatStructuredSession.test.tsx back below the 800-line static-analysis cap
  • preserve the existing grouped and legacy question coverage without disabling lint rules

Testing

  • pnpm test src/renderer/src/components/native-chat/NativeChatStructuredSession.test.tsx
  • pnpm run check:code-quality:changed
  • pnpm tc:web

@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 913d9423-2e72-486f-b058-1067999af510

📥 Commits

Reviewing files that changed from the base of the PR and between 4f5a827 and 442158b.

📒 Files selected for processing (2)
  • src/renderer/src/components/native-chat/NativeChatStructuredSession.test.tsx
  • src/renderer/src/components/native-chat/native-chat-structured-question-test-fixtures.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The change adds shared fixtures for grouped and legacy structured question prompts. The structured session tests import these fixtures instead of defining inline prompt arrays. Test assertions and behavior remain unchanged.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 44215

This refactor preserves grouped and legacy structured-question test coverage while moving data into a dedicated fixture module. No merge-blocking product or runtime risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description includes a summary and testing details, but it omits most required template sections, including ELI5, What Changed, Why, Linked Issue, Visual Proof, Review, Notes, and Checklist items. Complete the required sections. Add the linked issue after “Fixes #”, explain the change and rationale, state “N/A” with a reason for Visual Proof because this is a test-only change, and complete the testing, review, boundary, notes, and ch…
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: moving structured question fixtures into a separate module.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Resolution

Complete the required sections. Add the linked issue after “Fixes #”, explain the change and rationale, state “N/A” with a reason for Visual Proof because this is a test-only change, and complete the testing, review, boundary, notes, and checklist sections.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Extracted the two inline question fixtures into a focused module — claudeGroupedQuestionPromptItems and legacySingleQuestionPromptItems now live in native-chat-structured-question-test-fixtures.ts and are imported back into the test, with no assertion or type changes.
  • Brought the test file back under the max-lines cap — effective non-blank/non-comment line count drops from ~815 to 752 without an eslint/oxlint disable or a config bump.

Verified the extraction is byte-faithful, oxlint reports 0 warnings/errors on both changed files, and the targeted test suite passes 21/21.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@brennanb2025
brennanb2025 merged commit 721a269 into main Sep 10, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant