Skip to content

regression: lock screen no longer appears full screen#7118

Open
Rohit3523 wants to merge 19 commits intodevelopfrom
modal-container-style
Open

regression: lock screen no longer appears full screen#7118
Rohit3523 wants to merge 19 commits intodevelopfrom
modal-container-style

Conversation

@Rohit3523
Copy link
Copy Markdown
Member

@Rohit3523 Rohit3523 commented Apr 9, 2026

Proposed changes

Restores full screen layout by removing centering styles, justifyContent and alignItems from the container, allowing the lock screen to occupy the full viewport as intended.

Regression introduced in #7101

Issue(s)

https://rocketchat.atlassian.net/browse/CORE-2093

How to test or reproduce

Screenshots

Before After
Screenshot 2026-04-10 at 1 16 40 AM Screenshot 2026-04-10 at 1 16 59 AM

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

Summary by CodeRabbit

  • Style

    • Adjusted content positioning in passcode and locked-screen modals by removing center alignment so elements follow default layout.
  • Tests

    • Added unit and snapshot tests covering passcode states, biometry presence, and view snapshots; added test IDs to passcode keys and biometry button to support testing.
  • Chores

    • Added Storybook stories for passcode, change-passcode, and screen-locked view variants.
    • Added a test-environment mock for the gesture-handler root view.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 9, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Removed centering from two auth view containers; added Storybook stories and snapshot tests for ChangePasscodeView and ScreenLockedView; added Storybook stories and unit tests for Passcode/Base; added testIDs to passcode buttons; and added a jest mock for react-native-gesture-handler.

Changes

Cohort / File(s) Summary
Layout Styling Updates
app/views/ChangePasscodeView.tsx, app/views/ScreenLockedView.tsx
Removed justifyContent: 'center' and alignItems: 'center' from styles.container, leaving flex: 1, changing container alignment/full-screen presentation.
Passcode Base — Stories & Tests
app/containers/Passcode/Base/Base.stories.tsx, app/containers/Passcode/Base/Base.test.tsx
Added Storybook stories for Passcode/Base (choose/confirm/enter, subtitle, biometry variants) and unit tests asserting rendering, ref methods, biometry button, keypad/backspace presence, plus snapshot generation from stories.
Passcode Button Test IDs
app/containers/Passcode/Base/Button.tsx, app/containers/Passcode/Base/index.tsx
Added optional testID?: string to IPasscodeButton, forwarded testID to Touch, and assigned testIDs: passcode-button-0..passcode-button-9, passcode-button-backspace, biometry-button.
View Stories & Snapshot Tests
app/views/ChangePasscodeView.stories.tsx, app/views/ChangePasscodeView.test.tsx, app/views/ScreenLockedView.stories.tsx, app/views/ScreenLockedView.test.tsx
Added Storybook stories for ChangePasscodeView and ScreenLockedView (force/biometry/close variations) and snapshot test files that generate snapshots from those stories.
Jest Gesture-Handler Mock
jest.setup.js
Added a Jest module mock for react-native-gesture-handler that preserves actual exports but replaces GestureHandlerRootView with a forwardRef View wrapper and stubs gestureHandlerRootHOC.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes out-of-scope changes: multiple Storybook story files, test files with snapshot generation, testID additions for testing, and Jest mocking setup unrelated to fixing the full-screen regression. Remove testing infrastructure (story and test files), testID additions, and jest.setup.js changes; keep only the style changes to ChangePasscodeView.tsx and ScreenLockedView.tsx.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the main regression being fixed—removing centering styles to restore full-screen layout for the lock screen.
Linked Issues check ✅ Passed The PR restores full-screen layout by removing centering styles from ChangePasscodeView and ScreenLockedView containers, addressing the regression described in the linked issue.
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.

Copy link
Copy Markdown
Member

@diegolmello diegolmello left a comment

Choose a reason for hiding this comment

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

Missing the commit that introduced the regression.
Can you also take the opportunity and write unit tests and stories?
That would prevent us from introducing regressions like this again.
We should always do that, btw.

