## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work > - Operators use the board UI on mobile viewports (`390x844`) to inspect routines, members, costs, projects, dashboards, skills, and settings > - Wide tables overflowed the page horizontally, several `PageTabBar` callers omitted `value`/`onValueChange` (breaking their mobile section dropdowns), `w-96` popovers and floating save bars clipped or overlapped the bottom nav, and key controls were hover-only or cramped on narrow screens > - Mobile operators could not scroll clipped columns, switch sections, switch diff files, or tap hidden row actions on phones > - This pull request constrains table scrollers and flex/grid ancestors, wires all missing `PageTabBar` mobile callbacks, caps wide popovers and floating save bars using existing viewport tokens, polishes narrow layouts across collections and settings, and adds 390×844 Storybook views and Vitest regressions > - The benefit is clean mobile layout without horizontal page overflow and working touch controls across tables, tabs, popovers, dashboards, and settings ## Linked Issues or Issue Description Related mobile responsiveness PRs: #23045, #23046, #23047. **What happened?** On mobile viewports (`< 768px`, tested at `390x844`): - Wide tables in Routines, Members, Costs, Connections, and tool profile views caused horizontal page overflow or permanently clipped columns (`overflow-hidden`). - `AuditHub`, `Costs` (Providers/Billers), `Approvals`, `Inbox`, and `LegacyInbox` omitted `value` and/or `onValueChange` on `PageTabBar`, bypassing its mobile `<select>` section switcher. - `w-96` popovers in `RoutinePage` and `WorkspaceServiceControlBar` overflowed narrow viewports; the `CompanySkills` diff dialog hid its file picker on `< md` and its floating save bar overlapped `MobileBottomNav`. - `ProjectDetail` task toolbars crushed the search field on `< sm`, `Dashboard` charts rendered 2 cramped columns with uneven metric card heights, `Agents` hid row `Chat` buttons on touch devices, and `Inbox` hid nesting controls on `< sm`. **Expected behavior** Every collection, table, popover, dashboard, and settings screen stays within the mobile viewport (`scrollWidth <= innerWidth`), wide tables scroll horizontally inside their containers, mobile `PageTabBar` dropdowns switch sections cleanly, and touch users can reach all row actions, diff files, and nesting controls. **Steps to reproduce** 1. Open the board UI at `390x844` (or the added Storybook `*Mobile` stories). 2. Navigate to Routines, Settings → Members, Settings → Profile, Audit → Costs, Approvals, Project Detail, Dashboard, and Company Skills diff view. 3. Observe horizontal overflow, missing mobile tab switchers, hidden diff file picker, and cramped toolbars/charts prior to this change. **Paperclip version or commit** `85ad16b47e` (`master`) **Deployment mode** Local dev (pnpm dev) ## What Changed - **Horizontal table scroll containment & ancestor constraints**: - Wrapped and constrained tables plus flex/grid ancestors (`overflow-x-auto max-w-full`, `min-w-0`) in `RoutineTable.tsx`, `Routines.tsx`, `CompanyAccess.tsx`, `CostByUserTable.tsx`, `Costs.tsx`, `ProfileSettings.tsx`, `Connections.tsx`, `AgentToolsTab.tsx`, `RoutineHistoryTab.tsx`, `RoutineVariablesEditor.tsx`, `ProfilesTab.tsx`, `ProfileDetail.tsx`, `ProfilesIndex.tsx`, and `SmokeLabTab.tsx`. - Fixed `ProfileSettings.tsx` avatar upload `<label>` sizing (`inline-block w-fit`) so the camera badge stays anchored to the avatar circle. - **Wired missing `PageTabBar` mobile callbacks**: - Passed `value` and `onValueChange` to `PageTabBar` in `AuditHub.tsx`, `Costs.tsx` (Providers and Billers), `Approvals.tsx`, `Inbox.tsx`, and `LegacyInbox.tsx`. - **Popovers & floating bars**: - Capped `w-96` popovers in `RoutinePage.tsx` and `WorkspaceServiceControlBar.tsx` with `max-w-(--sz-calc-4)` and wrapping footer rows. - Added a mobile file `<select>` (`md:hidden`) in the `CompanySkills.tsx` version diff dialog and lifted its floating save bar above `MobileBottomNav` (`bottom-20 md:bottom-6 max-w-(--sz-calc-4) flex-wrap`). - **Touch visibility & responsive layout polish**: - Switched `ProjectDetail.tsx` task lists to `toolbarPresentation="collection"` so the toolbar wraps cleanly on `< sm`, and added `flex-wrap` to its left-membership notice banner. - Made the `Agents.tsx` inline row `Chat` button touch-visible via `pointer-coarse:opacity-100`. - Exposed mobile parent-child nesting toggle and row expand chevrons in `Inbox.tsx` and `LegacyInbox.tsx`. - Stacked `Dashboard.tsx` chart cards to `grid-cols-1 sm:grid-cols-2` and aligned the 2×2 summary metric cards with `auto-rows-fr items-stretch`. - Added responsive wrapping and width caps in `CompanySettings.tsx`, `Secrets.tsx`, `SkillStudio.tsx`, `GrokBotSetupContent.tsx`, and `ActionTestDialog.tsx`. - **Storybook & Vitest coverage**: - Added 390×844 mobile Storybook views for Routines (`RoutinesListMobile`, `RoutineDetailMobile`), Members (`MembersMobile`), Costs (`CostsMobile`), ProjectDetail (`ProjectDetailMobile`), CompanySettings (`CompanySettingsMobile`), and Dashboard (`DashboardMobile`). - Added `ui/src/pages/mobile-collections-responsive.test.tsx`. ## Verification - `pnpm exec vitest run ui/src/pages/mobile-collections-responsive.test.tsx ui/src/pages/CompanyAccess.test.tsx ui/src/pages/Dashboard.test.ts` — 3 files, 35/35 passed - `pnpm --filter @paperclipai/ui typecheck` — passed (0 errors) - `pnpm check:token-gates` — all 4 gates CLEAN + cliplab character in sync - `node scripts/storybook-catalog.mjs --check` — passed (373 files, 3494 stories) - `node --test scripts/check-maps.test.mjs scripts/storybook-catalog.test.mjs scripts/storybook-feature-index.test.mjs` — 30/30 passed ## Risks - Low risk: layout-only responsive class updates, missing prop wiring on `PageTabBar` callers, and additive mobile Storybook stories/tests. Desktop breakpoints (`sm:` / `md:` / `lg:` / `xl:`) preserve existing layouts. - Several edited pages (`CompanySkills.tsx`, `Inbox.tsx`, `LegacyInbox.tsx`, `Secrets.tsx`, `SkillStudio.tsx`, `Costs.tsx`, `ProfilesTab.tsx`, `RoutineHistoryTab.tsx`, `ActionTestDialog.tsx`) were already over 1,000 lines on `master`; this PR keeps edits minimal and localized without introducing new subsystems into those files. ## Model Used - Google Gemini 4 Neon (High) via Antigravity (tool use, code execution, multi-agent code review) ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass - [x] I have added or updated tests where applicable - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [ ] All Paperclip CI gates are green - [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge --------- Co-authored-by: Paperclip <noreply@paperclip.ing>
@paperclipai/ui
Published static assets for the Paperclip board UI.
What gets published
The npm package contains the production build under dist/. It does not ship the UI source tree or workspace-only dependencies.
Storybook
Storybook config, stories, and fixtures live under ui/storybook/.
pnpm --filter @paperclipai/ui storybook
pnpm --filter @paperclipai/ui build-storybook
Typical use
Install the package, then serve or copy the built files from node_modules/@paperclipai/ui/dist.
Editor dependency identity
Keep the root and workspace overrides for @codemirror/state,
@codemirror/view, and @lezer/common aligned. CodeMirror requires shared
extension identity, while Lezer parsers and syntax highlighters require shared
NodeProp IDs. Multiple Lezer copies can crash code-block highlighting with
tags is not iterable. src/lib/codemirror-single-instance.test.ts checks the
installed dependency graph and highlights sample code through the editor's real
language dependencies. GitHub Actions owns regeneration of pnpm-lock.yaml.