Skip to content

feat(webapp): upload and crop a profile picture from the account page - #4802

Open
kathiekiwi wants to merge 25 commits into
mainfrom
feat/profile-photo-upload
Open

feat(webapp): upload and crop a profile picture from the account page#4802
kathiekiwi wants to merge 25 commits into
mainfrom
feat/profile-photo-upload

Conversation

@kathiekiwi

@kathiekiwi kathiekiwi commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

You can now change your profile picture from the account page. Hovering the avatar shows "Change your profile picture"; clicking opens a modal where you pick an image (png, jpeg or webp, up to 5MB), crop it with a circular mask and zoom, and save. Uploads go to S3.

Screenshot 2026-08-27 at 14 47 47 Screenshot 2026-08-27 at 13 21 36 Screenshot 2026-08-27 at 14 44 33

@changeset-bot

changeset-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: c4b7ae4

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 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Adds profile photo upload, cropping, removal, and avatar preview handling. Adds validated avatar storage with dedicated object-store configuration, cleanup, presigned downloads, and raw byte reads. Adds authenticated avatar resource actions and loaders with request-size limits. Updates API avatar URLs and CSP image sources. Adds Storybook states, styling, environment examples, local MinIO setup, and tests.

Merge Risk: 🟡 Moderate · up to c4b7a