@Rohit3523 Rohit3523 had a problem deploying to official_android_build April 9, 2026 20:16 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_ios_build April 9, 2026 20:16 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_android_build April 9, 2026 20:16 — with GitHub Actions Error
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/containers/Passcode/Base/Base.stories.tsx`:
- Around line 11-14: PasscodeBase currently uses an untyped rest parameter ({
...props }) and an implicit return type; update the component signature to
declare an explicit prop type (e.g., a Props interface or FC<Props>) and an
explicit return type (React.ReactElement or JSX.Element) so it conforms to
strict TypeScript. Locate the PasscodeBase definition and replace the untyped
parameter with the proper Props type that extends/reflects the props accepted by
Base (including any onEndProcess override if needed) and annotate the function
return type; ensure imports/types like IBase and TYPE.CHOOSE remain unchanged
and the ref usage stays intact.

In `@app/containers/Passcode/Base/Base.test.tsx`:
- Around line 44-50: The test for biometry currently only asserts the existence
of the query function; update it to actually query for the rendered button when
rendering <TestBase type={TYPE.ENTER} ... showBiometry onBiometryPress={...}> —
either call UNSAFE_getByType(Button) and assert that result is defined/truthy,
or (preferably) add and query a testID/accessibilityLabel on the biometry button
in the component and use getByTestId/getByA11yLabel to assert the button is
present; ensure you reference TestBase, TYPE.ENTER, showBiometry,
onBiometryPress and UNSAFE_getByType (or the chosen query) in the updated
assertion.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b84ed20f-33ba-4c50-9f08-15797e85c68c

📥 Commits

Reviewing files that changed from the base of the PR and between 59f925b and 9c72bee.

⛔ Files ignored due to path filters (1)
  • app/containers/Passcode/Base/__snapshots__/Base.test.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (2)
  • app/containers/Passcode/Base/Base.stories.tsx
  • app/containers/Passcode/Base/Base.test.tsx
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: format
  • GitHub Check: ESLint and Test / run-eslint-and-test
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{js,jsx,ts,tsx,json}

📄 CodeRabbit inference engine (CLAUDE.md)

Configure Prettier with tabs, single quotes, 130 character width, no trailing commas, arrow parens avoid, and bracket same line

Files:

  • app/containers/Passcode/Base/Base.test.tsx
  • app/containers/Passcode/Base/Base.stories.tsx
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Use ESLint with @rocket.chat/eslint-config base configuration including React, React Native, TypeScript, and Jest plugins

Files:

  • app/containers/Passcode/Base/Base.test.tsx
  • app/containers/Passcode/Base/Base.stories.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Use TypeScript with strict mode enabled and configure baseUrl to app/ for import resolution

**/*.{ts,tsx}: Use TypeScript for type safety; add explicit type annotations to function parameters and return types
Prefer interfaces over type aliases for defining object shapes in TypeScript
Use enums for sets of related constants rather than magic strings or numbers

Files:

  • app/containers/Passcode/Base/Base.test.tsx
  • app/containers/Passcode/Base/Base.stories.tsx
app/containers/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Place reusable UI components in app/containers/ directory

Files:

  • app/containers/Passcode/Base/Base.test.tsx
  • app/containers/Passcode/Base/Base.stories.tsx
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{js,ts,jsx,tsx}: Use descriptive names for functions, variables, and classes that clearly convey their purpose
Write comments that explain the 'why' behind code decisions, not the 'what'
Keep functions small and focused on a single responsibility
Use const by default, let when reassignment is needed, and avoid var
Prefer async/await over .then() chains for handling asynchronous operations
Use explicit error handling with try/catch blocks for async operations
Avoid deeply nested code; refactor complex logic into helper functions

Files:

  • app/containers/Passcode/Base/Base.test.tsx
  • app/containers/Passcode/Base/Base.stories.tsx
🧠 Learnings (5)
📚 Learning: 2026-04-07T17:49:17.538Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.ReactNative PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-07T17:49:17.538Z
Learning: Applies to app/AppContainer.tsx : Implement root navigation container logic in app/AppContainer.tsx to switch between authentication states

Applied to files:

  • app/containers/Passcode/Base/Base.test.tsx
  • app/containers/Passcode/Base/Base.stories.tsx
📚 Learning: 2026-03-10T15:21:45.098Z
Learnt from: Rohit3523
Repo: RocketChat/Rocket.Chat.ReactNative PR: 7046
File: app/containers/InAppNotification/NotifierComponent.stories.tsx:46-75
Timestamp: 2026-03-10T15:21:45.098Z
Learning: In `app/containers/InAppNotification/NotifierComponent.tsx` (React Native, Rocket.Chat), `NotifierComponent` is exported as a Redux-connected component via `connect(mapStateToProps)`. The `isMasterDetail` prop is automatically injected from `state.app.isMasterDetail` and does not need to be passed explicitly at call sites or in Storybook stories that use the default (connected) export.

Applied to files:

  • app/containers/Passcode/Base/Base.stories.tsx
📚 Learning: 2026-04-07T17:49:17.538Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.ReactNative PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-07T17:49:17.538Z
Learning: Applies to index.js : Register app entry point in index.js with conditional Storybook loading

Applied to files:

  • app/containers/Passcode/Base/Base.stories.tsx
📚 Learning: 2026-04-07T17:49:17.538Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.ReactNative PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-07T17:49:17.538Z
Learning: Applies to app/stacks/**/*.{ts,tsx} : Use React Navigation 7 for navigation with stacks for InsideStack (authenticated), OutsideStack (login/register), MasterDetailStack (tablets), and ShareExtensionStack

Applied to files:

  • app/containers/Passcode/Base/Base.stories.tsx
📚 Learning: 2026-03-15T13:55:42.038Z
Learnt from: Rohit3523
Repo: RocketChat/Rocket.Chat.ReactNative PR: 6911
File: app/containers/markdown/Markdown.stories.tsx:104-104
Timestamp: 2026-03-15T13:55:42.038Z
Learning: In Rocket.Chat React Native, the markdown parser requires a space between the underscore wrapping italic text and a mention sigil (_ mention _ instead of _mention_). Ensure stories and tests that include italic-wrapped mentions follow this form to guarantee proper parsing. Specifically, for files like app/containers/markdown/Markdown.stories.tsx, and any test/content strings that exercise italic-mentions, use the pattern _ mention _ (with spaces) to prevent the mention from being treated as plain text. Validate any test strings or story content accordingly.

Applied to files:

  • app/containers/Passcode/Base/Base.stories.tsx
🔇 Additional comments (3)
app/containers/Passcode/Base/Base.stories.tsx (1)

16-56: Good story coverage across key passcode states.

These variants cover the main state combinations (CHOOSE, CONFIRM, ENTER, subtitle, biometry), which is useful for snapshot and visual regression confidence.

app/containers/Passcode/Base/Base.test.tsx (2)

53-53: Nice addition: snapshot generation from stories is wired correctly.

generateSnapshots(stories) keeps stories and regression tests aligned.


11-14: Add explicit type annotations to TestBase, but use Partial for the props type.

TestBase receives untyped props. The function needs explicit parameter and return types per the coding guidelines, but the suggested fix requires correction: React.ComponentProps<typeof Base> includes required props already hardcoded inside the function (like type and onEndProcess). Since TestBase is called with only partial props (e.g., <TestBase title='...' />), use Partial:

Corrected fix
+type TestBaseProps = Partial<React.ComponentProps<typeof Base>>;
+
-const TestBase = ({ ...props }) => {
+const TestBase = (props: TestBaseProps): React.JSX.Element => {
 	const ref = createRef<IBase>();
 	return <Base ref={ref} type={TYPE.ENTER} title='Test Title' onEndProcess={onEndProcessMock} {...props} />;
 };
			> Likely an incorrect or invalid review comment.

@Rohit3523 Rohit3523 requested a review from diegolmello April 9, 2026 20:42
@Rohit3523 Rohit3523 temporarily deployed to experimental_android_build April 9, 2026 20:46 — with GitHub Actions Inactive
@Rohit3523 Rohit3523 had a problem deploying to official_android_build April 9, 2026 20:46 — with GitHub Actions Error
@Rohit3523 Rohit3523 had a problem deploying to experimental_ios_build April 9, 2026 20:46 — with GitHub Actions Error
Copy link
Copy Markdown
Member

@diegolmello diegolmello left a comment

Choose a reason for hiding this comment

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

You added tests for Base and that's nice, but if we had those tests before this regression, we would still land the regression without noticing.

@Rohit3523 Rohit3523 had a problem deploying to upload_experimental_android April 9, 2026 21:29 — with GitHub Actions Error
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

Android Build Available

Rocket.Chat Experimental 4.72.0.108517

Internal App Sharing: https://play.google.com/apps/test/RQVpXLytHNc/ahAO29uNSCGYsC0IBYI27s098MyA6qY4mN8Qe-VdauX-jPtY2IWqwQm67H0di3qH3EhKnZ_17V-bJHEQSAk2GB8khJ

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (4)
app/views/ChangePasscodeView.stories.tsx (2)

24-25: Make the inline comment explain intent, not action.

The current comment describes what the code does. Prefer documenting why this emit is required for the story state setup.

As per coding guidelines: **/*.{js,ts,jsx,tsx}: "Write comments that explain the 'why' behind code decisions, not the 'what'".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/views/ChangePasscodeView.stories.tsx` around lines 24 - 25, Replace the
inline comment that states what is happening with a brief explanation of why the
emit is needed for this story: explain that
EventEmitter.emit(CHANGE_PASSCODE_EMITTER, ...) is used to preconfigure the
component/storybook state so the ChangePasscodeView renders in the desired
dialog/modal state for the story (i.e., to simulate the external event that
would normally open the view), mentioning EventEmitter.emit and
CHANGE_PASSCODE_EMITTER so reviewers can find the location.

