Skip to content

chore: add missing AttachmentView route to InsideStack param lists#6897

Open
divyanshu-patil wants to merge 6 commits intoRocketChat:developfrom
divyanshu-patil:chore/missing_types
Open

chore: add missing AttachmentView route to InsideStack param lists#6897
divyanshu-patil wants to merge 6 commits intoRocketChat:developfrom
divyanshu-patil:chore/missing_types

Conversation

@divyanshu-patil
Copy link
Copy Markdown

@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

  • New Features

    • Added attachment viewing to navigation, letting users open and view attachments from relevant screens.
  • Improvements

    • Strengthened navigation validation for opening attachments to improve reliability and catch issues earlier.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 32a7de1 and da2bf00.

📒 Files selected for processing (1)
  • app/views/RoomView/index.tsx
💤 Files with no reviewable changes (1)
  • app/views/RoomView/index.tsx

Walkthrough

Two navigation type definitions were extended with a new AttachmentView route parameter carrying an attachment: IAttachment. A TypeScript ignore directive was removed from a navigation call in RoomView, so that call is now type-checked.

Changes

Cohort / File(s) Summary
Navigation Stack Types
app/stacks/MasterDetailStack/types.ts, app/stacks/types.ts
Added AttachmentView entry to MasterDetailInsideStackParamList and InsideStackParamList with structure { attachment: IAttachment }.
View navigation fix
app/views/RoomView/index.tsx
Removed a // \@ts-ignore`` preceding a navigation call to the Attachment route so the call is now subject to TypeScript checking.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I hopped along the route today,
Found an attachment tucked away,
Types now tidy, no ignores to hide,
Forward we hop — with type-safe pride! 📎

🚥 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 describes the main change: adding the missing AttachmentView route to the InsideStack parameter list types to resolve TypeScript mismatches.
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.


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.

@Rohit3523
Copy link
Copy Markdown
Member

Rohit3523 commented Jan 10, 2026

I am unable to see that @ts-ignore has been removed, as mentioned in the PR description

Remove the need for @ts-ignore when navigating to AttachmentView

@divyanshu-patil
Copy link
Copy Markdown
Author

I am unable to see that you have removed @ts-ignore as mentioned in PR description

Remove the need for @ts-ignore when navigating to AttachmentView

@Rohit3523
my bad
updated the commit, you can see now

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