Skip to content

chore: migrate instances.get endpoint to new chained API pattern#38881

Merged
ggazzo merged 4 commits intoRocketChat:developfrom
smirk-dev:refactor/migrate-instances-api-chained-pattern
Feb 25, 2026
Merged

chore: migrate instances.get endpoint to new chained API pattern#38881
ggazzo merged 4 commits intoRocketChat:developfrom
smirk-dev:refactor/migrate-instances-api-chained-pattern

Conversation

@smirk-dev
Copy link
Copy Markdown
Contributor

@smirk-dev smirk-dev commented Feb 21, 2026

Summary

Migrates the instances.get GET endpoint from the legacy API.v1.addRoute() pattern to the new chained .get() API pattern.

Changes

  • Replaced addRoute('instances.get', ..., { async get() {} }) with API.v1.get('instances.get', { ... }, async function action() {})
  • Added typed AJV response schemas for 200, 401 (unauthorized), and 403 (forbidden) responses
  • Response schema validates instances array with address, currentStatus, instanceRecord, and broadcastAuth fields
  • Preserved all existing behavior: permission checks, instance record mapping, connection filtering

Motivation

Part of the ongoing effort to migrate REST API endpoints to the new chained API pattern that enables typed response validation and future OpenAPI spec generation.

Closes part of #38876
COMM-144

Summary by CodeRabbit

  • Refactor

    • Instances API moved to a new public route pattern with stricter response validation, an explicit success field, and clearer handling of authorization and error responses.
    • Response now enforces structured instance/status data and disallows unexpected fields for more predictable API behavior.
  • Chores

    • Recorded the change in a release entry for package versioning.

Task: ARCH-2004

@smirk-dev smirk-dev requested a review from a team as a code owner February 21, 2026 17:31
@dionisio-bot
Copy link
Copy Markdown
Contributor

dionisio-bot bot commented Feb 21, 2026

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

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Feb 21, 2026

🦋 Changeset detected

Latest commit: e393949

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 41 packages
Name Type
@rocket.chat/meteor Minor
@rocket.chat/core-typings Minor
@rocket.chat/rest-typings Minor
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/fuselage-ui-kit Major
@rocket.chat/gazzodown Major
@rocket.chat/http-router Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-avatar Major
@rocket.chat/ui-client Major
@rocket.chat/ui-contexts Major
@rocket.chat/ui-voip Major
@rocket.chat/web-ui-registration Major
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/abac Patch
@rocket.chat/federation-matrix Patch
@rocket.chat/license Patch
@rocket.chat/media-calls Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/models Patch
@rocket.chat/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/mock-providers Patch
@rocket.chat/ui-video-conf Major
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch
@rocket.chat/server-fetch Patch

Not sure what this means? Click here to learn what changesets are.

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 21, 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

Refactors the instances API route from API.v1.addRoute to the chained API.v1.get pattern, adds authRequired and permissionsRequired, introduces a detailed response.200 AJV schema plus 401/403 validators, moves handler into an async action, and adds a changeset file for a @rocket.chat/meteor minor bump.

Changes

Cohort / File(s) Summary
Release Changeset
.changeset/refactor-instances-api-chained-pattern.md
Adds a changeset recording a minor bump for @rocket.chat/meteor and describing migration of the instances.get API to the chained route pattern with response schemas.
API Endpoint Refactor
apps/meteor/app/api/server/v1/instances.ts
Replaces API.v1.addRoute(...) with API.v1.get(...) using authRequired and permissionsRequired; adds a strict response.200 AJV schema for instances, wires in validateUnauthorizedErrorResponse/validateForbiddenErrorResponse, and moves the handler into an async action() while preserving existing data-aggregation logic.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested labels

type: chore

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately describes the main change: migrating the instances.get endpoint to the new chained API pattern, which is the core focus of both file modifications.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ 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
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

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

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

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3145c41 and 6d1e6dc.

📒 Files selected for processing (2)
  • .changeset/refactor-instances-api-chained-pattern.md
  • apps/meteor/app/api/server/v1/instances.ts
🧰 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/instances.ts
⏰ 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). (3)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: CodeQL-Build
🔇 Additional comments (4)
.changeset/refactor-instances-api-chained-pattern.md (1)

1-5: LGTM!

Changeset is correctly formatted. The patch bump is appropriate for this internal refactor.

apps/meteor/app/api/server/v1/instances.ts (3)

2-6: LGTM on imports.

All imported symbols (ajv, validateUnauthorizedErrorResponse, validateForbiddenErrorResponse) are used in the route configuration below.


73-96: Handler logic cleanly preserved.

The data-fetching, mapping, and response construction are straightforward and correctly migrated. The optional chaining on connection gracefully handles missing connections.


20-71: Route configuration and schema structure look good.

Auth/permission guards are correctly preserved, error response mappings are properly wired, and the envelope validation (success: true, additionalProperties: false) is tight. The compile-at-module-load pattern is appropriate for AJV.

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

Inline comments:
In `@apps/meteor/app/api/server/v1/instances.ts`:
- Around line 55-58: The response schema's required array omits instanceRecord
even though the handler and the TypeScript response type include it; update the
schema's required array (the one currently set to ['currentStatus',
'broadcastAuth']) to also include 'instanceRecord' so it becomes
['currentStatus', 'broadcastAuth', 'instanceRecord'], ensuring the schema
matches the TypeScript type and the handler output (references: instanceRecord,
currentStatus, broadcastAuth, required).

@smirk-dev smirk-dev force-pushed the refactor/migrate-instances-api-chained-pattern branch from 6d1e6dc to 7df784b Compare February 21, 2026 19:46
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

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6d1e6dc and 7df784b.

📒 Files selected for processing (2)
  • .changeset/refactor-instances-api-chained-pattern.md
  • apps/meteor/app/api/server/v1/instances.ts
🧰 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/instances.ts
🧠 Learnings (1)
📚 Learning: 2026-01-17T01:51:47.764Z
Learnt from: tassoevan
Repo: RocketChat/Rocket.Chat PR: 38219
File: packages/core-typings/src/cloud/Announcement.ts:5-6
Timestamp: 2026-01-17T01:51:47.764Z
Learning: In packages/core-typings/src/cloud/Announcement.ts, the AnnouncementSchema.createdBy field intentionally overrides IBannerSchema.createdBy (object with _id and optional username) with a string enum ['cloud', 'system'] to match existing runtime behavior. This is documented as technical debt with a FIXME comment at apps/meteor/app/cloud/server/functions/syncWorkspace/handleCommsSync.ts:53 and should not be flagged as an error until the runtime behavior is corrected.

Applied to files:

  • apps/meteor/app/api/server/v1/instances.ts
⏰ 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: 📦 Build Packages
  • GitHub Check: CodeQL-Build
🔇 Additional comments (2)
apps/meteor/app/api/server/v1/instances.ts (1)

69-92: LGTM!

The action() handler correctly awaits both async calls, preserves the original data-aggregation logic, and uses API.v1.success as expected by the chained pattern.

.changeset/refactor-instances-api-chained-pattern.md (1)

1-5: LGTM!

Correct package name, appropriate patch bump, and description aligns with the migration objective.

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

Inline comments:
In `@apps/meteor/app/api/server/v1/instances.ts`:
- Line 24: The JSON schema marks address, lastHeartbeatTime, and local as
nullable but the TypeScript generics use optional (e.g., address?: string;
lastHeartbeatTime?: number; local?: boolean;) and the handler never emits null;
remove the nullable: true from those property definitions in the JSON/OpenAPI
schema(s) that describe the Instances/response object so the schema matches the
TypeScript types (leave the TypeScript optional properties unchanged). Ensure
you update every schema occurrence referencing those properties (the schema
objects that define address, lastHeartbeatTime, and local).

---

Duplicate comments:
In `@apps/meteor/app/api/server/v1/instances.ts`:
- Around line 51-54: The JSON schema's required array is missing the
instanceRecord property—update the schema so required includes 'instanceRecord'
alongside 'currentStatus' and 'broadcastAuth' to match the TypeScript types and
the handler that always sets instanceRecord; locate the schema object that
defines properties { instanceRecord, broadcastAuth, currentStatus } and add
'instanceRecord' to its required array to keep the contract accurate.

Migrates the instances.get REST API endpoint from the legacy
API.v1.addRoute() pattern to the new chained .get() pattern with:
- Typed response schemas for OpenAPI spec generation
- Standardized error response validators (401, 403)
- Named action function instead of anonymous method

Part of RocketChat#38876
@smirk-dev smirk-dev force-pushed the refactor/migrate-instances-api-chained-pattern branch from 7df784b to deef73c Compare February 22, 2026 05:32
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.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7df784b and deef73c.

📒 Files selected for processing (2)
  • .changeset/refactor-instances-api-chained-pattern.md
  • apps/meteor/app/api/server/v1/instances.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • .changeset/refactor-instances-api-chained-pattern.md
🧰 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/instances.ts
🧠 Learnings (3)
📚 Learning: 2026-01-17T01:51:47.764Z
Learnt from: tassoevan
Repo: RocketChat/Rocket.Chat PR: 38219
File: packages/core-typings/src/cloud/Announcement.ts:5-6
Timestamp: 2026-01-17T01:51:47.764Z
Learning: In packages/core-typings/src/cloud/Announcement.ts, the AnnouncementSchema.createdBy field intentionally overrides IBannerSchema.createdBy (object with _id and optional username) with a string enum ['cloud', 'system'] to match existing runtime behavior. This is documented as technical debt with a FIXME comment at apps/meteor/app/cloud/server/functions/syncWorkspace/handleCommsSync.ts:53 and should not be flagged as an error until the runtime behavior is corrected.