22-23: Add explicit return types for story functions.

Line 22 and Lines 39-41 currently rely on inference; please annotate return types for consistency with the repo TypeScript rule.

Diff suggestion
-const StoryWrapper = ({ force = false }: IStoryWrapperProps) => {
+const StoryWrapper = ({ force = false }: IStoryWrapperProps): React.JSX.Element => {
@@
-export const Default = () => <StoryWrapper />;
+export const Default = (): React.JSX.Element => <StoryWrapper />;
 
-export const Forced = () => <StoryWrapper force />;
+export const Forced = (): React.JSX.Element => <StoryWrapper force />;

As per coding guidelines: **/*.{ts,tsx}: "Use TypeScript for type safety; add explicit type annotations to function parameters and return types".

Also applies to: 39-41

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/views/ChangePasscodeView.stories.tsx` around lines 22 - 23, Annotate the
story functions with explicit TypeScript return types: change StoryWrapper to
include a return annotation (e.g. const StoryWrapper = ({ force = false }:
IStoryWrapperProps): JSX.Element => { ... }) and add the same explicit return
type (JSX.Element or React.ReactElement) to the other story functions referenced
around lines 39-41 so all story functions have explicit return types per repo
lint rules.
app/views/ScreenLockedView.stories.tsx (2)

25-25: Adjust the comment to capture rationale.

This comment currently states what happens; prefer a short note on why the emitter setup is needed for these stories.

As per coding guidelines: **/*.{js,ts,jsx,tsx}: "Write comments that explain the 'why' behind code decisions, not the 'what'".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/views/ScreenLockedView.stories.tsx` at line 25, The comment on the
emitter line in ScreenLockedView.stories.tsx currently restates the action;
replace it with a brief rationale explaining why the event emitter is set up for
these stories (e.g., to simulate external lock events and ensure the
ScreenLockedView renders and behaves as it would in-app), updating the comment
near the emitter call in the ScreenLockedView stories so future readers
understand the purpose of the setup rather than just what it does.

23-23: Add explicit return types to StoryWrapper and story exports.

Line 23 and Lines 41-47 should use explicit return types to align with the TypeScript rule configured for the repo.

Diff suggestion
-const StoryWrapper = ({ hasBiometry = false, force = false }: IStoryWrapperProps) => {
+const StoryWrapper = ({ hasBiometry = false, force = false }: IStoryWrapperProps): React.JSX.Element => {
@@
-export const Default = () => <StoryWrapper />;
+export const Default = (): React.JSX.Element => <StoryWrapper />;
 
-export const WithBiometry = () => <StoryWrapper hasBiometry />;
+export const WithBiometry = (): React.JSX.Element => <StoryWrapper hasBiometry />;
 
-export const WithCloseButton = () => <StoryWrapper force />;
+export const WithCloseButton = (): React.JSX.Element => <StoryWrapper force />;
 
-export const WithBiometryAndClose = () => <StoryWrapper hasBiometry force />;
+export const WithBiometryAndClose = (): React.JSX.Element => <StoryWrapper hasBiometry force />;

As per coding guidelines: **/*.{ts,tsx}: "Use TypeScript for type safety; add explicit type annotations to function parameters and return types".

Also applies to: 41-47

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/views/ScreenLockedView.stories.tsx` at line 23, Add explicit return
types: annotate the StoryWrapper component with an explicit return type (e.g., :
JSX.Element or React.ReactElement) and also add explicit return types to each
named story export function (the exported story functions defined below
StoryWrapper) so they align with the repo TypeScript rule; update the signatures
for StoryWrapper and each exported story (the story functions/consts around
lines 41-47) to include the chosen return type and ensure imports (React) remain
available.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@jest.setup.js`:
- Around line 49-55: The mock for react-native-gesture-handler has Prettier
violations: break the JSX so children are on their own line in the
GestureHandlerRootView return (i.e., <View ref={ref}
{...props}>{children}</View> -> place children on its own line) and remove
unnecessary arrow-function parentheses from gestureHandlerRootHOC; change
gestureHandlerRootHOC: (Component) => Component to gestureHandlerRootHOC:
Component => Component to satisfy "arrow parens avoid". Update these spots
(symbols: GestureHandlerRootView, View, ref, props, children,
gestureHandlerRootHOC) and ensure the file follows the repo Prettier settings
(tabs, single quotes, 130 char width, no trailing commas, bracketSameLine).

---

Nitpick comments:
In `@app/views/ChangePasscodeView.stories.tsx`:
- Around line 24-25: Replace the inline comment that states what is happening
with a brief explanation of why the emit is needed for this story: explain that
EventEmitter.emit(CHANGE_PASSCODE_EMITTER, ...) is used to preconfigure the
component/storybook state so the ChangePasscodeView renders in the desired
dialog/modal state for the story (i.e., to simulate the external event that
would normally open the view), mentioning EventEmitter.emit and
CHANGE_PASSCODE_EMITTER so reviewers can find the location.
- Around line 22-23: Annotate the story functions with explicit TypeScript
return types: change StoryWrapper to include a return annotation (e.g. const
StoryWrapper = ({ force = false }: IStoryWrapperProps): JSX.Element => { ... })
and add the same explicit return type (JSX.Element or React.ReactElement) to the
other story functions referenced around lines 39-41 so all story functions have
explicit return types per repo lint rules.

In `@app/views/ScreenLockedView.stories.tsx`:
- Line 25: The comment on the emitter line in ScreenLockedView.stories.tsx
currently restates the action; replace it with a brief rationale explaining why
the event emitter is set up for these stories (e.g., to simulate external lock
events and ensure the ScreenLockedView renders and behaves as it would in-app),
updating the comment near the emitter call in the ScreenLockedView stories so
future readers understand the purpose of the setup rather than just what it
does.
- Line 23: Add explicit return types: annotate the StoryWrapper component with
an explicit return type (e.g., : JSX.Element or React.ReactElement) and also add
explicit return types to each named story export function (the exported story
functions defined below StoryWrapper) so they align with the repo TypeScript
rule; update the signatures for StoryWrapper and each exported story (the story
functions/consts around lines 41-47) to include the chosen return type and
ensure imports (React) remain available.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b693f16d-f97a-46f3-874e-7e2dbf9db611

📥 Commits

Reviewing files that changed from the base of the PR and between fb4389e and a73fbe4.

⛔ Files ignored due to path filters (2)
  • app/views/__snapshots__/ChangePasscodeView.test.tsx.snap is excluded by !**/*.snap
  • app/views/__snapshots__/ScreenLockedView.test.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (5)
  • app/views/ChangePasscodeView.stories.tsx
  • app/views/ChangePasscodeView.test.tsx
  • app/views/ScreenLockedView.stories.tsx
  • app/views/ScreenLockedView.test.tsx
  • jest.setup.js
✅ Files skipped from review due to trivial changes (2)
  • app/views/ScreenLockedView.test.tsx
  • app/views/ChangePasscodeView.test.tsx
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: ESLint and Test / run-eslint-and-test
  • GitHub Check: format
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{js,jsx,ts,tsx,json}

📄 CodeRabbit inference engine (CLAUDE.md)

Configure Prettier with tabs, single quotes, 130 character width, no trailing commas, arrow parens avoid, and bracket same line

Files:

  • jest.setup.js
  • app/views/ChangePasscodeView.stories.tsx
  • app/views/ScreenLockedView.stories.tsx
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Use ESLint with @rocket.chat/eslint-config base configuration including React, React Native, TypeScript, and Jest plugins

Files:

  • jest.setup.js
  • app/views/ChangePasscodeView.stories.tsx
  • app/views/ScreenLockedView.stories.tsx
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{js,ts,jsx,tsx}: Use descriptive names for functions, variables, and classes that clearly convey their purpose
Write comments that explain the 'why' behind code decisions, not the 'what'
Keep functions small and focused on a single responsibility
Use const by default, let when reassignment is needed, and avoid var
Prefer async/await over .then() chains for handling asynchronous operations
Use explicit error handling with try/catch blocks for async operations
Avoid deeply nested code; refactor complex logic into helper functions

Files:

  • jest.setup.js
  • app/views/ChangePasscodeView.stories.tsx
  • app/views/ScreenLockedView.stories.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Use TypeScript with strict mode enabled and configure baseUrl to app/ for import resolution

**/*.{ts,tsx}: Use TypeScript for type safety; add explicit type annotations to function parameters and return types
Prefer interfaces over type aliases for defining object shapes in TypeScript
Use enums for sets of related constants rather than magic strings or numbers

Files:

  • app/views/ChangePasscodeView.stories.tsx
  • app/views/ScreenLockedView.stories.tsx
app/views/**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Place screen components in app/views/ directory

Files:

  • app/views/ChangePasscodeView.stories.tsx
  • app/views/ScreenLockedView.stories.tsx
🧠 Learnings (8)
📚 Learning: 2026-03-30T15:49:26.708Z
Learnt from: Rohit3523
Repo: RocketChat/Rocket.Chat.ReactNative PR: 6875
File: app/containers/RoomItem/Actions.tsx:12-12
Timestamp: 2026-03-30T15:49:26.708Z
Learning: In Rocket.Chat.ReactNative, do not rely on `react-native-worklets` v0.6.1 exporting a built-in Jest mock (e.g., `react-native-worklets/lib/module/mock` does not exist for this version). Instead, add the Jest manual mock in your repo’s `jest.setup.js`/`jest.setup.ts`, mocking `react-native-worklets` to provide `scheduleOnRN: jest.fn((fn, ...args) => fn(...args))`. This ensures Jest can import the module and that `scheduleOnRN` executes the passed function during tests.

Applied to files:

  • jest.setup.js
📚 Learning: 2026-04-07T17:49:17.538Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.ReactNative PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-07T17:49:17.538Z
Learning: Support React 19, React Native 0.79, and Expo 53

Applied to files:

  • jest.setup.js
📚 Learning: 2026-04-07T17:49:17.538Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.ReactNative PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-07T17:49:17.538Z
Learning: Applies to index.js : Register app entry point in index.js with conditional Storybook loading

Applied to files:

  • app/views/ChangePasscodeView.stories.tsx
  • app/views/ScreenLockedView.stories.tsx
📚 Learning: 2026-03-10T15:21:45.098Z
Learnt from: Rohit3523
Repo: RocketChat/Rocket.Chat.ReactNative PR: 7046
File: app/containers/InAppNotification/NotifierComponent.stories.tsx:46-75
Timestamp: 2026-03-10T15:21:45.098Z
Learning: In `app/containers/InAppNotification/NotifierComponent.tsx` (React Native, Rocket.Chat), `NotifierComponent` is exported as a Redux-connected component via `connect(mapStateToProps)`. The `isMasterDetail` prop is automatically injected from `state.app.isMasterDetail` and does not need to be passed explicitly at call sites or in Storybook stories that use the default (connected) export.

Applied to files:

  • app/views/ChangePasscodeView.stories.tsx
  • app/views/ScreenLockedView.stories.tsx
📚 Learning: 2026-04-07T17:49:17.538Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.ReactNative PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-07T17:49:17.538Z
Learning: Applies to app/AppContainer.tsx : Implement root navigation container logic in app/AppContainer.tsx to switch between authentication states

Applied to files:

  • app/views/ChangePasscodeView.stories.tsx
  • app/views/ScreenLockedView.stories.tsx
📚 Learning: 2026-04-07T17:49:17.538Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.ReactNative PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-07T17:49:17.538Z
Learning: Applies to app/stacks/**/*.{ts,tsx} : Use React Navigation 7 for navigation with stacks for InsideStack (authenticated), OutsideStack (login/register), MasterDetailStack (tablets), and ShareExtensionStack

Applied to files:

  • app/views/ChangePasscodeView.stories.tsx
  • app/views/ScreenLockedView.stories.tsx
📚 Learning: 2026-03-15T13:55:42.038Z
Learnt from: Rohit3523
Repo: RocketChat/Rocket.Chat.ReactNative PR: 6911
File: app/containers/markdown/Markdown.stories.tsx:104-104
Timestamp: 2026-03-15T13:55:42.038Z
Learning: In Rocket.Chat React Native, the markdown parser requires a space between the underscore wrapping italic text and a mention sigil (_ mention _ instead of _mention_). Ensure stories and tests that include italic-wrapped mentions follow this form to guarantee proper parsing. Specifically, for files like app/containers/markdown/Markdown.stories.tsx, and any test/content strings that exercise italic-mentions, use the pattern _ mention _ (with spaces) to prevent the mention from being treated as plain text. Validate any test strings or story content accordingly.

Applied to files:

  • app/views/ChangePasscodeView.stories.tsx
  • app/views/ScreenLockedView.stories.tsx
📚 Learning: 2026-04-07T17:49:17.538Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.ReactNative PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-07T17:49:17.538Z
Learning: Applies to app/views/**/*.{ts,tsx} : Place screen components in app/views/ directory

Applied to files:

  • app/views/ScreenLockedView.stories.tsx
🪛 ESLint
jest.setup.js

[error] 49-49: Replace {children} with ⏎↹↹↹{children}⏎↹↹

(prettier/prettier)


[error] 55-55: Replace (Component) with Component

(prettier/prettier)

🔇 Additional comments (2)
app/views/ChangePasscodeView.stories.tsx (1)

8-12: Fullscreen wrapper setup looks correct.

Using flex: 1 here is aligned with rendering this view as full-screen in Storybook.

app/views/ScreenLockedView.stories.tsx (1)

8-12: Wrapper layout is good for fullscreen behavior.

flex: 1 is appropriate here and matches the regression context around full-viewport rendering.

@Rohit3523 Rohit3523 requested a deployment to approve_e2e_testing April 10, 2026 15:20 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to official_android_build April 10, 2026 15:25 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to experimental_ios_build April 10, 2026 15:25 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to official_ios_build April 10, 2026 15:25 — with GitHub Actions Waiting
@Rohit3523 Rohit3523 requested a deployment to experimental_android_build April 10, 2026 15:25 — with GitHub Actions Waiting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants