Skip to content

Comments

fix: deploy quick fixes#5085

Open
ogzhanolguncu wants to merge 9 commits intomainfrom
deploy-quick-fixes
Open

fix: deploy quick fixes#5085
ogzhanolguncu wants to merge 9 commits intomainfrom
deploy-quick-fixes

Conversation

@ogzhanolguncu
Copy link
Contributor

What does this PR do?

This PR fixes:

  • Safari network tab rendering issue
Screenshot 2026-02-19 at 15 28 47
  • Locks network tab to eliminate weird panning issues
  • Fixes hover issue of workplace switcher
Screenshot 2026-02-19 at 13 37 02
  • Makes sure when reading the RPS for sentinel we read the correct project's sentinel
  • Uses same default value for items in the /project/settings
  • Removes faulty default value for healthcheck setting
Screenshot 2026-02-19 at 13 36 57 - Removes `Environment Variables` and `Custom Domains` from project overview coz they are moved to settings.

How should this be tested?

  • Just trigger a deployment locally and check network tab
  • Play around with the UI a bit

Checklist

Required

  • Filled out the "How to test" section in this PR
  • Read Contributing Guide
  • Self-reviewed my own code
  • Commented on my code in hard-to-understand areas
  • Ran pnpm build
  • Ran pnpm fmt
  • Ran make fmt on /go directory
  • Checked for warnings, there are none
  • Removed all console.logs
  • Merged the latest changes from main onto my branch with git pull origin main
  • My changes don't cause any responsiveness issues

Appreciated

  • If a UI change was made: Added a screen recording or screenshots to this PR
  • Updated the Unkey Docs if changes were necessary

@vercel
Copy link

vercel bot commented Feb 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dashboard Ready Ready Preview, Comment Feb 20, 2026 9:07pm
engineering Ready Ready Preview, Comment Feb 20, 2026 9:07pm

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 19, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

Adds a locked prop to the infinite canvas to disable interactions, introduces per-node sizing and a Safari foreignObject workaround, renames generator model from regions→sentinels, adjusts several node/status UI layouts, and changes multiple empty-state displays to render null (with FormSettingCard fallback).

Changes

Cohort / File(s) Summary
Network Canvas Interaction
web/apps/dashboard/app/(app)/[workspaceSlug]/projects/[projectId]/(overview)/deployments/[deploymentId]/network/deployment-network-view.tsx, web/apps/dashboard/app/(app)/[workspaceSlug]/projects/[projectId]/(overview)/deployments/[deploymentId]/network/unkey-flow/components/canvas/infinite-canvas.tsx
Added locked?: boolean prop to InfiniteCanvas; when locked disables wheel/zoom and mouse interactions, adjusts initial origin offset, and switches cursor styling.
Tree / Element Sizing & Safari Fix
.../components/tree/tree-element-node.tsx, .../components/tree/tree-layout.tsx, web/apps/dashboard/styles/tailwind/tailwind.css
TreeElementNode now accepts size and centers via adjusted foreignObject offsets; TreeLayout passes NODE_SIZES into elements. Added .safari-fo-fix CSS with Safari-specific fixes and animations.
Canvas Boundary Usage
.../components/canvas/canvas-boundary.tsx
ErrorBoundary fallback now supplies size={{ width: 0, height: 0 }} to TreeElementNode usage.
Status / Health UI
.../components/nodes/status/status-dot.tsx, .../status/status-indicator.tsx, .../nodes/node-wrapper/health-banner.tsx, .../skeleton-node/skeleton-node.tsx, .../skeleton-node/skeleton-layout.tsx
Refactored StatusDot to drop variant and use grid-area layering; removed hover scale animations, changed transitions to shadow-only; simplified health-banner gradient layout; reduced/removed certain skeleton nodes and animations.
Node Wrapper Styling
.../components/nodes/node-wrapper/node-wrapper.tsx
Removed relative positioning classes and replaced hover scale with shadow transition for hover interactions.
Simulation / Generator Model
.../components/simulate/tree-generate.tsx, web/apps/dashboard/lib/trpc/routers/deploy/network/generate.ts
Renamed regions→sentinels and instancesPerRegion→instancesPerSentinel across UI and generator; updated presets, ranges (instances per sentinel min can be 0), health mappings, and replaced static flags with mapRegionToFlag usage (imported from ./utils). Added optional instanceDirection field.
Sentinel Data Query
web/apps/dashboard/lib/trpc/routers/deploy/network/get-sentinel-rps.ts
Include projectId in lookup/filter and add orderBy(createdAt desc) to deployment selection.
Live Indicator
.../components/overlay/live.tsx
Removed explicit variant prop from StatusDot usage (now uses default).
Settings — Empty-State Display Changes
.../settings/components/advanced-settings/command.tsx, .../custom-domains/index.tsx, .../env-vars/index.tsx, .../runtime-settings/regions.tsx, .../runtime-settings/healthcheck/index.tsx
Multiple settings components now render null instead of an explicit "None" text for empty states; HealthcheckForm made internal with hasPreviousData prop to conditionally render previous data.
Form Setting Card Fallback
.../settings/components/shared/form-setting-card.tsx
Added nullish coalescing fallback: label={displayValue ?? <span className="text-gray-11 font-normal">None</span>} so null displayValues show a gray "None" placeholder.
Project Page Structure
web/apps/dashboard/app/(app)/[workspaceSlug]/projects/[projectId]/page.tsx
Removed Custom Domains and Environment Variables sections and related imports; simplified project page rendering.
Sidebar Styling
web/apps/dashboard/components/navigation/sidebar/team-switcher.tsx
Added hover:bg-grayA-3 background on workspace switcher dropdown items for hover state.
Tailwind config
web/internal/ui/tailwind.config.js
Changed marquee keyframes to animate via text-indent instead of translateX transforms.
Minor Formatting
web/apps/dashboard/app/(app)/[workspaceSlug]/projects/[projectId]/(overview)/deployments/[deploymentId]/page.tsx
Whitespace removal only (empty line removed).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'fix: deploy quick fixes' is vague and generic, using non-descriptive terms like 'quick fixes' that don't convey specific information about the main changes. Consider a more specific title that describes the primary fix, such as 'fix: address Safari rendering, network panning, and settings defaults' or similar.
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly outlines multiple fixes with specific details about Safari rendering, network locking, switcher hover, sentinel RPS reading, and removal of UI components from project overview.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch deploy-quick-fixes

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
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: 3

