Skip to content

regression(apps): notifier accessor undefined in the Reader implementation - #41738

Merged
dionisio-bot[bot] merged 1 commit into
developfrom
regression/notifier-accessor-undefined
Aug 12, 2026
Merged

regression(apps): notifier accessor undefined in the Reader implementation#41738
dionisio-bot[bot] merged 1 commit into
developfrom
regression/notifier-accessor-undefined

Conversation

@d-gubert

@d-gubert d-gubert commented Aug 10, 2026

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

Introduced in #41377

The way to instantiate the reader changed, causing an ordering issue.

Issue(s)

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Bug Fixes
    • Improved notification initialization so notification-related functionality is available reliably when needed.
    • Ensured notification and settings access remain consistent across supported access paths.
    • Fixed notification delivery through the application bridge.

@dionisio-bot

dionisio-bot Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Aug 10, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: a39df10

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

AppAccessors now initializes Notifier lazily through getNotifier(). New tests validate accessor availability, shared instances, settings readers, and notifier bridge traffic.

Changes

Accessor notifier lifecycle

Layer / File(s) Summary
Lazy notifier resolution
packages/apps/base-runtime/src/lib/accessors/mod.ts
AppAccessors no longer constructs Notifier in the constructor. getNotifier() now returns and caches an INotifier instance.
Accessor integrity and notifier regression tests
packages/apps/base-runtime/src/lib/accessors/tests/accessorSurfaceIntegrity.test.ts
Reflective tests verify populated accessors, shared notifier and settings-reader instances, and matching notifier bridge traffic through read and modify paths.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested labels: type: bug

Suggested reviewers: ggazzo, sampaiodiego, scuciatto

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the notifier accessor regression in the Reader implementation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • 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.

@d-gubert d-gubert changed the title fix(apps): notifier accessor undefined in the Reader implementation regression(apps): notifier accessor undefined in the Reader implementation Aug 10, 2026
@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.71%. Comparing base (3b5213e) to head (a39df10).
⚠️ Report is 12 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #41738      +/-   ##
===========================================
+ Coverage    68.67%   68.71%   +0.04%     
===========================================
  Files         4166     4166              
  Lines       159384   159384              
  Branches     28315    28280      -35     
===========================================
+ Hits        109458   109523      +65     
+ Misses       44763    44701      -62     
+ Partials      5163     5160       -3     
Flag Coverage Δ
e2e 58.92% <ø> (+0.02%) ⬆️
e2e-api 45.99% <ø> (+0.26%) ⬆️
unit 70.58% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@d-gubert
d-gubert marked this pull request as ready for review August 10, 2026 19:36
@d-gubert
d-gubert requested a review from a team as a code owner August 10, 2026 19:36

@coderabbitai coderabbitai 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.

🧹 Nitpick comments (1)
packages/apps/base-runtime/src/lib/accessors/mod.ts (1)

105-106: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove the new implementation comments.

The coding guidelines prohibit code comments in implementation files. The getReader() and getNotifier() calls show the initialization order.

Proposed change
-		// `getReader()` bakes the notifier into the Reader, so the notifier has to be
-		// resolvable before this line runs -- `getNotifier()` creates it on demand.
 		this.http = new Http(this.getReader(), this.getPersistence(), this.httpExtend, this.getSenderFn());

As per coding guidelines, “Avoid code comments in the implementation.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/apps/base-runtime/src/lib/accessors/mod.ts` around lines 105 - 106,
Remove the implementation comment immediately above the getReader() and
getNotifier() initialization calls, leaving the existing calls and
initialization order unchanged.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@packages/apps/base-runtime/src/lib/accessors/mod.ts`:
- Around line 105-106: Remove the implementation comment immediately above the
getReader() and getNotifier() initialization calls, leaving the existing calls
and initialization order unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9ac8dce4-5c99-4ec4-97e7-91d98b39467a

📥 Commits

Reviewing files that changed from the base of the PR and between 3b5213e and a39df10.

📒 Files selected for processing (2)
  • packages/apps/base-runtime/src/lib/accessors/mod.ts
  • packages/apps/base-runtime/src/lib/accessors/tests/accessorSurfaceIntegrity.test.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: Hacktron Security Check
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • packages/apps/base-runtime/src/lib/accessors/mod.ts
  • packages/apps/base-runtime/src/lib/accessors/tests/accessorSurfaceIntegrity.test.ts
packages/**

📄 CodeRabbit inference engine (CLAUDE.md)

Shared libraries belong in packages/, while other services belong in apps/ and ee/.

Files:

  • packages/apps/base-runtime/src/lib/accessors/mod.ts
  • packages/apps/base-runtime/src/lib/accessors/tests/accessorSurfaceIntegrity.test.ts
🧠 Learnings (3)
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In the Rocket.Chat repository, do not reference Biome lint rules in code review feedback. Biome is not used even if biome.json exists; only reference Biome rules if there is explicit, project-wide usage documented. For TypeScript files, review lint implications without Biome guidance unless the project enables Biome rules.

Applied to files:

  • packages/apps/base-runtime/src/lib/accessors/mod.ts
  • packages/apps/base-runtime/src/lib/accessors/tests/accessorSurfaceIntegrity.test.ts
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In this repository (RocketChat/Rocket.Chat), Biome lint rules are not used even if a biome.json exists. When reviewing TypeScript files (e.g., packages/ui-voip/src/providers/useMediaSession.ts), ensure lint suggestions do not reference Biome-specific rules. Rely on general ESLint/TypeScript lint rules and project conventions instead.

Applied to files:

  • packages/apps/base-runtime/src/lib/accessors/mod.ts
  • packages/apps/base-runtime/src/lib/accessors/tests/accessorSurfaceIntegrity.test.ts
📚 Learning: 2026-05-06T12:21:44.083Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 40256
File: apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx:121-149
Timestamp: 2026-05-06T12:21:44.083Z
Learning: Field wrappers in rocket.chat/fuselage-forms (Field, FieldLabel, FieldRow, FieldError, FieldHint) auto-create htmlFor/id associations, aria-describedby, and role="alert" for errors. Do not manually set htmlFor, id, aria-describedby, or role attributes when using these wrappers. This automatic wiring does not apply to plain rocket.chat/fuselage components, which require explicit ID wiring per the accessibility docs. In code reviews, prefer using fuselage-forms wrappers for form fields and verify there is no unnecessary manual ID/aria wiring in files that use these wrappers. If a component uses plain fuselage components, ensure proper id wiring as per docs.

Applied to files:

  • packages/apps/base-runtime/src/lib/accessors/mod.ts
  • packages/apps/base-runtime/src/lib/accessors/tests/accessorSurfaceIntegrity.test.ts
🔇 Additional comments (2)
packages/apps/base-runtime/src/lib/accessors/mod.ts (1)

365-370: LGTM!

packages/apps/base-runtime/src/lib/accessors/tests/accessorSurfaceIntegrity.test.ts (1)

1-197: LGTM!

@cubic-dev-ai cubic-dev-ai 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 issues found across 2 files

Re-trigger cubic

@d-gubert d-gubert added this to the 8.8.0 milestone Aug 11, 2026
@d-gubert d-gubert added the stat: QA assured Means it has been tested and approved by a company insider label Aug 12, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Aug 12, 2026
@dionisio-bot
dionisio-bot Bot added this pull request to the merge queue Aug 12, 2026
Merged via the queue into develop with commit cbf3f1d Aug 12, 2026
99 of 101 checks passed
@dionisio-bot
dionisio-bot Bot deleted the regression/notifier-accessor-undefined branch August 12, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge type: bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants