Skip to content

RD-T47 Active Calls Panel Fix - #148

Merged
ucswift merged 1 commit into
masterfrom
develop
Oct 20, 2026
Merged

ucswift merged 1 commit into
masterfrom
develop

Conversation

@ucswift

@ucswift ucswift commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes the Active Calls panel’s dispatch picker so it opens and remains interactive without being wrapped in a React Native Modal.

Changes

  • Removed the Modal wrapper around DispatchSelectionModal.
  • Rendered the dispatch selection Actionsheet directly, allowing it to manage its own portal and overlay behavior.
  • Added a regression test verifying that:
    • The dispatch picker opens for the selected call.
    • The correct call ID is passed to the picker.
    • No React Native Modal is rendered around it.

This prevents an empty transparent modal layer from blocking scrolling and user interaction with the dispatch picker.

Summary by CodeRabbit

  • Bug Fixes
    • Improved the dispatch picker interaction by removing an unnecessary modal layer.
    • Dispatching additional resources from an active call now opens the picker correctly without an extra transparent overlay interfering with controls.
    • Added coverage to verify the picker opens for the selected call.

@Resgrid-Bot

Resgrid-Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Code Review Completed! 🔥

The code review was successfully completed based on your current configurations.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ❌
Security ✅
Business Logic ❌

Access your configuration settings here.

​

const { Modal } = require('react-native');
render(<ActiveCallsPanel />);

await waitFor(() => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

kody code-review Kody Rules high

The awaited waitFor operation at src/components/dispatch-console/tests/active-calls-panel.test.tsx:528 can reject without explicit asynchronous failure handling. Wrap it in try/catch or attach a .catch handler.

Kody rule violation: Handle async operations with proper error handling

await waitFor(() => { /* handle rejection with try/catch or .catch(...) */
Prompt for LLM

File src/components/dispatch-console/__tests__/active-calls-panel.test.tsx:

Line 522:

The awaited waitFor operation at src/components/dispatch-console/__tests__/active-calls-panel.test.tsx:528 can reject without explicit asynchronous failure handling. Wrap it in try/catch or attach a .catch handler.

Suggested Code:

    await waitFor(() => { /* handle rejection with try/catch or .catch(...) */

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

​

​

leaving the Modal as an empty, transparent full-screen layer on top that swallows every tap and scroll. */}
<DispatchSelectionModal
isVisible={!!dispatchTargetCall}
onClose={() => setDispatchTargetCall(null)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

kody code-review Kody Rules high

The inline arrow function in the JSX onClose prop creates a new function on every render, impacting performance. Move the function definition outside the render method.

Kody rule violation: Avoid using .bind() or arrow functions in JSX props

Prompt for LLM

File src/components/dispatch-console/active-calls-panel.tsx:

Line 518:

The inline arrow function in the JSX onClose prop creates a new function on every render, impacting performance. Move the function definition outside the render method.

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

​

​

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 43b97148-194c-4ea3-ba7b-ea769b789a77
📥 Commits

Reviewing files that changed from the base of the PR and between 1509db7 and f54bef3.

📒 Files selected for processing: 2
  • src/components/dispatch-console/__tests__/active-calls-panel.test.tsx
  • src/components/dispatch-console/active-calls-panel.tsx

Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

📝 Walkthrough

ActiveCallsPanel now renders DispatchSelectionModal directly instead of wrapping it in a React Native Modal. A test verifies that opening the picker for a call passes its ID and does not render a React Native Modal.

Changes: Dispatch picker rendering

Layer / File(s) Summary
Render and verify the dispatch picker
src/components/dispatch-console/active-calls-panel.tsx, src/components/dispatch-console/__tests__/active-calls-panel.test.tsx
ActiveCallsPanel renders DispatchSelectionModal directly, preserving its existing props. The test checks the call ID and confirms that no React Native Modal is rendered.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to f54be

The dispatch picker can be rendered without the extra modal layer. No issue requiring a fix before merge was identified.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title identifies the main change in the pull request: a fix to the Active Calls Panel. It is concise and related to the code changes.
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: Docstring Coverage

Explanation

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 files.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

src/components/dispatch-console/__tests__/active-calls-panel.test.tsx

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

src/components/dispatch-console/active-calls-panel.tsx

ESLint skipped: the matched ESLint configuration already failed (missing-dependency).

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

@ucswift

ucswift commented Oct 20, 2026

Copy link
Copy Markdown
Member Author

Approve

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This PR is approved.

@ucswift
ucswift merged commit 2c9015b into master Oct 20, 2026
12 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.

2 participants