Local test sub#2082
Open
lwx270901 wants to merge 80 commits into
Open
Conversation
Revert "Frontend executing"
Deploy to production (Automated)
Stabilize Gmail realtime receive on VM
Llm service
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Introduces “Doorman” functionality and rebrands the app, adding new DB-backed user profile/category systems plus “Doorman” realtime ingestion + enrichment (priority/category/action suggestions) across server workflows and mail UI.
Changes:
- Add new Postgres schema + Drizzle migrations for Doorman entities (profiles, categories, analysis outputs, feedback).
- Add server routes/services for user profiles, categories, feedback/corrections, and Doorman ingestion/enrichment.
- Update mail app UI/routing/theme to “Doorman”, add profile gating, feedback page, and priority/category displays.
Reviewed changes
Copilot reviewed 71 out of 133 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| update-check/wrangler-latest.json | Records latest Wrangler version metadata. |
| tsconfig.json | Switches TS config base to local monorepo tsconfig. |
| docker-compose.db.yaml | Changes Valkey image source. |
| apps/server/wrangler.jsonc | Updates local/prod env vars, KV ids, and local DB host. |
| apps/server/src/workflows/sync-threads-workflow.ts | Calls Doorman receiver after syncing threads. |
| apps/server/src/types.ts | Adds optional Doorman fields to ParsedMessage schema. |
| apps/server/src/trpc/routes/user.ts | Adds TRPC endpoints for user profile CRUD/check. |
| apps/server/src/trpc/routes/mail.ts | Adds feedback endpoints, thread enrichment on getThread, and RPC disposal. |
| apps/server/src/trpc/routes/label.ts | Adds automatic category labels and merges into label list. |
| apps/server/src/trpc/routes/categories.ts | Replaces defaults endpoint with DB-backed category CRUD. |
| apps/server/src/trpc/routes/brain.ts | Adds VECTORIZE binding guards and error handling. |
| apps/server/src/thread-workflow-utils/workflow-functions.ts | Adds VECTORIZE binding guards and changes draft creation behavior. |
| apps/server/src/services/user-profile-service.ts | New DB service for user profile read/create/update. |
| apps/server/src/services/category-service.ts | New DB service for default categories + CRUD. |
| apps/server/src/routes/autumn.ts | Makes Autumn optional and returns fallback customer payloads. |
| apps/server/src/routes/agent/index.ts | Adds stub disposal in sync worker calls + defines getRawEmail. |
| apps/server/src/routes/agent/db/index.ts | Adds regex-based auto-category label assignment when creating threads. |
| apps/server/src/pipelines.ts | Calls Doorman receiver after watch-triggered sync. |
| apps/server/src/main.ts | Adds Doorman dev endpoints, changes Google push flow to direct workflow run, and scheduled analysis job. |
| apps/server/src/lib/server-utils.ts | Adds RPC stub disposer and ensures sendDoState disposes stubs. |
| apps/server/src/lib/schemas.ts | Changes default colorTheme to light. |
| apps/server/src/lib/logging-service.ts | Guards Datadog export behind an enabled flag; adjusts log message. |
| apps/server/src/lib/email-verification.ts | Adds no-op statements inside catch blocks. |
| apps/server/src/lib/driver/google.ts | Adds retry logic for retryable Gmail driver errors. |
| apps/server/src/lib/doorman/save-received-email.ts | New DB upsert utility for received emails/mime content. |
| apps/server/src/lib/doorman/received-email.types.ts | New types for Doorman received email/thread ingestion payloads. |
| apps/server/src/lib/doorman/realtime-receiver.ts.bak | Adds a backup copy of realtime receiver implementation. |
| apps/server/src/lib/doorman/realtime-receiver.ts | New realtime receiver that saves email then triggers analysis. |
| apps/server/src/lib/doorman/enrich-priority-scores.ts | New thread enrichment from priority score table. |
| apps/server/src/lib/doorman/enrich-categories.ts | New thread enrichment from analysis result category. |
| apps/server/src/lib/doorman/enrich-action-suggestions.ts | New thread enrichment from action suggestion table. |
| apps/server/src/lib/datadog-service.ts | Makes Datadog logging optional and non-fatal without credentials. |
| apps/server/src/lib/bulk-delete.ts | Adds development environment option and safer Cloudflare KV deletion fallback. |
| apps/server/src/lib/auth.ts | Triggers force resync after connection setup; updates trusted origins; disables email verification requirement. |
| apps/server/src/db/schema.ts | Adds Doorman tables alongside existing schema. |
| apps/server/src/db/migrations/meta/_journal.json | Adds new migration journal entries for 0038/0039. |
| apps/server/src/db/migrations/0039_fearless_alex_power.sql | Adds Doorman tables + indexes + FKs. |
| apps/server/src/db/migrations/0038_tranquil_william_stryker.sql | Alters constraints/indexes and updates user settings default. |
| apps/server/src/db/migrations/0038_fine_randall.sql | Adds an additional 0038 migration with identical content. |
| apps/server/package.json | Updates dev script flags/binding settings. |
| apps/server/drizzle.config.ts | Includes new Doorman tables in Drizzle filter. |
| apps/mail/vite.config.ts | Tightens dev server host/port/allowedHosts/HMR settings. |
| apps/mail/types/index.ts | Adds Doorman fields (priority/category/action) to mail ParsedMessage UI type. |
| apps/mail/public/manifest.json | Rebrands PWA manifest to “Doorman” + theme colors. |
| apps/mail/providers/server-providers.tsx | Comments out Autumn provider wrapper (billing integration). |
| apps/mail/package.json | Pins dev host/port for mail app. |
| apps/mail/lib/site-config.ts | Rebrands site config strings to “Doorman”. |
| apps/mail/hooks/use-billing.ts | Stops automatic sign-out on billing errors. |
| apps/mail/config/navigation.ts | Changes settings navigation to user-information and removes several settings items. |
| apps/mail/components/user-profile-gate.tsx | Adds client-side gate redirecting users to profile setup. |
| apps/mail/components/ui/toast.tsx | Updates toast styling to use theme tokens. |
| apps/mail/components/ui/sidebar.tsx | Adds topBarOffset rendering variant for layout. |
| apps/mail/components/ui/settings-content.tsx | Adds top bar and adjusts settings layout scrolling. |
| apps/mail/components/ui/recursive-folder.tsx | Changes label selection UX to single-select. |
| apps/mail/components/ui/pricing-dialog.tsx | Comments out billing attach usage. |
| apps/mail/components/ui/nav-user.tsx | Stubs billing + removes logout/debug actions in dropdown. |
| apps/mail/components/ui/nav-main.tsx | Routes feedback to internal /mail/feedback. |
| apps/mail/components/ui/doorman-top-bar.tsx | New Doorman top bar with logout button. |
| apps/mail/components/ui/bimi-avatar.tsx | Uses theme token for avatar background. |
| apps/mail/components/ui/app-sidebar.tsx | Supports top-bar offset layout and adjusts sizing/footer. |
| apps/mail/components/ui/ai-sidebar.tsx | Stubs billing-related checks and updates panel sizing/borders. |
| apps/mail/components/onboarding.tsx | Disables onboarding wrapper (returns null). |
| apps/mail/components/navigation.tsx | Reworks public nav styling and rebrands assets/text. |
| apps/mail/components/mail/thread-display.tsx | Updates UI component styling tokens. |
| apps/mail/components/mail/reply-composer.tsx | Updates signature branding link/name to Doorman. |
| apps/mail/components/mail/render-labels.tsx | Fixes label count button rendering line (removes stray +). |
| apps/mail/components/mail/removable-text-labels.tsx | New reusable label rendering for message tags. |
| apps/mail/components/mail/priority-score-circle.tsx | New visual indicator for priority score. |
| apps/mail/components/mail/note-panel.tsx | Updates styling tokens and borders. |
| apps/mail/components/mail/mail.tsx | Adds thread panel collapse/expand logic and replaces category filter with sort dropdown. |
| apps/mail/components/mail/mail-list.tsx | Adds sort dropdown, new label/category/priority UI, and implements cache-based priority sorting. |
| apps/mail/components/mail/mail-display.tsx | Adds priority UI + feedback submission for priority corrections. |
| apps/mail/components/mail/category-badge.tsx | New badge styling for categories. |
| apps/mail/components/home/footer.tsx | Rebrands footer and updates styling tokens. |
| apps/mail/components/create/create-email.tsx | Updates signature branding link/name to Doorman. |
| apps/mail/components/context/label-sidebar-context.tsx | Updates context menu styling tokens. |
| apps/mail/components/context/command-palette-context.tsx | Comments out command list population + removes Help group. |
| apps/mail/components/connection/add.tsx | Stubs billing checks and disables upgrade prompt gating. |
| apps/mail/components/categories/category-dialog.tsx | New dialog UI for category create/edit. |
| apps/mail/app/routes.ts | Adds auth callback/signup routes and feedback route; updates settings route to user-information. |
| apps/mail/app/root.tsx | Updates theme-color meta and general background tokens. |
| apps/mail/app/page.tsx | Redirects index to /login. |
| apps/mail/app/globals.css | Replaces base theme tokens with Doorman pink palette (light/dark). |
| apps/mail/app/(routes)/settings/user-information/page.tsx | New settings page to capture user profile fields. |
| apps/mail/app/(routes)/settings/page.tsx | Redirects settings root to user-information. |
| apps/mail/app/(routes)/settings/labels/page.tsx | Removes labels settings page implementation. |
| apps/mail/app/(routes)/settings/labels/colors.ts | Removes labels color constants. |
| apps/mail/app/(routes)/settings/[...settings]/page.tsx | Sets default settings section and swaps labels->categories + adds user-information. |
| apps/mail/app/(routes)/mail/layout.tsx | Adds profile gate + new top-bar layout wrapper. |
| apps/mail/app/(routes)/mail/feedback/page.tsx | New feedback page using TRPC mail.submitFeedback. |
| apps/mail/app/(full-width)/terms.tsx | Uses theme background token. |
| apps/mail/app/(full-width)/privacy.tsx | Uses theme background token. |
| apps/mail/app/(full-width)/pricing.tsx | Uses theme background token. |
| apps/mail/app/(full-width)/about.tsx | Uses theme background token. |
| apps/mail/app/(auth)/zero/signup/page.tsx | Implements email/password signup flow for @0.email. |
| apps/mail/app/(auth)/login/page.tsx | Uses theme background token. |
| apps/mail/app/(auth)/login/login-client.tsx | Rebrands login strings and switches styling tokens. |
| apps/mail/app/(auth)/callback/page.tsx | New auth callback page that routes users to signup. |
| .github/workflows/sync-production.yml | Changes automated production sync target branch to doorman. |
| .github/workflows/ci.yml | Comments out JS lint step. |
Comments suppressed due to low confidence (1)
apps/mail/components/mail/mail-list.tsx:1
- Sorting calls
getPriorityScorerepeatedly inside the comparator, which results in many cache lookups per sort (O(n log n) comparisons * 2 lookups each). Build aMap<threadId, score>once before sorting (single pass), then sort using precomputed values; this will reduce work and make performance more predictable for large lists.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
24
to
+28
| - name: Install dependencies 📦 | ||
| run: pnpm install | ||
|
|
||
| - name: Lint JS | ||
| run: pnpm dlx oxlint@latest --deny-warnings | ||
| # - name: Lint JS | ||
| #run: pnpm dlx oxlint@latest --deny-warnings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
READ CAREFULLY THEN REMOVE
Remove bullet points that are not relevant.
PLEASE REFRAIN FROM USING AI TO WRITE YOUR CODE AND PR DESCRIPTION. IF YOU DO USE AI TO WRITE YOUR CODE PLEASE PROVIDE A DESCRIPTION AND REVIEW IT CAREFULLY. MAKE SURE YOU UNDERSTAND THE CODE YOU ARE SUBMITTING USING AI.
Description
Please provide a clear description of your changes.
Type of Change
Please delete options that are not relevant.
Areas Affected
Please check all that apply:
Testing Done
Describe the tests you've done:
Security Considerations
For changes involving data or authentication:
Checklist
Additional Notes
Add any other context about the pull request here.
Screenshots/Recordings
Add screenshots or recordings here if applicable.
By submitting this pull request, I confirm that my contribution is made under the terms of the project's license.