Caution

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

⚠️ Outside diff range comments (1)
web/apps/dashboard/app/(app)/[workspaceSlug]/projects/[projectId]/(overview)/deployments/[deploymentId]/network/unkey-flow/components/simulate/tree-generate.tsx (1)

224-258: ⚠️ Potential issue | 🟡 Minor

Set min="1" for instance sliders to prevent empty sentinel groups.

The slider currently allows 0 instances per sentinel, which would create sentinels with no children in the visualization. While this doesn't cause a divide-by-zero error (the generator uses Array.from({ length: instanceCount }, ...) which handles 0 gracefully), it produces semantically invalid network topologies. All preset configurations enforce min >= 1, so the slider should do the same.

Fix
-                min="0"
+                min="1"
...
-                min="0"
+                min="1"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@web/apps/dashboard/app/`(app)/[workspaceSlug]/projects/[projectId]/(overview)/deployments/[deploymentId]/network/unkey-flow/components/simulate/tree-generate.tsx
around lines 224 - 258, The instance-per-sentinel range inputs allow 0
currently; change both input elements that read/write
customConfig.instancesPerSentinel (the two <input type="range"> controls whose
onChange call setCustomConfig) to use min="1" instead of min="0" so sliders
cannot select zero, and ensure the onChange handlers clamp/adjust the paired
value if necessary to keep min <= max (update setCustomConfig logic in those
handlers to enforce the constraint while preserving generateMutation.isLoading
disabling).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@web/apps/dashboard/app/`(app)/[workspaceSlug]/projects/[projectId]/(overview)/deployments/[deploymentId]/network/unkey-flow/components/nodes/node-wrapper/health-banner.tsx:
- Line 20: Replace the Tailwind template literal width class which the JIT can't
detect by moving the dynamic width into an inline style: keep the static
Tailwind classes (e.g., "mx-auto" and "-m-[20px]") on the div in the
HealthBanner component and add a style prop that sets width using
DEFAULT_NODE_WIDTH (e.g., style={{ width: `${DEFAULT_NODE_WIDTH}px` }} or
equivalent), removing the `w-[${DEFAULT_NODE_WIDTH}px]` from the className.

In
`@web/apps/dashboard/app/`(app)/[workspaceSlug]/projects/[projectId]/(overview)/deployments/[deploymentId]/network/unkey-flow/components/tree/tree-element-node.tsx:
- Around line 1-35: The TreeElementNode component signature now requires a size
prop but canvas-boundary.tsx's error boundary fallback (the <TreeElementNode> at
line 11) is missing it; update that TreeElementNode usage to include a size
object (e.g., width: 400, height: 250) along with the existing id and position
so it matches how tree-layout.tsx passes size (NODE_SIZES[...] ) and preserves
the doubling logic in TreeElementNode.

In `@web/apps/dashboard/lib/trpc/routers/deploy/network/generate.ts`:
- Around line 14-19: The schema allows instancesPerSentinel.min >
instancesPerSentinel.max which can produce a negative range for getRandomInt;
update generatorConfigSchema to add a cross-field validation (using z.refine or
superRefine) on the instancesPerSentinel object to ensure min <= max and return
a clear validation error message; reference the instancesPerSentinel object and
its min/max fields in the refinement so the constraint is enforced before any
code (e.g., where getRandomInt is used) runs.

---

Outside diff comments:
In
`@web/apps/dashboard/app/`(app)/[workspaceSlug]/projects/[projectId]/(overview)/deployments/[deploymentId]/network/unkey-flow/components/simulate/tree-generate.tsx:
- Around line 224-258: The instance-per-sentinel range inputs allow 0 currently;
change both input elements that read/write customConfig.instancesPerSentinel
(the two <input type="range"> controls whose onChange call setCustomConfig) to
use min="1" instead of min="0" so sliders cannot select zero, and ensure the
onChange handlers clamp/adjust the paired value if necessary to keep min <= max
(update setCustomConfig logic in those handlers to enforce the constraint while
preserving generateMutation.isLoading disabling).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants