Skip to content

refactor: move app/utils modules - #41927

Open
tassoevan wants to merge 1 commit into
refactor/move-app-lib-client-modulesfrom
refactor/move-app-utils-client-modules
Open

refactor: move app/utils modules#41927
tassoevan wants to merge 1 commit into
refactor/move-app-lib-client-modulesfrom
refactor/move-app-utils-client-modules

Conversation

@tassoevan

@tassoevan tassoevan commented Aug 24, 2026

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

It moves client modules from app/utils/ to client/.

Issue(s)

Steps to test or reproduce

Further comments


Stack created with GitHub Stacks CLIGive Feedback 💬

Review in cubic

Task: ARCH-2397

Summary by CodeRabbit

  • Bug Fixes
    • Improved reliability across client-side messaging, avatars, uploads, notifications, slash commands, and administrative workflows.
    • Preserved existing behavior while improving consistency in shared client functionality.
  • Refactor
    • Streamlined internal client utility organization and application startup loading.
  • Tests
    • Updated automated coverage and test setup to reflect the reorganized client functionality.

@tassoevan
tassoevan requested a review from a team as a code owner August 24, 2026 20:49
@changeset-bot

changeset-bot Bot commented Aug 24, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: d861d8a

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

@hacktron-app

hacktron-app Bot commented Aug 24, 2026

Copy link
Copy Markdown

Hacktron Security Check - Skipped

Reason: OSS PR review limit reached for this approved repository and developer. New OSS PRs for this repository will resume at the start of the next cycle.

Wait for the next cycle. OSS quota is limited to the approved OSS repository and cannot be used on paid repositories.

@coderabbitai

coderabbitai Bot commented Aug 24, 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 Plus

Run ID: 036581bd-4915-4136-a893-55b4f7ff065a

📥 Commits

Reviewing files that changed from the base of the PR and between 765115e and d861d8a.

📒 Files selected for processing (1)
  • apps/meteor/client/lib/chats/flows/processSetReaction.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/meteor/client/lib/chats/flows/processSetReaction.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (5)
  • GitHub Check: ⚙️ Variables Setup
  • GitHub Check: ⚙️ Test Guard
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build

Walkthrough

The change consolidates client utilities under apps/meteor/client/lib, updates consumers and test mocks to use local paths, removes legacy client utility imports, and simplifies several TypeScript assertions and annotations.

Changes

Client path consolidation

Layer / File(s) Summary
Client library modules
apps/meteor/client/lib/*
SDK, URL, avatar, preference, restriction, and slash-command imports now use client-local modules. New avatar helpers were added. Stream casts and room type assertions were simplified.
Application and provider integrations
apps/meteor/app/ui/client/lib/UserAction.ts, apps/meteor/client/apps/*, apps/meteor/client/components/*, apps/meteor/client/hooks/*, apps/meteor/client/providers/*, apps/meteor/app/utils/client/index.ts
Application consumers and providers now reference relocated client utilities. The client utility barrel and its import side effect were removed.
Startup, commands, and view consumers
apps/meteor/client/meteor/*, apps/meteor/client/startup/*, apps/meteor/client/views/*
Startup flows, slash commands, views, and test mocks now use client-local SDK, URL, and slash-command modules. Legacy bootstrap imports were removed.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to d861d

This refactor moves client modules and updates their references without any supplied evidence of an actionable merge-blocking risk; it is merge-ready after normal checks and review.

Suggested labels: type: chore

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 5…
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: moving modules from app/utils to client.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 50 files.

Warning

Errors were encountered while retrieving linked issues.

Errors (1)
  • ARCH-2397: 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.

@dionisio-bot

dionisio-bot Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@tassoevan tassoevan added this to the 8.9.0 milestone Aug 24, 2026
@tassoevan

Copy link
Copy Markdown
Member Author

/jira ARCH

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

1 issue found across 108 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/client/lib/chats/restrictions.ts">

<violation number="1" location="apps/meteor/client/lib/chats/restrictions.ts:1">
P3: The generic `fileUploadIsValidContentType` helper now lives in `client/lib/chats/restrictions.ts` but is imported by both `client/lib/chats/uploads.ts` and the non-chats `views/room/modals/FileUploadModal`. Per the repo's promotion convention, move it to a shared upper-level location (e.g. `client/lib/`) so a modal outside the chats module doesn't import from within it.</violation>
</file>

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

Re-trigger cubic

@@ -1,5 +1,5 @@
import { settings } from '../../../client/lib/settings';
import { fileUploadIsValidContentTypeFromSettings } from '../lib/restrictions';
import { fileUploadIsValidContentTypeFromSettings } from '../../../app/utils/lib/restrictions';

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.

P3: The generic fileUploadIsValidContentType helper now lives in client/lib/chats/restrictions.ts but is imported by both client/lib/chats/uploads.ts and the non-chats views/room/modals/FileUploadModal. Per the repo's promotion convention, move it to a shared upper-level location (e.g. client/lib/) so a modal outside the chats module doesn't import from within it.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/meteor/client/lib/chats/restrictions.ts, line 1:

<comment>The generic `fileUploadIsValidContentType` helper now lives in `client/lib/chats/restrictions.ts` but is imported by both `client/lib/chats/uploads.ts` and the non-chats `views/room/modals/FileUploadModal`. Per the repo's promotion convention, move it to a shared upper-level location (e.g. `client/lib/`) so a modal outside the chats module doesn't import from within it.</comment>

<file context>
@@ -1,5 +1,5 @@
-import { settings } from '../../../client/lib/settings';
-import { fileUploadIsValidContentTypeFromSettings } from '../lib/restrictions';
+import { fileUploadIsValidContentTypeFromSettings } from '../../../app/utils/lib/restrictions';
+import { settings } from '../settings';
 
</file context>

@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.81818% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.31%. Comparing base (438b671) to head (d861d8a).

Additional details and impacted files

Impacted file tree graph

@@                           Coverage Diff                            @@
##           refactor/move-app-lib-client-modules   #41927      +/-   ##
========================================================================
- Coverage                                 69.35%   69.31%   -0.05%     
========================================================================
  Files                                      4249     4248       -1     
  Lines                                    168580   168570      -10     
  Branches                                  30028    30063      +35     
========================================================================
- Hits                                     116922   116847      -75     
- Misses                                    46491    46549      +58     
- Partials                                   5167     5174       +7     
Flag Coverage Δ
e2e 58.76% <38.46%> (-0.02%) ⬇️
e2e-api 45.87% <ø> (-0.30%) ⬇️
unit 71.28% <96.87%> (-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.

@tassoevan
tassoevan force-pushed the refactor/move-app-utils-client-modules branch from 648264c to d3ba450 Compare August 24, 2026 21:45
@tassoevan
tassoevan force-pushed the refactor/move-app-utils-client-modules branch from d3ba450 to 765115e Compare August 25, 2026 03:26
@tassoevan
tassoevan force-pushed the refactor/move-app-utils-client-modules branch 2 times, most recently from 119a9fd to 978bf65 Compare August 25, 2026 04:27
@tassoevan
tassoevan force-pushed the refactor/move-app-utils-client-modules branch from 978bf65 to d861d8a Compare August 25, 2026 05:04
@rc-layne

rc-layne Bot commented Aug 25, 2026

Copy link
Copy Markdown

⚠️ Layne — scan incomplete

Layne could not analyze all changed content. Review the Check Run summary before merging.

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.

1 participant