Skip to content

improvement(ui): consolidate the disclosure chevron and order resource menus like the sidebar - #6447

Merged
waleedlatif1 merged 2 commits into
stagingfrom
worktree-chevron-sizing-audit
Aug 8, 2026
Merged

improvement(ui): consolidate the disclosure chevron and order resource menus like the sidebar#6447
waleedlatif1 merged 2 commits into
stagingfrom
worktree-chevron-sizing-audit

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Extract disclosureChevronClass (14px, --text-icon, 150ms) into chip-chrome as the single source; the sidebar section header and both sidebar trees hand-copied it after improvement(ui): unbold the app, align the folder chevron, tidy the feedback modal #6400, so they could drift apart again
  • Add chipIconSlotClass for the 16px slot ChipChevronDown, ChipSelect, ChipDropdown and ChipDatePicker each re-derived
  • Fix both Back buttons — they used a ChevronDown rotated 90° at 10px (wrong glyph, 4px under every other chevron); now ChevronLeft at 14px in that slot
  • Swap the sidebar file tree's hand-inlined SVGs (strokeWidth 2) for the emcn icons the workflow tree beside it already used, so the two trees stop showing different folder glyphs
  • Fix that tree's file-row indent: it cleared only the chevron's width, landing the file icon 4px left of a folder's and 2px smaller despite the comment claiming they aligned
  • Order the chat +/@ resource menus like the sidebar — Integrations, Chats, Tables, Files, Knowledge Bases, Logs, Workflows, then Browser/Terminal on desktop. They previously emitted all foldered families as submenus and only then the flat ones, pinning Workflows to the top regardless of order
  • Document the general rule in .claude/rules/sim-list-ordering.md + CLAUDE.md

Type of Change

  • Bug fix
  • Improvement

Testing

Type-check and lint pass across both workspaces; @sim/emcn tests pass (62). Verified the cn() composition emits byte-identical geometry at all four chevron call sites, and checked the indent arithmetic (folder icon x=26 / label x=46; file row now matches, was 22/44). Menu order verified against the sidebar's section order. Not exercised in a browser — no local env/DB in this worktree.

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)

…e menus like the sidebar

#6400 aligned the workflow-tree folder chevron to the sidebar section header
(16px/100ms -> 14px/150ms) but left the literal hand-copied in three files, so the
next edit could drift them apart again. Extracts `disclosureChevronClass` into
chip-chrome as the single source and points the section header and both sidebar
trees at it. Adds `chipIconSlotClass` for the 16px slot that ChipChevronDown,
ChipSelect, ChipDropdown and ChipDatePicker each re-derived.

Both Back buttons rendered a ChevronDown rotated 90deg at 10px — wrong glyph, and
4px under every other chevron in the app; they are now ChevronLeft at 14px in that
shared slot. The sidebar file tree drew hand-inlined SVGs at strokeWidth 2 next to
the workflow tree's emcn icons at 1.55, so the two trees showed different folder
glyphs; both now use the emcn set. Its file rows also indented by the chevron's
width alone, landing their icon 4px left of a folder's and 2px smaller despite the
comment claiming they lined up — they now clear the chevron plus the row gap at
the same 16px size.

Separately, the chat `+`/`@` resource menus rendered every foldered family as a
submenu and only then the flat ones, which pinned Workflows to the top regardless
of any ordering. Adds `RESOURCE_MENU_ORDER` mirroring the sidebar top-down and
merges both kinds into one ordered pass, so the menus read Integrations, Chats,
Tables, Files, Knowledge Bases, Logs, Workflows, then Browser and Terminal on
desktop. Documents the general rule in .claude/rules/sim-list-ordering.md.
@vercel

vercel Bot commented Aug 8, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 8, 2026 9:04pm

Request Review

@cursor

cursor Bot commented Aug 8, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
UI-only consistency and documentation; no auth, data, or API changes. Menu refactor is localized to resource dropdown rendering with clear ordering constants.

Overview
Introduces a list & menu ordering rule (.claude/rules/sim-list-ordering.md + CLAUDE.md): menus mirror where users already read the same set (sidebar, page header, action bar).

Resource attach menus (+ / @ / add-resource dropdown) now use RESOURCE_MENU_ORDER and byResourceMenuOrder, and ResourceMenuSections renders foldered and flat families in one sorted pass instead of all submenus first (which pinned workflows at the top).

Other ordering fixes: Recently Deleted tabs / URL literals; search palette resource sections; list context menus for files, tables, and knowledge (match header action order); table cell context menu (Run / Re-run / Stop before View execution).

Design tokens in @sim/emcn: disclosureChevronClass and chipIconSlotClass replace duplicated chevron/slot markup in sidebar trees, chip dropdowns, and settings Back (now ChevronLeft at 14px). Sidebar file tree swaps inline SVGs for shared icons and fixes file-row indent so icons align with folder rows.

Reviewed by Cursor Bugbot for commit 085f58f. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR consolidates shared chip and disclosure icon styling, aligns sidebar tree visuals, and makes resource menus and related lists follow canonical sidebar ordering.

  • Introduces shared chevron and icon-slot classes in @sim/emcn.
  • Interleaves foldered and flat resource families through a canonical resource order.
  • Aligns context menus, search sections, and Recently Deleted tabs with their primary navigation surfaces.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/add-resource-dropdown/add-resource-dropdown.tsx Replaces phased foldered/flat rendering with a single canonically ordered resource-menu pass.
apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-registry/resource-registry.tsx Adds the shared resource-family ordering constant and comparator used by resource menus.
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/file-list/file-list.tsx Standardizes disclosure and file-tree icons while correcting file-row indentation.
packages/emcn/src/components/chip/chip-chrome.ts Centralizes reusable disclosure-chevron and chip icon-slot geometry.
apps/sim/app/workspace/[workspaceId]/settings/components/recently-deleted/search-params.ts Reorders accepted Recently Deleted resource tabs to match sidebar navigation.

Reviews (2): Last reviewed commit: "improvement(ui): order the remaining res..." | Re-trigger Greptile

…reads them

An audit of every menu, tab strip, and context menu against the surface the user
already reads those items on turned up six more divergences.

The table row context menu put View execution before the Run/Re-run/Stop cluster
while the action bar puts it after, so the same four actions read in two orders;
the menu now follows the bar. The Files, Tables, and Knowledge empty-space create
menus were each the exact reverse of their own page header, and each named the
same action differently ("Create table" vs "New table", "Add knowledge base" vs
"New base") — reversed to match, labels unified.

Recently Deleted led with Workflows and buried Chats last, and put Knowledge Bases
ahead of Files; it now follows the sidebar after the default All tab. The command
palette hoisted Workflows from last to second for the same reason, and is now in
sidebar order too. Chats stays first in both, so the palette's Enter default is
unchanged.

Drops the unused RESOURCE_TYPES export: nothing consumed it, and its declaration
order was nearly the inverse of RESOURCE_MENU_ORDER, so the first consumer to map
it would have silently rendered a backwards menu.

Not included: buildUnifiedSettingsNavigation never applies its own unified.order
and returns registry declaration order instead. Nothing user-visible today (the
sidebar re-sorts before rendering) but navigation.test.ts pins the unsorted order
as canonical, so fixing it means changing that test — worth doing deliberately
rather than inside this PR.
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 085f58f. Configure here.

@waleedlatif1
waleedlatif1 merged commit 107748d into staging Aug 8, 2026
30 checks passed
@waleedlatif1
waleedlatif1 deleted the worktree-chevron-sizing-audit branch August 8, 2026 21:13
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