Skip to content

fix: show offline users' custom status text and expiration#41087

Merged
dionisio-bot[bot] merged 1 commit into
feat/presence-expiration-uifrom
fix/offline-custom-status-presence
Jun 26, 2026
Merged

fix: show offline users' custom status text and expiration#41087
dionisio-bot[bot] merged 1 commit into
feat/presence-expiration-uifrom
fix/offline-custom-status-presence

Conversation

@ricardogarim

@ricardogarim ricardogarim commented Jun 26, 2026

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

With the new presence engine, a custom status (text + expiration) should stay visible after a user goes offline — e.g. "On vacation until next week". The engine persists it and the live stream already broadcasts it, but it was dropped on the REST cold-load (page reload / first card open), so offline users showed as a plain "Offline" with no message.

Root cause: GET /api/v1/users.presence?ids=<uid> used Users.findNotOfflineByIds, which filtered status ∈ { online, away, busy } and excluded every offline user. The client then fell back to { status: OFFLINE } with no statusText /statusExpiresAt. That filter is a legacy optimization that is wrong now that offline users can keep a displayable custom status.

Fix: a dedicated Users.findByIdsForPresence backs the ids branch, returning online/away/busy users plus offline users that still carry a custom status (statusText or statusExpiresAt). Silently-offline users are still omitted and inferred offline by the client fallback, keeping the payload optimization. The old findNotOfflineByIds (only used here) is removed; bulk/incremental paths unchanged.

Issue(s)

Steps to test or reproduce

  1. As User A, set a custom status with a message and a future expiration (Away, "On vacation until next week", expires in 7 days).
  2. Disconnect User A (go offline).
  3. As User B, open User A's card/info, or reload the page with it open.

Expected: "Offline - On vacation until next week" + expiration, until it expires.
Before: plain "Offline", no text/expiration.

Further comments

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Updated presence lookups by user ID to include offline users who have a custom status message and/or a status expiry time.
    • Prevented disconnect-triggered offline transitions from clearing an existing manual custom status, preserving consistency in presence data.
  • Tests
    • Added end-to-end coverage for users.presence to verify custom status fields are returned for offline users.
    • Extended presence engine tests to confirm manual offline status text isn’t cleared on disconnect.

@dionisio-bot

dionisio-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

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

@coderabbitai

coderabbitai Bot commented Jun 26, 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: c4d72eb6-8a75-46e6-9e88-1f271fd7a054

📥 Commits

Reviewing files that changed from the base of the PR and between c6bd374 and 6a4ad7c.

📒 Files selected for processing (5)
  • apps/meteor/app/api/server/v1/users.ts
  • apps/meteor/tests/end-to-end/api/users.ts
  • ee/packages/presence/src/lib/presenceEngine.spec.ts
  • packages/model-typings/src/models/IUsersModel.ts
  • packages/models/src/models/Users.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • apps/meteor/app/api/server/v1/users.ts
  • apps/meteor/tests/end-to-end/api/users.ts
  • ee/packages/presence/src/lib/presenceEngine.spec.ts
📜 Recent review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: Hacktron Security Check
  • GitHub Check: CodeQL-Build
⚠️ CI failures not shown inline (2)

GitHub Check: Dionisio QA: Some checks did not pass

Conclusion: failure

View job details

**Conclusion:** failure
### Steps
- ✅ **No merge conflicts**
- ❌ **QA assured** — This PR is missing the 'stat: QA assured' label
- ✅ **Mergeable**
- ✅ **Has milestone or project**
- ✅ **Valid PR title**
- ✅ **Correct target version**

GitHub Check: Dionisio QA: Some checks did not pass

Conclusion: failure

View job details

**Conclusion:** failure
### Steps
- ✅ **No merge conflicts**
- ❌ **QA assured** — This PR is missing the 'stat: QA assured' label
- ✅ **Mergeable**
- ✅ **Has milestone or project**
- ✅ **Valid PR title**
- ✅ **Correct target version**
🧰 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:

  • packages/model-typings/src/models/IUsersModel.ts
  • packages/models/src/models/Users.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/model-typings/src/models/IUsersModel.ts
  • packages/models/src/models/Users.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/model-typings/src/models/IUsersModel.ts
  • packages/models/src/models/Users.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/model-typings/src/models/IUsersModel.ts
  • packages/models/src/models/Users.ts
