Skip to content

improvement(headers): one action cluster and one ordering app-wide - #6210

Merged
waleedlatif1 merged 1 commit into
stagingfrom
headers-app-wide-consistency
Aug 3, 2026
Merged

improvement(headers): one action cluster and one ordering app-wide#6210
waleedlatif1 merged 1 commit into
stagingfrom
headers-app-wide-consistency

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Follow-up to #6206, which standardized detail-page header order. This extends it past settings.

Summary

  • 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 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, exported next to PAGE_HEADER_BAR, and all five compose it. The app has exactly two bar geometries and now exactly one action cluster.
  • Resource.Header ranks its actions through orderHeaderActions too, so tables/files/knowledge/logs inherit the same ordering as settings instead of rendering their array verbatim. ResourceAction gains id, the only field that kept it from being a subset of SettingsAction.
  • Delete is now ranked by its id, not by position. That matters on a header with no primary action: file detail listed Download → Share → Delete, leaving a destructive chip in the slot a primary would occupy. Tagging it id:'delete' fixes the order without inventing a primary.

Deliberately not changed

  • The mothership tab strip (ResourceTabs) — different surface, icon Buttons by design.
  • Merging PAGE_HEADER_BAR with Resource.Header's bordered bar — the border is load-bearing for the filter row beneath it.
  • Breadcrumbs vs back chip — the two shells have genuinely different left sides.

Type of Change

  • Improvement

Testing

tsc and biome clean. 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

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

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

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 3, 2026 5:29pm

Request Review

@cursor

cursor Bot commented Aug 3, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
UI consistency and header action ordering only; no auth, data, or API changes. Visible spacing change on resource pages (chips gain gap).

Overview
Introduces HEADER_ACTION_CLUSTER next to PAGE_HEADER_BAR and replaces ad hoc right-side wrappers (flex items-center, missing height/gap on Resource.Header, etc.) across settings, credential detail, integrations, and resource pages so chip rows share h-[30px] and gap-1.

Resource.Header now runs actions through orderHeaderActions, matching settings; ResourceAction adds optional id (e.g. id: 'delete' on file detail). orderHeaderActions ranks id:'delete' before discard and primary, so headers without a primary action don’t leave Delete in the right-most slot.

Docs and settings-header-order.test.ts cover the new Delete-by-id behavior.

Reviewed by Cursor Bugbot for commit 9de6b0a. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR standardizes header action-cluster geometry and applies a shared action-ordering policy to resource headers.

  • Adds a shared HEADER_ACTION_CLUSTER class constant and adopts it across settings, credential, resource, and integration headers.
  • Extends ResourceAction with an optional stable ID and routes resource actions through orderHeaderActions.
  • Tags the file-detail delete action and adds coverage for ID-based delete placement.

Confidence Score: 5/5

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

Important Files Changed

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

@waleedlatif1
waleedlatif1 merged commit feaddc4 into staging Aug 3, 2026
27 checks passed
@waleedlatif1
waleedlatif1 deleted the headers-app-wide-consistency branch August 3, 2026 17:31
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