Skip to content

regression: archived room links fail to open when user has no subscription#41085

Merged
dionisio-bot[bot] merged 3 commits into
release-8.6.0from
regression/archived-room-link-fails
Jun 26, 2026
Merged

regression: archived room links fail to open when user has no subscription#41085
dionisio-bot[bot] merged 3 commits into
release-8.6.0from
regression/archived-room-link-fails

Conversation

@nazabucciarelli

@nazabucciarelli nazabucciarelli commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Proposed changes (including videos or screenshots)

  • rooms.info API endpoint: Pass checkedArchive property as false to findRoomByIdOrName, avoiding short-circuit when useGoToRoom (apps/meteor/client/views/room/hooks/useGoToRoom.ts) calls useEndpoint('GET', '/v1/rooms.info'); (It previously used useMethod('getRoomById');, change done in chore: migrate DDP callers to REST endpoints (used methods with REST replacement) #40659). This means that the endpoint response will include archived rooms too.
  • Add E2E API tests covering the archived room case for rooms.info.

Issue(s)

CORE-2317 [Regression] Archived room links fail to open from fresh client state

Steps to test or reproduce

  1. Create a public channel, for example #archived-link-repro
  2. Send a message in #general containing #archived-link-repro
  3. Archive #archived-link-repro
  4. Log in as a normal test user in a fresh/incognito browser session
  5. Open #general
  6. Click the #archived-link-repro mention

Further comments

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • rooms.info now returns information for archived rooms when access is allowed.
    • Archived public channels can be retrieved successfully by non-members.
    • Access checks still prevent users from viewing archived private rooms they can’t access.
  • Tests
    • Added end-to-end coverage for archived room behavior in rooms.info.

@dionisio-bot

dionisio-bot Bot commented Jun 25, 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 Jun 25, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 8f2c2a6

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 Jun 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 228bca3b-4389-417a-ad6b-fe63f5f796ab

📥 Commits

Reviewing files that changed from the base of the PR and between e11c7db and 8f2c2a6.

📒 Files selected for processing (2)
  • apps/meteor/app/api/server/v1/rooms.ts
  • apps/meteor/tests/end-to-end/api/rooms.ts
📜 Recent review details
⏰ Context from checks skipped due to timeout. (7)
  • GitHub Check: 🔎 Code Check / TypeScript
  • GitHub Check: 🔎 Code Check / Code Lint
  • GitHub Check: 🔨 Test Unit / Unit Tests
  • GitHub Check: 🔨 Test Storybook / Test Storybook
  • GitHub Check: 📦 Meteor Build (coverage)
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: Hacktron Security Check
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{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:

  • apps/meteor/app/api/server/v1/rooms.ts
  • apps/meteor/tests/end-to-end/api/rooms.ts
🧠 Learnings (5)
📚 Learning: 2026-02-23T17:53:06.802Z
Learnt from: ggazzo
Repo: RocketChat/Rocket.Chat PR: 35995
File: apps/meteor/app/api/server/v1/rooms.ts:1107-1112
Timestamp: 2026-02-23T17:53:06.802Z
Learning: During PR reviews that touch endpoint files under apps/meteor/app/api/server/v1, enforce strict scope: if a PR targets a specific endpoint (e.g., rooms.favorite), do not propose changes to unrelated endpoints (e.g., rooms.invite) unless maintainers explicitly request them. Focus feedback on the touched endpoint's behavior, API surface, and related tests; avoid broad cross-endpoint changes in the same PR unless requested.

Applied to files:

  • apps/meteor/app/api/server/v1/rooms.ts
📚 Learning: 2026-02-24T19:09:01.522Z
Learnt from: ahmed-n-abdeltwab
Repo: RocketChat/Rocket.Chat PR: 38974
File: apps/meteor/app/api/server/v1/im.ts:220-221
Timestamp: 2026-02-24T19:09:01.522Z
Learning: In Rocket.Chat OpenAPI migration PRs for endpoints under apps/meteor/app/api/server/v1, avoid introducing logic changes. Only perform scope-tight changes that preserve behavior; style-only cleanups (e.g., removing inline comments) may be deferred to follow-ups to keep the migration PR focused.

Applied to files:

  • apps/meteor/app/api/server/v1/rooms.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 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:

  • apps/meteor/app/api/server/v1/rooms.ts
  • apps/meteor/tests/end-to-end/api/rooms.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:

  • apps/meteor/app/api/server/v1/rooms.ts
  • apps/meteor/tests/end-to-end/api/rooms.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:

  • apps/meteor/app/api/server/v1/rooms.ts
  • apps/meteor/tests/end-to-end/api/rooms.ts
🔇 Additional comments (2)
apps/meteor/app/api/server/v1/rooms.ts (1)

538-538: LGTM!

apps/meteor/tests/end-to-end/api/rooms.ts (1)

1481-1534: LGTM!


Walkthrough

rooms.info now resolves archived rooms without triggering archived-room validation, while access control remains unchanged. The end-to-end suite adds coverage for archived public room access and archived private room denial.

Changes

rooms.info archived lookup

Layer / File(s) Summary
Room resolution and archived access tests
apps/meteor/app/api/server/v1/rooms.ts, apps/meteor/tests/end-to-end/api/rooms.ts
rooms.info now resolves rooms with checkedArchived: false, and the end-to-end suite verifies archived public room access and archived private room rejection.

Sequence Diagram(s)

None

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

type: bug

Suggested reviewers

  • sampaiodiego
  • ggazzo
🚥 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 accurately describes the archived-room regression fixed by the rooms.info lookup change and added coverage.
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.

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • CORE-2317: Request failed with status code 401

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.

@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (release-8.6.0@e11c7db). Learn more about missing BASE report.

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff                @@
##             release-8.6.0   #41085   +/-   ##
================================================
  Coverage                 ?   70.17%           
================================================
  Files                    ?     3365           
  Lines                    ?   129983           
  Branches                 ?    22587           
================================================
  Hits                     ?    91222           
  Misses                   ?    35439           
  Partials                 ?     3322           
Flag Coverage Δ
e2e 59.33% <ø> (?)
e2e-api 46.28% <ø> (?)
unit 70.16% <ø> (?)

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.

@nazabucciarelli nazabucciarelli changed the title fix: send checkedArchive false param regression: archived room links fail to open when user has no subscription Jun 25, 2026
@nazabucciarelli nazabucciarelli added this to the 8.6.0 milestone Jun 25, 2026
@nazabucciarelli nazabucciarelli marked this pull request as ready for review June 26, 2026 13:53
@nazabucciarelli nazabucciarelli requested a review from a team as a code owner June 26, 2026 13:53

@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

@nazabucciarelli nazabucciarelli added the stat: QA assured Means it has been tested and approved by a company insider label Jun 26, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Jun 26, 2026
@dionisio-bot dionisio-bot Bot merged commit b5e4210 into release-8.6.0 Jun 26, 2026
81 of 83 checks passed
@dionisio-bot dionisio-bot Bot deleted the regression/archived-room-link-fails branch June 26, 2026 16:02
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