Skip to content

fix(desktop): give the Add Trigger button the same inset as the trigger rows - #6569

Merged
saddlepaddle merged 1 commit into
mainfrom
fix/trigger-surface-bottom-padding
Aug 17, 2026
Merged

saddlepaddle merged 1 commit into
mainfrom
fix/trigger-surface-bottom-padding

Conversation

@saddlepaddle

@saddlepaddle saddlepaddle commented Aug 17, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The trigger editor surface (rounded-[12px] bg-foreground/[0.04] p-1) had visibly more room above its first row than below the "Add Trigger" button. Measured over CDP in the running app before touching anything:

before after
surface top edge → first row's content (surface p-1 4px + row py-1.5 6px) 10px 10px
"Add Trigger" button bottom edge → surface bottom edge 4px 10px

The rows carry 6px of their own vertical padding; the button carried none, so the surface's uniform p-1 came out uneven at the bottom.

Change

One class: mb-1.5 on the Add Trigger button. It goes on the button rather than as extra surface padding because it's the button that lacks what every row has, and the separator right above it already carries the same mb-1.5 to match the row padding — the 6px unit is now consistent throughout the surface. Row padding, the separator, and the button's h-10 are untouched.

Note: with no triggers (only the button in the surface) the button sits 4px from the top and 10px from the bottom; kept unconditional to keep this a one-class change.

Verification

  • CDP against this workspace's renderer (dark theme, 2× DPR), automation detail page: numbers above re-measured after the change (getBoundingClientRect on the surface, first row, and button); before/after screenshots confirm the only thing that moved is the surface's bottom edge, 6px lower.
  • bun run typecheck → exit 0, bun run lint → exit 0 (repo root).

Summary by cubic

Balances vertical spacing in the Triggers Editor surface by adding mb-1.5 to the Add Trigger button. Previously the bottom spacing was 4px; now top and bottom spacing are both 10px, matching row padding and improving visual consistency.

  • Only change: add mb-1.5 to the Add Trigger button in apps/desktop/src/renderer/routes/_authenticated/_dashboard/automations/components/TriggersEditor/TriggersEditor.tsx; rows and separator remain unchanged.
  • No functional behavior changes; layout spacing only. Button height (h-10) and hover styles are unchanged.
  • With no triggers, the button remains 4px from the top and 10px from the bottom; this is intentional to keep the change minimal.

Written for commit 5e3d6eb. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Style
    • Improved spacing around the Add Trigger button for a cleaner layout in the automation trigger editor.

The trigger surface is padded p-1 all round, but the rows inside it
carry py-1.5 of their own while the Add Trigger button carries none.
Measured in the app: 10px from the surface's top edge to the first row's
content (4 + 6), but only 4px from the button's bottom edge to the
surface's bottom edge, so the surface looked cramped at the bottom.

The 6px goes on the button as mb-1.5 rather than as extra surface
padding: it is the button that lacks what every row has, and the
separator above it already carries the same mb-1.5 to match the row
padding. Rows, separator, and button height are untouched; the button
now sits 10px above the surface's bottom edge, matching the top.
@coderabbitai

coderabbitai Bot commented Aug 17, 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e08e295c-6e3e-4d47-bf86-7703280c14b2

📥 Commits

Reviewing files that changed from the base of the PR and between 630a41f and 5e3d6eb.

📒 Files selected for processing (1)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/automations/components/TriggersEditor/TriggersEditor.tsx

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


📝 Walkthrough

Walkthrough

The Add Trigger button in TriggersEditor now has bottom margin. Its existing sizing, layout, and hover styles remain unchanged.

Changes

Trigger button spacing

Layer / File(s) Summary
Add Trigger button spacing
apps/desktop/src/renderer/routes/_authenticated/_dashboard/automations/components/TriggersEditor/TriggersEditor.tsx
The Add Trigger button adds bottom margin while preserving its existing styles.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 5e3d6

This is a narrowly scoped spacing adjustment with no actionable merge-blocking risk remaining after normal checks and review.

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title uses conventional commit format and clearly describes the spacing change to the Add Trigger button.
Description check ✅ Passed The description clearly explains the change, rationale, measurements, and verification, but omits the template checklist and attached screenshots.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/trigger-surface-bottom-padding

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.

@saddlepaddle
saddlepaddle merged commit d956dfd into main Aug 17, 2026
12 checks passed
@saddlepaddle
saddlepaddle deleted the fix/trigger-surface-bottom-padding branch August 17, 2026 22:06
@github-actions

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch

Thank you for your contribution! 🎉

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.

1 participant