Applied to files:

  • apps/meteor/app/api/server/v1/instances.ts
📚 Learning: 2026-01-26T18:26:01.279Z
Learnt from: d-gubert
Repo: RocketChat/Rocket.Chat PR: 38227
File: apps/meteor/app/api/server/router.ts:44-49
Timestamp: 2026-01-26T18:26:01.279Z
Learning: In apps/meteor/app/api/server/router.ts, when retrieving bodyParams and queryParams from the Hono context via c.get(), do not add defensive defaults (e.g., ?? {}). The code should fail fast if these parameters are missing, as endpoint handlers expect them to be present and breaking here helps surface parsing problems rather than hiding them.

Applied to files:

  • apps/meteor/app/api/server/v1/instances.ts
📚 Learning: 2025-10-06T20:32:23.658Z
Learnt from: d-gubert
Repo: RocketChat/Rocket.Chat PR: 37152
File: packages/apps-engine/tests/test-data/utilities.ts:557-573
Timestamp: 2025-10-06T20:32:23.658Z
Learning: In packages/apps-engine/tests/test-data/utilities.ts, the field name `isSubscripbedViaBundle` in the `IMarketplaceSubscriptionInfo` type should not be flagged as a typo, as it may match the upstream API's field name.

Applied to files:

  • apps/meteor/app/api/server/v1/instances.ts
⏰ 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: 📦 Build Packages
  • GitHub Check: CodeQL-Build
🔇 Additional comments (2)
apps/meteor/app/api/server/v1/instances.ts (2)

69-92: LGTM!

The migrated action logic faithfully preserves the existing behavior: unbounded InstanceStatus.find() fetch, getConnections() lookup, per-instance mapping with safe optional chaining, and hardcoded broadcastAuth: true — all consistent with the PR's stated goal of a behavioral no-op refactor.


22-62: This is the established convention across the codebase — success should be omitted from the generic type.

The pattern of excluding success from the ajv.compile<T> generic while including it in the AJV schema is consistent across all API endpoints in this codebase. Examples: chat.ts, webdav.ts, users.ts, permissions.ts, oauthapps.ts all follow the same pattern. This indicates that success is automatically appended by the framework (via API.v1.success()), so the generic type should only describe the custom payload. The code is correct as-is.

Likely an incorrect or invalid review comment.

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

Duplicate comments:
In `@apps/meteor/app/api/server/v1/instances.ts`:
- Line 54: The JSON schema's required array (currently required:
['currentStatus', 'broadcastAuth']) is missing "instanceRecord" even though the
handler sets instanceRecord and the TypeScript generic marks it non-optional;
update that required array to include 'instanceRecord' so the AJV/OpenAPI schema
matches the TypeScript types and the handler (look for the schema object where
required: ['currentStatus','broadcastAuth'] in
apps/meteor/app/api/server/v1/instances.ts and the handler that sets
instanceRecord).
- Around line 41-47: The schema incorrectly marks fields that are omitted
(undefined) as nullable; update the schema where the response defines address
and currentStatus.properties to remove nullable: true from address,
lastHeartbeatTime, and local and instead treat them as optional/omitted
properties (i.e., leave them out of the OpenAPI nullable list so the spec
reflects that they are absent when missing); locate the schema definition
referencing address and currentStatus (the properties named address,
lastHeartbeatTime, and local) and delete the nullable: true entries for those
three fields.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.60%. Comparing base (b1b1d6c) to head (e393949).
⚠️ Report is 78 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #38881      +/-   ##
===========================================
- Coverage    70.64%   70.60%   -0.05%     
===========================================
  Files         3190     3190              
  Lines       112732   112732              
  Branches     20421    20406      -15     
===========================================
- Hits         79642    79596      -46     
- Misses       31047    31087      +40     
- Partials      2043     2049       +6     
Flag Coverage Δ
e2e 60.34% <ø> (-0.02%) ⬇️
e2e-api 47.86% <ø> (ø)
unit 71.21% <ø> (-0.05%) ⬇️

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.

- Add instanceRecord to required array in schema
- Remove nullable: true from optional fields (address, lastHeartbeatTime, local)
- Add success: true to TypeScript generic type
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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/meteor/app/api/server/v1/instances.ts (1)

2-68: ⚠️ Potential issue | 🟡 Minor

Fix response structure to handle missing connections properly.

When no matching connection is found, connection?.lastHeartbeatTime becomes undefined in the response object. The AJV schema enforces { type: 'number' } for this field, which rejects undefined values even though the field is not in the required array. Either omit lastHeartbeatTime when the connection doesn't exist or restructure to avoid including undefined properties in the response.

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

