Skip to content

Conversation

@divyanshu-patil
Copy link

@divyanshu-patil divyanshu-patil commented Jan 7, 2026

Proposed changes

This PR addresses a small mismatch between the runtime navigator configuration and the TypeScript route definitions.

Issue
AttachmentView is registered in InsideStack, but its route definition is missing from:

  • InsideStackParamList
  • MasterDetailInsideStackParamList

Because of this, navigating to AttachmentView currently requires using @ts-ignore, even though the route exists and works correctly at runtime.

Changes

  • Add the missing AttachmentView route definitions to both param lists
  • Align the TypeScript navigation types with the actual navigator setup
  • Remove the need for @ts-ignore when navigating to AttachmentView

Issue(s)

How to test or reproduce

Screenshots

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

InsideStack.tsx

<InsideStack.Screen name='AttachmentView' component={AttachmentView} />

MasterDetailStack

<InsideStack.Screen name='AttachmentView' component={AttachmentView} />

Summary by CodeRabbit

Release Notes

  • New Features
    • Added attachment viewing capability to the app's navigation system, enabling users to seamlessly access and view attachments throughout the application.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 7, 2026

Walkthrough

Two navigation type definitions are being extended with a new AttachmentView route parameter. Both MasterDetailInsideStackParamList and InsideStackParamList now include an AttachmentView entry containing an attachment field of type IAttachment.

Changes

Cohort / File(s) Summary
Navigation Stack Types
app/stacks/MasterDetailStack/types.ts, app/stacks/types.ts
Added AttachmentView parameter entry to both MasterDetailInsideStackParamList and InsideStackParamList with structure { attachment: IAttachment }

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A new route hops into view,
Where attachments find their place so true,
Types aligned in harmony's way,
The stack grows stronger every day! 📎

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: adding the missing AttachmentView route to InsideStack param lists to fix a TypeScript mismatch.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between b990e60 and f8cec1b.

📒 Files selected for processing (2)
  • app/stacks/MasterDetailStack/types.ts
  • app/stacks/types.ts
🧰 Additional context used
🧬 Code graph analysis (2)
app/stacks/types.ts (1)
app/definitions/IAttachment.ts (1)
  • IAttachment (9-48)
app/stacks/MasterDetailStack/types.ts (1)
app/definitions/IAttachment.ts (1)
  • IAttachment (9-48)
🔇 Additional comments (2)
app/stacks/types.ts (1)

296-298: LGTM! The type definition is correct and consistent with the MasterDetailInsideStackParamList version.

Runtime verification confirms:

  • InsideStack.tsx registration (line 336) matches this signature exactly
  • All navigation calls to AttachmentView originate from InsideStack views (RoomView, MessagesView, SearchMessagesView, UIKit/Image), so ChatsStackParamList correctly does not include this route
  • Type and runtime implementation are properly aligned
app/stacks/MasterDetailStack/types.ts (1)

225-227: The type definition and navigator registration are correctly implemented.

All navigation call sites properly pass the attachment parameter, and the component correctly receives it via useAppRoute. The type signature is consistent across type definition files and matches the runtime implementation.


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 and usage tips.

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