🔇 Additional comments (2)
packages/model-typings/src/models/IUsersModel.ts (1)

384-384: LGTM!

packages/models/src/models/Users.ts (1)

2491-2500: LGTM!


Walkthrough

The PR updates presence lookup so users.presence returns users with custom offline status data, and adjusts model and presence-engine tests to preserve that data.

Changes

Presence custom status

Layer / File(s) Summary
Query contract and filter
packages/model-typings/src/models/IUsersModel.ts, packages/models/src/models/Users.ts
findPresenceUsersByIds replaces findNotOfflineByIds, and the query matches users by status, non-empty statusText, or statusExpiresAt.
Offline transition behavior
ee/packages/presence/src/lib/presenceEngine.spec.ts
processPresence keeps OFFLINE transitions from clearing custom status text or expiration data.
API lookup and end-to-end coverage
apps/meteor/app/api/server/v1/users.ts, apps/meteor/tests/end-to-end/api/users.ts
users.presence switches ID lookups to the new model method, and the end-to-end test checks status, statusText, and statusExpiresAt in the response.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested labels

type: bug

Suggested reviewers

  • KevLehman
🚥 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 matches the main change: preserving offline users' custom status text and expiration.
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)
  • PRES-59: 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.

@ricardogarim ricardogarim added this to the 8.6.0 milestone Jun 26, 2026
@ricardogarim ricardogarim changed the title fix: show offline users' custom status text and expiration regression: show offline users' custom status text and expiration Jun 26, 2026
@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.15%. Comparing base (a4a1071) to head (6a4ad7c).
⚠️ Report is 1 commits behind head on feat/presence-expiration-ui.

Additional details and impacted files

Impacted file tree graph

@@                       Coverage Diff                       @@
##           feat/presence-expiration-ui   #41087      +/-   ##
===============================================================
- Coverage                        70.17%   70.15%   -0.02%     
===============================================================
  Files                             3371     3371              
  Lines                           130417   130417              
  Branches                         22593    22591       -2     
===============================================================
- Hits                             91522    91499      -23     
- Misses                           35575    35590      +15     
- Partials                          3320     3328       +8     
Flag Coverage Δ
e2e 59.42% <ø> (-0.05%) ⬇️
e2e-api 46.18% <ø> (-0.03%) ⬇️
unit 70.11% <ø> (-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.

@ricardogarim ricardogarim changed the title regression: show offline users' custom status text and expiration fix: show offline users' custom status text and expiration Jun 26, 2026
@ricardogarim ricardogarim changed the base branch from release-8.6.0 to feat/presence-expiration-ui June 26, 2026 12:49
@ricardogarim ricardogarim force-pushed the fix/offline-custom-status-presence branch from 22598e3 to 636966e Compare June 26, 2026 12:56
@changeset-bot

changeset-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 6a4ad7c

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

@ricardogarim ricardogarim force-pushed the fix/offline-custom-status-presence branch from 636966e to 220bed3 Compare June 26, 2026 12:57
@ricardogarim ricardogarim force-pushed the feat/presence-expiration-ui branch from a98223d to 5bea13b Compare June 26, 2026 13:05
@ricardogarim ricardogarim force-pushed the fix/offline-custom-status-presence branch from 220bed3 to c6bd374 Compare June 26, 2026 13:06
@ricardogarim ricardogarim marked this pull request as ready for review June 26, 2026 14:29
@ricardogarim ricardogarim requested review from a team as code owners June 26, 2026 14:29

@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)
apps/meteor/tests/end-to-end/api/users.ts (1)

1852-1878: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Optional: guarantee cleanup if an assertion fails.

deleteUser(vacationUser) only runs when all assertions pass; an earlier failure leaks the created user into the rest of the suite. Consider tracking the user and deleting it in an after/finally hook.