In `@apps/meteor/app/api/server/v1/instances.ts` around lines 2 - 68, The response
builder for the API.v1.get handler 'instances.get' is including
currentStatus.lastHeartbeatTime with an undefined value when no connection
exists, which violates the AJV schema (type: 'number'); update the code that
assembles each instance's currentStatus (where you reference
connection?.lastHeartbeatTime) to only include the lastHeartbeatTime property
when it is a defined number (e.g., conditionally add the property or use a
spread with connection && { lastHeartbeatTime: connection.lastHeartbeatTime }),
so the response omits the property entirely when no connection is found and
remains a number when present.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@apps/meteor/app/api/server/v1/instances.ts`:
- Around line 2-68: The response builder for the API.v1.get handler
'instances.get' is including currentStatus.lastHeartbeatTime with an undefined
value when no connection exists, which violates the AJV schema (type: 'number');
update the code that assembles each instance's currentStatus (where you
reference connection?.lastHeartbeatTime) to only include the lastHeartbeatTime
property when it is a defined number (e.g., conditionally add the property or
use a spread with connection && { lastHeartbeatTime:
connection.lastHeartbeatTime }), so the response omits the property entirely
when no connection is found and remains a number when present.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between deef73c and d3ccad3.

📒 Files selected for processing (1)
  • apps/meteor/app/api/server/v1/instances.ts
📜 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). (3)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: CodeQL-Build
🧰 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/instances.ts
🧠 Learnings (4)
📚 Learning: 2026-01-17T01:51:47.764Z
Learnt from: tassoevan
Repo: RocketChat/Rocket.Chat PR: 38219
File: packages/core-typings/src/cloud/Announcement.ts:5-6
Timestamp: 2026-01-17T01:51:47.764Z
Learning: In packages/core-typings/src/cloud/Announcement.ts, the AnnouncementSchema.createdBy field intentionally overrides IBannerSchema.createdBy (object with _id and optional username) with a string enum ['cloud', 'system'] to match existing runtime behavior. This is documented as technical debt with a FIXME comment at apps/meteor/app/cloud/server/functions/syncWorkspace/handleCommsSync.ts:53 and should not be flagged as an error until the runtime behavior is corrected.

Applied to files:

  • apps/meteor/app/api/server/v1/instances.ts
📚 Learning: 2026-01-26T18:26:01.279Z
Learnt from: d-gubert
Repo: RocketChat/Rocket.Chat PR: 38227
File: apps/meteor/app/api/server/router.ts:44-49
Timestamp: 2026-01-26T18:26:01.279Z
Learning: In apps/meteor/app/api/server/router.ts, when retrieving bodyParams and queryParams from the Hono context via c.get(), do not add defensive defaults (e.g., ?? {}). The code should fail fast if these parameters are missing, as endpoint handlers expect them to be present and breaking here helps surface parsing problems rather than hiding them.

Applied to files:

  • apps/meteor/app/api/server/v1/instances.ts
📚 Learning: 2025-10-06T20:32:23.658Z
Learnt from: d-gubert
Repo: RocketChat/Rocket.Chat PR: 37152
File: packages/apps-engine/tests/test-data/utilities.ts:557-573
Timestamp: 2025-10-06T20:32:23.658Z
Learning: In packages/apps-engine/tests/test-data/utilities.ts, the field name `isSubscripbedViaBundle` in the `IMarketplaceSubscriptionInfo` type should not be flagged as a typo, as it may match the upstream API's field name.

Applied to files:

  • apps/meteor/app/api/server/v1/instances.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/instances.ts
🔇 Additional comments (1)
apps/meteor/app/api/server/v1/instances.ts (1)

70-92: LGTM: handler preserves behavior and aligns with new route shape.

Mapping instances from the records/connections and returning via API.v1.success matches the expected response contract.

@ggazzo ggazzo changed the title refactor: migrate instances.get endpoint to new chained API pattern chore: migrate instances.get endpoint to new chained API pattern Feb 25, 2026
@ggazzo ggazzo added this to the 8.3.0 milestone Feb 25, 2026
@ggazzo
Copy link
Copy Markdown
Member

ggazzo commented Feb 25, 2026

/jira ARCH-1935

@ggazzo ggazzo added the stat: QA assured Means it has been tested and approved by a company insider label Feb 25, 2026
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Feb 25, 2026
@dionisio-bot dionisio-bot bot enabled auto-merge February 25, 2026 16:17
@ggazzo ggazzo disabled auto-merge February 25, 2026 16:17
@ggazzo ggazzo merged commit 9d8c410 into RocketChat:develop Feb 25, 2026
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community 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: chore

Projects

Development

Successfully merging this pull request may close these issues.

3 participants