Skip to content

Conversation

@github-actions
Copy link
Contributor

This is an automated pull request to merge mariano/undo-ui-changes into dev.
It was created by the [Auto Pull Request] action.

@cursor
Copy link

cursor bot commented Dec 16, 2025

PR Summary

Replaces the old sidebar system with a custom AnimatedLayout + Sidebar (incl. mobile menu), adds cookie‑backed collapse state via server action/context, and streamlines UI library components/exports.

  • App layout/navigation
    • Introduces context/sidebar-context and cookie-backed server action actions/sidebar.updateSidebarState to persist sidebar-collapsed.
    • Replaces @comp/ui/sidebar with custom components/AnimatedLayout + components/Sidebar, SidebarCollapseButton, SidebarLogo.
    • Adds components/MobileMenu and rewires Header to use it; updates [orgId]/layout.tsx to use new layout/provider and cookie for initial state.
    • Refactors components/MainMenu to button/tooltip-based nav (no Sidebar primitives) and improves active indicator logic.
    • Revamps components/OrganizationSwitcher to dialog-based selector with sorting/search; supports collapsed mode.
  • UI library (@trycompai/ui)
    • Removes sidebar component and use-mobile hook; drops related CSS variables; updates components.json (style: default, rsc: false).
    • Tweaks button (centered content), dropdown-menu (simplified exports/APIs, icon updates), sheet typings, and globals/base styles.
    • Pins lucide-react to ^0.554.0 and adjusts lockfile.
  • Misc
    • Adds components/animated-layout.tsx; cleans providers by removing TooltipProvider wrapper.

Written by Cursor Bugbot for commit ece08b8. This will update automatically on new commits. Configure here.

@vercel
Copy link

vercel bot commented Dec 16, 2025

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

Project Deployment Review Updated (UTC)
app Ready Ready Preview, Comment Dec 16, 2025 7:54pm
portal Ready Ready Preview, Comment Dec 16, 2025 7:54pm

@Marfuen Marfuen merged commit ec93c2e into main Dec 16, 2025
10 of 12 checks passed
@Marfuen Marfuen deleted the mariano/undo-ui-changes branch December 16, 2025 19:54
@graphite-app
Copy link

graphite-app bot commented Dec 16, 2025

Graphite Automations

"Auto-assign PRs to Author" took an action on this PR • (12/16/25)

1 reviewer was added to this PR based on Mariano Fuentes's automation.

</div>
<div className="bg-background flex-1 overflow-y-auto">{children}</div>
</div>
);
Copy link

Choose a reason for hiding this comment

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

Bug: Sidebar collapse won't visually update until page refresh

The AnimatedLayout component receives isCollapsed as a server-side prop from layout.tsx, which is read from the cookie during server rendering. When the user clicks the collapse button, the SidebarContext updates and the cookie is set via server action, but AnimatedLayout (a server component) still uses the original server-rendered isCollapsed value for the sidebar width. The UI won't visually change until the page is refreshed to read the new cookie value. The context is updated but nothing consumes it for display—all visual components receive their isCollapsed value from server-rendered props.

Additional Locations (1)

Fix in Cursor Fix in Web

}
}
}, [activeIndex, pathname, isCollapsed]);
}, [activeIndex, pathname]);
Copy link

Choose a reason for hiding this comment

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

Bug: Missing dependency causes stale active menu indicator position

The useEffect that updates the active indicator position had isCollapsed removed from its dependency array. When the sidebar collapses or expands, menu items change size (from full-width buttons to icon-only), affecting their offsetTop and offsetHeight values. Without isCollapsed in the dependencies, the effect won't re-run when the collapsed state changes, causing the active indicator to be positioned incorrectly until a window resize or navigation occurs.

Fix in Cursor Fix in Web

organizationId={organizationId}
isQuestionnaireEnabled={isQuestionnaireEnabled}
isTrustNdaEnabled={isTrustNdaEnabled}
/>
Copy link

Choose a reason for hiding this comment

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

Bug: Mobile menu missing auditor role props causes incorrect menu

The Header component doesn't fetch or pass hasAuditorRole and isOnlyAuditor props to MobileMenu, and consequently MobileMenu doesn't pass them to MainMenu. Since these props default to false, mobile users see incorrect menu items: auditors won't see the "Auditor View" item (hidden when hasAuditorRole is false), and auditor-only users will incorrectly see "Integrations" and "Settings" (which should be hidden when isOnlyAuditor is true). The desktop Sidebar correctly fetches member roles from the database and passes these props.

Additional Locations (1)

Fix in Cursor Fix in Web

claudfuen pushed a commit that referenced this pull request Dec 16, 2025
# [1.71.0](v1.70.0...v1.71.0) (2025-12-16)

### Features

* Added logout function to onboarding/setup ([#1914](#1914)) ([d58341b](d58341b))
* **integrations:** update sanitized inputs for github to read monorepo apps ([#1929](#1929)) ([5912194](5912194))
* **onboarding:** add skip functionality to onboarding steps ([#1925](#1925)) ([b522c10](b522c10))

### Reverts

* Revert "[dev] [Itsnotaka] daniel/ui ([#1915](#1915))" ([#1928](#1928)) ([ec93c2e](ec93c2e))
@claudfuen
Copy link
Contributor

🎉 This PR is included in version 1.71.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants