Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

feat(mes): use the same navigation rail as the ERP

aashu93ff4e3cd3bc
diff --git a/.claude/skills/carbon-design/references/page-archetypes.md b/.claude/skills/carbon-design/references/page-archetypes.md
index e16d45df58..56db520adc 100644
--- a/.claude/skills/carbon-design/references/page-archetypes.md
+++ b/.claude/skills/carbon-design/references/page-archetypes.md
@@ -34,8 +34,9 @@ unless they start with `apps/` or `packages/`.
│ ⚙ │ ╰────────────────────────────────────────────────────────────────╯ │
└──────┴──────────────────────────────────────────────────────────────────┘
```
-- Shell: `routes/x+/_layout.tsx`. Rail: `components/Layout/Navigation/PrimaryNavigation.tsx`
- (icon rail, hover-expands, pushes content). Modules are registered in `hooks/useModules.tsx`
+- Shell: `routes/x+/_layout.tsx`. Rail: `components/Layout/Navigation/PrimaryNavigation.tsx`,
+ built on the shared `NavRail` from `@carbon/react` (the same rail MES uses): icon rail that
+ expands on mouse hover or when pinned with ⌘B, and pushes content. Modules are registered in `hooks/useModules.tsx`
(`{ key, permission, name, to, icon }`, Lucide icons, Settings pinned bottom).
- Topbar: breadcrumbs (from route `handle`), global ✎ Create menu
(`components/Layout/Topbar/CreateMenu.tsx`), notifications, avatar.
@@ -229,7 +230,7 @@ menu (add new document types to `CreateMenu.tsx`). Both link to the same `path.t
## 14. Responsive
One JS breakpoint: `useIsMobile` = `< 768px`. ERP is desktop-first:
-- < md: rail hidden → hamburger drawer; module sub-nav → "Submodules" drawer; Explorer and
+- < md: rail hidden → the same `NavRail` items in a left drawer, opened by the Topbar hamburger; module sub-nav → "Submodules" drawer; Explorer and
Properties become overlay drawers that close on navigation; breadcrumbs hidden.
- 768–1023px: Properties starts collapsed.
- Form grids collapse to one column (`grid-cols-1 md:grid-cols-2 lg:grid-cols-3`).
diff --git a/.claude/skills/carbon-design/references/shop-floor-mes.md b/.claude/skills/carbon-design/references/shop-floor-mes.md
index 8f4e94f00e..6f346d60dc 100644
--- a/.claude/skills/carbon-design/references/shop-floor-mes.md
+++ b/.claude/skills/carbon-design/references/shop-floor-mes.md
@@ -17,11 +17,11 @@ changes the ergonomics.
|---|---|---|
| Control size | `sm`/`md` (24/32px buttons) | **`size="lg"` default** (44–48px); hero Start/Pause 56 → 96 → 128px |
| Text | `text-xs`/`text-sm` | `text-sm`/`text-base`; big numbers for counts |
-| Navigation | module rail + sub-nav + breadcrumbs + ⌘K | touch `Sidebar` of **task queues** (Schedule, Assigned, Active, Jobs, Maintenance, Picking) with live counts; per-page sticky header with title or "‹ Back" |
+| Navigation | module rail + sub-nav + breadcrumbs + ⌘K | the same shared `NavRail` as ERP, holding **task queues** (Schedule, Assigned, Active, Recent, Jobs, Maintenance, Picking) with live count pills, then tools, then Time Card + user menu; per-page sticky header with title or "‹ Back" and the rail toggle |
| Detail tabs | routes | client `Tabs` (Details / Model / Instructions / Chat) |
| Actions | header strip, menus | **dock**: right column at `lg`, bottom bar below `lg` (safe-area padding); one color-coded primary; "More actions" sheet |
| Secondary actions | ⋯ menus, context menus | `BottomSheet` / FAB sheet of big round icon buttons |
-| Hover-reveal | common | **none** — everything visible |
+| Hover-reveal | common | **none** — everything visible (the nav rail's hover-expand is mouse-only; touch opens it with the header toggle / ⌘B) |
| Context menus / bulk | yes | **none** |
| Lists | feature-rich Table | cards in `grid-cols-[repeat(auto-fill,minmax(min(100%,330px),1fr))]`, simple tables with one search, Kanban |
| Keyboard | bare letters OK (`n`, `g`) | **no bare letters** — `alt+1..7`, space (start/stop), enter, arrows; yield Enter to scans |
diff --git a/apps/mes/app/components/AdjustInventory.tsx b/apps/mes/app/components/AdjustInventory.tsx
index 12119f62a4..0aae496c36 100644
--- a/apps/mes/app/components/AdjustInventory.tsx
+++ b/apps/mes/app/components/AdjustInventory.tsx
@@ -12,7 +12,7 @@ import {
ModalFooter,
ModalHeader,
ModalTitle,
- SidebarMenuButton,
+ NavRailItem,
toast,
useDisclosure,
useMount,
@@ -110,15 +110,11 @@ export function AdjustInventory({ add }: { add: boolean }) {
return (
<>
- <SidebarMenuButton
- tooltip={add ? t`Add Inventory` : t`Remove Inventory`}
+ <NavRailItem
+ icon={add ? <LuGitPullRequestCreateArrow /> : <LuGitBranchPlus />}
+ label={add ? t`Add Inventory` : t`Remove Inventory`}
onClick={modal.onOpen}
- >
- {add ? <LuGitPullRequestCreateArrow /> : <LuGitBranchPlus />}
- <span>
- {add ? <Trans>Add Inventory</Trans> : <Trans>Remove Inventory</Trans>}
- </span>
- </SidebarMenuButton>
+ />
{modal.isOpen && (
<Modal
open={modal.isOpen}
diff --git a/apps/mes/app/components/AppSidebar.tsx b/apps/mes/app/components/AppSidebar.tsx
index db2abf4c81..4d6e86225d 100644
--- a/apps/mes/app/components/AppSidebar.tsx
+++ b/apps/mes/app/components/AppSidebar.tsx
@@ -1,83 +1,34 @@
"use client";
import type { Company } from "@carbon/auth";
-import { CONTROLLED_ENVIRONMENT } from "@carbon/auth";
import {
- Avatar,
- cn,
- DropdownMenu,
- DropdownMenuContent,
- DropdownMenuIcon,
- DropdownMenuItem,
- DropdownMenuLabel,
- DropdownMenuRadioGroup,
- DropdownMenuRadioItem,
- DropdownMenuSeparator,
- DropdownMenuSub,
- DropdownMenuSubContent,
- DropdownMenuSubTrigger,
- DropdownMenuTrigger,
- HStack,
- ItarDisclosure,
- Sidebar,
- SidebarContent,
- SidebarFooter,
- SidebarGroup,
- SidebarGroupLabel,
- SidebarHeader,
- SidebarMenu,
- SidebarMenuButton,
- SidebarMenuItem,
- SidebarRail,
- Switch,
- useDisclosure,
- useMode,
- useRouteData,
- useShortcutKeyMap,
- useSidebar
+ NavRail,
+ NavRailDivider,
+ NavRailLink,
+ useShortcutKeyMap
} from "@carbon/react";
-import { Trans, useLingui } from "@lingui/react/macro";
-import type { ComponentProps } from "react";
-import { Suspense, useCallback, useMemo, useRef } from "react";
-import { BsFillHexagonFill } from "react-icons/bs";
+import { useLingui } from "@lingui/react/macro";
+import { Suspense, useMemo } from "react";
import {
LuActivity,
- LuBuilding,
LuCalendarDays,
- LuChevronDown,
LuCirclePlay,
LuClipboardList,
LuHistory,
- LuLogOut,
- LuMapPin,
- LuMonitor,
LuMonitorPlay,
- LuMoon,
LuPackageCheck,
- LuShieldCheck,
- LuSun,
- LuUser,
- LuUsers,
LuWrench
} from "react-icons/lu";
-import {
- Await,
- Form,
- Link,
- useFetcher,
- useLocation,
- useNavigate
-} from "react-router";
-import { useUser } from "~/hooks";
-import type { action } from "~/root";
+import { Await, useLocation, useNavigate } from "react-router";
import type { Location } from "~/services/types";
import { MES_NAV_SHORTCUTS } from "~/shortcuts";
import type { PinnedInUser } from "~/types";
-import { ERP_URL, path } from "~/utils/path";
+import { path } from "~/utils/path";
import { AdjustInventory } from "./AdjustInventory";
import { EndShift } from "./EndShift";
import Suggestion from "./Suggestion";
import { TimeCardButton } from "./TimeCardButton";
+import { UserNav } from "./UserNav";
export function AppSidebar({
activeEvents,
@@ -90,9 +41,8 @@ export function AppSidebar({
locations,
openClockEntry,
pinnedInUser,
- timeCardEnabled,
- ...props
-}: ComponentProps<typeof Sidebar> & {
+ timeCardEnabled
+}: {
activeEvents: number;
activeMaintenanceCount: number;
company: Company;
@@ -108,24 +58,10 @@ export function AppSidebar({
}> | null;
}) {
return (
- <Sidebar
- collapsible="icon"
- className="[&_[data-sidebar=sidebar]]:bg-background group-data-[side=left]:border-r-0"
- {...props}
- >
- <SidebarHeader>
- <TeamSwitcher company={company} />
- </SidebarHeader>
- <SidebarContent>
- <OperationsNav
- activeEvents={activeEvents}
- activeMaintenanceCount={activeMaintenanceCount}
- />
- <ToolsNav />
- </SidebarContent>
- <SidebarFooter>
- {timeCardEnabled && (
- <SidebarMenu>
+ <NavRail
+ footer={
+ <>
+ {timeCardEnabled && (
<Suspense fallback={<TimeCardButton openClockEntry={null} />}>
<Await resolve={openClockEntry}>
{(resolved) => (
@@ -142,237 +78,89 @@ export function AppSidebar({
)}
</Await>
</Suspense>
- </SidebarMenu>
- )}
- <UserNav
- company={company}
- companies={companies}
- consoleEnabled={consoleEnabled}
- consoleMode={consoleMode}
- location={location}
- locations={locations}
- pinnedInUser={pinnedInUser}
- />
- </SidebarFooter>
- <SidebarRail />
- </Sidebar>
+ )}
+ <UserNav
+ company={company}
+ companies={companies}
+ consoleEnabled={consoleEnabled}
+ consoleMode={consoleMode}
+ location={location}
+ locations={locations}
+ pinnedInUser={pinnedInUser}
+ />
+ </>
+ }
+ >
+ <QueueLinks
+ counts={{
+ active: activeEvents,
+ maintenance: activeMaintenanceCount
+ }}
+ />
+ <NavRailDivider />
+ <AdjustInventory add={true} />
+ <AdjustInventory add={false} />
+ <EndShift />
+ <Suggestion />
+ <DisplaysLink />
+ </NavRail>
);
}
-export function TeamSwitcher({ company }: { company: Company }) {
- const mode = useMode();
- const companyLogo =
- mode === "dark" ? company.logoDarkIcon : company.logoLightIcon;
+type QueueKey = keyof typeof MES_NAV_SHORTCUTS;
- return (
- <SidebarMenu>
- <SidebarMenuItem>
- <SidebarMenuButton
- size="lg"
- className="data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground"
- asChild
- >
- <a href={ERP_URL}>
- <div className="flex aspect-square size-10 items-center justify-center rounded-lg text-foreground">
- {companyLogo ? (
- <img
- src={companyLogo}
- alt={`${company.name} logo`}
- className="h-full w-full rounded object-contain"
- />
- ) : (
- <BsFillHexagonFill className="size-6" />
- )}
- </div>
- <div className="grid flex-1 text-left text-sm leading-tight">
- <span className="truncate font-semibold">{company.name}</span>
- </div>
- </a>
- </SidebarMenuButton>
- </SidebarMenuItem>
- </SidebarMenu>
- );
-}
+/** The task queues, in rail order; each one's ⌥-digit comes from its key. */
+const QUEUES: { key: QueueKey; icon: typeof LuActivity; to: string }[] = [
+ { key: "operations", icon: LuCalendarDays, to: path.to.operations },
+ { key: "assigned", icon: LuClipboardList, to: path.to.assigned },
+ { key: "active", icon: LuActivity, to: path.to.active },
+ { key: "recent", icon: LuHistory, to: path.to.recent },
+ { key: "jobs", icon: LuCirclePlay, to: path.to.jobs },
+ { key: "maintenance", icon: LuWrench, to: path.to.maintenance },
+ { key: "picking", icon: LuPackageCheck, to: path.to.picking }
+];
-export function OperationsNav({
- activeEvents,
- activeMaintenanceCount
-}: {
- activeEvents: number;
- activeMaintenanceCount: number;
-}) {
+// `path.to.operations` carries a `?saved=1` query; activity matches on paths.
+const pathOf = (to: string) => to.split("?")[0];
+
+function QueueLinks({ counts }: { counts: Partial<Record<QueueKey, number>> }) {
const { t } = useLingui();
const navigate = useNavigate();
- const { isMobile, setOpenMobile } = useSidebar();
-
- // Same close-on-navigate behavior as the sidebar links' onClick below —
- // a shortcut jump must not leave the mobile drawer covering the new page.
- const go = useCallback(
- (to: string) => {
- if (isMobile) setOpenMobile(false);
- navigate(to);
- },
- [isMobile, setOpenMobile, navigate]
- );
+ const { pathname } = useLocation();
+
+ const titles: Record<QueueKey, string> = {
+ operations: t`Schedule`,
+ assigned: t`Assigned`,
+ active: t`Active`,
+ recent: t`Recent`,
+ jobs: t`Jobs`,
+ maintenance: t`Maintenance`,
+ picking: t`Picking`
+ };
- // ⌥1–7 sidebar navigation (see ~/shortcuts). ⌘digits are browser-reserved.
useShortcutKeyMap(
useMemo(
- () => [
- {
- shortcut: MES_NAV_SHORTCUTS.operations,
- action: () => go(path.to.operations)
- },
- {
- shortcut: MES_NAV_SHORTCUTS.assigned,
- action: () => go(path.to.assigned)
- },
- {
- shortcut: MES_NAV_SHORTCUTS.active,
- action: () => go(path.to.active)
- },
- {
- shortcut: MES_NAV_SHORTCUTS.recent,
- action: () => go(path.to.recent)
- },
- {
- shortcut: MES_NAV_SHORTCUTS.jobs,
- action: () => go(path.to.jobs)
- },
- {
- shortcut: MES_NAV_SHORTCUTS.maintenance,
- action: () => go(path.to.maintenance)
- },
- {
- shortcut: MES_NAV_SHORTCUTS.picking,
- action: () => go(path.to.picking)
- }
- ],
- [go]
+ () =>
+ QUEUES.map((queue) => ({
+ shortcut: MES_NAV_SHORTCUTS[queue.key],
+ action: () => navigate(queue.to)
+ })),
+ [navigate]
)
);
- const links = [
- {
- title: t`Schedule`,
- icon: LuCalendarDays,
- to: path.to.operations
- },
- {
- title: t`Assigned`,
- icon: LuClipboardList,
- to: path.to.assigned
- },
- {
- title: t`Active`,
- icon: LuActivity,
- label: (activeEvents ?? 0).toString(),
- to: path.to.active
- },
- {
- title: t`Recent`,
- icon: LuHistory,
- to: path.to.recent
- },
- {
- title: t`Jobs`,
- icon: LuCirclePlay,
- to: path.to.jobs
- },
- {
- title: t`Maintenance`,
- icon: LuWrench,
- label: (activeMaintenanceCount ?? 0).toString(),
- to: path.to.maintenance
- },
- {
- title: t`Picking`,
- icon: LuPackageCheck,
- to: path.to.picking
- }
- ];
-
- const location = useLocation();
- const { pathname } = location;
-
- return (
- <SidebarGroup>
- <SidebarGroupLabel>
- <Trans>Operations</Trans>
- </SidebarGroupLabel>
- <SidebarMenu>
- {links.map((item) => {
- const isActive =
- pathname.includes(item.to) ||
- (pathname.includes("operations") && item.title === "Schedule");
- return (
- <SidebarMenuItem key={item.title}>
- <SidebarMenuButton
- tooltip={item.title}
- className={cn(
- item.label &&
- Number.isInteger(parseInt(item.label)) &&
- parseInt(item.label) > 0 &&
- "text-emerald-500"
- )}
- isActive={isActive}
- asChild
- >
- <Link
- to={item.to}
- onClick={() => isMobile && setOpenMobile(false)}
- >
- {item.icon && <item.icon />}
- <span>{item.title}</span>
- {item.label && (
- <span className="ml-auto text-muted-foreground text-sm">
- {item.label}
- </span>
- )}
- </Link>
- </SidebarMenuButton>
- </SidebarMenuItem>
- );
- })}
- </SidebarMenu>
- </SidebarGroup>
- );
-}
-
-export function ToolsNav() {
return (
<>
- <SidebarGroup>
- <SidebarGroupLabel>
- <Trans>Inventory Adjustments</Trans>
- </SidebarGroupLabel>
- <SidebarMenu>
- <SidebarMenuItem>
- <AdjustInventory add={true} />
- </SidebarMenuItem>
- <SidebarMenuItem>
- <AdjustInventory add={false} />
- </SidebarMenuItem>
- </SidebarMenu>
- </SidebarGroup>
- <SidebarGroup>
- <SidebarGroupLabel>
- <Trans>Tools</Trans>
- </SidebarGroupLabel>
- <SidebarMenu>
- <SidebarMenuItem>
- <EndShift />
- </SidebarMenuItem>
-
- <SidebarMenuItem>
- <Suggestion />
- </SidebarMenuItem>
-
- <SidebarMenuItem>
- <DisplaysLink />
- </SidebarMenuItem>
- </SidebarMenu>
- </SidebarGroup>
+ {QUEUES.map((queue) => (
+ <NavRailLink
+ key={queue.key}
+ to={queue.to}
+ icon={<queue.icon />}
+ label={titles[queue.key]}
+ isActive={pathname.startsWith(pathOf(queue.to))}
+ tag={counts[queue.key] ? String(counts[queue.key]) : undefined}
+ />
+ ))}
</>
);
}
@@ -386,296 +174,13 @@ function DisplaysLink() {
const { t } = useLingui();
return (
- <SidebarMenuButton tooltip={t`Displays`} asChild>
- <a href={path.to.displays} target="_blank" rel="noreferrer">
- <LuMonitorPlay />
- <span>
- <Trans>Displays</Trans>
- </span>
- </a>
- </SidebarMenuButton>
- );
-}
-
-export function UserNav({
- company,
- companies,
- consoleEnabled,
- consoleMode,
- location,
- locations,
- pinnedInUser
-}: {
- company: Company;
- companies: Company[];
- consoleEnabled?: boolean;
- consoleMode: boolean;
- location: string;
- locations: Location[];
- pinnedInUser: PinnedInUser | null;
-}) {
- const { t } = useLingui();
- const user = useUser();
- const stationName = `${user.firstName} ${user.lastName}`;
- const { isMobile } = useSidebar();
-
- const mode = useMode();
-
- const modeSubmitRef = useRef<HTMLButtonElement>(null);
- const consoleSubmitRef = useRef<HTMLButtonElement>(null);
-
- const fetcher = useFetcher<typeof action>();
-
- const updateLocation = (value: string) => {
- const formData = new FormData();
- formData.append("location", value);
- fetcher.submit(formData, { method: "POST", action: path.to.location });
- };
-
- const optimisticLocation =
- (fetcher.formData?.get("location") as string | undefined) ?? location;
-
- const itarDisclosure = useDisclosure();
-
- // useUser().id returns the effective (operator) ID — read the original station user ID directly
- const routeData = useRouteData<{ user: { id: string } | null }>(
- path.to.authenticatedRoot
- );
- const sessionUserId = routeData?.user?.id;
- const isOperatorPinnedIn =
- consoleMode &&
- pinnedInUser &&
- sessionUserId &&
- pinnedInUser.userId !== sessionUserId;
- const showingOperator = consoleMode && pinnedInUser;
- const displayName = showingOperator ? pinnedInUser.name : stationName;
- const displayAvatar = showingOperator
- ? pinnedInUser.avatarUrl
- : user.avatarUrl;
- const displaySubtext = showingOperator ? t`Console` : user.email;
-
- return (
- <SidebarMenu>
- <SidebarMenuItem>
- <DropdownMenu>
- <DropdownMenuTrigger asChild>
- <SidebarMenuButton
- size="lg"
- className="data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground"
- >
- <Avatar
- className="h-8 w-8 rounded-lg"
- src={displayAvatar ?? undefined}
- name={displayName}
- />
- <div className="grid flex-1 text-left text-sm leading-tight">
- <span className="truncate font-semibold">{displayName}</span>
- <span className="truncate text-xs">{displaySubtext}</span>
- </div>
- <LuChevronDown className="ml-auto size-4" />
- </SidebarMenuButton>
- </DropdownMenuTrigger>
- <DropdownMenuContent
- className="w-[var(--radix-dropdown-menu-trigger-width)] min-w-56 rounded-lg"
- side={isMobile ? "bottom" : "right"}
- align="end"
- sideOffset={4}
- >
- {/* Console mode with pinned-in operator: simplified menu */}
- {showingOperator ? (
- <>
- <DropdownMenuLabel>{pinnedInUser.name}</DropdownMenuLabel>
- <DropdownMenuSeparator />
- <DropdownMenuItem
- onSelect={() => {
- fetcher.submit(null, {
- method: "POST",
- action: path.to.consolePinOut
- });
- }}
- >
- <DropdownMenuIcon icon={<LuUsers />} />
- <Trans>Switch Operator</Trans>
- </DropdownMenuItem>
- <DropdownMenuSeparator />
- <DropdownMenuLabel className="text-xs font-normal text-muted-foreground">
- <Trans>Station: {stationName}</Trans>
- </DropdownMenuLabel>
- </>
- ) : (
- <>
- <DropdownMenuLabel>
- <Trans>Signed in as {stationName}</Trans>
- </DropdownMenuLabel>
- <DropdownMenuSeparator />
- <DropdownMenuItem asChild>
- <Link to={path.to.accountSettings}>
- <DropdownMenuIcon icon={<LuUser />} />
- <Trans>Account Settings</Trans>
- </Link>
- </DropdownMenuItem>
- <DropdownMenuSeparator />
-
- <DropdownMenuSub>
- <DropdownMenuSubTrigger>
- <DropdownMenuIcon icon={<LuBuilding />} />
- <Trans>Company</Trans>
- </DropdownMenuSubTrigger>
- <DropdownMenuSubContent>
- <DropdownMenuRadioGroup value={company.companyId!}>
- {companies.map((c) => {
- const logo =
- mode === "dark" ? c.logoDarkIcon : c.logoLightIcon;
- return (
- <DropdownMenuRadioItem
- key={c.companyId}
- value={c.companyId!}
- onSelect={() => {
- const form = new FormData();
- form.append("companyId", c.companyId!);
- fetcher.submit(form, {
- method: "post",
- action: path.to.switchCompany(c.companyId!)
- });
- }}
- >
- <HStack>
- <Avatar
- size="xs"
- name={c.name ?? undefined}
- src={logo ?? undefined}
- />
- <span>{c.name}</span>
- </HStack>
- </DropdownMenuRadioItem>
- );
- })}
- </DropdownMenuRadioGroup>
- </DropdownMenuSubContent>
- </DropdownMenuSub>
- <DropdownMenuSeparator />
- {locations.length > 1 ? (
- <>
- <DropdownMenuSub>
- <DropdownMenuSubTrigger>
- <DropdownMenuIcon icon={<LuMapPin />} />
- <Trans>Location</Trans>
- </DropdownMenuSubTrigger>
- <DropdownMenuSubContent>
- <DropdownMenuRadioGroup value={optimisticLocation}>
- {locations.map((loc) => (
- <DropdownMenuRadioItem
- key={loc.id}
- value={loc.id}
- onSelect={() => {
- updateLocation(loc.id);
- }}
- >
- {loc.name}
- </DropdownMenuRadioItem>
- ))}
- </DropdownMenuRadioGroup>
- </DropdownMenuSubContent>
- </DropdownMenuSub>
- <DropdownMenuSeparator />
- </>
- ) : null}
- </>
- )}
- <DropdownMenuItem onSelect={(e) => e.preventDefault()}>
- <div className="flex items-center justify-between w-full">
- <div className="flex items-center justify-start">
- <DropdownMenuIcon
- icon={mode === "dark" ? <LuMoon /> : <LuSun />}
- />
- <Trans>Dark Mode</Trans>
- </div>
- <div>
- <Switch
- checked={mode === "dark"}
- onCheckedChange={() => modeSubmitRef.current?.click()}
- />
- <fetcher.Form
- action={path.to.root}
- method="post"
- onSubmit={() => {
- document.body.removeAttribute("style");
- }}
- className="sr-only"
- >
- <input
- type="hidden"
- name="mode"
- value={mode === "dark" ? "light" : "dark"}
- />
- <button
- ref={modeSubmitRef}
- className="sr-only"
- type="submit"
- />
- </fetcher.Form>
- </div>
- </div>
- </DropdownMenuItem>
- {!isOperatorPinnedIn && (
- <>
- {consoleEnabled && (
- <DropdownMenuItem onSelect={(e) => e.preventDefault()}>
- <div className="flex items-center justify-between w-full">
- <div className="flex items-center justify-start">
- <DropdownMenuIcon icon={<LuMonitor />} />
- <Trans>Console Mode</Trans>
- </div>
- <div>
- <Switch
- checked={consoleMode}
- onCheckedChange={() =>
- consoleSubmitRef.current?.click()
- }
- />
- <fetcher.Form
- action={path.to.consoleToggle}
- method="post"
- className="sr-only"
- >
- <input
- type="hidden"
- name="consoleMode"
- value={consoleMode ? "false" : "true"}
- />
- <button
- ref={consoleSubmitRef}
- className="sr-only"
- type="submit"
- />
- </fetcher.Form>
- </div>
- </div>
- </DropdownMenuItem>
- )}
- <DropdownMenuSeparator />
- {CONTROLLED_ENVIRONMENT && (
- <DropdownMenuItem onClick={itarDisclosure.onOpen}>
- <DropdownMenuIcon icon={<LuShieldCheck />} />
- <Trans>About</Trans>
- </DropdownMenuItem>
- )}
- <DropdownMenuItem onSelect={(e) => e.preventDefault()}>
- <Form method="post" action={path.to.logout}>
- <button type="submit" className="w-full flex items-center">
- <DropdownMenuIcon icon={<LuLogOut />} />
- <span>
- <Trans>Sign Out</Trans>
- </span>
- </button>
- </Form>
- </DropdownMenuItem>
- </>
- )}
- </DropdownMenuContent>
- </DropdownMenu>
- </SidebarMenuItem>
- {CONTROLLED_ENVIRONMENT && <ItarDisclosure disclosure={itarDisclosure} />}
- </SidebarMenu>
+ <NavRailLink
+ to={path.to.displays}
+ icon={<LuMonitorPlay />}
+ label={t`Displays`}
+ external
+ target="_blank"
+ rel="noreferrer"
+ />
);
}
diff --git a/apps/mes/app/components/EndShift.tsx b/apps/mes/app/components/EndShift.tsx
index 4c224867d4..49ad045c38 100644
--- a/apps/mes/app/components/EndShift.tsx
+++ b/apps/mes/app/components/EndShift.tsx
@@ -10,7 +10,7 @@ import {
ModalFooter,
ModalHeader,
ModalTitle,
- SidebarMenuButton,
+ NavRailItem,
Spinner,
toast,
useDisclosure
@@ -68,12 +68,11 @@ export function EndShift() {
return (
<>
- <SidebarMenuButton tooltip={t`End Operations`} onClick={openModal}>
- <LuCircleStop />
- <span>
- <Trans>End Operations</Trans>
- </span>
- </SidebarMenuButton>
+ <NavRailItem
+ icon={<LuCircleStop />}
+ label={t`End Operations`}
+ onClick={openModal}
+ />
{confirmModal.isOpen && (
<Modal
open={confirmModal.isOpen}
diff --git a/apps/mes/app/components/JobOperation/JobOperation.tsx b/apps/mes/app/components/JobOperation/JobOperation.tsx
index d177afeb3b..496aa233b9 100644
--- a/apps/mes/app/components/JobOperation/JobOperation.tsx
+++ b/apps/mes/app/components/JobOperation/JobOperation.tsx
@@ -791,7 +791,7 @@ export const JobOperation = ({
// the viewport itself, less the frame's md:my-2 inset.
className="grid h-svh md:h-[calc(100svh-1rem)] min-h-0 w-full min-w-0 bg-card grid-cols-[minmax(0,1fr)] grid-rows-[auto_auto_auto_minmax(0,1fr)_auto_auto] [grid-template-areas:'header'_'context'_'sep'_'main'_'status'_'dock'] lg:grid-cols-[minmax(0,1fr)_auto] lg:grid-rows-[auto_auto_auto_minmax(0,1fr)_auto] lg:[grid-template-areas:'header_header'_'context_context'_'sep_sep'_'main_dock'_'status_dock']"
>
- <header className="[grid-area:header] flex h-[var(--header-height)] shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12 border-b px-2">
+ <header className="[grid-area:header] flex h-[var(--header-height)] shrink-0 items-center gap-2 border-b px-2">
<HStack className="w-full justify-between">
<div className="flex items-center gap-0">
<SidebarTrigger />
diff --git a/apps/mes/app/components/Suggestion.tsx b/apps/mes/app/components/Suggestion.tsx
index 634da7fcec..9cd2614ab8 100644
--- a/apps/mes/app/components/Suggestion.tsx
+++ b/apps/mes/app/components/Suggestion.tsx
@@ -15,10 +15,10 @@ import {
Checkbox,
File,
HStack,
+ NavRailItem,
Popover,
PopoverContent,
PopoverTrigger,
- SidebarMenuButton,
toast,
useMode,
VStack
@@ -138,12 +138,7 @@ const Suggestion = () => {
return (
<Popover>
<PopoverTrigger ref={popoverTriggerRef} asChild>
- <SidebarMenuButton tooltip={t`Suggestion`}>
- <LuMailbox />
- <span>
- <Trans>Suggestion</Trans>
- </span>
- </SidebarMenuButton>
+ <NavRailItem icon={<LuMailbox />} label={t`Suggestion`} />
</PopoverTrigger>
<PopoverContent className="w-[380px] ">
<ValidatedForm
diff --git a/apps/mes/app/components/TimeCardButton.tsx b/apps/mes/app/components/TimeCardButton.tsx
index c0af2765a0..d073e6e6e8 100644
--- a/apps/mes/app/components/TimeCardButton.tsx
+++ b/apps/mes/app/components/TimeCardButton.tsx
@@ -1,13 +1,8 @@
-import {
- Badge,
- SidebarMenuButton,
- SidebarMenuItem,
- useSidebar
-} from "@carbon/react";
-import { Trans, useLingui } from "@lingui/react/macro";
+import { Badge, NavRailItem, NavRailLink } from "@carbon/react";
+import { useLingui } from "@lingui/react/macro";
import { useEffect, useState } from "react";
import { LuClock, LuPlay, LuSquare } from "react-icons/lu";
-import { Link, useFetcher, useLocation } from "react-router";
+import { useFetcher, useLocation } from "react-router";
import { path } from "~/utils/path";
type TimeCardButtonProps = {
@@ -27,7 +22,6 @@ function formatElapsed(since: string) {
export function TimeCardButton({ openClockEntry }: TimeCardButtonProps) {
const { t } = useLingui();
const fetcher = useFetcher();
- const { isMobile, setOpenMobile } = useSidebar();
const { pathname } = useLocation();
const [, setTick] = useState(0);
@@ -42,7 +36,6 @@ export function TimeCardButton({ openClockEntry }: TimeCardButtonProps) {
}, [openClockEntry]);
const handleClockOut = () => {
- if (isMobile) setOpenMobile(false);
const formData = new FormData();
formData.append("intent", "clockOut");
fetcher.submit(formData, {
@@ -52,7 +45,6 @@ export function TimeCardButton({ openClockEntry }: TimeCardButtonProps) {
};
const handleClockIn = () => {
- if (isMobile) setOpenMobile(false);
const formData = new FormData();
formData.append("intent", "clockIn");
fetcher.submit(formData, {
@@ -66,57 +58,34 @@ export function TimeCardButton({ openClockEntry }: TimeCardButtonProps) {
return (
<>
{isClockedIn ? (
- <SidebarMenuItem>
- <SidebarMenuButton
- tooltip={t`Clock Out`}
- onClick={handleClockOut}
- disabled={fetcher.state !== "idle"}
- className="font-medium"
- >
- <LuSquare className="size-4" />
- <span>
- <Trans>Clock Out</Trans>
- </span>
- {openClockEntry && (
- <Badge variant="red" className="ml-auto">
+ <NavRailItem
+ icon={<LuSquare />}
+ label={t`Clock Out`}
+ onClick={handleClockOut}
+ disabled={fetcher.state !== "idle"}
+ trailing={
+ openClockEntry && (
+ <Badge variant="red">
{formatElapsed(openClockEntry.clockIn)}
</Badge>
- )}
- </SidebarMenuButton>
- </SidebarMenuItem>
+ )
+ }
+ />
) : (
- <SidebarMenuItem>
- <SidebarMenuButton
- tooltip={t`Clock In`}
- onClick={handleClockIn}
- disabled={fetcher.state !== "idle"}
- className="font-medium"
- >
- <LuPlay className="size-4" />
- <span>
- <Trans>Clock In</Trans>
- </span>
- </SidebarMenuButton>
- </SidebarMenuItem>
+ <NavRailItem
+ icon={<LuPlay />}
+ label={t`Clock In`}
+ onClick={handleClockIn}
+ disabled={fetcher.state !== "idle"}
+ />
)}
- <SidebarMenuItem>
- <SidebarMenuButton
- tooltip={t`My Hours`}
- isActive={isOnTimeCardPage}
- asChild
- >
- <Link
- to={path.to.timeCardPage}
- onClick={() => isMobile && setOpenMobile(false)}
- >
- <LuClock />
- <span>
- <Trans>My Hours</Trans>
- </span>
- </Link>
- </SidebarMenuButton>
- </SidebarMenuItem>
+ <NavRailLink
+ to={path.to.timeCardPage}
+ icon={<LuClock />}
+ label={t`My Hours`}
+ isActive={isOnTimeCardPage}
+ />
</>
);
}
diff --git a/apps/mes/app/components/UserNav.tsx b/apps/mes/app/components/UserNav.tsx
new file mode 100644
index 0000000000..80ef3fa9b2
--- /dev/null
+++ b/apps/mes/app/components/UserNav.tsx
@@ -0,0 +1,320 @@
+import type { Company } from "@carbon/auth";
+import { CONTROLLED_ENVIRONMENT } from "@carbon/auth";
+import {
+ Avatar,
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuIcon,
+ DropdownMenuItem,
+ DropdownMenuLabel,
+ DropdownMenuRadioGroup,
+ DropdownMenuRadioItem,
+ DropdownMenuSeparator,
+ DropdownMenuSub,
+ DropdownMenuSubContent,
+ DropdownMenuSubTrigger,
+ DropdownMenuTrigger,
+ HStack,
+ ItarDisclosure,
+ NavRailItem,
+ Switch,
+ useDisclosure,
+ useMode,
+ useRouteData,
+ useSidebar
+} from "@carbon/react";
+import { Trans } from "@lingui/react/macro";
+import { useRef } from "react";
+import {
+ LuBuilding,
+ LuChevronDown,
+ LuLogOut,
+ LuMapPin,
+ LuMonitor,
+ LuMoon,
+ LuShieldCheck,
+ LuSun,
+ LuUser,
+ LuUsers
+} from "react-icons/lu";
+import { Form, Link, useFetcher } from "react-router";
+import { useUser } from "~/hooks";
+import type { action } from "~/root";
+import type { Location } from "~/services/types";
+import type { PinnedInUser } from "~/types";
+import { path } from "~/utils/path";
+
+export function UserNav({
+ company,
+ companies,
+ consoleEnabled,
+ consoleMode,
+ location,
+ locations,
+ pinnedInUser
+}: {
+ company: Company;
+ companies: Company[];
+ consoleEnabled?: boolean;
+ consoleMode: boolean;
+ location: string;
+ locations: Location[];
+ pinnedInUser: PinnedInUser | null;
+}) {
+ const user = useUser();
+ const stationName = `${user.firstName} ${user.lastName}`;
+ const { isMobile } = useSidebar();
+
+ const mode = useMode();
+
+ const modeSubmitRef = useRef<HTMLButtonElement>(null);
+ const consoleSubmitRef = useRef<HTMLButtonElement>(null);
+
+ const fetcher = useFetcher<typeof action>();
+
+ const updateLocation = (value: string) => {
+ const formData = new FormData();
+ formData.append("location", value);
+ fetcher.submit(formData, { method: "POST", action: path.to.location });
+ };
+
+ const optimisticLocation =
+ (fetcher.formData?.get("location") as string | undefined) ?? location;
+
+ const itarDisclosure = useDisclosure();
+
+ // useUser().id returns the effective (operator) ID — read the original station user ID directly
+ const routeData = useRouteData<{ user: { id: string } | null }>(
+ path.to.authenticatedRoot
+ );
+ const sessionUserId = routeData?.user?.id;
+ const isOperatorPinnedIn =
+ consoleMode &&
+ pinnedInUser &&
+ sessionUserId &&
+ pinnedInUser.userId !== sessionUserId;
+ const showingOperator = consoleMode && pinnedInUser;
+ const displayName = showingOperator ? pinnedInUser.name : stationName;
+ const displayAvatar = showingOperator
+ ? pinnedInUser.avatarUrl
+ : user.avatarUrl;
+
+ return (
+ <>
+ <DropdownMenu>
+ <DropdownMenuTrigger asChild>
+ <NavRailItem
+ icon={
+ <Avatar
+ size="xs"
+ src={displayAvatar ?? undefined}
+ name={displayName}
+ />
+ }
+ label={displayName}
+ trailing={<LuChevronDown className="size-4" />}
+ />
+ </DropdownMenuTrigger>
+ <DropdownMenuContent
+ className="min-w-56 rounded-lg"
+ side={isMobile ? "bottom" : "right"}
+ align="end"
+ sideOffset={4}
+ >
+ {/* Console mode with pinned-in operator: simplified menu */}
+ {showingOperator ? (
+ <>
+ <DropdownMenuLabel>{pinnedInUser.name}</DropdownMenuLabel>
+ <DropdownMenuSeparator />
+ <DropdownMenuItem
+ onSelect={() => {
+ fetcher.submit(null, {
+ method: "POST",
+ action: path.to.consolePinOut
+ });
+ }}
+ >
+ <DropdownMenuIcon icon={<LuUsers />} />
+ <Trans>Switch Operator</Trans>
+ </DropdownMenuItem>
+ <DropdownMenuSeparator />
+ <DropdownMenuLabel className="text-xs font-normal text-muted-foreground">
+ <Trans>Station: {stationName}</Trans>
+ </DropdownMenuLabel>
+ </>
+ ) : (
+ <>
+ <DropdownMenuLabel>
+ <Trans>Signed in as {stationName}</Trans>
+ </DropdownMenuLabel>
+ <DropdownMenuSeparator />
+ <DropdownMenuItem asChild>
+ <Link to={path.to.accountSettings}>
+ <DropdownMenuIcon icon={<LuUser />} />
+ <Trans>Account Settings</Trans>
+ </Link>
+ </DropdownMenuItem>
+ <DropdownMenuSeparator />
+
+ <DropdownMenuSub>
+ <DropdownMenuSubTrigger>
+ <DropdownMenuIcon icon={<LuBuilding />} />
+ <Trans>Company</Trans>
+ </DropdownMenuSubTrigger>
+ <DropdownMenuSubContent>
+ <DropdownMenuRadioGroup value={company.companyId!}>
+ {companies.map((c) => {
+ const logo =
+ mode === "dark" ? c.logoDarkIcon : c.logoLightIcon;
+ return (
+ <DropdownMenuRadioItem
+ key={c.companyId}
+ value={c.companyId!}
+ onSelect={() => {
+ const form = new FormData();
+ form.append("companyId", c.companyId!);
+ fetcher.submit(form, {
+ method: "post",
+ action: path.to.switchCompany(c.companyId!)
+ });
+ }}
+ >
+ <HStack>
+ <Avatar
+ size="xs"
+ name={c.name ?? undefined}
+ src={logo ?? undefined}
+ />
+ <span>{c.name}</span>
+ </HStack>
+ </DropdownMenuRadioItem>
+ );
+ })}
+ </DropdownMenuRadioGroup>
+ </DropdownMenuSubContent>
+ </DropdownMenuSub>
+ <DropdownMenuSeparator />
+ {locations.length > 1 ? (
+ <>
+ <DropdownMenuSub>
+ <DropdownMenuSubTrigger>
+ <DropdownMenuIcon icon={<LuMapPin />} />
+ <Trans>Location</Trans>
+ </DropdownMenuSubTrigger>
+ <DropdownMenuSubContent>
+ <DropdownMenuRadioGroup value={optimisticLocation}>
+ {locations.map((loc) => (
+ <DropdownMenuRadioItem
+ key={loc.id}
+ value={loc.id}
+ onSelect={() => {
+ updateLocation(loc.id);
+ }}
+ >
+ {loc.name}
+ </DropdownMenuRadioItem>
+ ))}
+ </DropdownMenuRadioGroup>
+ </DropdownMenuSubContent>
+ </DropdownMenuSub>
+ <DropdownMenuSeparator />
+ </>
+ ) : null}
+ </>
+ )}
+ <DropdownMenuItem onSelect={(e) => e.preventDefault()}>
+ <div className="flex items-center justify-between w-full">
+ <div className="flex items-center justify-start">
+ <DropdownMenuIcon
+ icon={mode === "dark" ? <LuMoon /> : <LuSun />}
+ />
+ <Trans>Dark Mode</Trans>
+ </div>
+ <div>
+ <Switch
+ checked={mode === "dark"}
+ onCheckedChange={() => modeSubmitRef.current?.click()}
+ />
+ <fetcher.Form
+ action={path.to.root}
+ method="post"
+ onSubmit={() => {
+ document.body.removeAttribute("style");
+ }}
+ className="sr-only"
+ >
+ <input
+ type="hidden"
+ name="mode"
+ value={mode === "dark" ? "light" : "dark"}
+ />
+ <button
+ ref={modeSubmitRef}
+ className="sr-only"
+ type="submit"
+ />
+ </fetcher.Form>
+ </div>
+ </div>
+ </DropdownMenuItem>
+ {!isOperatorPinnedIn && (
+ <>
+ {consoleEnabled && (
+ <DropdownMenuItem onSelect={(e) => e.preventDefault()}>
+ <div className="flex items-center justify-between w-full">
+ <div className="flex items-center justify-start">
+ <DropdownMenuIcon icon={<LuMonitor />} />
+ <Trans>Console Mode</Trans>
+ </div>
+ <div>
+ <Switch
+ checked={consoleMode}
+ onCheckedChange={() =>
+ consoleSubmitRef.current?.click()
+ }
+ />
+ <fetcher.Form
+ action={path.to.consoleToggle}
+ method="post"
+ className="sr-only"
+ >
+ <input
+ type="hidden"
+ name="consoleMode"
+ value={consoleMode ? "false" : "true"}
+ />
+ <button
+ ref={consoleSubmitRef}
+ className="sr-only"
+ type="submit"
+ />
+ </fetcher.Form>
+ </div>
+ </div>
+ </DropdownMenuItem>
+ )}
+ <DropdownMenuSeparator />
+ {CONTROLLED_ENVIRONMENT && (
+ <DropdownMenuItem onClick={itarDisclosure.onOpen}>
+ <DropdownMenuIcon icon={<LuShieldCheck />} />
+ <Trans>About</Trans>
+ </DropdownMenuItem>
+ )}
+ <DropdownMenuItem onSelect={(e) => e.preventDefault()}>
+ <Form method="post" action={path.to.logout}>
+ <button type="submit" className="w-full flex items-center">
+ <DropdownMenuIcon icon={<LuLogOut />} />
+ <span>
+ <Trans>Sign Out</Trans>
+ </span>
+ </button>
+ </Form>
+ </DropdownMenuItem>
+ </>
+ )}
+ </DropdownMenuContent>
+ </DropdownMenu>
+ {CONTROLLED_ENVIRONMENT && <ItarDisclosure disclosure={itarDisclosure} />}
+ </>
+ );
+}
diff --git a/apps/mes/app/routes/x+/_layout.tsx b/apps/mes/app/routes/x+/_layout.tsx
index 4035c11067..fb81eea385 100644
--- a/apps/mes/app/routes/x+/_layout.tsx
+++ b/apps/mes/app/routes/x+/_layout.tsx
@@ -500,7 +500,7 @@ export default function AuthenticatedRoute() {
}}
>
<RealtimeDataProvider>
- <SidebarProvider defaultOpen={false} touch>
+ <SidebarProvider defaultOpen={false}>
<TooltipProvider delayDuration={0}>
<AppSidebar
activeEvents={activeEvents}
diff --git a/apps/mes/app/routes/x+/active.tsx b/apps/mes/app/routes/x+/active.tsx
index 739f3e14e6..fc9284e1c7 100644
--- a/apps/mes/app/routes/x+/active.tsx
+++ b/apps/mes/app/routes/x+/active.tsx
@@ -62,7 +62,7 @@ export default function ActiveRoute() {
return (
<div className="flex flex-col flex-1">
- <header className="sticky top-0 z-10 flex h-[var(--header-height)] shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12 border-b bg-card">
+ <header className="sticky top-0 z-10 flex h-[var(--header-height)] shrink-0 items-center gap-2 border-b bg-card">
<div className="flex items-center gap-2 px-2">
<SidebarTrigger />
<Heading size="h4">
diff --git a/apps/mes/app/routes/x+/assigned.tsx b/apps/mes/app/routes/x+/assigned.tsx
index f833e3ec91..ae12c9f080 100644
--- a/apps/mes/app/routes/x+/assigned.tsx
+++ b/apps/mes/app/routes/x+/assigned.tsx
@@ -228,7 +228,7 @@ export default function AssignedRoute() {
return (
<div className="flex flex-col flex-1 min-w-0">
- <header className="sticky top-0 z-10 flex h-[var(--header-height)] overflow-y-scroll scrollbar-thin scrollbar-thumb-accent scrollbar-track-transparent shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12 border-b bg-card">
+ <header className="sticky top-0 z-10 flex h-[var(--header-height)] overflow-y-scroll scrollbar-thin scrollbar-thumb-accent scrollbar-track-transparent shrink-0 items-center gap-2 border-b bg-card">
<div className="flex items-center gap-2 px-2">
<SidebarTrigger />
<Heading size="h4">
diff --git a/apps/mes/app/routes/x+/dispatch.$dispatchId.tsx b/apps/mes/app/routes/x+/dispatch.$dispatchId.tsx
index b583d39792..a366eb2df0 100644
--- a/apps/mes/app/routes/x+/dispatch.$dispatchId.tsx
+++ b/apps/mes/app/routes/x+/dispatch.$dispatchId.tsx
@@ -230,7 +230,7 @@ export default function MaintenanceDetailRoute() {
return (
<div className="flex flex-col flex-1">
- <header className="sticky top-0 z-10 flex h-[var(--header-height)] shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12 border-b bg-card">
+ <header className="sticky top-0 z-10 flex h-[var(--header-height)] shrink-0 items-center gap-2 border-b bg-card">
<div className="flex items-center gap-2 px-2 w-full justify-between">
<HStack>
<SidebarTrigger />
diff --git a/apps/mes/app/routes/x+/job.$jobId.tsx b/apps/mes/app/routes/x+/job.$jobId.tsx
index b7ac32ff7b..49ed0f0b18 100644
--- a/apps/mes/app/routes/x+/job.$jobId.tsx
+++ b/apps/mes/app/routes/x+/job.$jobId.tsx
@@ -56,7 +56,7 @@ export default function JobDagRoute() {
return (
<div className="flex flex-col flex-1">
- <header className="sticky top-0 z-10 flex h-[var(--header-height)] shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12 border-b bg-card">
+ <header className="sticky top-0 z-10 flex h-[var(--header-height)] shrink-0 items-center gap-2 border-b bg-card">
<div className="flex items-center gap-2 px-2">
<SidebarTrigger />
<Link
diff --git a/apps/mes/app/routes/x+/jobs.tsx b/apps/mes/app/routes/x+/jobs.tsx
index 5ab155649a..a00c151e67 100644
--- a/apps/mes/app/routes/x+/jobs.tsx
+++ b/apps/mes/app/routes/x+/jobs.tsx
@@ -113,7 +113,7 @@ export default function JobsRoute() {
return (
<div className="flex flex-col flex-1">
- <header className="sticky top-0 z-10 flex h-[var(--header-height)] shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12 border-b bg-card">
+ <header className="sticky top-0 z-10 flex h-[var(--header-height)] shrink-0 items-center gap-2 border-b bg-card">
<div className="flex items-center gap-2 px-2">
<SidebarTrigger />
<Heading size="h4">
diff --git a/apps/mes/app/routes/x+/maintenance.tsx b/apps/mes/app/routes/x+/maintenance.tsx
index b53c04711c..5febee8880 100644
--- a/apps/mes/app/routes/x+/maintenance.tsx
+++ b/apps/mes/app/routes/x+/maintenance.tsx
@@ -397,7 +397,7 @@ export default function MaintenanceRoute() {
return (
<div className="flex flex-col flex-1">
- <header className="sticky top-0 z-10 flex h-[var(--header-height)] shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12 border-b bg-card">
+ <header className="sticky top-0 z-10 flex h-[var(--header-height)] shrink-0 items-center gap-2 border-b bg-card">
<div className="flex items-center gap-2 px-2">
<SidebarTrigger />
<Heading size="h4">
diff --git a/apps/mes/app/routes/x+/operations.tsx b/apps/mes/app/routes/x+/operations.tsx
index 0fffcedc9a..19ef1336f1 100644
--- a/apps/mes/app/routes/x+/operations.tsx
+++ b/apps/mes/app/routes/x+/operations.tsx
@@ -559,7 +559,7 @@ function KanbanSchedule() {
return (
<div className="flex flex-col flex-1 min-h-0 w-full">
- <header className="sticky top-0 z-10 flex h-[var(--header-height)] shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12 border-b bg-card">
+ <header className="sticky top-0 z-10 flex h-[var(--header-height)] shrink-0 items-center gap-2 border-b bg-card">
<div className="flex items-center gap-2 px-2">
<SidebarTrigger />
<Heading size="h4">
diff --git a/apps/mes/app/routes/x+/picking._index.tsx b/apps/mes/app/routes/x+/picking._index.tsx
index fc15cf6265..fcfc5eec73 100644
--- a/apps/mes/app/routes/x+/picking._index.tsx
+++ b/apps/mes/app/routes/x+/picking._index.tsx
@@ -35,7 +35,7 @@ export default function PickingIndexRoute() {
return (
<div className="flex flex-col flex-1">
- <header className="sticky top-0 z-10 flex h-[var(--header-height)] shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12 border-b bg-card">
+ <header className="sticky top-0 z-10 flex h-[var(--header-height)] shrink-0 items-center gap-2 border-b bg-card">
<div className="flex items-center gap-2 px-2">
<SidebarTrigger />
<Heading size="h4">
diff --git a/apps/mes/app/routes/x+/recent.tsx b/apps/mes/app/routes/x+/recent.tsx
index d1578a1d63..ca2cd2726d 100644
--- a/apps/mes/app/routes/x+/recent.tsx
+++ b/apps/mes/app/routes/x+/recent.tsx
@@ -62,7 +62,7 @@ export default function ActiveRoute() {
return (
<div className="flex flex-col flex-1">
- <header className="sticky top-0 z-10 flex h-[var(--header-height)] shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12 border-b bg-card">
+ <header className="sticky top-0 z-10 flex h-[var(--header-height)] shrink-0 items-center gap-2 border-b bg-card">
<div className="flex items-center gap-2 px-2">
<SidebarTrigger />
<Heading size="h4">