The PR adds S3-backed avatar upload and retrieval, but the current implementation can expose avatar access over unencrypted HTTP, leave removed images reachable after cleanup failures, or break the current avatar during overlapping updates. These concrete security and reliability issues should be fixed or explicitly accepted before merge.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 41.07% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 56 functions across 22 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description explains the feature and includes screenshots, but it omits the required issue reference, checklist, testing steps, and changelog sections. Add the required template sections. Include the linked issue, completed checklist items, specific testing steps, and a short changelog entry.
✅ Passed checks (3 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly and concisely describes the primary change: uploading and cropping a profile picture from the account page.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/profile-photo-upload

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.

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Observability map

As of c4b7ae4.

20/100 over 451 measured of 469 entry points (base 20, no change)

What this PR changed

route base head now failing
/resources/account/avatar new 0 request-context
/resources/account/avatar/:userId/:filename new 0 request-context

FIX FIRST

  • /api/v1/projects/:projectRef/envvars (sensitive) - auth-boundary, request-context
  • /auth/sso (sensitive) - auth-boundary, request-context
  • /_app/orgs/:organizationSlug/settings/team (sensitive) - error-classification, auth-scope, request-context

AUDIT 3 of 50 sensitive mutations record an actor. 47 without one.
CONTEXT 23 of 451 entry points name a tenant on a failure path. 349 appear only here, 39 of them sensitive, in the JSON rather than the fix list.

What the score is made of
CHECKS
  error-classification  183 applicable, 105 pass,   0 sole, global without it 12
  auth-boundary          62 applicable,  57 pass,   0 sole, global without it 16
  auth-scope             19 applicable,  17 pass,   0 sole, global without it 19
  request-context       451 applicable,  23 pass, 246 sole, global without it 64
  audit-trail            50 applicable,   3 pass,   0 sole, not in the score

The score and findings here are report-only and never gate the merge. Separately, a required test suite keeps this tool's symbol and route lists in sync with the code they name, and can fail a pull request that renames or removes a symbol they reference, or that adds the first route with a segment they anticipate. Each failure names the list to edit. The rules and their reasons: internal-packages/observability-map/README.md.

@devin-ai-integration devin-ai-integration 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.

Note

This report is out of date. Scroll down for Devin Review's latest report on this PR.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

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

Caution

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

⚠️ Outside diff range comments (2)
apps/webapp/app/services/dashboardAgentBodyCap.server.ts (1)

82-90: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add required crumb instrumentation to the changed flows.

  • apps/webapp/app/services/dashboardAgentBodyCap.server.ts#L82-L90: add crumbs for declared-length rejection and request teardown.
  • apps/webapp/app/routes/resources.account.avatar.ts#L18-L25: add crumbs for the impersonation mutation rejection.
  • apps/webapp/test/dashboardAgentBodyCap.test.ts#L174-L187: add crumbs for the stalled-client teardown test path.
  • apps/webapp/app/components/ProfilePhotoEditor.tsx#L94-L97: add crumbs for saved-avatar fallback state.

Use an approved crumb namespace where required. As per coding guidelines: “Add crumbs as you write code — not just when debugging.”

Source: Coding guidelines

apps/webapp/app/components/ProfilePhotoEditor.tsx (1)

116-129: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Reject selected files over the 5 MiB limit.

selectFile checks only file.type. A source image over 5 MiB can still be decoded and cropped into a smaller PNG that passes the server upload limit. Check file.size against the shared MAX_AVATAR_SIZE_IN_BYTES before creating the object URL.

Proposed fix
   if (!ACCEPTED_TYPES.includes(file.type)) {
     setError("Choose a PNG, JPEG or WebP image.");
     return;
   }
 
+  if (file.size > MAX_AVATAR_SIZE_IN_BYTES) {
+    setError("Choose an image smaller than 5 MB.");
+    return;
+  }
+
   setCrop(CENTER);

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e56b1115-c91b-44a3-9c6d-8bc5d32226bd

📥 Commits

Reviewing files that changed from the base of the PR and between 820a2a7 and 237e84d.

📒 Files selected for processing (5)
  • apps/webapp/app/components/ProfilePhotoEditor.tsx
  • apps/webapp/app/routes/resources.account.avatar.ts
  • apps/webapp/app/routes/storybook.profile-photo-editor/route.tsx
  • apps/webapp/app/services/dashboardAgentBodyCap.server.ts
  • apps/webapp/test/dashboardAgentBodyCap.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/webapp/app/routes/storybook.profile-photo-editor/route.tsx

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

📜 Review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: internal / 🧪 Unit Tests: Internal
🧰 Additional context used
📓 Path-based instructions (14)
Use Remix flat-file route conventions with dot-separated segments; for example, `api.v1.tasks.$taskId.trigger.ts` maps to `/api/v1/tasks/:taskId/trigger`.

📄 CodeRabbit inference engine (apps/webapp/CLAUDE.md)

Files:

  • apps/webapp/app/routes/resources.account.avatar.ts
Never use `request.signal` to detect client disconnects. Use `getRequestAbortSignal()` from `app/services/httpAsyncStorage.server.ts`, which is wired to Express response close events.

📄 CodeRabbit inference engine (apps/webapp/CLAUDE.md)

Files:

  • apps/webapp/app/routes/resources.account.avatar.ts
  • apps/webapp/app/services/dashboardAgentBodyCap.server.ts
We use vitest exclusively. **Never mock anything** - use testcontainers instead.

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • apps/webapp/test/dashboardAgentBodyCap.test.ts
Test files must not import `app/env.server.ts`; pass configuration as options instead.

📄 CodeRabbit inference engine (apps/webapp/CLAUDE.md)

Files:

  • apps/webapp/test/dashboardAgentBodyCap.test.ts
For dashboard changes, visually verify the running Remix app with Chrome DevTools MCP, using snapshots, screenshots, interaction, and console-message checks as appropriate.

📄 CodeRabbit inference engine (apps/webapp/CLAUDE.md)

Files:

  • apps/webapp/app/routes/resources.account.avatar.ts
  • apps/webapp/app/components/ProfilePhotoEditor.tsx
  • apps/webapp/app/services/dashboardAgentBodyCap.server.ts
**Prefer static imports over dynamic imports.** Only use dynamic `import()` when:

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • apps/webapp/app/routes/resources.account.avatar.ts
  • apps/webapp/app/components/ProfilePhotoEditor.tsx
  • apps/webapp/app/services/dashboardAgentBodyCap.server.ts
  • apps/webapp/test/dashboardAgentBodyCap.test.ts
Add crumbs as you write code — not just when debugging. Mark lines with

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • apps/webapp/app/routes/resources.account.avatar.ts
  • apps/webapp/app/components/ProfilePhotoEditor.tsx
  • apps/webapp/app/services/dashboardAgentBodyCap.server.ts
  • apps/webapp/test/dashboardAgentBodyCap.test.ts
Use zod for validation in packages/core and apps/webapp

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Files:

  • apps/webapp/app/routes/resources.account.avatar.ts
  • apps/webapp/app/components/ProfilePhotoEditor.tsx
  • apps/webapp/app/services/dashboardAgentBodyCap.server.ts
  • apps/webapp/test/dashboardAgentBodyCap.test.ts
Do not import `env.server.ts` directly or indirectly into test files; instead pass environment-dependent values through options/parameters to make code testable

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

Files:

  • apps/webapp/test/dashboardAgentBodyCap.test.ts
Access environment variables through the `env` export of `env.server.ts` instead of directly accessing `process.env`

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

Files:

  • apps/webapp/app/routes/resources.account.avatar.ts
  • apps/webapp/app/components/ProfilePhotoEditor.tsx
  • apps/webapp/app/services/dashboardAgentBodyCap.server.ts
  • apps/webapp/test/dashboardAgentBodyCap.test.ts
Use vitest for all tests in the Trigger.dev repository

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Files:

  • apps/webapp/test/dashboardAgentBodyCap.test.ts
Use function declarations instead of default exports

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Files:

  • apps/webapp/app/routes/resources.account.avatar.ts
  • apps/webapp/app/components/ProfilePhotoEditor.tsx
  • apps/webapp/app/services/dashboardAgentBodyCap.server.ts
  • apps/webapp/test/dashboardAgentBodyCap.test.ts
Use types over interfaces for TypeScript

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Files:

  • apps/webapp/app/routes/resources.account.avatar.ts
  • apps/webapp/app/components/ProfilePhotoEditor.tsx
  • apps/webapp/app/services/dashboardAgentBodyCap.server.ts
  • apps/webapp/test/dashboardAgentBodyCap.test.ts
When creating or editing OTEL metrics (counters, histograms, gauges), ensure metric attributes have low cardinality by using only enums, booleans, bounded error codes, or bounded shard IDs

📄 CodeRabbit inference engine (.cursor/rules/otel-metrics.mdc)

Files:

  • apps/webapp/app/routes/resources.account.avatar.ts
  • apps/webapp/app/services/dashboardAgentBodyCap.server.ts
  • apps/webapp/test/dashboardAgentBodyCap.test.ts
🪛 ast-grep (0.45.2)
apps/webapp/test/dashboardAgentBodyCap.test.ts

[warning] 25-25: Express application should use Helmet
Context: express()
Note: [CWE-693] Protection Mechanism Failure (Express app without Helmet security headers).

(missing-helmet-typescript)

@trigger-dot-bot

trigger-dot-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown

Preview Deployment

Status Preview Commit Updated
🟢 Ready feat-profile-photo-upload.triggerlabs.dev c4b7ae4 Aug 28, 07:11 UTC

coderabbitai[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

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

Caution

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

⚠️ Outside diff range comments (2)
apps/webapp/test/userAvatar.test.ts (1)

204-210: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Isolate AVATARS_OBJECT_STORE_SERVICE in avatar tests.

A runner-provided service value can remain active because neither suite resets this new setting. The MinIO test then does not guarantee S3 signing.

  • apps/webapp/test/userAvatar.test.ts#L204-L210: include AVATARS_OBJECT_STORE_SERVICE in the saved and reset avatar environment state, then set "s3" for isolated test cases.
  • apps/webapp/test/objectStore.test.ts#L855-L878: save and restore this value, and set it to "s3" before the MinIO upload.
Proposed fix
 const AVATAR_ENV_KEYS = [
   "AVATARS_OBJECT_STORE_BASE_URL",
   "AVATARS_OBJECT_STORE_BUCKET",
   "AVATARS_OBJECT_STORE_ACCESS_KEY_ID",
   "AVATARS_OBJECT_STORE_SECRET_ACCESS_KEY",
   "AVATARS_OBJECT_STORE_REGION",
+  "AVATARS_OBJECT_STORE_SERVICE",
 ] as const;
 const original = {
   // existing settings
+  service: env.AVATARS_OBJECT_STORE_SERVICE,
 };

 afterAll(() => {
   // existing restores
+  env.AVATARS_OBJECT_STORE_SERVICE = original.service;
 });

 // MinIO setup
+env.AVATARS_OBJECT_STORE_SERVICE = "s3";
apps/webapp/app/routes/account._index/route.tsx (1)

457-548: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add crumb instrumentation to the new profile-photo flow.

The new ChangeProfilePhotoButton upload and removal flow has no // @Crumbs marker or `// `#region` `@crumbs block. Add a crumb around this behavior so development tracing is available before agentcrumbs strip removes it.

As per coding guidelines: **/*: Add crumbs as you write code — not just when debugging.

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: eba5b1a5-ff6e-456e-b53b-d0807e378893

📥 Commits

Reviewing files that changed from the base of the PR and between 64e24f4 and c4b7ae4.

📒 Files selected for processing (5)
  • apps/webapp/app/env.server.ts
  • apps/webapp/app/routes/account._index/route.tsx
  • apps/webapp/app/services/userAvatar.server.ts
  • apps/webapp/test/objectStore.test.ts
  • apps/webapp/test/userAvatar.test.ts

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

📜 Review details
⏰ Context from checks skipped due to timeout. (38)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (4, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (16, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (17, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (3, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (24, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (10, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (6, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (15, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (11, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (9, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (13, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (5, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (23, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (18, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (7, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (21, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (19, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (8, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (14, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (20, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (12, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (1, 24)
  • GitHub Check: sdk-compat / Node.js 24.18 (warp-ubuntu-latest-x64-4x)
  • GitHub Check: sdk-compat / Node.js 26.4 (warp-ubuntu-latest-x64-4x)
  • GitHub Check: sdk-compat / Cloudflare Workers
  • GitHub Check: e2e / 🧪 CLI v3 tests (warp-windows-latest-x64-8x - npm)
  • GitHub Check: e2e-webapp / 🧪 E2E Tests: Webapp (2, 2)
  • GitHub Check: e2e / 🧪 CLI v3 tests (warp-windows-latest-x64-8x - pnpm)
  • GitHub Check: sdk-compat / Deno Runtime
  • GitHub Check: internal / 🧪 Unit Tests: Internal
  • GitHub Check: sdk-compat / Bun Runtime
  • GitHub Check: packages / 🧪 Unit Tests: Packages (2, 3)
  • GitHub Check: packages / 🧪 Unit Tests: Packages (3, 3)
  • GitHub Check: e2e-webapp / 🧪 E2E Tests: Webapp (1, 2)
  • GitHub Check: packages / 🧪 Unit Tests: Packages (1, 3)
  • GitHub Check: runops-guard / runops-guard
  • GitHub Check: 🛡️ E2E Auth Tests (full)
  • GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (13)
Never use `request.signal` to detect client disconnects. Use `getRequestAbortSignal()` from `app/services/httpAsyncStorage.server.ts`, which is wired to Express response close events.

📄 CodeRabbit inference engine (apps/webapp/CLAUDE.md)

Files:

  • apps/webapp/app/env.server.ts
  • apps/webapp/app/services/userAvatar.server.ts
We use vitest exclusively. **Never mock anything** - use testcontainers instead.

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • apps/webapp/test/objectStore.test.ts
  • apps/webapp/test/userAvatar.test.ts
Test files must not import `app/env.server.ts`; pass configuration as options instead.

📄 CodeRabbit inference engine (apps/webapp/CLAUDE.md)

Files:

  • apps/webapp/test/objectStore.test.ts
  • apps/webapp/test/userAvatar.test.ts
For dashboard changes, visually verify the running Remix app with Chrome DevTools MCP, using snapshots, screenshots, interaction, and console-message checks as appropriate.

📄 CodeRabbit inference engine (apps/webapp/CLAUDE.md)

Files:

  • apps/webapp/app/routes/account._index/route.tsx
  • apps/webapp/app/env.server.ts
  • apps/webapp/app/services/userAvatar.server.ts
**Prefer static imports over dynamic imports.** Only use dynamic `import()` when:

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • apps/webapp/app/routes/account._index/route.tsx
  • apps/webapp/test/objectStore.test.ts
  • apps/webapp/app/env.server.ts
  • apps/webapp/test/userAvatar.test.ts
  • apps/webapp/app/services/userAvatar.server.ts
Add crumbs as you write code — not just when debugging. Mark lines with

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • apps/webapp/app/routes/account._index/route.tsx
  • apps/webapp/test/objectStore.test.ts
  • apps/webapp/app/env.server.ts
  • apps/webapp/test/userAvatar.test.ts
  • apps/webapp/app/services/userAvatar.server.ts
Use zod for validation in packages/core and apps/webapp

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Files:

  • apps/webapp/app/routes/account._index/route.tsx
  • apps/webapp/test/objectStore.test.ts
  • apps/webapp/app/env.server.ts
  • apps/webapp/test/userAvatar.test.ts
  • apps/webapp/app/services/userAvatar.server.ts
Do not import `env.server.ts` directly or indirectly into test files; instead pass environment-dependent values through options/parameters to make code testable

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

Files:

  • apps/webapp/test/objectStore.test.ts
  • apps/webapp/test/userAvatar.test.ts
Access environment variables through the `env` export of `env.server.ts` instead of directly accessing `process.env`

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

Files:

  • apps/webapp/app/routes/account._index/route.tsx
  • apps/webapp/test/objectStore.test.ts
  • apps/webapp/app/env.server.ts
  • apps/webapp/test/userAvatar.test.ts
  • apps/webapp/app/services/userAvatar.server.ts
Use vitest for all tests in the Trigger.dev repository

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Files:

  • apps/webapp/test/objectStore.test.ts
  • apps/webapp/test/userAvatar.test.ts
Use function declarations instead of default exports

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Files:

  • apps/webapp/app/routes/account._index/route.tsx
  • apps/webapp/test/objectStore.test.ts
  • apps/webapp/app/env.server.ts
  • apps/webapp/test/userAvatar.test.ts
  • apps/webapp/app/services/userAvatar.server.ts
Use types over interfaces for TypeScript

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Files:

  • apps/webapp/app/routes/account._index/route.tsx
  • apps/webapp/test/objectStore.test.ts
  • apps/webapp/app/env.server.ts
  • apps/webapp/test/userAvatar.test.ts
  • apps/webapp/app/services/userAvatar.server.ts
When creating or editing OTEL metrics (counters, histograms, gauges), ensure metric attributes have low cardinality by using only enums, booleans, bounded error codes, or bounded shard IDs

📄 CodeRabbit inference engine (.cursor/rules/otel-metrics.mdc)

Files:

  • apps/webapp/test/objectStore.test.ts
  • apps/webapp/app/env.server.ts
  • apps/webapp/test/userAvatar.test.ts
  • apps/webapp/app/services/userAvatar.server.ts
🧠 Learnings (2)
📚 Learning: 2026-05-18T14:40:02.173Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3658
File: packages/core/src/v3/realtimeStreams/manager.test.ts:1-147
Timestamp: 2026-05-18T14:40:02.173Z
Learning: In the triggerdotdev/trigger.dev repo, the policy “Never mock anything — use testcontainers instead” should only be enforced for integration tests that interact with real external services (e.g., Redis, Postgres) via actual infrastructure. For unit tests that exercise pure in-memory logic (e.g., cache semantics) it is OK to stub collaborators such as `ApiClient` using Vitest (`vi.fn()`) to assert call counts or control behavior. Do not flag `vi.fn()`-based `ApiClient` stubs in unit tests as violations of the testcontainers policy.

Applied to files:

  • apps/webapp/test/objectStore.test.ts
📚 Learning: 2026-06-16T09:19:47.637Z
Learnt from: d-cs
Repo: triggerdotdev/trigger.dev PR: 3960
File: apps/webapp/test/prismaInfrastructureErrorCapture.test.ts:0-0
Timestamp: 2026-06-16T09:19:47.637Z
Learning: In this repo’s Vitest setup, `vitest.config.ts` uses `globals: true`, so identifiers like `vi`, `describe`, `it`, and `expect` are available as globals in Vitest test files. During code review, do not flag missing `vi`/`describe`/`it`/`expect` imports as a runtime error or correctness issue when they’re used in `*.test.ts/tsx` or `*.spec.ts/tsx` files. Explicit imports are still preferred for consistency, but they’re not required for runtime behavior.

Applied to files:

  • apps/webapp/test/userAvatar.test.ts
🔇 Additional comments (1)
apps/webapp/app/routes/account._index/route.tsx (1)

11-11: LGTM!

Also applies to: 37-37, 95-95, 267-271, 882-883, 1003-1007

@samejr

samejr commented Aug 28, 2026

Copy link
Copy Markdown
Member

Linear have a nice feature that lets you rotate the uploaded image by 45 degrees if it uploads in the wrong rotation. Like a little rotate icon top right of the image. It would be nice to include this too as it would be a big pain to fix outside the UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants