mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-16 23:41:43 +00:00
Greptile caught a real regression in the shadcn migration: starting to edit organization settings and switching to another tab silently discarded the unsaved input. antd Tabs and Tremor TabGroup mount a panel lazily and then keep it mounted, so a half-filled form or a search history survives leaving the tab and coming back. Base UI unmounts inactive panels instead. Its keepMounted escape hatch is not equivalent either: it mounts every panel eagerly, which renders work the user may never ask for and, on the organization view, put the organization name on screen twice. useVisitedTabs reproduces the original semantics by tracking which tabs have been opened and keeping only those mounted. It is applied to the two tab strips whose panels wrap stateful children: organization Settings, and the vector-stores Create and Test tabs, where an in-progress upload or a search history was equally exposed. The access-group detail tabs render lists derived from props, so they stay lazy. The added regression test fails without the fix and passes with it, and it also passes against the pre-migration antd component, so it pins parity rather than the new markup. |
||
|---|---|---|
| .. | ||
| policies | ||
| mcpOAuthUtils.ts | ||
| use-safe-layout-effect.ts | ||
| useMcpOAuthFlow.test.tsx | ||
| useMcpOAuthFlow.tsx | ||
| useTestMCPConnection.tsx | ||
| useToolsOAuthFlow.test.tsx | ||
| useToolsOAuthFlow.tsx | ||
| useUserMcpOAuthFlow.tsx | ||
| useVisitedTabs.ts | ||
| useWorker.ts | ||