improvement(headers): one action cluster and one ordering app-wide - #6210
Conversation
Extends the settings-header ordering past detail pages. Five headers hand-rolled their own action wrapper. `resource-header` used `flex shrink-0 items-center` — no height, no gap, so chips on tables, files, knowledge, logs and scheduled tasks sat flush against each other; the integrations tab strip and the integration block detail each used `ml-auto flex items-center`. Only the settings shell and credential detail wore the intended `flex h-[30px] items-center gap-1`. That string is now HEADER_ACTION_CLUSTER, next to PAGE_HEADER_BAR, and all five compose it. `Resource.Header` now ranks its actions through orderHeaderActions too, so the resource pages inherit the same order as settings rather than rendering their array verbatim. `ResourceAction` gains `id`, which was the only field keeping it from being a subset of `SettingsAction`. Delete is now ranked by its `id` rather than by where the caller put it. That matters for a header with no primary action: the file detail listed `Download → Share → Delete`, leaving a destructive chip in the slot a primary would occupy. Tagging it `id:'delete'` fixes that without inventing a primary.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview
Docs and Reviewed by Cursor Bugbot for commit 9de6b0a. Configure here. |
Greptile SummaryThe PR standardizes header action-cluster geometry and applies a shared action-ordering policy to resource headers.
Confidence Score: 5/5The PR appears safe to merge, with no concrete changed-code failure identified. The shared layout constant preserves existing settings and credential geometry, while current resource-header callers remain compatible with the documented and tested action-ranking behavior.
|
| Filename | Overview |
|---|---|
| apps/sim/app/workspace/[workspaceId]/components/resource/components/resource-header/resource-header.tsx | Applies the shared action-cluster geometry and deterministic ordering while preserving current action handlers and supported metadata. |
| apps/sim/components/settings/settings-header.tsx | Extends the existing stable ranking policy with a dedicated delete band and reuses the shared cluster class. |
| apps/sim/components/page-header-bar.ts | Introduces the single shared class constant for 30px header action clusters. |
| apps/sim/app/workspace/[workspaceId]/files/files.tsx | Identifies the file-detail delete action so the shared sorter places it in the destructive-action band. |
| apps/sim/components/settings/settings-header-order.test.ts | Adds focused regression coverage proving delete placement is based on ID rather than caller array position. |
Reviews (1): Last reviewed commit: "improvement(headers): one action cluster..." | Re-trigger Greptile
Follow-up to #6206, which standardized detail-page header order. This extends it past settings.
Summary
resource-headerusedflex shrink-0 items-center— no height, no gap — so chips on tables, files, knowledge, logs and scheduled tasks sat flush against each other. The integrations tab strip and integration block detail each usedml-auto flex items-center. Only the settings shell and credential detail wore the intendedflex h-[30px] items-center gap-1.HEADER_ACTION_CLUSTER, exported next toPAGE_HEADER_BAR, and all five compose it. The app has exactly two bar geometries and now exactly one action cluster.Resource.Headerranks its actions throughorderHeaderActionstoo, so tables/files/knowledge/logs inherit the same ordering as settings instead of rendering their array verbatim.ResourceActiongainsid, the only field that kept it from being a subset ofSettingsAction.id, not by position. That matters on a header with no primary action: file detail listedDownload → Share → Delete, leaving a destructive chip in the slot a primary would occupy. Tagging itid:'delete'fixes the order without inventing a primary.Deliberately not changed
ResourceTabs) — different surface, iconButtons by design.PAGE_HEADER_BARwithResource.Header's bordered bar — the border is load-bearing for the filter row beneath it.Type of Change
Testing
tscandbiomeclean. 1969 tests pass across settings, files, tables, knowledge, skills, integrations and ee. New ranking case added for the id-placed Delete; the ordering tests were verified to fail when the mechanism is removed. Not exercised in a browser — the cluster change is visible (resource-page chips gain a 4px gap), so it's worth a look.Checklist