🤖 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 `@apps/meteor/tests/end-to-end/api/users.ts` around lines 1852 - 1878, The
end-to-end test in users.ts leaks the created vacation user if any assertion
fails because deleteUser(vacationUser) is only reached on success. Update the
test around createUser, login, and users.presence to guarantee cleanup with a
finally block or a scoped after hook so the user is always deleted even when an
expectation throws.
🤖 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 `@apps/meteor/tests/end-to-end/api/users.ts`:
- Around line 1852-1878: The end-to-end test in users.ts leaks the created
vacation user if any assertion fails because deleteUser(vacationUser) is only
reached on success. Update the test around createUser, login, and users.presence
to guarantee cleanup with a finally block or a scoped after hook so the user is
always deleted even when an expectation throws.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0fadee2d-5ec9-4a98-a065-48ec0b63dcb4

📥 Commits

Reviewing files that changed from the base of the PR and between 5bea13b and c6bd374.

📒 Files selected for processing (5)
  • apps/meteor/app/api/server/v1/users.ts
  • apps/meteor/tests/end-to-end/api/users.ts
  • ee/packages/presence/src/lib/presenceEngine.spec.ts
  • packages/model-typings/src/models/IUsersModel.ts
  • packages/models/src/models/Users.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: cubic · AI code reviewer
🧰 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/model-typings/src/models/IUsersModel.ts
  • packages/models/src/models/Users.ts
  • apps/meteor/app/api/server/v1/users.ts
  • ee/packages/presence/src/lib/presenceEngine.spec.ts
  • apps/meteor/tests/end-to-end/api/users.ts
**/*.spec.ts

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

**/*.spec.ts: Use descriptive test names that clearly communicate expected behavior in Playwright tests
Use .spec.ts extension for test files (e.g., login.spec.ts)

Files:

  • ee/packages/presence/src/lib/presenceEngine.spec.ts
🧠 Learnings (10)
📚 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/model-typings/src/models/IUsersModel.ts
  • packages/models/src/models/Users.ts
  • apps/meteor/app/api/server/v1/users.ts
  • ee/packages/presence/src/lib/presenceEngine.spec.ts
  • apps/meteor/tests/end-to-end/api/users.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/model-typings/src/models/IUsersModel.ts
  • packages/models/src/models/Users.ts
  • apps/meteor/app/api/server/v1/users.ts
  • ee/packages/presence/src/lib/presenceEngine.spec.ts
  • apps/meteor/tests/end-to-end/api/users.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/model-typings/src/models/IUsersModel.ts
  • packages/models/src/models/Users.ts
  • apps/meteor/app/api/server/v1/users.ts
  • ee/packages/presence/src/lib/presenceEngine.spec.ts
  • apps/meteor/tests/end-to-end/api/users.ts
📚 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/users.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/users.ts
📚 Learning: 2026-03-15T14:31:25.380Z
Learnt from: amitb0ra
Repo: RocketChat/Rocket.Chat PR: 39647
File: apps/meteor/app/api/server/v1/users.ts:710-757
Timestamp: 2026-03-15T14:31:25.380Z
Learning: Do not flag this type/schema misalignment in the OpenAPI/migration review for apps/meteor/app/api/server/v1/users.ts. The UserCreateParamsPOST type intentionally uses non-optional fields: fields: string and settings?: IUserSettings without an AJV schema entry, carried over from the original rest-typings (PR `#39647`). Treat this as a known pre-existing divergence and document it as a separate follow-up fix; do not block or mark it as a review issue during the migration.

Applied to files:

  • apps/meteor/app/api/server/v1/users.ts
📚 Learning: 2026-03-16T23:33:11.443Z
Learnt from: amitb0ra
Repo: RocketChat/Rocket.Chat PR: 39676
File: apps/meteor/app/api/server/v1/users.ts:862-869
Timestamp: 2026-03-16T23:33:11.443Z
Learning: In rockets OpenAPI/AJV migration reviews for RocketChat/Rocket.Chat, when reviewing migrations that involve apps/meteor/app/api/server/v1/users.ts, do not require or flag a missing query AJV schema for the fields consumed by parseJsonQuery() (i.e., fields, sort, query) as part of this endpoint's migration PR. The addition of global query-param schemas for parseJsonQuery() usage is a cross-cutting concern and out of scope for individual endpoint migrations. Only flag violations related to the specific scope of the migration, not the absence of a query schema for parseJsonQuery() in this file.

Applied to files:

  • apps/meteor/app/api/server/v1/users.ts
📚 Learning: 2025-12-10T21:00:43.645Z
Learnt from: KevLehman
Repo: RocketChat/Rocket.Chat PR: 37091
File: ee/packages/abac/jest.config.ts:4-7
Timestamp: 2025-12-10T21:00:43.645Z
Learning: Adopt the monorepo-wide Jest testMatch pattern: <rootDir>/src/**/*.spec.{ts,js,mjs} (represented here as '**/src/**/*.spec.{ts,js,mjs}') to ensure spec files under any package's src directory are picked up consistently across all packages in the Rocket.Chat monorepo. Apply this pattern in jest.config.ts for all relevant packages to maintain uniform test discovery.

Applied to files:

  • ee/packages/presence/src/lib/presenceEngine.spec.ts
📚 Learning: 2026-02-24T19:22:48.358Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 38493
File: apps/meteor/tests/e2e/omnichannel/omnichannel-send-pdf-transcript.spec.ts:66-67
Timestamp: 2026-02-24T19:22:48.358Z
Learning: In Playwright end-to-end tests (e.g., under apps/meteor/tests/e2e/...), prefer locating elements by translated text (getByText) and ARIA roles (getByRole) over data-qa attributes. If translation values change, update the corresponding test locators accordingly. Never use data-qa locators. This guideline applies to all Playwright e2e test specs in the repository and helps keep tests robust to UI text changes and accessible semantics.

Applied to files:

  • ee/packages/presence/src/lib/presenceEngine.spec.ts
📚 Learning: 2026-03-06T18:10:15.268Z
Learnt from: tassoevan
Repo: RocketChat/Rocket.Chat PR: 39397
File: packages/gazzodown/src/code/CodeBlock.spec.tsx:47-68
Timestamp: 2026-03-06T18:10:15.268Z
Learning: In tests (especially those using testing-library/dom/jsdom) for Rocket.Chat components, the HTML <code> element has an implicit ARIA role of 'code'. Therefore, screen.getByRole('code') or screen.findByRole('code') will locate <code> elements even without a role attribute. Do not flag findByRole('code') as invalid in reviews; prefer using the implicit role instead of adding role="code" unless necessary for accessibility.

Applied to files:

  • ee/packages/presence/src/lib/presenceEngine.spec.ts
🔇 Additional comments (4)
packages/model-typings/src/models/IUsersModel.ts (1)

384-384: LGTM!

packages/models/src/models/Users.ts (1)

2491-2501: LGTM!

ee/packages/presence/src/lib/presenceEngine.spec.ts (1)

51-64: LGTM!

apps/meteor/app/api/server/v1/users.ts (1)

1549-1549: 🗄️ Data Integrity & Integration

The projection already includes the custom status fields.
The options object passed to findByIdsForPresence on line 1549 explicitly defines a projection containing statusText, statusSource, and statusExpiresAt. Consequently, the query correctly preserves these fields for all returned users, including offline ones.

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

3 issues found across 5 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/meteor/tests/end-to-end/api/users.ts">

<violation number="1" location="apps/meteor/tests/end-to-end/api/users.ts:1875">
P2: The test does not verify that `statusExpiresAt` matches the value set by the request, so incorrect expiration propagation could still pass.</violation>

<violation number="2" location="apps/meteor/tests/end-to-end/api/users.ts:1877">
P2: Test cleanup is not protected with `finally`, so assertion failures can leak created users and make the suite flaky over time.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread packages/models/src/models/Users.ts
Comment thread apps/meteor/tests/end-to-end/api/users.ts
Comment thread apps/meteor/tests/end-to-end/api/users.ts
@ricardogarim ricardogarim force-pushed the fix/offline-custom-status-presence branch from c6bd374 to 6a4ad7c Compare June 26, 2026 15:02
@ricardogarim ricardogarim 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 dba082e into feat/presence-expiration-ui Jun 26, 2026
45 checks passed
@dionisio-bot dionisio-bot Bot deleted the fix/offline-custom-status-presence branch June 26, 2026 15:24
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.

3 participants