Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
refactor(frontend): reorganize source by route ownership (#20942)
boojack9a122b4efd7a
diff --git a/.sonarcloud.properties b/.sonarcloud.propertiesindex 64df05bb50..a5242d542b 100644--- a/.sonarcloud.properties+++ b/.sonarcloud.properties@@ -52,7 +52,7 @@ sonar.issue.ignore.multicriteria.fp_sync_sql.resourceKey=backend/plugin/db/*/syn# Route name constants (e.g., "auth.password.reset") contain the word "password"# as part of the feature name, not actual credentials.sonar.issue.ignore.multicriteria.fp_route_creds.ruleKey=typescript:S2068-sonar.issue.ignore.multicriteria.fp_route_creds.resourceKey=frontend/src/router/auth.ts+sonar.issue.ignore.multicriteria.fp_route_creds.resourceKey=frontend/src/app/router/routes/auth.tsx# go:S2077 (SQL Injection) in stats.go files (CountAffectedRows).# These run EXPLAIN on user-authored SQL by design — Bytebase is a database@@ -88,6 +88,6 @@ sonar.cpd.exclusions=\frontend/src/**/*.test.ts,\frontend/src/**/*.test.tsx,\frontend/scripts/**/*.test.mjs,\- frontend/src/react/mount*.ts,\+ frontend/src/app/runtime.ts,\frontend/tests/**,\proto/gen/**diff --git a/AGENTS.md b/AGENTS.mdindex 7941cf2423..618bb6e681 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -152,19 +152,29 @@ psql -U bbdev bbdev### React-The frontend is built entirely in React. **All UI code is React** — use the stack and component patterns below.+The product frontend is built in React. **All product UI code is React** — use the stack and component patterns below. The only Vue runtime is the isolated `pev2` adapter under `frontend/src/apps/explain-visualizer/`.++The canonical frontend ownership map is in `./frontend/AGENTS.md`. In summary:++- `frontend/src/app/` owns bootstrap, layouts, and router infrastructure.+- `frontend/src/routes/` owns route modules and route-local code.+- `frontend/src/modules/` owns reusable application subsystems.+- `frontend/src/components/ui/` owns shared UI primitives; `frontend/src/components/` contains other genuinely shared product components.+- `frontend/src/stores/`, `frontend/src/api/`, `frontend/src/hooks/`, and `frontend/src/lib/` contain cross-route infrastructure. Existing `types/` and `utils/` are compatibility surfaces, not default homes for owner-specific code.+- Do not introduce a generic feature bucket or recreate the migration-era framework namespace.+- Historical frontend migration plans under `docs/superpowers/` preserve the paths that existed when they were written; use `frontend/AGENTS.md`, not those plans, for current placement decisions.**Stack**: React + [Base UI](https://base-ui.com/) (`@base-ui/react`) + Tailwind CSS v4 + shadcn-style component patterns**Component patterns**:- Build UI components in the shadcn style — `class-variance-authority` (cva) for variant props, `clsx`/`tailwind-merge` for class merging-- Wrap Base UI primitives (Button, Tabs, Input, etc.) with styled variants in `./frontend/src/react/components/ui/`+- Wrap Base UI primitives (Button, Tabs, Input, etc.) with styled variants in `./frontend/src/components/ui/`- Use `useTranslation()` from `react-i18next` for i18n- Use CSS custom properties (`--color-accent`, `--color-error`, `--color-control-border`, etc.) for theme tokens, defined in `./frontend/src/assets/css/tailwind.css`**Shared UI primitives**:-- For React UI code, prefer shared components from `./frontend/src/react/components/ui/` over native HTML controls or ad hoc styled elements-- Before adding or modifying an interactive UI element, first check whether a matching component already exists in `./frontend/src/react/components/ui/`+- For React UI code, prefer shared components from `./frontend/src/components/ui/` over native HTML controls or ad hoc styled elements+- Before adding or modifying an interactive UI element, first check whether a matching component already exists in `./frontend/src/components/ui/`- Use shared UI components for common controls such as buttons, inputs, selects, dialogs, dropdowns, tooltips, tabs, checkboxes, radios, switches, tables, and form controls when available- Do not hand-roll native controls with Tailwind classes when a shared component exists- Native HTML controls are allowed only when the shared component does not support the required browser behavior, accessibility behavior, or integration pattern@@ -176,7 +186,7 @@ The frontend is built entirely in React. **All UI code is React** — use the st- Default border color is `currentcolor` (compat shim in `tailwind.css` preserves v3 behavior)**State & build**:-- React app state lives under `./frontend/src/react/stores/` — the core slices are in `stores/app/`, consumed via the `useAppStore` hook. Routing helpers live in `./frontend/src/react/router/`+- React app state lives under `./frontend/src/stores/` — the core slices are in `stores/app/`, consumed via the `useAppStore` hook. Routing helpers live in `./frontend/src/app/router/`- React `.tsx` is compiled by esbuild (`react-tsx-transform` Vite plugin) and type-checked with `tsc --build` via `pnpm --dir frontend type-check`## Namingdiff --git a/docs/superpowers/AGENTS.md b/docs/superpowers/AGENTS.mdnew file mode 100644index 0000000000..604ef67e21--- /dev/null+++ b/docs/superpowers/AGENTS.md@@ -0,0 +1,6 @@+This directory contains historical design and implementation records.++- Preserve the paths, framework names, and migration terminology that were accurate when each record was written.+- Do not use those historical paths as current frontend architecture guidance.+- For current frontend placement and dependency rules, follow `../../frontend/AGENTS.md` and verify every referenced path in the working tree.+- New implementation plans must use the current route-first ownership map from `frontend/AGENTS.md`.diff --git a/frontend/.claude/BUTTON_SPACING_STANDARDIZATION.md b/frontend/.claude/BUTTON_SPACING_STANDARDIZATION.mdindex b8c1794c85..a0206b7931 100644--- a/frontend/.claude/BUTTON_SPACING_STANDARDIZATION.md+++ b/frontend/.claude/BUTTON_SPACING_STANDARDIZATION.md@@ -1,218 +1,29 @@-# Button Spacing Standardization+# Button group spacing-## Overview+Use Tailwind `gap-*` utilities on the parent of every React button group. Do not use `space-x-*`, `space-y-*`, or per-button margins for sibling spacing.-This document defines the spacing standards for button groups and general layout spacing in the Bytebase frontend codebase.--## Spacing Standards--### Standard Spacing Value--**ONE STANDARD TO RULE THEM ALL:**--| Value | Pixels | Use Case |-| --------- | ------ | ----------------------------------------------------------------- |-| `gap-x-2` | 8px | **ALL button groups** (modals, drawers, toolbars, inline actions) |--**Optional (Rare cases only):**--| Value | Pixels | Use Case |-| --------- | ------ | --------------------------------------------- |-| `gap-x-1` | 4px | Extremely tight spacing (dense icon toolbars) |--### Why This Simplification?--- ✅ **Easier to remember**: One standard for all button groups-- ✅ **Easier to maintain**: No need to decide between gap-x-2 vs gap-x-3-- ✅ **Consistent UX**: Uniform spacing across the entire application-- ✅ **Faster implementation**: Less decision-making during development-- ✅ **Simpler code reviews**: Clear yes/no - is it gap-x-2?--## Usage Guidelines--### Modal/Drawer Footers--```vue-<!-- ✅ CORRECT: Use gap-x-2 for modal/drawer footers -->-<div class="flex justify-end gap-x-2">- <NButton @click="cancel">Cancel</NButton>- <NButton type="primary" @click="confirm">Confirm</NButton>-</div>--<!-- ❌ WRONG: Never use space-x -->-<div class="flex justify-end space-x-2">- <NButton @click="cancel">Cancel</NButton>- <NButton type="primary" @click="confirm">Confirm</NButton>+```tsx+<div className="flex items-center gap-x-2">+ <Button variant="outline">Cancel</Button>+ <Button>Save</Button></div>```-### Inline Action Buttons--```vue-<!-- ✅ CORRECT: Use gap-x-2 for inline action buttons -->-<div class="flex items-center gap-x-2">- <NButton>Edit</NButton>- <NButton>Delete</NButton>-</div>-```--### Toolbar Actions--```vue-<!-- ✅ CORRECT: Use gap-x-2 for toolbar buttons -->-<div class="flex items-center gap-x-2">- <NButton>Export</NButton>- <NButton>Import</NButton>- <NButton type="primary">Create</NButton>-</div>-```--### Vertical Spacing--```vue-<!-- ✅ CORRECT: Use flex flex-col with gap-y-* -->-<div class="flex flex-col gap-y-4">- <div>Section 1</div>- <div>Section 2</div>- <div>Section 3</div>-</div>--<!-- ❌ WRONG: Never use space-y -->-<div class="space-y-4">- <div>Section 1</div>- <div>Section 2</div>-</div>-```--### Icon Button Groups--```vue-<!-- ✅ PREFERRED: Use gap-x-2 even for icons when possible -->-<div class="flex items-center gap-x-2">- <NButton quaternary circle><Icon /></NButton>- <NButton quaternary circle><Icon /></NButton>-</div>--<!-- ⚠️ OPTIONAL: Use gap-x-1 only when space is critical -->-<div class="flex items-center gap-x-1">- <NButton quaternary circle><Icon /></NButton>- <NButton quaternary circle><Icon /></NButton>-</div>-```--## Important Notes--### Always Add Flex Direction--When using `gap-*` utilities, always include the appropriate flex direction:--```vue-<!-- ✅ CORRECT: Horizontal spacing with flex -->-<div class="flex gap-x-2">...</div>--<!-- ✅ CORRECT: Vertical spacing with flex flex-col -->-<div class="flex flex-col gap-y-4">...</div>--<!-- ❌ WRONG: gap-* without flex context -->-<div class="gap-x-2">...</div>-```--### Grid Layouts--`gap-*` works with both flexbox and grid:--```vue-<!-- ✅ Works with grid too -->-<div class="grid grid-cols-3 gap-4">- <div>Item 1</div>- <div>Item 2</div>- <div>Item 3</div>-</div>-```--### Wrapping Layouts--`gap-*` handles wrapped items correctly:--```vue-<!-- ✅ CORRECT: gap-* works perfectly with flex-wrap -->-<div class="flex flex-wrap gap-x-2 gap-y-2">- <NButton>Button 1</NButton>- <NButton>Button 2</NButton>- <NButton>Button 3</NButton>- <!-- Buttons wrap correctly with consistent spacing -->-</div>--<!-- ❌ WRONG: space-* breaks when items wrap -->-<div class="flex flex-wrap space-x-2">- <!-- Spacing breaks on wrapped lines -->-</div>-```--## Code Review Checklist--When reviewing code or creating new components, verify:--- ✅ Uses `gap-x-2` for button groups-- ✅ Uses `gap-x-*` or `gap-y-*` for ALL spacing needs-- ✅ Has `flex` or `flex flex-col` when using `gap-*`-- ❌ **REJECT** any use of `space-x-*` or `space-y-*`--## Exceptions--The following cases may deviate from the standard:--1. **Third-party components** - Don't modify vendored code-2. **Documented tight spacing** - If using `gap-x-1`, document why-3. **Responsive designs** - May use different spacing at breakpoints (e.g., `gap-x-2 md:gap-x-4`)--## Quick Reference--### Do This ✅--```vue-<!-- Horizontal button group -->-<div class="flex gap-x-2">- <NButton>Cancel</NButton>- <NButton type="primary">Confirm</NButton>-</div>--<!-- Vertical stack -->-<div class="flex flex-col gap-y-4">- <div>Item 1</div>- <div>Item 2</div>-</div>--<!-- Wrapped layout -->-<div class="flex flex-wrap gap-2">- <NBadge />- <NBadge />- <NBadge />-</div>-```--### NOT This ❌--```vue-<!-- NEVER use space-x or space-y -->-<div class="flex space-x-2">- <NButton>Cancel</NButton>- <NButton>Confirm</NButton>-</div>+This applies to dialog and sheet footers, toolbars, table actions, inline actions, and responsive button rows. Use `gap-y-*` as well when a group can wrap:-<div class="space-y-4">- <div>Item 1</div>- <div>Item 2</div>+```tsx+<div className="flex flex-wrap items-center gap-x-2 gap-y-2">+ <Button variant="outline">Preview</Button>+ <Button>Apply</Button></div>```-## Verification+Do not add an empty wrapper only to satisfy this rule. Put the gap on the existing flex or grid container that owns the sibling layout.-To check for violations in your code:+Audit with:```bash-# Should return no results-grep -r "space-[xy]-[0-9]" src/components --include="*.vue"+rg -n 'space-[xy]-|(?:m[lrxy]|margin)-' frontend/src --glob '*.tsx'```-If you find `space-*` utilities, replace them with `gap-*` immediately.+Review matches in button-group containers; not every margin elsewhere is a violation.diff --git a/frontend/.gitignore b/frontend/.gitignoreindex 1d776b7544..9de6a19ae9 100644--- a/frontend/.gitignore+++ b/frontend/.gitignore@@ -3,9 +3,6 @@node_modules/distcomponents.d.ts-# Generated by vue-tsc --build (composite mode)-src/react/**/*.d.ts-!src/react/react-env.d.tssrc/types/plan.yamlsrc/types/iam/*.yamlsrc/types/iam/permission-generated.tsdiff --git a/frontend/AGENTS.md b/frontend/AGENTS.mdindex 201d5ca497..7015061519 100644--- a/frontend/AGENTS.md+++ b/frontend/AGENTS.md@@ -7,33 +7,66 @@ This file provides additional guidance to AI coding assistants working under `./## React-- All UI code is React, under `src/react/`. Write new UI in React, following the stack and component patterns in the root `../AGENTS.md` and the shadcn guidance below.+- All product UI code is React. Write new UI following the stack and component patterns in the root `../AGENTS.md` and the shadcn guidance below. The `pev2` adapter under `src/apps/explain-visualizer/` is the only Vue runtime exception.++## Source ownership++Use route ownership as the primary organization axis. Do not add a generic `features/` directory.++| Location | Owns |+| --- | --- |+| `src/app/` | Bootstrap, root providers, layouts, and React Router infrastructure |+| `src/app/router/` | Route definitions, navigation helpers, guards, and route handles |+| `src/routes/auth/` | Authentication route modules |+| `src/routes/workspace/` | Workspace-level route modules, including settings and resource lists |+| `src/routes/project/` | Project-scoped route modules; keep page-only components, hooks, and tests beside their route |+| `src/modules/` | Cohesive application subsystems reused by routes, such as SQL Editor, agent, AI, CEL, and schema tooling |+| `src/components/ui/` | Base UI/shadcn-style primitives |+| `src/components/` | Product components genuinely reused by multiple routes or modules |+| `src/stores/` | Cross-route Zustand state and compatibility helpers; route-local state stays with its owner |+| `src/api/` | ConnectRPC clients, transports, middleware, and API adapters |+| `src/hooks/` and `src/lib/` | Cross-cutting hooks and framework-neutral helpers only |+| `src/types/` and `src/utils/` | Existing cross-module contracts and compatibility utilities; prefer owner-local code for new work |+| `src/types/proto-es/` | Generated protobuf output; do not edit manually |+| `src/apps/explain-visualizer/` | Isolated secondary entrypoint; the only source subtree allowed to use Vue through `pev2` |++### Placement and dependency rules++- Start from the route in `src/app/router/routes/`, then open the matching subtree under `src/routes/`.+- Keep route-only code beside its route. Promote code to `components`, `hooks`, or `lib` only after it has multiple independent consumers.+- Colocate new types and helpers with their route or module. Do not grow the broad `types` and `utils` barrels without a cross-module need.+- Put a large reusable workflow in `src/modules/<name>/`; do not spread one subsystem across `components`, `stores`, and a migration-era `views` directory.+- Shared code and modules must not import from `src/routes/`. Move the shared implementation to its actual owner instead.+- Prefer direct owner imports such as `@/modules/sql-editor/store` over broad barrels when the owner is known.+- Historical migration plans under `docs/` describe old paths and are not current architecture guidance.+- `CLAUDE.md` files only import their adjacent `AGENTS.md`; update `AGENTS.md` as the source of truth.+- `pnpm --dir frontend check` runs the structure guard. Do not bypass failures by recreating retired framework, view, or singular-store namespaces.## shadcn Skill-When working on React UI, invoke the `shadcn` skill before writing or modifying components. The skill provides component selection guidance, critical rules, and best practices. Always check the skill when unsure which component to use.+When a `shadcn` skill is available, use it before writing or modifying React UI. If it is unavailable, inspect `src/components/ui/` and follow the component rules below; do not block ordinary frontend work on a missing optional skill.## shadcn Component Guidelines-React UI components live in `src/react/components/ui/` and follow shadcn-style patterns: Base UI primitives wrapped with `cva` variants and `cn()` for class merging.+React UI components live in `src/components/ui/` and follow shadcn-style patterns: Base UI primitives wrapped with `cva` variants and `cn()` for class merging.### Rules-- **Use existing UI components first** — check `src/react/components/ui/` before writing custom markup. Use `Badge` not styled spans, `Alert` not custom callout divs, `Separator` not `<hr>` or `border-t` divs+- **Use existing UI components first** — check `src/components/ui/` before writing custom markup. Use `Badge` not styled spans, `Alert` not custom callout divs, `Separator` not `<hr>` or `border-t` divs- **Use semantic color tokens** — `bg-accent`, `text-control`, `border-control-border`, `bg-error`, `text-warning`, etc. Never use raw color values like `bg-blue-500`, `text-gray-600`, or `bg-red-500`. Semantic tokens are defined as CSS custom properties in `src/assets/css/tailwind.css`- **Use `gap-*` not `space-x-*` / `space-y-*`** — always use `flex gap-*` or `grid gap-*` for spacing between children- **Use `size-*` for equal dimensions** — `size-4` not `w-4 h-4`- **Use `truncate` shorthand** — not `overflow-hidden text-ellipsis whitespace-nowrap`-- **Use `cn()` for conditional classes** — import from `@/react/lib/utils`, don't write manual template literal ternaries+- **Use `cn()` for conditional classes** — import from `@/lib/utils`, don't write manual template literal ternaries- **No manual `dark:` overrides** — use semantic tokens that handle theming- **Overlay layering policy** — React overlays use three semantic families: `overlay`, `agent`, and `critical`.- Standard app overlays mount into `overlay`.- - The shared primitives in `src/react/components/ui/` are the `overlay` entry points; they are not for agent-owned or critical surfaces.+ - The shared primitives in `src/components/ui/` are the `overlay` entry points; they are not for agent-owned or critical surfaces.- `AgentWindow`, the minimized launcher, and other agent-owned overlays mount into `agent` and stay above normal app overlays.- - Agent-owned surfaces should use the wrappers in `src/react/plugins/agent/components/ui/` or other agent-owned code that mounts into `getLayerRoot("agent")`.+ - Agent-owned surfaces should use the wrappers in `src/modules/agent/components/ui/` or other agent-owned code that mounts into `getLayerRoot("agent")`.- Forced session-expired / re-login UI mounts into `critical` and is the only layer allowed above and disabling the agent.- `critical` is reserved for auth/session recovery surfaces such as `SessionExpiredSurface`; do not introduce new feature-level critical overlays without an explicit policy change.- - Each family has a dedicated portal root; use `getLayerRoot(<family>)` to choose the family root, and use `LAYER_SURFACE_CLASS` / `LAYER_BACKDROP_CLASS` from `src/react/components/ui/layer.ts` for shared intra-family stacking where appropriate.+ - Each family has a dedicated portal root; use `getLayerRoot(<family>)` to choose the family root, and use `LAYER_SURFACE_CLASS` / `LAYER_BACKDROP_CLASS` from `src/components/ui/layer.ts` for shared intra-family stacking where appropriate.- Children inherit the owning family. If a parent mounts into `agent` or `critical`, its descendants must not remount into a lower family.- Raw global `z-index` values are forbidden in React feature code for cross-surface stacking. Local component-internal `z-index` remains allowed when it only affects internal composition.- Consumers of overlay primitives must not set their own global `z-index`.@@ -43,7 +76,7 @@ React UI components live in `src/react/components/ui/` and follow shadcn-style p- Do not hide raw global overlay classes in constants, imported helpers, `cn()` inputs, or interpolated template literals. A value like `fixed inset-0 z-50` is still forbidden even when it is not written directly in `className`.- When adding or changing React overlays, run `pnpm --dir frontend check` or `node frontend/scripts/check-react-layering.mjs` before handing off. The scanner is intended to catch raw high-z overlays, forbidden body portals, and policy drift in feature code.- The scanner is a guardrail, not proof of policy compliance. It intentionally avoids full static analysis, so imported, dynamic, shadowed, or complex expressions may be unresolved; passing the check does not permit raw global z-index overlays or body portals.-- **Dialog vs Sheet** — use `<Sheet>` (right-side drawer, in `src/react/components/ui/sheet.tsx`) for **creating or editing a resource**. Use `<Dialog>` for **confirmations, single-field prompts, critical interrupts, and read-only result displays**. The dividing line is whether the user is filling out a form with multiple fields — drawers keep the parent list/table visible behind a scrim and scale to multi-section forms, while dialogs are for short blocking interactions. `AlertDialog` is the right pick for destructive confirms that need an explicit acknowledgment.+- **Dialog vs Sheet** — use `<Sheet>` (right-side drawer, in `src/components/ui/sheet.tsx`) for **creating or editing a resource**. Use `<Dialog>` for **confirmations, single-field prompts, critical interrupts, and read-only result displays**. The dividing line is whether the user is filling out a form with multiple fields — drawers keep the parent list/table visible behind a scrim and scale to multi-section forms, while dialogs are for short blocking interactions. `AlertDialog` is the right pick for destructive confirms that need an explicit acknowledgment.- **Dialog sizing contract** — `DialogContent` and `AlertDialogContent` are padded (`p-6`) by default; don't add inner padding wrappers, and override with `p-*` on the content element when needed. `DialogContent` defaults to a wide content size (`max-w-[max(48rem,55vw)]`); pass `max-w-*` (and `w-*` if needed) for smaller dialogs. Keep component defaults free of responsive variants like `2xl:max-w-*` — tailwind-merge can't replace them with a caller's unprefixed utility, so they silently win on wide screens.- **Sheet width tiers** — `<SheetContent>` accepts a `width` variant. Pick the tier that matches the form complexity; don't inline ad-hoc widths. Add a new tier to `sheet.tsx` only if a genuinely new size is needed.- `narrow` (384px) — single-field pickers, short 2–3 field forms, environment/project selection, read-only display sheetsdiff --git a/frontend/components.json b/frontend/components.jsonindex 6098954095..a02e0f9310 100644--- a/frontend/components.json+++ b/frontend/components.json@@ -12,10 +12,10 @@"prefix": ""},"aliases": {- "components": "@/react/components",- "ui": "@/react/components/ui",- "utils": "@/react/lib/utils",- "lib": "@/react/lib",- "hooks": "@/react/hooks"+ "components": "@/components",+ "ui": "@/components/ui",+ "utils": "@/lib/utils",+ "lib": "@/lib",+ "hooks": "@/hooks"}}diff --git a/frontend/env.d.ts b/frontend/env.d.tsindex 1ddac2f7ac..6a8b65a8ce 100644--- a/frontend/env.d.ts+++ b/frontend/env.d.ts@@ -1,3 +1,8 @@/// <reference types="vite/client" />declare module "virtual:stylex:css-only";++declare module "*.yaml" {+ const content: unknown;+ export default content;+}diff --git a/frontend/explain-visualizer.html b/frontend/explain-visualizer.htmlindex ead311d81a..6a367567e5 100644--- a/frontend/explain-visualizer.html+++ b/frontend/explain-visualizer.html@@ -11,7 +11,7 @@<div id="app"></div><scripttype="module"- src="/src/react/explain-visualizer/main.tsx"+ src="/src/apps/explain-visualizer/main.tsx"></script></body></html>diff --git a/frontend/package.json b/frontend/package.jsonindex d5346ccc32..18a9ba8b8f 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -10,7 +10,7 @@"release-docker": "export NODE_OPTIONS=--max_old_space_size=8000 && pnpm run prepare:artifacts && vite build --mode release","release-aws": "export NODE_OPTIONS=--max_old_space_size=8000 && pnpm run prepare:artifacts && vite build --mode release-aws","precheck": "pnpm run prepare:artifacts",- "check": "biome ci . && node scripts/check-no-crypto-randomuuid.mjs && node scripts/check-react-i18n.mjs && node scripts/check-react-layering.mjs && node scripts/sort_i18n_keys.mjs --check",+ "check": "biome ci . && node scripts/check-frontend-structure.mjs && node scripts/check-no-crypto-randomuuid.mjs && node scripts/check-react-i18n.mjs && node scripts/check-react-layering.mjs && node scripts/sort_i18n_keys.mjs --check","fix": "pnpm run sort:i18n && biome check --write .","bundle-visualize": "export NODE_OPTIONS=--max_old_space_size=80000 && vite-bundle-visualizer -c vite.config.ts","pretype-check": "pnpm run prepare:artifacts",diff --git a/frontend/scripts/check-frontend-structure.mjs b/frontend/scripts/check-frontend-structure.mjsnew file mode 100644index 0000000000..e662f0f7c6--- /dev/null+++ b/frontend/scripts/check-frontend-structure.mjs@@ -0,0 +1,134 @@+import { existsSync, readFileSync, readdirSync } from "node:fs";+import { dirname, relative, resolve } from "node:path";+import { fileURLToPath } from "node:url";++const scriptDir = dirname(fileURLToPath(import.meta.url));+const frontendRoot = resolve(scriptDir, "..");+const repoRoot = resolve(frontendRoot, "..");+const sourceRoot = resolve(frontendRoot, "src");++const errors = [];++const removedDirectories = [+ "react",+ "features",+ "views",+ "layouts",+ "plugins",+ "connect",+ "store",+];+for (const directory of removedDirectories) {+ if (existsSync(resolve(sourceRoot, directory))) {+ errors.push(`src/${directory}/ must not be recreated`);+ }+}++const requiredDirectories = [+ "app",+ "app/router",+ "api",+ "components/ui",+ "modules",+ "routes/auth",+ "routes/project",+ "routes/workspace",+ "stores/app",+];+for (const directory of requiredDirectories) {+ if (!existsSync(resolve(sourceRoot, directory))) {+ errors.push(`required owner directory is missing: src/${directory}`);+ }+}++const listSourceFiles = (directory) =>+ readdirSync(directory, { withFileTypes: true }).flatMap((entry) => {+ const path = resolve(directory, entry.name);+ if (entry.isDirectory()) return listSourceFiles(path);+ return /\.(?:ts|tsx)$/.test(entry.name) ? [path] : [];+ });++const retiredAliases = [+ ["@", "react"].join("/"),+ ["@", "views"].join("/"),+ ["@", "layouts"].join("/"),+ ["@", "connect"].join("/"),+ ["@", "plugins"].join("/"),+];++const sourceFiles = listSourceFiles(sourceRoot);+for (const file of sourceFiles) {+ const source = readFileSync(file, "utf8");+ const path = relative(frontendRoot, file);+ for (const alias of retiredAliases) {+ if (source.includes(alias)) errors.push(`${path} uses retired alias ${alias}`);+ }+ if (/from\s+["']@\/store(?:[\/"'])/.test(source)) {+ errors.push(`${path} uses retired alias @/store`);+ }+}++const sharedRoots = ["api", "components", "hooks", "lib", "modules", "stores"];+for (const root of sharedRoots) {+ for (const file of listSourceFiles(resolve(sourceRoot, root))) {+ const source = readFileSync(file, "utf8");+ if (source.includes("@/routes/")) {+ errors.push(`${relative(frontendRoot, file)} imports route-owned code`);+ }+ }+}++const agentFiles = [+ resolve(repoRoot, "AGENTS.md"),+ resolve(repoRoot, "CLAUDE.md"),+ resolve(repoRoot, "docs/superpowers/AGENTS.md"),+ resolve(frontendRoot, "AGENTS.md"),+ resolve(frontendRoot, "CLAUDE.md"),+ resolve(frontendRoot, "components.json"),+ resolve(frontendRoot, "package.json"),+ resolve(frontendRoot, "vite.config.ts"),+ resolve(frontendRoot, "explain-visualizer.html"),+ resolve(frontendRoot, ".claude/BUTTON_SPACING_STANDARDIZATION.md"),+ resolve(frontendRoot, "tests/e2e/AGENTS.md"),+ resolve(frontendRoot, "src/modules/agent/AGENTS.md"),+ resolve(frontendRoot, "src/modules/sql-editor/AGENTS.md"),+ resolve(repoRoot, ".sonarcloud.properties"),+];+const retiredDocumentationTokens = [+ ["src", "react"].join("/"),+ ["src", "features"].join("/"),+ ["src", "views"].join("/"),+ ["src", "layouts"].join("/"),+ ["src", "plugins"].join("/"),+ ["src", "connect"].join("/"),+ ["src", "store", ""].join("/"),+ ["@", "react"].join("/"),+ "VueShellBridgeEvent",+ "bb.vue-notification",+];+for (const file of agentFiles) {+ if (!existsSync(file)) {+ errors.push(`agent-facing file is missing: ${relative(repoRoot, file)}`);+ continue;+ }+ const source = readFileSync(file, "utf8");+ for (const token of retiredDocumentationTokens) {+ if (source.includes(token)) {+ errors.push(`${relative(repoRoot, file)} contains retired reference ${token}`);+ }+ }+}++for (const file of [resolve(repoRoot, "CLAUDE.md"), resolve(frontendRoot, "CLAUDE.md")]) {+ if (readFileSync(file, "utf8").trim() !== "@AGENTS.md") {+ errors.push(`${relative(repoRoot, file)} must delegate only to AGENTS.md`);+ }+}++if (errors.length > 0) {+ console.error("Frontend structure check failed:\n");+ for (const error of errors) console.error(`- ${error}`);+ process.exit(1);+}++console.log("Frontend structure check passed");diff --git a/frontend/scripts/check-react-i18n.mjs b/frontend/scripts/check-react-i18n.mjsindex 52d1a6d221..abc5a70764 100644--- a/frontend/scripts/check-react-i18n.mjs+++ b/frontend/scripts/check-react-i18n.mjs@@ -37,10 +37,10 @@ const DYNAMIC_PREFIXES = ["settings.sidebar.",// Stored as messageKey string literals and translated via t(messageKey) at// render, not as literal t("…") calls. See- // frontend/src/react/pages/auth/OAuthCallbackPage.tsx.+ // frontend/src/routes/auth/OAuthCallbackPage.tsx."auth.oauth-callback.",// Returned from getReviewBadge as labelKey string literals, not invoked- // via t("…") in source. See frontend/src/react/pages/project/utils/reviewBadge.ts.+ // via t("…") in source. See frontend/src/routes/project/utils/reviewBadge.ts."common.bypassed","common.closed","common.rejected",@@ -51,12 +51,12 @@ const DYNAMIC_PREFIXES = [// MembersPage.tsx (EXPIRATION_PRESETS), not as literal t("…") calls."project.members.expiration-presets.",// Keys consumed by SHARED non-React `.ts` modules that translate via- // `@/react/i18n` (the same react-i18next instance — vue-i18n is gone), but+ // `@/lib/i18n` (the same react-i18next instance — vue-i18n is gone), but// live OUTSIDE this checker's React-only scan, so they read as unused. They// must stay in the canonical locale files. Listed with the shared caller// that uses them:// - role.*.self / .description — displayRoleTitle / displayRoleTitleFromList- // (src/utils/role.ts, src/react/lib/role.ts)+ // (src/utils/role.ts, src/lib/role.ts)"role.",// - project.webhook.activity-item.* — projectWebhookV1ActivityItemList// (src/types/v1/projectWebhook.ts)@@ -77,7 +77,7 @@ const DYNAMIC_PREFIXES = [// - data-source.{admin,read-only} — dataSourceType (src/utils/v1/instance.ts)"data-source.admin","data-source.read-only",- // - sheet.{mine,shared} — src/views/sql-editor/Sheet/context.ts+ // - sheet.{mine,shared} — src/modules/sql-editor/model/Sheet/context.ts"sheet.mine","sheet.shared",// - task.status.* — stringifyTaskStatus / stringifyTaskRunStatus@@ -89,7 +89,7 @@ const DYNAMIC_PREFIXES = ["task.status.not-started","task.status.pending","task.status.running",- // - auth.token-expired-description — src/connect/middlewares/authInterceptorMiddleware.ts+ // - auth.token-expired-description — src/api/middlewares/authInterceptorMiddleware.ts"auth.token-expired-description",// - issue.title.export-data — src/utils/v1/issue/issue.ts"issue.title.export-data",diff --git a/frontend/scripts/check-react-layering.mjs b/frontend/scripts/check-react-layering.mjsindex 69f642689a..cb3b97c7af 100644--- a/frontend/scripts/check-react-layering.mjs+++ b/frontend/scripts/check-react-layering.mjs@@ -20,16 +20,16 @@ import ts from "typescript-6";const __dirname = dirname(fileURLToPath(import.meta.url));const ROOT = resolve(__dirname, "..");-const REACT_DIR = resolve(ROOT, "src/react");+const SOURCE_DIR = resolve(ROOT, "src");const REPORT_ONLY = process.argv.includes("--report-only");const APPROVED_PREFIXES = [- "src/react/components/ui/",- "src/react/plugins/agent/",+ "src/components/ui/",+ "src/modules/agent/",];const APPROVED_FILES = new Set([- "src/react/components/auth/SessionExpiredSurface.tsx",+ "src/app/components/SessionExpiredSurface.tsx",]);const CLASS_ATTR_PATTERN = /\bclass(Name)?\s*=\s*/g;@@ -656,7 +656,7 @@ export const scanFile = (file) => {return scanSource(source, rel);};-export const scanReactLayering = () => findFiles(REACT_DIR).flatMap(scanFile);+export const scanReactLayering = () => findFiles(SOURCE_DIR).flatMap(scanFile);const main = () => {const violations = scanReactLayering();diff --git a/frontend/scripts/check-react-layering.test.mjs b/frontend/scripts/check-react-layering.test.mjsindex f7f9d53218..da270c7352 100644--- a/frontend/scripts/check-react-layering.test.mjs+++ b/frontend/scripts/check-react-layering.test.mjs@@ -1,8 +1,8 @@import { describe, expect, test } from "vitest";import { scanSource } from "./check-react-layering.mjs";-const FEATURE_FILE = "src/react/pages/project/Feature.tsx";-const APPROVED_FILE = "src/react/components/ui/overlay.tsx";+const FEATURE_FILE = "src/routes/project/Feature.tsx";+const APPROVED_FILE = "src/components/ui/overlay.tsx";describe("check-react-layering", () => {test("flags raw overlay classes stored in local constants", () => {diff --git a/frontend/scripts/generate_openapi_index.js b/frontend/scripts/generate_openapi_index.jsindex 8db57046dd..9a207e4190 100644--- a/frontend/scripts/generate_openapi_index.js+++ b/frontend/scripts/generate_openapi_index.js@@ -13,7 +13,7 @@ const YAML_FILE = path.join();const OUTPUT_FILE = path.join(__dirname,- "../src/react/plugins/agent/logic/tools/gen/openapi-index.ts"+ "../src/modules/agent/logic/tools/gen/openapi-index.ts");// --- Helpers ---@@ -310,7 +310,7 @@ console.log();// Validate service directory coverage in the prompt-const PROMPT_FILE = path.join(__dirname, "../src/react/plugins/agent/logic/prompt.ts");+const PROMPT_FILE = path.join(__dirname, "../src/modules/agent/logic/prompt.ts");if (fs.existsSync(PROMPT_FILE)) {const promptContent = fs.readFileSync(PROMPT_FILE, "utf8");const specServices = new Set(endpoints.map((ep) => ep.service));@@ -325,13 +325,13 @@ if (fs.existsSync(PROMPT_FILE)) {` ⚠ Services not reflected in prompt.ts serviceDirectory: ${missing.join(", ")}`);console.warn(- " Review frontend/src/react/plugins/agent/AGENT.md and manually update the serviceDirectory block in prompt.ts"+ " Review frontend/src/modules/agent/AGENTS.md and manually update the serviceDirectory block in prompt.ts");} else {console.log(` ✓ Prompt service directory covers all ${specServices.size} services`);}} else {console.warn(- " ⚠ No prompt.ts found. Review frontend/src/react/plugins/agent/AGENT.md and restore or recreate the serviceDirectory block"+ " ⚠ No prompt.ts found. Review frontend/src/modules/agent/AGENTS.md and restore or recreate the serviceDirectory block");}diff --git a/frontend/src/connect/context-key/ignored_codes.ts b/frontend/src/api/context-key/ignored_codes.tssimilarity index 100%rename from frontend/src/connect/context-key/ignored_codes.tsrename to frontend/src/api/context-key/ignored_codes.tsdiff --git a/frontend/src/connect/context-key/index.ts b/frontend/src/api/context-key/index.tssimilarity index 100%rename from frontend/src/connect/context-key/index.tsrename to frontend/src/api/context-key/index.tsdiff --git a/frontend/src/connect/context-key/silent.ts b/frontend/src/api/context-key/silent.tssimilarity index 100%rename from frontend/src/connect/context-key/silent.tsrename to frontend/src/api/context-key/silent.tsdiff --git a/frontend/src/connect/index.ts b/frontend/src/api/index.tssimilarity index 100%rename from frontend/src/connect/index.tsrename to frontend/src/api/index.tsdiff --git a/frontend/src/connect/methods.ts b/frontend/src/api/methods.tssimilarity index 100%rename from frontend/src/connect/methods.tsrename to frontend/src/api/methods.tsdiff --git a/frontend/src/connect/middlewares/activeInterceptorMiddleware.ts b/frontend/src/api/middlewares/activeInterceptorMiddleware.tssimilarity index 93%rename from frontend/src/connect/middlewares/activeInterceptorMiddleware.tsrename to frontend/src/api/middlewares/activeInterceptorMiddleware.tsindex ec7965a629..ab5d97337b 100644--- a/frontend/src/connect/middlewares/activeInterceptorMiddleware.ts+++ b/frontend/src/api/middlewares/activeInterceptorMiddleware.ts@@ -1,5 +1,5 @@import { type Interceptor } from "@connectrpc/connect";-import { getCurrentUserV1 } from "@/store";+import { getCurrentUserV1 } from "@/stores";import { storageKeyLastActivity } from "@/utils/storage-keys";export const activeInterceptor: Interceptor = (next) => async (req) => {diff --git a/frontend/src/connect/middlewares/authInterceptorMiddleware.test.ts b/frontend/src/api/middlewares/authInterceptorMiddleware.test.tssimilarity index 97%rename from frontend/src/connect/middlewares/authInterceptorMiddleware.test.tsrename to frontend/src/api/middlewares/authInterceptorMiddleware.test.tsindex 7bfad150db..161f43ae9e 100644--- a/frontend/src/connect/middlewares/authInterceptorMiddleware.test.ts+++ b/frontend/src/api/middlewares/authInterceptorMiddleware.test.ts@@ -20,13 +20,13 @@ const mocks = vi.hoisted(() => ({},}));-vi.mock("@/react/i18n", () => ({+vi.mock("@/lib/i18n", () => ({default: {t: (key: string) => key,},}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: mocks.pushNotification,}));@@ -39,8 +39,8 @@ vi.mock("@/utils/app-store-bridge", () => ({}),}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {currentRoute: mocks.currentRoute,push: mocks.routerPush,diff --git a/frontend/src/connect/middlewares/authInterceptorMiddleware.ts b/frontend/src/api/middlewares/authInterceptorMiddleware.tssimilarity index 93%rename from frontend/src/connect/middlewares/authInterceptorMiddleware.tsrename to frontend/src/api/middlewares/authInterceptorMiddleware.tsindex 8f5972aed9..d8ddb9a4d9 100644--- a/frontend/src/connect/middlewares/authInterceptorMiddleware.ts+++ b/frontend/src/api/middlewares/authInterceptorMiddleware.ts@@ -5,11 +5,11 @@ import {type StreamRequest,type UnaryRequest,} from "@connectrpc/connect";-import i18n from "@/react/i18n";-import { router } from "@/react/router";-import { WORKSPACE_ROUTE_403 } from "@/react/router/handles";-import { buildPermissionDeniedRouteQuery } from "@/react/router/permissionDenied";-import { pushNotification } from "@/store";+import { router } from "@/app/router";+import { WORKSPACE_ROUTE_403 } from "@/app/router/handles";+import { buildPermissionDeniedRouteQuery } from "@/app/router/permissionDenied";+import i18n from "@/lib/i18n";+import { pushNotification } from "@/stores";import { PermissionDeniedDetailSchema } from "@/types/proto-es/v1/common_pb";import { appStoreUtilBridge } from "@/utils/app-store-bridge";import { ignoredCodesContextKey, silentContextKey } from "../context-key";diff --git a/frontend/src/connect/middlewares/errorNotificationMiddleware.test.ts b/frontend/src/api/middlewares/errorNotificationMiddleware.test.tssimilarity index 95%rename from frontend/src/connect/middlewares/errorNotificationMiddleware.test.tsrename to frontend/src/api/middlewares/errorNotificationMiddleware.test.tsindex 94e16c392f..f3d3a221b1 100644--- a/frontend/src/connect/middlewares/errorNotificationMiddleware.test.ts+++ b/frontend/src/api/middlewares/errorNotificationMiddleware.test.ts@@ -11,19 +11,19 @@ const mocks = vi.hoisted(() => ({},}));-vi.mock("@/react/i18n", () => ({+vi.mock("@/lib/i18n", () => ({default: {t: (key: string) => key,},}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({router: {currentRoute: mocks.currentRoute,},}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: mocks.pushNotification,}));diff --git a/frontend/src/connect/middlewares/errorNotificationMiddleware.ts b/frontend/src/api/middlewares/errorNotificationMiddleware.tssimilarity index 96%rename from frontend/src/connect/middlewares/errorNotificationMiddleware.tsrename to frontend/src/api/middlewares/errorNotificationMiddleware.tsindex 47c313e4b8..388abe0365 100644--- a/frontend/src/connect/middlewares/errorNotificationMiddleware.ts+++ b/frontend/src/api/middlewares/errorNotificationMiddleware.ts@@ -1,6 +1,6 @@import { Code, ConnectError, type Interceptor } from "@connectrpc/connect";-import i18n from "@/react/i18n";-import { pushNotification } from "@/store";+import i18n from "@/lib/i18n";+import { pushNotification } from "@/stores";import { ignoredCodesContextKey, silentContextKey } from "../context-key";export type SilentRequestOptions = {diff --git a/frontend/src/connect/middlewares/index.ts b/frontend/src/api/middlewares/index.tssimilarity index 100%rename from frontend/src/connect/middlewares/index.tsrename to frontend/src/api/middlewares/index.tsdiff --git a/frontend/src/connect/refreshToken.ts b/frontend/src/api/refreshToken.tssimilarity index 97%rename from frontend/src/connect/refreshToken.tsrename to frontend/src/api/refreshToken.tsindex a48b28af14..e15131dca5 100644--- a/frontend/src/connect/refreshToken.ts+++ b/frontend/src/api/refreshToken.ts@@ -1,4 +1,4 @@-import { authServiceClientConnect } from "@/connect";+import { authServiceClientConnect } from "@/api";const LOCK_NAME = "bb_token_refresh";const CHANNEL_NAME = "bb_token_refresh";diff --git a/frontend/src/react/app/AppRoot.tsx b/frontend/src/app/AppRoot.tsxsimilarity index 90%rename from frontend/src/react/app/AppRoot.tsxrename to frontend/src/app/AppRoot.tsxindex 4bc23f977a..4fc2fb00b9 100644--- a/frontend/src/react/app/AppRoot.tsx+++ b/frontend/src/app/AppRoot.tsx@@ -4,9 +4,9 @@ import {matchRoutes,} from "react-router";import { RouterProvider } from "react-router/dom";-import { rootGuard } from "@/react/router/guard";-import { setAppRouter, setRouteNameIndex } from "@/react/router/navigation";-import { buildRouteNameIndex, routes } from "@/react/router/routes";+import { rootGuard } from "@/app/router/guard";+import { setAppRouter, setRouteNameIndex } from "@/app/router/navigation";+import { buildRouteNameIndex, routes } from "@/app/router/routes";// Register the name→path index so the guard + auth lifecycle can resolve their// by-name redirects to paths.diff --git a/frontend/src/react/app/AuthGate.test.tsx b/frontend/src/app/AuthGate.test.tsxsimilarity index 96%rename from frontend/src/react/app/AuthGate.test.tsxrename to frontend/src/app/AuthGate.test.tsxindex 6c7c193f69..3bbc169ffb 100644--- a/frontend/src/react/app/AuthGate.test.tsx+++ b/frontend/src/app/AuthGate.test.tsx@@ -66,27 +66,27 @@ vi.mock("react-router", () => ({useNavigate: () => mocks.navigate,}));-vi.mock("@/react/components/auth/InactiveRemindModal", () => ({+vi.mock("@/components/auth/InactiveRemindModal", () => ({InactiveRemindModal: () => <div data-testid="inactive-remind-modal" />,}));-vi.mock("@/react/router/guard", () => ({+vi.mock("@/app/router/guard", () => ({buildSigninRedirectQuery: mocks.buildSigninRedirectQuery,isAuthRelatedRoute: (name: string) => name.startsWith("auth."),}));-vi.mock("@/react/router/handles", () => ({+vi.mock("@/app/router/handles", () => ({AUTH_SIGNIN_MODULE: "auth.signin",WORKSPACE_ROUTE_403: "error.403",WORKSPACE_ROUTE_404: "error.404",WORKSPACE_ROOT_MODULE: "workspace.root",}));-vi.mock("@/react/router/navigation", () => ({+vi.mock("@/app/router/navigation", () => ({resolvePath: mocks.resolvePath,}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: vi.fn(),}));@@ -94,7 +94,7 @@ vi.mock("@/utils", () => ({isDev: () => true,}));-vi.mock("@/react/stores/app", async () => {+vi.mock("@/stores/app", async () => {const { create } = await import("zustand");const initialUser = {name: "users/[email protected]",@@ -120,7 +120,7 @@ vi.mock("@/react/stores/app", async () => {return { useAppStore };});-import { useAppStore } from "@/react/stores/app";+import { useAppStore } from "@/stores/app";import { AuthGate } from "./AuthGate";describe("AuthGate", () => {diff --git a/frontend/src/react/app/AuthGate.tsx b/frontend/src/app/AuthGate.tsxsimilarity index 94%rename from frontend/src/react/app/AuthGate.tsxrename to frontend/src/app/AuthGate.tsxindex 6c52243964..324bad76b8 100644--- a/frontend/src/react/app/AuthGate.tsx+++ b/frontend/src/app/AuthGate.tsx@@ -2,20 +2,20 @@ import { Loader2 } from "lucide-react";import { type ReactNode, useEffect, useRef, useState } from "react";import { useTranslation } from "react-i18next";import { useLocation, useMatches, useNavigate } from "react-router";-import { InactiveRemindModal } from "@/react/components/auth/InactiveRemindModal";import {buildSigninRedirectQuery,isAuthRelatedRoute,-} from "@/react/router/guard";+} from "@/app/router/guard";import {AUTH_SIGNIN_MODULE,WORKSPACE_ROOT_MODULE,WORKSPACE_ROUTE_403,WORKSPACE_ROUTE_404,-} from "@/react/router/handles";-import { resolvePath } from "@/react/router/navigation";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/app/router/handles";+import { resolvePath } from "@/app/router/navigation";+import { InactiveRemindModal } from "@/components/auth/InactiveRemindModal";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import { isDev } from "@/utils";// Session-validity poll interval (1 min dev, 5 min prod), mirroring the legacydiff --git a/frontend/src/react/app/RootLayout.tsx b/frontend/src/app/RootLayout.tsxsimilarity index 80%rename from frontend/src/react/app/RootLayout.tsxrename to frontend/src/app/RootLayout.tsxindex a94ca14740..8167637eca 100644--- a/frontend/src/react/app/RootLayout.tsx+++ b/frontend/src/app/RootLayout.tsx@@ -1,15 +1,15 @@import { useRef } from "react";import type { Location } from "react-router";import { matchRoutes, Outlet, useBlocker } from "react-router";-import { AuthGate } from "@/react/app/AuthGate";-import { SessionExpiredSurfaceGate } from "@/react/app/SessionExpiredSurfaceGate";-import { Toaster } from "@/react/components/ui/toaster";-import { Watermark } from "@/react/components/Watermark";-import { AgentWindow } from "@/react/plugins/agent/components/AgentWindow";-import type { ReactRoute } from "@/react/router";-import { buildReactRoute, runBeforeEachGuards } from "@/react/router";-import { NavigationScrollRestoration } from "@/react/router/NavigationScrollRestoration";-import { routes } from "@/react/router/routes";+import { AuthGate } from "@/app/AuthGate";+import type { ReactRoute } from "@/app/router";+import { buildReactRoute, runBeforeEachGuards } from "@/app/router";+import { NavigationScrollRestoration } from "@/app/router/NavigationScrollRestoration";+import { routes } from "@/app/router/routes";+import { SessionExpiredSurfaceGate } from "@/app/SessionExpiredSurfaceGate";+import { Toaster } from "@/components/ui/toaster";+import { Watermark } from "@/components/Watermark";+import { AgentWindow } from "@/modules/agent/components/AgentWindow";// Translate a react-router Location into the legacy `ReactRoute` snapshot the// registered `beforeEach` leave guards expect (they read `to.name` /diff --git a/frontend/src/react/app/RouteErrorPage.test.tsx b/frontend/src/app/RouteErrorPage.test.tsxsimilarity index 100%rename from frontend/src/react/app/RouteErrorPage.test.tsxrename to frontend/src/app/RouteErrorPage.test.tsxdiff --git a/frontend/src/react/app/RouteErrorPage.tsx b/frontend/src/app/RouteErrorPage.tsxsimilarity index 96%rename from frontend/src/react/app/RouteErrorPage.tsxrename to frontend/src/app/RouteErrorPage.tsxindex 1576642f49..f8c2fd5918 100644--- a/frontend/src/react/app/RouteErrorPage.tsx+++ b/frontend/src/app/RouteErrorPage.tsx@@ -1,8 +1,8 @@import { useEffect } from "react";import { useTranslation } from "react-i18next";import { useRouteError } from "react-router";-import { Button } from "@/react/components/ui/button";-import { cn } from "@/react/lib/utils";+import { Button } from "@/components/ui/button";+import { cn } from "@/lib/utils";/*** `errorElement` for uncaught render/loader exceptions, instead ofdiff --git a/frontend/src/react/app/SessionExpiredSurfaceGate.test.tsx b/frontend/src/app/SessionExpiredSurfaceGate.test.tsxsimilarity index 95%rename from frontend/src/react/app/SessionExpiredSurfaceGate.test.tsxrename to frontend/src/app/SessionExpiredSurfaceGate.test.tsxindex 4cd9c911ea..5fe4e2eaff 100644--- a/frontend/src/react/app/SessionExpiredSurfaceGate.test.tsx+++ b/frontend/src/app/SessionExpiredSurfaceGate.test.tsx@@ -7,7 +7,7 @@ const isLoggedInRef = { value: true };const fullPathRef = { value: "/" };const routeNameRef = { value: "workspace.dashboard" };-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: <T,>(selector: (s: unknown) => T) =>selector({isLoggedIn: () => isLoggedInRef.value,@@ -15,7 +15,7 @@ vi.mock("@/react/stores/app", () => ({}),}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({useCurrentRoute: () => ({name: routeNameRef.value,fullPath: fullPathRef.value,@@ -42,7 +42,7 @@ vi.mock("@/utils/auth", () => ({].includes(name),}));-vi.mock("@/react/components/auth/SessionExpiredSurface", () => ({+vi.mock("@/app/components/SessionExpiredSurface", () => ({SessionExpiredSurface: ({ currentPath }: { currentPath: string }) => (<div data-testid="surface" data-path={currentPath} />),diff --git a/frontend/src/react/app/SessionExpiredSurfaceGate.tsx b/frontend/src/app/SessionExpiredSurfaceGate.tsxsimilarity index 80%rename from frontend/src/react/app/SessionExpiredSurfaceGate.tsxrename to frontend/src/app/SessionExpiredSurfaceGate.tsxindex 3475217f4a..c1a4c98d73 100644--- a/frontend/src/react/app/SessionExpiredSurfaceGate.tsx+++ b/frontend/src/app/SessionExpiredSurfaceGate.tsx@@ -1,6 +1,6 @@-import { SessionExpiredSurface } from "@/react/components/auth/SessionExpiredSurface";-import { useCurrentRoute } from "@/react/router";-import { useAppStore } from "@/react/stores/app";+import { SessionExpiredSurface } from "@/app/components/SessionExpiredSurface";+import { useCurrentRoute } from "@/app/router";+import { useAppStore } from "@/stores/app";import { isAuthRelatedRoute } from "@/utils/auth";export function SessionExpiredSurfaceGate() {diff --git a/frontend/src/react/components/auth/SessionExpiredSurface.test.tsx b/frontend/src/app/components/SessionExpiredSurface.test.tsxsimilarity index 96%rename from frontend/src/react/components/auth/SessionExpiredSurface.test.tsxrename to frontend/src/app/components/SessionExpiredSurface.test.tsxindex dc1d4fa543..766028d039 100644--- a/frontend/src/react/components/auth/SessionExpiredSurface.test.tsx+++ b/frontend/src/app/components/SessionExpiredSurface.test.tsx@@ -2,11 +2,11 @@ import { act } from "react";import { createRoot } from "react-dom/client";import { afterEach, describe, expect, test, vi } from "vitest";-vi.mock("@/react/pages/auth/SigninPage", () => ({+vi.mock("@/routes/auth/SigninPage", () => ({SigninPage: () => <button data-testid="signin-bridge">Sign in</button>,}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: Object.assign(() => ({}), {getState: () => ({ logout: vi.fn() }),}),@@ -19,7 +19,7 @@ vi.mock("react-i18next", () => ({initReactI18next: { type: "3rdParty", init: () => {} },}));-import { Dialog, DialogContent } from "@/react/components/ui/dialog";+import { Dialog, DialogContent } from "@/components/ui/dialog";import { SessionExpiredSurface } from "./SessionExpiredSurface";(diff --git a/frontend/src/react/components/auth/SessionExpiredSurface.tsx b/frontend/src/app/components/SessionExpiredSurface.tsxsimilarity index 93%rename from frontend/src/react/components/auth/SessionExpiredSurface.tsxrename to frontend/src/app/components/SessionExpiredSurface.tsxindex b85d95f895..b13dcb9c68 100644--- a/frontend/src/react/components/auth/SessionExpiredSurface.tsx+++ b/frontend/src/app/components/SessionExpiredSurface.tsx@@ -4,9 +4,9 @@ import {getLayerRoot,LAYER_BACKDROP_CLASS,LAYER_SURFACE_CLASS,-} from "@/react/components/ui/layer";-import { SigninPage } from "@/react/pages/auth/SigninPage";-import { useAppStore } from "@/react/stores/app";+} from "@/components/ui/layer";+import { SigninPage } from "@/routes/auth/SigninPage";+import { useAppStore } from "@/stores/app";export function SessionExpiredSurface({currentPath,diff --git a/frontend/src/react/dashboard-shell.ts b/frontend/src/app/dashboard-shell.tssimilarity index 100%rename from frontend/src/react/dashboard-shell.tsrename to frontend/src/app/dashboard-shell.tsdiff --git a/frontend/src/react/app/layouts/BodyLayout.tsx b/frontend/src/app/layouts/BodyLayout.tsxsimilarity index 88%rename from frontend/src/react/app/layouts/BodyLayout.tsxrename to frontend/src/app/layouts/BodyLayout.tsxindex 1ab37b2a4d..f6a86cca57 100644--- a/frontend/src/react/app/layouts/BodyLayout.tsx+++ b/frontend/src/app/layouts/BodyLayout.tsx@@ -1,17 +1,17 @@import { useEffect, useState } from "react";import { createPortal } from "react-dom";import { Outlet, useLocation, useMatches } from "react-router";-import { DashboardBodyShell } from "@/react/components/DashboardBodyShell";-import { DashboardSidebar } from "@/react/components/DashboardSidebar";-import { ProjectSidebar } from "@/react/components/ProjectSidebar";-import { Quickstart } from "@/react/components/Quickstart";-import { RoutePermissionGuardShell } from "@/react/components/RoutePermissionGuardShell";-import type { DashboardShellTargets } from "@/react/dashboard-shell";+import type { DashboardShellTargets } from "@/app/dashboard-shell";import {PROJECT_V1_ROUTE_DASHBOARD,WORKSPACE_ROOT_MODULE,WORKSPACE_ROUTE_MY_ISSUES,-} from "@/react/router/handles";+} from "@/app/router/handles";+import { DashboardBodyShell } from "@/components/DashboardBodyShell";+import { DashboardSidebar } from "@/components/DashboardSidebar";+import { ProjectSidebar } from "@/components/ProjectSidebar";+import { Quickstart } from "@/components/Quickstart";+import { RoutePermissionGuardShell } from "@/components/RoutePermissionGuardShell";// Ported from `src/layouts/BodyLayout.vue`. Mounts the workspace// `DashboardBodyShell` (header + sidebar slot + body slot) and portals the@@ -69,9 +69,7 @@ export function BodyLayout() {const handler = async (e: KeyboardEvent) => {if ((e.ctrlKey || e.metaKey) && e.shiftKey && e.key === "A") {e.preventDefault();- const { useAgentStore } = await import(- "@/react/plugins/agent/store/agent"- );+ const { useAgentStore } = await import("@/modules/agent/store/agent");useAgentStore.getState().toggle();}};diff --git a/frontend/src/react/app/layouts/DashboardLayout.tsx b/frontend/src/app/layouts/DashboardLayout.tsxsimilarity index 78%rename from frontend/src/react/app/layouts/DashboardLayout.tsxrename to frontend/src/app/layouts/DashboardLayout.tsxindex 7f1c8f9b54..914183fc9d 100644--- a/frontend/src/react/app/layouts/DashboardLayout.tsx+++ b/frontend/src/app/layouts/DashboardLayout.tsx@@ -1,9 +1,9 @@import { useState } from "react";import { createPortal } from "react-dom";import { Outlet } from "react-router";-import { DashboardFrameShell } from "@/react/components/DashboardFrameShell";-import type { DashboardFrameShellTargets } from "@/react/dashboard-shell";-import { useEnsureWorkspaceCommonData } from "@/react/hooks/useEnsureWorkspaceCommonData";+import type { DashboardFrameShellTargets } from "@/app/dashboard-shell";+import { DashboardFrameShell } from "@/components/DashboardFrameShell";+import { useEnsureWorkspaceCommonData } from "@/hooks/useEnsureWorkspaceCommonData";// Ported from `src/layouts/DashboardLayout.vue`. The Vue layout mounted// `DashboardFrameShell` and teleported `<router-view name="body"/>` into thediff --git a/frontend/src/react/app/layouts/SplashLayout.test.tsx b/frontend/src/app/layouts/SplashLayout.test.tsxsimilarity index 93%rename from frontend/src/react/app/layouts/SplashLayout.test.tsxrename to frontend/src/app/layouts/SplashLayout.test.tsxindex 9cc4ea6bc3..039740b9cc 100644--- a/frontend/src/react/app/layouts/SplashLayout.test.tsx+++ b/frontend/src/app/layouts/SplashLayout.test.tsx@@ -1,6 +1,6 @@import { render } from "@testing-library/react";import { beforeEach, describe, expect, test, vi } from "vitest";-import { AUTH_SIGNIN_MODULE } from "@/react/router/handles";+import { AUTH_SIGNIN_MODULE } from "@/app/router/handles";import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";import { SplashLayout } from "./SplashLayout";@@ -14,7 +14,7 @@ vi.mock("react-router", () => ({useMatches: () => [{ handle: { name: AUTH_SIGNIN_MODULE } }],}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {type MockState = {currentPlan: () => number;isTrialing: () => boolean;diff --git a/frontend/src/react/app/layouts/SplashLayout.tsx b/frontend/src/app/layouts/SplashLayout.tsxsimilarity index 93%rename from frontend/src/react/app/layouts/SplashLayout.tsxrename to frontend/src/app/layouts/SplashLayout.tsxindex c23f8aa297..2e2f8a8963 100644--- a/frontend/src/react/app/layouts/SplashLayout.tsx+++ b/frontend/src/app/layouts/SplashLayout.tsx@@ -1,9 +1,9 @@import { useState } from "react";import { Outlet, useMatches } from "react-router";+import { AUTH_SIGNUP_MODULE } from "@/app/router/handles";import signinImage from "@/assets/illustration/signin.webp";import signupImage from "@/assets/illustration/signup.webp";-import { AUTH_SIGNUP_MODULE } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";+import { useAppStore } from "@/stores/app";import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";// Ported from `src/layouts/SplashLayout.vue`. Two-column auth chrome: andiff --git a/frontend/src/react/app/mountApp.ts b/frontend/src/app/mountApp.tssimilarity index 98%rename from frontend/src/react/app/mountApp.tsrename to frontend/src/app/mountApp.tsindex f62dc81118..ffee139b15 100644--- a/frontend/src/react/app/mountApp.ts+++ b/frontend/src/app/mountApp.ts@@ -1,4 +1,4 @@-import { buildTree, loadCoreDeps, type ReactComponent } from "@/react/mount";+import { buildTree, loadCoreDeps, type ReactComponent } from "@/app/runtime";// Vite resolves the glob at build time and produces a lazy chunk.const appRootLoaders = import.meta.glob("./AppRoot.tsx");diff --git a/frontend/src/react/router/NavigationScrollRestoration.test.tsx b/frontend/src/app/router/NavigationScrollRestoration.test.tsxsimilarity index 100%rename from frontend/src/react/router/NavigationScrollRestoration.test.tsxrename to frontend/src/app/router/NavigationScrollRestoration.test.tsxdiff --git a/frontend/src/react/router/NavigationScrollRestoration.tsx b/frontend/src/app/router/NavigationScrollRestoration.tsxsimilarity index 99%rename from frontend/src/react/router/NavigationScrollRestoration.tsxrename to frontend/src/app/router/NavigationScrollRestoration.tsxindex c9324a3eb0..3e3fe2af9a 100644--- a/frontend/src/react/router/NavigationScrollRestoration.tsx+++ b/frontend/src/app/router/NavigationScrollRestoration.tsx@@ -10,8 +10,8 @@ import {useState,} from "react";import { type Location, useLocation, useNavigationType } from "react-router";-import type { PagedDataResult } from "@/react/hooks/usePagedData";-import { getAppRouterState, subscribeRoute } from "@/react/router/navigation";+import { getAppRouterState, subscribeRoute } from "@/app/router/navigation";+import type { PagedDataResult } from "@/hooks/usePagedData";import { minmax } from "@/utils/math";const STORAGE_KEY = "bb.navigation-scroll-restoration";diff --git a/frontend/src/react/router/ProjectRouteGate.test.tsx b/frontend/src/app/router/ProjectRouteGate.test.tsxsimilarity index 95%rename from frontend/src/react/router/ProjectRouteGate.test.tsxrename to frontend/src/app/router/ProjectRouteGate.test.tsxindex 1e6df31f43..8dc6ac346c 100644--- a/frontend/src/react/router/ProjectRouteGate.test.tsx+++ b/frontend/src/app/router/ProjectRouteGate.test.tsx@@ -33,22 +33,22 @@ vi.mock("react-router", () => ({useParams: () => mocks.params,}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({useCurrentRoute: () => mocks.route,useNavigate: () => ({ replace: mocks.replace, resolve: mocks.resolve }),WORKSPACE_ROUTE_LANDING: "workspace.landing",PROJECT_V1_ROUTE_DETAIL: "workspace.project.detail",}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useNotify: () => mocks.notify,}));-vi.mock("@/react/pages/settings/RequestRoleSheet", () => ({+vi.mock("@/modules/access-control/RequestRoleSheet", () => ({RequestRoleSheet: () => <div data-testid="request-role-sheet" />,}));-vi.mock("@/react/components/FeatureBadge", () => ({+vi.mock("@/components/FeatureBadge", () => ({FeatureBadge: () => <span data-testid="feature-badge" />,}));@@ -57,7 +57,7 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const state = {currentUser: { name: "users/[email protected]" },roles: [],diff --git a/frontend/src/react/router/ProjectRouteGate.tsx b/frontend/src/app/router/ProjectRouteGate.tsxsimilarity index 95%rename from frontend/src/react/router/ProjectRouteGate.tsxrename to frontend/src/app/router/ProjectRouteGate.tsxindex 883de50a30..ba50d7edac 100644--- a/frontend/src/react/router/ProjectRouteGate.tsx+++ b/frontend/src/app/router/ProjectRouteGate.tsx@@ -1,19 +1,19 @@import { LoaderCircle } from "lucide-react";import { useEffect, useRef, useState } from "react";import { Outlet, useParams } from "react-router";-import {- PermissionDeniedFallback,- useComponentPermissionState,- usePermissionDataReady,-} from "@/react/components/ComponentPermissionGuard";-import { useNotify } from "@/react/hooks/useAppState";import {PROJECT_V1_ROUTE_DETAIL,useCurrentRoute,useNavigate,WORKSPACE_ROUTE_LANDING,-} from "@/react/router";-import { projectResourceNameFromId, useAppStore } from "@/react/stores/app";+} from "@/app/router";+import {+ PermissionDeniedFallback,+ useComponentPermissionState,+ usePermissionDataReady,+} from "@/components/ComponentPermissionGuard";+import { useNotify } from "@/hooks/useAppState";+import { projectResourceNameFromId, useAppStore } from "@/stores/app";// `<Outlet/>`-aware permission gate for `/projects/:projectId/*`. Project-scoped// permission checks need the loaded `Project` resource, so this loads thediff --git a/frontend/src/app/router/RouteGroupOutlet.tsx b/frontend/src/app/router/RouteGroupOutlet.tsxnew file mode 100644index 0000000000..c32c45ca71--- /dev/null+++ b/frontend/src/app/router/RouteGroupOutlet.tsx@@ -0,0 +1,3 @@+import { Outlet } from "react-router";++export const RouteGroupOutlet = () => <Outlet />;diff --git a/frontend/src/react/router/currentRouteSnapshot.test.ts b/frontend/src/app/router/currentRouteSnapshot.test.tssimilarity index 100%rename from frontend/src/react/router/currentRouteSnapshot.test.tsrename to frontend/src/app/router/currentRouteSnapshot.test.tsdiff --git a/frontend/src/react/router/guard.test.ts b/frontend/src/app/router/guard.test.tssimilarity index 98%rename from frontend/src/react/router/guard.test.tsrename to frontend/src/app/router/guard.test.tsindex 5bff782f69..e73a058be2 100644--- a/frontend/src/react/router/guard.test.ts+++ b/frontend/src/app/router/guard.test.ts@@ -18,7 +18,7 @@ const resets = {resetProjects: vi.fn(),};-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: {getState: () => ({isLoggedIn: () => session.isLoggedIn,@@ -33,7 +33,7 @@ vi.mock("@/react/stores/app", () => ({},}));-vi.mock("@/plugins/ai/store", () => ({+vi.mock("@/modules/ai/store", () => ({// Zustand store: the guard calls `useConversationStore.getState().reset()`.useConversationStore: { getState: () => ({ reset: vi.fn() }) },}));diff --git a/frontend/src/react/router/guard.ts b/frontend/src/app/router/guard.tssimilarity index 98%rename from frontend/src/react/router/guard.tsrename to frontend/src/app/router/guard.tsindex 5d9130f792..b1c5155f39 100644--- a/frontend/src/react/router/guard.ts+++ b/frontend/src/app/router/guard.ts@@ -1,5 +1,5 @@import { redirect } from "react-router";-import { useAppStore } from "@/react/stores/app";+import { useAppStore } from "@/stores/app";import { DatabaseChangeMode } from "@/types/proto-es/v1/setting_service_pb";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import {@@ -237,7 +237,7 @@ export function rootGuard({store.resetDatabases();store.resetInstances();store.resetProjects();- void import("@/plugins/ai/store").then(({ useConversationStore }) => {+ void import("@/modules/ai/store").then(({ useConversationStore }) => {useConversationStore.getState().reset();});return null;diff --git a/frontend/src/react/router/handles.ts b/frontend/src/app/router/handles.tssimilarity index 97%rename from frontend/src/react/router/handles.tsrename to frontend/src/app/router/handles.tsindex 55e0a12a0f..711f9e7325 100644--- a/frontend/src/react/router/handles.ts+++ b/frontend/src/app/router/handles.ts@@ -1,6 +1,4 @@-// Route-name constants for the React router — the single source of truth.-// Fully VUE-FREE and self-contained (no `@/router/**` imports): the legacy-// vue-router modules are retired, so all values are inlined as literals here.+// Route-name constants and metadata for the React Router configuration.// --- dashboard/workspaceRoutes (inlined) ---export const WORKSPACE_ROOT_MODULE = "workspace.root";diff --git a/frontend/src/react/router/index.ts b/frontend/src/app/router/index.tssimilarity index 99%rename from frontend/src/react/router/index.tsrename to frontend/src/app/router/index.tsindex 332d665f66..ca6660ab35 100644--- a/frontend/src/react/router/index.ts+++ b/frontend/src/app/router/index.ts@@ -23,7 +23,7 @@ import {} from "./navigation";// Re-export the route-name constants from the vue-free handles module so React-// consumers keep importing them from `@/react/router`.+// consumers keep importing them from `@/app/router`.export {AUTH_SIGNIN_MODULE,DATABASE_ROUTE_DASHBOARD,@@ -261,7 +261,7 @@ export function isSqlEditorRouteName(name: string | undefined): boolean {// vue-router instance (`import { router } from "@/router"`), backed by the// react-router data router. Lets the ~110 imperative call sites keep their// usage unchanged through teardown — only the import path moves to-// `@/react/router`.+// `@/app/router`.// vue-router `next()` callback: no-arg / `RouteTarget` proceeds, `false`// cancels.diff --git a/frontend/src/react/router/issueDetailRedirect.test.ts b/frontend/src/app/router/issueDetailRedirect.test.tssimilarity index 99%rename from frontend/src/react/router/issueDetailRedirect.test.tsrename to frontend/src/app/router/issueDetailRedirect.test.tsindex 04ba91bfa1..31df1797fd 100644--- a/frontend/src/react/router/issueDetailRedirect.test.ts+++ b/frontend/src/app/router/issueDetailRedirect.test.ts@@ -6,7 +6,7 @@ const mocks = vi.hoisted(() => ({getPlan: vi.fn(),}));-vi.mock("@/connect", () => ({+vi.mock("@/api", () => ({issueServiceClientConnect: { getIssue: mocks.getIssue },planServiceClientConnect: { getPlan: mocks.getPlan },}));diff --git a/frontend/src/react/router/issueDetailRedirect.ts b/frontend/src/app/router/issueDetailRedirect.tssimilarity index 94%rename from frontend/src/react/router/issueDetailRedirect.tsrename to frontend/src/app/router/issueDetailRedirect.tsindex 51fb049706..8be70cae2b 100644--- a/frontend/src/react/router/issueDetailRedirect.ts+++ b/frontend/src/app/router/issueDetailRedirect.ts@@ -1,8 +1,8 @@import { create } from "@bufbuild/protobuf";import { type LoaderFunctionArgs, redirect } from "react-router";-import { issueServiceClientConnect, planServiceClientConnect } from "@/connect";-import { shouldStayOnPlanDetailPage } from "@/react/pages/project/plan-detail/utils/header";-import { issueNamePrefix, projectNamePrefix } from "@/store/modules/v1/common";+import { issueServiceClientConnect, planServiceClientConnect } from "@/api";+import { shouldStayOnPlanDetailPage } from "@/lib/plan/workflow";+import { issueNamePrefix, projectNamePrefix } from "@/stores/modules/v1/common";import {GetIssueRequestSchema,Issue_Type,diff --git a/frontend/src/react/router/lazyPage.ts b/frontend/src/app/router/lazyPage.tssimilarity index 100%rename from frontend/src/react/router/lazyPage.tsrename to frontend/src/app/router/lazyPage.tsdiff --git a/frontend/src/react/router/navigation.test.ts b/frontend/src/app/router/navigation.test.tssimilarity index 100%rename from frontend/src/react/router/navigation.test.tsrename to frontend/src/app/router/navigation.test.tsdiff --git a/frontend/src/react/router/navigation.ts b/frontend/src/app/router/navigation.tssimilarity index 100%rename from frontend/src/react/router/navigation.tsrename to frontend/src/app/router/navigation.tsdiff --git a/frontend/src/react/router/permissionDenied.test.ts b/frontend/src/app/router/permissionDenied.test.tssimilarity index 100%rename from frontend/src/react/router/permissionDenied.test.tsrename to frontend/src/app/router/permissionDenied.test.tsdiff --git a/frontend/src/react/router/permissionDenied.ts b/frontend/src/app/router/permissionDenied.tssimilarity index 100%rename from frontend/src/react/router/permissionDenied.tsrename to frontend/src/app/router/permissionDenied.tsdiff --git a/frontend/src/react/router/routeHelpers.ts b/frontend/src/app/router/routeHelpers.tssimilarity index 89%rename from frontend/src/react/router/routeHelpers.tsrename to frontend/src/app/router/routeHelpers.tsindex ec48e074e8..db8a90638f 100644--- a/frontend/src/react/router/routeHelpers.ts+++ b/frontend/src/app/router/routeHelpers.ts@@ -1,9 +1,9 @@-import type { RouteTarget } from "@/react/router";+import type { RouteTarget } from "@/app/router";import {PLAN_DETAIL_PHASE_DEPLOY,PROJECT_V1_ROUTE_PLAN_DETAIL,PROJECT_V1_ROUTE_PLAN_DETAIL_SPEC_DETAIL,-} from "@/react/router/handles";+} from "@/app/router/handles";import { extractPlanUID } from "@/utils/v1/issue/plan";import {extractPlanUIDFromRolloutName,@@ -13,10 +13,8 @@ import {} from "@/utils/v1/issue/rollout";import { extractProjectResourceName } from "@/utils/v1/project";-// Route-target builders ported vue-free from-// `@/router/dashboard/projectV1RouteHelpers`. Return the structural-// `RouteTarget` ({ name, params, query }) consumed by the React navigation-// shim's push/replace/resolve.+// Route-target builders return the structural `RouteTarget` consumed by the+// application router's push, replace, and resolve methods.type BuildPlanDeployRouteParams = {projectId: string;diff --git a/frontend/src/react/router/routes.test.tsx b/frontend/src/app/router/routes.test.tsxsimilarity index 98%rename from frontend/src/react/router/routes.test.tsxrename to frontend/src/app/router/routes.test.tsxindex 2584c71dc1..474c9f8525 100644--- a/frontend/src/react/router/routes.test.tsx+++ b/frontend/src/app/router/routes.test.tsx@@ -1,6 +1,6 @@import { matchRoutes, type RouteObject } from "react-router";import { describe, expect, it } from "vitest";-import { WORKSPACE_ROUTE_404 } from "@/react/router/handles";+import { WORKSPACE_ROUTE_404 } from "@/app/router/handles";import { routes } from "./routes";// Guardrail for the "blank body" route bug class. During the Vue→React routerdiff --git a/frontend/src/react/router/routes.tsx b/frontend/src/app/router/routes.tsxsimilarity index 66%rename from frontend/src/react/router/routes.tsxrename to frontend/src/app/router/routes.tsxindex c1d368cd1f..9a29e03716 100644--- a/frontend/src/react/router/routes.tsx+++ b/frontend/src/app/router/routes.tsx@@ -1,20 +1,14 @@import type { RouteObject } from "react-router";-import { RootLayout } from "@/react/app/RootLayout";-import { RouteErrorPage } from "@/react/app/RouteErrorPage";-import { rootGuard } from "@/react/router/guard";-import { WORKSPACE_ROUTE_404 } from "@/react/router/handles";-import { authRoutes } from "@/react/router/routes/auth";-import { dashboardRoutes } from "@/react/router/routes/dashboard";-import { sqlEditorRoutes } from "@/react/router/routes/sqlEditor";+import { RootLayout } from "@/app/RootLayout";+import { RouteErrorPage } from "@/app/RouteErrorPage";+import { rootGuard } from "@/app/router/guard";+import { WORKSPACE_ROUTE_404 } from "@/app/router/handles";+import { authRoutes } from "@/app/router/routes/auth";+import { dashboardRoutes } from "@/app/router/routes/dashboard";+import { sqlEditorRoutes } from "@/app/router/routes/sqlEditor";-// React-router route table translated from the vue-router route definitions-// (`@/router/auth.ts`, `@/router/setup.ts`, `@/router/sqlEditor.ts`,-// `@/router/dashboard/**`). Composed in the same order as the vue router's-// `routes: [...authRoutes, ...setupRoutes, ...dashboardRoutes,-// ...sqlEditorRoutes]` (setup is folded into authRoutes here, both rendering-// the SplashLayout). The whole table hangs off a single `RootLayout` route that-// hosts the global overlays + `<AuthGate>`. Wiring this table into the-// application root happens in a later phase.+// Compose route groups under the root providers. Keep the catch-all last so+// React Router can rank all concrete application paths first.export const routes: RouteObject[] = [{element: <RootLayout />,diff --git a/frontend/src/react/router/routes/auth.tsx b/frontend/src/app/router/routes/auth.tsxsimilarity index 72%rename from frontend/src/react/router/routes/auth.tsxrename to frontend/src/app/router/routes/auth.tsxindex c9c4f5cb09..7207c00677 100644--- a/frontend/src/react/router/routes/auth.tsx+++ b/frontend/src/app/router/routes/auth.tsx@@ -1,5 +1,5 @@import type { RouteObject } from "react-router";-import { SplashLayout } from "@/react/app/layouts/SplashLayout";+import { SplashLayout } from "@/app/layouts/SplashLayout";import {AUTH_2FA_SETUP_MODULE,AUTH_MFA_MODULE,@@ -13,12 +13,10 @@ import {AUTH_SIGNUP_MODULE,OAUTH2_CONSENT_MODULE,SETUP_MODULE,-} from "@/react/router/handles";-import { lazyPage } from "@/react/router/lazyPage";+} from "@/app/router/handles";+import { lazyPage } from "@/app/router/lazyPage";-// Translated from `@/router/auth.ts` and `@/router/setup.ts`. Every auth /-// consent / setup leaf renders a self-contained React page under the-// SplashLayout chrome.+// Authentication, consent, and initial workspace setup routes.export const authRoutes: RouteObject[] = [{path: "/oauth2/consent",@@ -28,7 +26,7 @@ export const authRoutes: RouteObject[] = [index: true,handle: { name: OAUTH2_CONSENT_MODULE },lazy: lazyPage(- () => import("@/react/pages/auth/OAuth2ConsentPage"),+ () => import("@/routes/auth/OAuth2ConsentPage"),(m) => m.OAuth2ConsentPage),},@@ -43,7 +41,7 @@ export const authRoutes: RouteObject[] = [index: true,handle: { name: AUTH_SIGNIN_MODULE },lazy: lazyPage(- () => import("@/react/pages/auth/SigninPage"),+ () => import("@/routes/auth/SigninPage"),(m) => m.SigninPage),},@@ -54,7 +52,7 @@ export const authRoutes: RouteObject[] = [path: "signin",handle: { name: AUTH_SIGNIN_MODULE },lazy: lazyPage(- () => import("@/react/pages/auth/SigninPage"),+ () => import("@/routes/auth/SigninPage"),(m) => m.SigninPage),},@@ -62,7 +60,7 @@ export const authRoutes: RouteObject[] = [path: "admin",handle: { name: AUTH_SIGNIN_ADMIN_MODULE },lazy: lazyPage(- () => import("@/react/pages/auth/SigninAdminPage"),+ () => import("@/routes/auth/SigninAdminPage"),(m) => m.SigninAdminPage),},@@ -70,7 +68,7 @@ export const authRoutes: RouteObject[] = [path: "signup",handle: { name: AUTH_SIGNUP_MODULE },lazy: lazyPage(- () => import("@/react/pages/auth/SignupPage"),+ () => import("@/routes/auth/SignupPage"),(m) => m.SignupPage),},@@ -78,7 +76,7 @@ export const authRoutes: RouteObject[] = [path: "password-forgot",handle: { name: AUTH_PASSWORD_FORGOT_MODULE },lazy: lazyPage(- () => import("@/react/pages/auth/PasswordForgotPage"),+ () => import("@/routes/auth/PasswordForgotPage"),(m) => m.PasswordForgotPage),},@@ -86,7 +84,7 @@ export const authRoutes: RouteObject[] = [path: "password-reset",handle: { name: AUTH_PASSWORD_RESET_MODULE },lazy: lazyPage(- () => import("@/react/pages/auth/PasswordResetPage"),+ () => import("@/routes/auth/PasswordResetPage"),(m) => m.PasswordResetPage),},@@ -94,7 +92,7 @@ export const authRoutes: RouteObject[] = [path: "mfa",handle: { name: AUTH_MFA_MODULE },lazy: lazyPage(- () => import("@/react/pages/auth/MultiFactorPage"),+ () => import("@/routes/auth/MultiFactorPage"),(m) => m.MultiFactorPage),},@@ -102,7 +100,7 @@ export const authRoutes: RouteObject[] = [path: "profile-setup",handle: { name: AUTH_PROFILE_SETUP_MODULE },lazy: lazyPage(- () => import("@/react/pages/auth/ProfileSetupPage"),+ () => import("@/routes/auth/ProfileSetupPage"),(m) => m.ProfileSetupPage),},@@ -112,7 +110,7 @@ export const authRoutes: RouteObject[] = [path: "/oauth/callback",handle: { name: AUTH_OAUTH_CALLBACK_MODULE },lazy: lazyPage(- () => import("@/react/pages/auth/OAuthCallbackPage"),+ () => import("@/routes/auth/OAuthCallbackPage"),(m) => m.OAuthCallbackPage),},@@ -120,7 +118,7 @@ export const authRoutes: RouteObject[] = [path: "/oidc/callback",handle: { name: AUTH_OIDC_CALLBACK_MODULE },lazy: lazyPage(- () => import("@/react/pages/auth/OAuthCallbackPage"),+ () => import("@/routes/auth/OAuthCallbackPage"),(m) => m.OAuthCallbackPage),},@@ -128,7 +126,7 @@ export const authRoutes: RouteObject[] = [path: "/2fa/setup",handle: { name: AUTH_2FA_SETUP_MODULE },lazy: lazyPage(- () => import("@/react/pages/auth/TwoFactorRequiredPage"),+ () => import("@/routes/auth/TwoFactorRequiredPage"),(m) => m.TwoFactorRequiredPage),},@@ -140,7 +138,7 @@ export const authRoutes: RouteObject[] = [index: true,handle: { name: SETUP_MODULE },lazy: lazyPage(- () => import("@/react/pages/auth/SetupPage"),+ () => import("@/routes/auth/SetupPage"),(m) => m.SetupPage),},diff --git a/frontend/src/react/router/routes/dashboard.tsx b/frontend/src/app/router/routes/dashboard.tsxsimilarity index 82%rename from frontend/src/react/router/routes/dashboard.tsxrename to frontend/src/app/router/routes/dashboard.tsxindex f4befeb28e..a90a913a53 100644--- a/frontend/src/react/router/routes/dashboard.tsx+++ b/frontend/src/app/router/routes/dashboard.tsx@@ -1,8 +1,8 @@import { Navigate, type RouteObject, redirect } from "react-router";-import { BodyLayout } from "@/react/app/layouts/BodyLayout";-import { DashboardLayout } from "@/react/app/layouts/DashboardLayout";-import { RouteErrorPage } from "@/react/app/RouteErrorPage";-import { rootGuard } from "@/react/router/guard";+import { BodyLayout } from "@/app/layouts/BodyLayout";+import { DashboardLayout } from "@/app/layouts/DashboardLayout";+import { RouteErrorPage } from "@/app/RouteErrorPage";+import { rootGuard } from "@/app/router/guard";import {DATABASE_ROUTE_DASHBOARD,ENVIRONMENT_V1_ROUTE_DASHBOARD,@@ -73,22 +73,15 @@ import {WORKSPACE_ROUTE_USER_PROFILE,WORKSPACE_ROUTE_USERS,WORKSPACE_ROUTE_WORKLOAD_IDENTITIES,-} from "@/react/router/handles";-import { issueDetailRedirectLoader } from "@/react/router/issueDetailRedirect";-import { RouteShellOutletPlaceholder } from "@/react/router/layoutPlaceholders";-import { lazyPage } from "@/react/router/lazyPage";-import { ProjectRouteGate } from "@/react/router/ProjectRouteGate";+} from "@/app/router/handles";+import { issueDetailRedirectLoader } from "@/app/router/issueDetailRedirect";+import { lazyPage } from "@/app/router/lazyPage";+import { ProjectRouteGate } from "@/app/router/ProjectRouteGate";+import { RouteGroupOutlet } from "@/app/router/RouteGroupOutlet";import type { Permission } from "@/types";-// Translated from `@/router/dashboard/**`. Vue named views (`content`,-// `leftSidebar`, `body`) collapse to the single `<Outlet/>` of each layout-// route. The Vue route-shell parents (`SettingRouteShell` /-// `ProjectRouteShell` / `InstanceRouteShell` / `IssuesRouteShell`) render an-// empty teleport target and require ReactRouteShellBridge props; they do not-// render an `<Outlet/>`, so each shell-parent route here uses-// `RouteShellOutletPlaceholder` to keep child leaves rendering until a later-// phase swaps in `<Outlet/>`-aware shells. Leaf routes lazy-import their page-// component.+// Workspace and project routes nested under the dashboard layouts. Leaf route+// modules are lazy-loaded from their owner under src/routes.// Workspace-level pages (the BodyLayout children).const workspaceLevelRoutes: RouteObject[] = [@@ -115,7 +108,7 @@ const workspaceLevelRoutes: RouteObject[] = [path: "landing",handle: { name: WORKSPACE_ROUTE_LANDING },lazy: lazyPage(- () => import("@/react/pages/settings/LandingPage"),+ () => import("@/routes/workspace/LandingPage"),(m) => m.LandingPage),},@@ -123,7 +116,7 @@ const workspaceLevelRoutes: RouteObject[] = [path: "projects",handle: { name: PROJECT_V1_ROUTE_DASHBOARD },lazy: lazyPage(- () => import("@/react/pages/settings/ProjectsPage"),+ () => import("@/routes/workspace/ProjectsPage"),(m) => m.ProjectsPage),},@@ -134,7 +127,7 @@ const workspaceLevelRoutes: RouteObject[] = [requiredPermissionList: (): Permission[] => ["bb.instances.list"],},lazy: lazyPage(- () => import("@/react/pages/settings/InstancesPage"),+ () => import("@/routes/workspace/InstancesPage"),(m) => m.InstancesPage),},@@ -145,7 +138,7 @@ const workspaceLevelRoutes: RouteObject[] = [requiredPermissionList: (): Permission[] => ["bb.databases.list"],},lazy: lazyPage(- () => import("@/react/pages/settings/DatabasesPage"),+ () => import("@/routes/workspace/DatabasesPage"),(m) => m.DatabasesPage),},@@ -158,7 +151,7 @@ const workspaceLevelRoutes: RouteObject[] = [],},lazy: lazyPage(- () => import("@/react/pages/settings/EnvironmentsPage"),+ () => import("@/routes/workspace/EnvironmentsPage"),(m) => m.EnvironmentsPage),},@@ -166,7 +159,7 @@ const workspaceLevelRoutes: RouteObject[] = [path: "users/:principalEmail",handle: { name: WORKSPACE_ROUTE_USER_PROFILE },lazy: lazyPage(- () => import("@/react/pages/settings/ProfilePage"),+ () => import("@/routes/workspace/ProfilePage"),(m) => m.ProfilePage),},@@ -174,7 +167,7 @@ const workspaceLevelRoutes: RouteObject[] = [path: "403",handle: { name: WORKSPACE_ROUTE_403 },lazy: lazyPage(- () => import("@/react/pages/workspace/Page403"),+ () => import("@/routes/workspace/Page403"),(m) => m.Page403),},@@ -182,14 +175,14 @@ const workspaceLevelRoutes: RouteObject[] = [path: "404",handle: { name: WORKSPACE_ROUTE_404 },lazy: lazyPage(- () => import("@/react/pages/workspace/Page404"),+ () => import("@/routes/workspace/Page404"),(m) => m.Page404),},// /sql-review — SettingRouteShell layout owns these leaves.{path: "sql-review",- element: <RouteShellOutletPlaceholder />,+ element: <RouteGroupOutlet />,children: [{index: true,@@ -201,7 +194,7 @@ const workspaceLevelRoutes: RouteObject[] = [],},lazy: lazyPage(- () => import("@/react/pages/settings/SQLReviewPage"),+ () => import("@/routes/workspace/SQLReviewPage"),(m) => m.SQLReviewPage),},@@ -214,7 +207,7 @@ const workspaceLevelRoutes: RouteObject[] = [],},lazy: lazyPage(- () => import("@/react/pages/settings/SQLReviewCreatePage"),+ () => import("@/routes/workspace/SQLReviewCreatePage"),(m) => m.SQLReviewCreatePage),},@@ -228,7 +221,7 @@ const workspaceLevelRoutes: RouteObject[] = [],},lazy: lazyPage(- () => import("@/react/pages/settings/SQLReviewDetailPage"),+ () => import("@/routes/workspace/SQLReviewDetailPage"),(m) => m.SQLReviewDetailPage),},@@ -242,13 +235,13 @@ const workspaceLevelRoutes: RouteObject[] = [handle: {requiredPermissionList: (): Permission[] => ["bb.identityProviders.get"],},- element: <RouteShellOutletPlaceholder />,+ element: <RouteGroupOutlet />,children: [{index: true,handle: { name: WORKSPACE_ROUTE_IDENTITY_PROVIDERS },lazy: lazyPage(- () => import("@/react/pages/settings/IDPsPage"),+ () => import("@/routes/workspace/IDPsPage"),(m) => m.IDPsPage),},@@ -256,7 +249,7 @@ const workspaceLevelRoutes: RouteObject[] = [path: ":idpId",handle: { name: WORKSPACE_ROUTE_IDENTITY_PROVIDER_DETAIL },lazy: lazyPage(- () => import("@/react/pages/settings/IDPDetailPage"),+ () => import("@/routes/workspace/IDPDetailPage"),(m) => m.IDPDetailPage),},@@ -265,13 +258,13 @@ const workspaceLevelRoutes: RouteObject[] = [// Empty-path SettingRouteShell group (risk-assessment, members, roles, …).{path: "",- element: <RouteShellOutletPlaceholder />,+ element: <RouteGroupOutlet />,children: [{path: "risk-assessment",handle: { name: WORKSPACE_ROUTE_RISK_ASSESSMENT },lazy: lazyPage(- () => import("@/react/pages/settings/RiskAssessmentPage"),+ () => import("@/routes/workspace/RiskAssessmentPage"),(m) => m.RiskAssessmentPage),},@@ -282,7 +275,7 @@ const workspaceLevelRoutes: RouteObject[] = [requiredPermissionList: (): Permission[] => ["bb.settings.get"],},lazy: lazyPage(- () => import("@/react/pages/settings/CustomApprovalPage"),+ () => import("@/routes/workspace/CustomApprovalPage"),(m) => m.CustomApprovalPage),},@@ -295,7 +288,7 @@ const workspaceLevelRoutes: RouteObject[] = [],},lazy: lazyPage(- () => import("@/react/pages/settings/GlobalMaskingPage"),+ () => import("@/routes/workspace/GlobalMaskingPage"),(m) => m.GlobalMaskingPage),},@@ -306,7 +299,7 @@ const workspaceLevelRoutes: RouteObject[] = [requiredPermissionList: (): Permission[] => ["bb.settings.get"],},lazy: lazyPage(- () => import("@/react/pages/settings/SemanticTypesPage"),+ () => import("@/routes/workspace/SemanticTypesPage"),(m) => m.SemanticTypesPage),},@@ -317,7 +310,7 @@ const workspaceLevelRoutes: RouteObject[] = [requiredPermissionList: (): Permission[] => ["bb.settings.get"],},lazy: lazyPage(- () => import("@/react/pages/settings/DataClassificationPage"),+ () => import("@/routes/workspace/DataClassificationPage"),(m) => m.DataClassificationPage),},@@ -328,7 +321,7 @@ const workspaceLevelRoutes: RouteObject[] = [requiredPermissionList: (): Permission[] => ["bb.auditLogs.search"],},lazy: lazyPage(- () => import("@/react/pages/settings/AuditLogPage"),+ () => import("@/routes/workspace/AuditLogPage"),(m) => m.AuditLogPage),},@@ -339,7 +332,7 @@ const workspaceLevelRoutes: RouteObject[] = [requiredPermissionList: (): Permission[] => ["bb.users.list"],},lazy: lazyPage(- () => import("@/react/pages/settings/UsersPage"),+ () => import("@/routes/workspace/UsersPage"),(m) => m.UsersPage),},@@ -352,7 +345,7 @@ const workspaceLevelRoutes: RouteObject[] = [],},lazy: lazyPage(- () => import("@/react/pages/settings/ServiceAccountsPage"),+ () => import("@/routes/workspace/ServiceAccountsPage"),(m) => m.ServiceAccountsPage),},@@ -365,7 +358,7 @@ const workspaceLevelRoutes: RouteObject[] = [],},lazy: lazyPage(- () => import("@/react/pages/settings/WorkloadIdentitiesPage"),+ () => import("@/routes/workspace/WorkloadIdentitiesPage"),(m) => m.WorkloadIdentitiesPage),},@@ -378,7 +371,7 @@ const workspaceLevelRoutes: RouteObject[] = [],},lazy: lazyPage(- () => import("@/react/pages/settings/MembersPage"),+ () => import("@/routes/workspace/MembersPage"),(m) => m.MembersPage),},@@ -389,7 +382,7 @@ const workspaceLevelRoutes: RouteObject[] = [requiredPermissionList: (): Permission[] => ["bb.groups.list"],},lazy: lazyPage(- () => import("@/react/pages/settings/GroupsPage"),+ () => import("@/routes/workspace/GroupsPage"),(m) => m.GroupsPage),},@@ -400,7 +393,7 @@ const workspaceLevelRoutes: RouteObject[] = [requiredPermissionList: (): Permission[] => ["bb.roles.list"],},lazy: lazyPage(- () => import("@/react/pages/settings/RolesPage"),+ () => import("@/routes/workspace/RolesPage"),(m) => m.RolesPage),},@@ -409,7 +402,7 @@ const workspaceLevelRoutes: RouteObject[] = [// /integration — SettingRouteShell layout.{path: "integration",- element: <RouteShellOutletPlaceholder />,+ element: <RouteGroupOutlet />,children: [{path: "im",@@ -418,7 +411,7 @@ const workspaceLevelRoutes: RouteObject[] = [requiredPermissionList: (): Permission[] => ["bb.settings.get"],},lazy: lazyPage(- () => import("@/react/pages/settings/IMPage"),+ () => import("@/routes/workspace/IMPage"),(m) => m.IMPage),},@@ -429,7 +422,7 @@ const workspaceLevelRoutes: RouteObject[] = [requiredPermissionList: (): Permission[] => ["bb.settings.get"],},lazy: lazyPage(- () => import("@/react/pages/settings/MCPPage"),+ () => import("@/routes/workspace/MCPPage"),(m) => m.MCPPage),},@@ -442,13 +435,13 @@ const workspaceSettingRoutes: RouteObject[] = [{path: "setting",handle: { name: SETTING_ROUTE_WORKSPACE },- element: <RouteShellOutletPlaceholder />,+ element: <RouteGroupOutlet />,children: [{path: "profile",handle: { name: SETTING_ROUTE_PROFILE },lazy: lazyPage(- () => import("@/react/pages/settings/ProfilePage"),+ () => import("@/routes/workspace/ProfilePage"),(m) => m.ProfilePage),},@@ -456,7 +449,7 @@ const workspaceSettingRoutes: RouteObject[] = [path: "profile/two-factor",handle: { name: SETTING_ROUTE_PROFILE_TWO_FACTOR },lazy: lazyPage(- () => import("@/react/pages/settings/TwoFactorSetupPage"),+ () => import("@/routes/workspace/TwoFactorSetupPage"),(m) => m.TwoFactorSetupPage),},@@ -470,7 +463,7 @@ const workspaceSettingRoutes: RouteObject[] = [],},lazy: lazyPage(- () => import("@/react/pages/settings/GeneralPage"),+ () => import("@/routes/workspace/GeneralPage"),(m) => m.GeneralPage),},@@ -481,7 +474,7 @@ const workspaceSettingRoutes: RouteObject[] = [requiredPermissionList: (): Permission[] => ["bb.settings.get"],},lazy: lazyPage(- () => import("@/react/pages/settings/SubscriptionPage"),+ () => import("@/routes/workspace/SubscriptionPage"),(m) => m.SubscriptionPage),},@@ -515,13 +508,13 @@ const instanceRoutes: RouteObject[] = [requiredPermissionList: (): Permission[] => ["bb.instances.create"],},lazy: lazyPage(- () => import("@/react/pages/settings/CreateInstancePage"),+ () => import("@/routes/workspace/CreateInstancePage"),(m) => m.CreateInstancePage),},{path: "instances/:instanceId",- element: <RouteShellOutletPlaceholder />,+ element: <RouteGroupOutlet />,children: [{index: true,@@ -530,7 +523,7 @@ const instanceRoutes: RouteObject[] = [requiredPermissionList: (): Permission[] => ["bb.instances.get"],},lazy: lazyPage(- () => import("@/react/pages/settings/InstanceDetailPage"),+ () => import("@/routes/workspace/InstanceDetailPage"),(m) => m.InstanceDetailPage),},@@ -544,7 +537,7 @@ const instanceRoutes: RouteObject[] = [],},lazy: lazyPage(- () => import("@/react/pages/settings/InstanceDatabaseRedirectPage"),+ () => import("@/routes/workspace/InstanceDatabaseRedirectPage"),(m) => m.InstanceDatabaseRedirectPage),},@@ -584,7 +577,7 @@ const projectV1Routes: RouteObject[] = [requiredPermissionList: (): Permission[] => ["bb.databases.list"],},lazy: lazyPage(- () => import("@/react/pages/project/ProjectDatabasesPage"),+ () => import("@/routes/project/ProjectDatabasesPage"),(m) => m.ProjectDatabasesPage),},@@ -592,7 +585,7 @@ const projectV1Routes: RouteObject[] = [path: "access-grants",handle: { name: PROJECT_V1_ROUTE_ACCESS_GRANTS },lazy: lazyPage(- () => import("@/react/pages/project/ProjectAccessGrantsPage"),+ () => import("@/routes/project/ProjectAccessGrantsPage"),(m) => m.ProjectAccessGrantsPage),},@@ -609,7 +602,7 @@ const projectV1Routes: RouteObject[] = [],},lazy: lazyPage(- () => import("@/react/pages/project/ProjectMaskingExemptionPage"),+ () => import("@/routes/project/ProjectMaskingExemptionPage"),(m) => m.ProjectMaskingExemptionPage),},@@ -626,9 +619,7 @@ const projectV1Routes: RouteObject[] = [},lazy: lazyPage(() =>- import(- "@/react/pages/project/ProjectMaskingExemptionCreatePage"- ),+ import("@/routes/project/ProjectMaskingExemptionCreatePage"),(m) => m.ProjectMaskingExemptionCreatePage),},@@ -646,7 +637,7 @@ const projectV1Routes: RouteObject[] = [],},lazy: lazyPage(- () => import("@/react/pages/project/ProjectDatabaseGroupsPage"),+ () => import("@/routes/project/ProjectDatabaseGroupsPage"),(m) => m.ProjectDatabaseGroupsPage),},@@ -660,8 +651,7 @@ const projectV1Routes: RouteObject[] = [],},lazy: lazyPage(- () =>- import("@/react/pages/project/ProjectDatabaseGroupCreatePage"),+ () => import("@/routes/project/ProjectDatabaseGroupCreatePage"),(m) => m.ProjectDatabaseGroupCreatePage),},@@ -675,8 +665,7 @@ const projectV1Routes: RouteObject[] = [],},lazy: lazyPage(- () =>- import("@/react/pages/project/ProjectDatabaseGroupDetailPage"),+ () => import("@/routes/project/ProjectDatabaseGroupDetailPage"),(m) => m.ProjectDatabaseGroupDetailPage),},@@ -689,7 +678,7 @@ const projectV1Routes: RouteObject[] = [requiredPermissionList: (): Permission[] => ["bb.issues.list"],},lazy: lazyPage(- () => import("@/react/pages/project/ProjectIssueDashboardPage"),+ () => import("@/routes/project/ProjectIssueDashboardPage"),(m) => m.ProjectIssueDashboardPage),},@@ -703,7 +692,7 @@ const projectV1Routes: RouteObject[] = [],},lazy: lazyPage(- () => import("@/react/pages/project/ProjectPlanDashboardPage"),+ () => import("@/routes/project/ProjectPlanDashboardPage"),(m) => m.ProjectPlanDashboardPage),},@@ -720,7 +709,7 @@ const projectV1Routes: RouteObject[] = [],},lazy: lazyPage(- () => import("@/react/pages/project/ProjectSyncSchemaPage"),+ () => import("@/routes/project/ProjectSyncSchemaPage"),(m) => m.ProjectSyncSchemaPage),},@@ -731,7 +720,7 @@ const projectV1Routes: RouteObject[] = [requiredPermissionList: (): Permission[] => ["bb.auditLogs.search"],},lazy: lazyPage(- () => import("@/react/pages/project/ProjectAuditLogPage"),+ () => import("@/routes/project/ProjectAuditLogPage"),(m) => m.ProjectAuditLogPage),},@@ -742,7 +731,7 @@ const projectV1Routes: RouteObject[] = [index: true,handle: { name: PROJECT_V1_ROUTE_WEBHOOKS },lazy: lazyPage(- () => import("@/react/pages/project/ProjectWebhooksPage"),+ () => import("@/routes/project/ProjectWebhooksPage"),(m) => m.ProjectWebhooksPage),},@@ -755,7 +744,7 @@ const projectV1Routes: RouteObject[] = [],},lazy: lazyPage(- () => import("@/react/pages/project/ProjectWebhookCreatePage"),+ () => import("@/routes/project/ProjectWebhookCreatePage"),(m) => m.ProjectWebhookCreatePage),},@@ -763,7 +752,7 @@ const projectV1Routes: RouteObject[] = [path: ":webhookResourceId",handle: { name: PROJECT_V1_ROUTE_WEBHOOK_DETAIL },lazy: lazyPage(- () => import("@/react/pages/project/ProjectWebhookDetailPage"),+ () => import("@/routes/project/ProjectWebhookDetailPage"),(m) => m.ProjectWebhookDetailPage),},@@ -778,7 +767,7 @@ const projectV1Routes: RouteObject[] = [],},lazy: lazyPage(- () => import("@/react/pages/settings/MembersPage"),+ () => import("@/routes/workspace/MembersPage"),(m) => m.MembersPage),},@@ -791,7 +780,7 @@ const projectV1Routes: RouteObject[] = [],},lazy: lazyPage(- () => import("@/react/pages/settings/ServiceAccountsPage"),+ () => import("@/routes/workspace/ServiceAccountsPage"),(m) => m.ServiceAccountsPage),},@@ -804,7 +793,7 @@ const projectV1Routes: RouteObject[] = [],},lazy: lazyPage(- () => import("@/react/pages/settings/WorkloadIdentitiesPage"),+ () => import("@/routes/workspace/WorkloadIdentitiesPage"),(m) => m.WorkloadIdentitiesPage),},@@ -812,7 +801,7 @@ const projectV1Routes: RouteObject[] = [path: "settings",handle: { name: PROJECT_V1_ROUTE_SETTINGS },lazy: lazyPage(- () => import("@/react/pages/project/ProjectSettingsPage"),+ () => import("@/routes/project/ProjectSettingsPage"),(m) => m.ProjectSettingsPage),},@@ -823,7 +812,7 @@ const projectV1Routes: RouteObject[] = [requiredPermissionList: (): Permission[] => ["bb.databases.get"],},lazy: lazyPage(- () => import("@/react/pages/project/ProjectDatabaseDetailPage"),+ () => import("@/routes/project/ProjectDatabaseDetailPage"),(m) => m.ProjectDatabaseDetailPage),},@@ -837,7 +826,7 @@ const projectV1Routes: RouteObject[] = [],},lazy: lazyPage(- () => import("@/react/pages/project/DatabaseChangelogDetailPage"),+ () => import("@/routes/project/DatabaseChangelogDetailPage"),(m) => m.DatabaseChangelogDetailPage),},@@ -848,7 +837,7 @@ const projectV1Routes: RouteObject[] = [requiredPermissionList: (): Permission[] => ["bb.databases.get"],},lazy: lazyPage(- () => import("@/react/pages/project/DatabaseRevisionDetailPage"),+ () => import("@/routes/project/DatabaseRevisionDetailPage"),(m) => m.DatabaseRevisionDetailPage),},@@ -862,7 +851,7 @@ const projectV1Routes: RouteObject[] = [requiredPermissionList: (): Permission[] => ["bb.releases.list"],},lazy: lazyPage(- () => import("@/react/pages/project/ProjectReleaseDashboardPage"),+ () => import("@/routes/project/ProjectReleaseDashboardPage"),(m) => m.ProjectReleaseDashboardPage),},@@ -873,7 +862,7 @@ const projectV1Routes: RouteObject[] = [requiredPermissionList: (): Permission[] => ["bb.releases.get"],},lazy: lazyPage(- () => import("@/react/pages/project/ProjectReleaseDetailPage"),+ () => import("@/routes/project/ProjectReleaseDetailPage"),(m) => m.ProjectReleaseDetailPage),},@@ -889,7 +878,7 @@ const projectV1Routes: RouteObject[] = [],},lazy: lazyPage(- () => import("@/react/pages/project/ProjectGitOpsPage"),+ () => import("@/routes/project/ProjectGitOpsPage"),(m) => m.ProjectGitOpsPage),},@@ -905,8 +894,7 @@ const projectV1Routes: RouteObject[] = [],},lazy: lazyPage(- () =>- import("@/react/pages/project/plan-detail/ProjectPlanDetailPage"),+ () => import("@/routes/project/plan-detail/ProjectPlanDetailPage"),(m) => m.ProjectPlanDetailPage),},@@ -921,8 +909,7 @@ const projectV1Routes: RouteObject[] = [],},lazy: lazyPage(- () =>- import("@/react/pages/project/plan-detail/ProjectPlanDetailPage"),+ () => import("@/routes/project/plan-detail/ProjectPlanDetailPage"),(m) => m.ProjectPlanDetailPage),},@@ -937,8 +924,7 @@ const projectV1Routes: RouteObject[] = [],},lazy: lazyPage(- () =>- import("@/react/pages/project/plan-detail/ProjectPlanDetailPage"),+ () => import("@/routes/project/plan-detail/ProjectPlanDetailPage"),(m) => m.ProjectPlanDetailPage),},@@ -954,7 +940,7 @@ const projectV1Routes: RouteObject[] = [},loader: issueDetailRedirectLoader,lazy: lazyPage(- () => import("@/react/pages/project/ProjectIssueDetailPage"),+ () => import("@/routes/project/ProjectIssueDetailPage"),(m) => m.ProjectIssueDetailPage),},@@ -1022,7 +1008,7 @@ export const dashboardRoutes: RouteObject[] = [path: "issues",handle: { name: WORKSPACE_ROUTE_MY_ISSUES },lazy: lazyPage(- () => import("@/react/pages/workspace/MyIssuesPage"),+ () => import("@/routes/workspace/MyIssuesPage"),(m) => m.MyIssuesPage),},diff --git a/frontend/src/react/router/routes/sqlEditor.tsx b/frontend/src/app/router/routes/sqlEditor.tsxsimilarity index 96%rename from frontend/src/react/router/routes/sqlEditor.tsxrename to frontend/src/app/router/routes/sqlEditor.tsxindex 1b2ac1a168..57f6cfcb19 100644--- a/frontend/src/react/router/routes/sqlEditor.tsx+++ b/frontend/src/app/router/routes/sqlEditor.tsx@@ -7,7 +7,7 @@ import {SQL_EDITOR_PROJECT_MODULE,SQL_EDITOR_QUERY_HISTORY_MODULE,SQL_EDITOR_WORKSHEET_MODULE,-} from "@/react/router/handles";+} from "@/app/router/handles";import type { Permission } from "@/types";// `SQLEditorLayout` is a "layout as a page": the React component inspects the@@ -17,7 +17,7 @@ import type { Permission } from "@/types";// their own — they exist only so navigation by route name resolves to a path,// matching the original vue `NoopRouteComponent` children.const SQLEditorLayout = lazy(() =>- import("@/react/components/sql-editor/SQLEditorLayout").then((m) => ({+ import("@/modules/sql-editor/components/SQLEditorLayout").then((m) => ({default: m.SQLEditorLayout,})));diff --git a/frontend/src/react/router/useCurrentRoute.integration.test.tsx b/frontend/src/app/router/useCurrentRoute.integration.test.tsxsimilarity index 100%rename from frontend/src/react/router/useCurrentRoute.integration.test.tsxrename to frontend/src/app/router/useCurrentRoute.integration.test.tsxdiff --git a/frontend/src/react/router/useCurrentRoute.test.tsx b/frontend/src/app/router/useCurrentRoute.test.tsxsimilarity index 100%rename from frontend/src/react/router/useCurrentRoute.test.tsxrename to frontend/src/app/router/useCurrentRoute.test.tsxdiff --git a/frontend/src/react/mount.ts b/frontend/src/app/runtime.tssimilarity index 97%rename from frontend/src/react/mount.tsrename to frontend/src/app/runtime.tsindex 68246dc4c2..72426b0cae 100644--- a/frontend/src/react/mount.ts+++ b/frontend/src/app/runtime.ts@@ -17,7 +17,7 @@ export async function loadCoreDeps() {import("react"),import("react-dom/client"),import("react-i18next"),- import("@/react/i18n"),+ import("@/lib/i18n"),]);await i18nModule.i18nReady;cachedDeps = {diff --git a/frontend/src/react/explain-visualizer/ExplainVisualizerApp.tsx b/frontend/src/apps/explain-visualizer/ExplainVisualizerApp.tsxsimilarity index 100%rename from frontend/src/react/explain-visualizer/ExplainVisualizerApp.tsxrename to frontend/src/apps/explain-visualizer/ExplainVisualizerApp.tsxdiff --git a/frontend/src/react/explain-visualizer/MSSQLPlanView.tsx b/frontend/src/apps/explain-visualizer/MSSQLPlanView.tsxsimilarity index 100%rename from frontend/src/react/explain-visualizer/MSSQLPlanView.tsxrename to frontend/src/apps/explain-visualizer/MSSQLPlanView.tsxdiff --git a/frontend/src/react/explain-visualizer/PostgresPlanView.tsx b/frontend/src/apps/explain-visualizer/PostgresPlanView.tsxsimilarity index 100%rename from frontend/src/react/explain-visualizer/PostgresPlanView.tsxrename to frontend/src/apps/explain-visualizer/PostgresPlanView.tsxdiff --git a/frontend/src/react/explain-visualizer/SpannerPlanNode.test.tsx b/frontend/src/apps/explain-visualizer/SpannerPlanNode.test.tsxsimilarity index 100%rename from frontend/src/react/explain-visualizer/SpannerPlanNode.test.tsxrename to frontend/src/apps/explain-visualizer/SpannerPlanNode.test.tsxdiff --git a/frontend/src/react/explain-visualizer/SpannerPlanNode.tsx b/frontend/src/apps/explain-visualizer/SpannerPlanNode.tsxsimilarity index 100%rename from frontend/src/react/explain-visualizer/SpannerPlanNode.tsxrename to frontend/src/apps/explain-visualizer/SpannerPlanNode.tsxdiff --git a/frontend/src/react/explain-visualizer/SpannerQueryPlan.tsx b/frontend/src/apps/explain-visualizer/SpannerQueryPlan.tsxsimilarity index 100%rename from frontend/src/react/explain-visualizer/SpannerQueryPlan.tsxrename to frontend/src/apps/explain-visualizer/SpannerQueryPlan.tsxdiff --git a/frontend/src/react/explain-visualizer/explain-visualizer.css b/frontend/src/apps/explain-visualizer/explain-visualizer.csssimilarity index 100%rename from frontend/src/react/explain-visualizer/explain-visualizer.cssrename to frontend/src/apps/explain-visualizer/explain-visualizer.cssdiff --git a/frontend/src/react/explain-visualizer/loadQueryPlanScript.ts b/frontend/src/apps/explain-visualizer/loadQueryPlanScript.tssimilarity index 100%rename from frontend/src/react/explain-visualizer/loadQueryPlanScript.tsrename to frontend/src/apps/explain-visualizer/loadQueryPlanScript.tsdiff --git a/frontend/src/react/explain-visualizer/main.tsx b/frontend/src/apps/explain-visualizer/main.tsxsimilarity index 100%rename from frontend/src/react/explain-visualizer/main.tsxrename to frontend/src/apps/explain-visualizer/main.tsxdiff --git a/frontend/src/react/explain-visualizer/spanner-types.ts b/frontend/src/apps/explain-visualizer/spanner-types.tssimilarity index 100%rename from frontend/src/react/explain-visualizer/spanner-types.tsrename to frontend/src/apps/explain-visualizer/spanner-types.tsdiff --git a/frontend/src/react/no-legacy-vue-deps.test.ts b/frontend/src/architecture/legacy-boundaries.test.tssimilarity index 82%rename from frontend/src/react/no-legacy-vue-deps.test.tsrename to frontend/src/architecture/legacy-boundaries.test.tsindex 7411ee72ee..e027dad850 100644--- a/frontend/src/react/no-legacy-vue-deps.test.ts+++ b/frontend/src/architecture/legacy-boundaries.test.ts@@ -2,17 +2,11 @@ import { describe, expect, test } from "vitest";const sources = import.meta.glob([- "./pages/project/**/*.{ts,tsx}",- "./pages/settings/**/*.{ts,tsx}",- "./pages/auth/**/*.{ts,tsx}",- "./components/**/*.{ts,tsx}",- "../components/ProvideSQLEditorContext.vue",- "./components/ProjectRouteShell.tsx",- "./components/SettingRouteShell.tsx",- "./components/InstanceRouteShell.tsx",- "./components/IssuesRouteShell.tsx",- "./components/RoutePermissionGuardShell.tsx",- "./components/ComponentPermissionGuard.tsx",+ "../routes/project/**/*.{ts,tsx}",+ "../routes/workspace/**/*.{ts,tsx}",+ "../routes/auth/**/*.{ts,tsx}",+ "../components/**/*.{ts,tsx}",+ "../modules/sql-editor/**/*.{ts,tsx}",],{query: "?raw",@@ -23,9 +17,9 @@ const sources = import.meta.glob(const currentUserMigrationSources = import.meta.glob([- "./**/*.{ts,tsx}",- "../plugins/ai/react/**/*.{ts,tsx}",- "../connect/middlewares/activeInterceptorMiddleware.ts",+ "../**/*.{ts,tsx}",+ "../modules/ai/components/**/*.{ts,tsx}",+ "../api/middlewares/activeInterceptorMiddleware.ts","../utils/pagination.ts","../utils/v1/worksheet.ts",],@@ -46,7 +40,7 @@ const instanceMigrationSources = import.meta.glob() as Record<string, string>;const removedLegacyInstanceStoreSources = import.meta.glob(- ["./pages/settings/InstancesPage.tsx", "../store/modules/v1/index.ts"],+ ["../routes/workspace/InstancesPage.tsx", "../stores/modules/v1/index.ts"],{query: "?raw",import: "default",@@ -61,7 +55,7 @@ const databaseMigrationSources = import.meta.glob("../utils/v1/changelog.ts","../utils/v1/issue/rollout.ts","../utils/v1/issue/issue.ts",- "../store/modules/v1/index.ts",+ "../stores/modules/v1/index.ts",],{query: "?raw",@@ -71,7 +65,7 @@ const databaseMigrationSources = import.meta.glob() as Record<string, string>;const dbSchemaMigrationSources = import.meta.glob(- ["./**/*.{ts,tsx}", "../store/modules/v1/index.ts"],+ ["../**/*.{ts,tsx}", "../stores/modules/v1/index.ts"],{query: "?raw",import: "default",@@ -107,6 +101,7 @@ describe("React Project and Settings legacy Vue dependencies", () => {});test("console and SQL Editor shell do not re-import legacy Vue permission chain", () => {+ const legacyLayoutPrefix = ["@", "layouts"].join("/");const bannedImports = ["@/components/Permission/RoutePermissionGuard.vue","@/components/Permission/ComponentPermissionGuard.vue",@@ -115,10 +110,10 @@ describe("React Project and Settings legacy Vue dependencies", () => {"@/components/IssueV1/components/Sidebar/IssueLabels","./IssueLabelSelector.vue","@/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue",- "@/layouts/ProjectV1Layout.vue",- "@/layouts/SettingLayout.vue",- "@/layouts/InstanceLayout.vue",- "@/layouts/IssuesLayout.vue",+ `${legacyLayoutPrefix}/ProjectV1Layout.vue`,+ `${legacyLayoutPrefix}/SettingLayout.vue`,+ `${legacyLayoutPrefix}/InstanceLayout.vue`,+ `${legacyLayoutPrefix}/IssuesLayout.vue`,];const violations: string[] = [];for (const [file, source] of Object.entries(sources)) {@@ -139,7 +134,7 @@ describe("React Project and Settings legacy Vue dependencies", () => {}for (const bannedImport of ["usePermissionStore",- "@/react/components/PermissionGuard",+ "@/components/PermissionGuard",]) {if (source.includes(bannedImport)) {violations.push(`${file}: ${bannedImport}`);@@ -156,7 +151,7 @@ describe("React Project and Settings legacy Vue dependencies", () => {continue;}for (const bannedImport of [- "@/store",+ '"@/store"',"useProjectIamPolicyStore","loadSubscription",]) {@@ -173,8 +168,8 @@ describe("React Project and Settings legacy Vue dependencies", () => {"useGroupStore","useIdentityProviderStore","useAccessGrantStore",- "@/store/modules/idp",- "@/store/modules/accessGrant",+ "@/stores/modules/idp",+ "@/stores/modules/accessGrant",];const violations: string[] = [];for (const [file, source] of Object.entries(sources)) {@@ -191,8 +186,8 @@ describe("React Project and Settings legacy Vue dependencies", () => {const bannedImports = ["useUserStore","useRoleStore",- "@/store/modules/user",- "@/store/modules/role",+ "@/stores/modules/user",+ "@/stores/modules/role",];const violations: string[] = [];for (const [file, source] of Object.entries(sources)) {@@ -209,7 +204,7 @@ describe("React Project and Settings legacy Vue dependencies", () => {const legacyCurrentUserHook = ["use", "Current", "User", "V1"].join("");const violations: string[] = [];for (const [file, source] of Object.entries(currentUserMigrationSources)) {- if (file.endsWith("/no-legacy-vue-deps.test.ts")) {+ if (file.endsWith("/legacy-boundaries.test.ts")) {continue;}if (source.includes(legacyCurrentUserHook)) {@@ -233,7 +228,7 @@ describe("React Project and Settings legacy Vue dependencies", () => {});test("migrated instance surfaces do not expose the legacy instance store module", () => {- const bannedImports = ["@/store/modules/v1/instance", "./instance"];+ const bannedImports = ["@/stores/modules/v1/instance", "./instance"];const violations: string[] = [];for (const [file, source] of Object.entries(removedLegacyInstanceStoreSources@@ -248,7 +243,10 @@ describe("React Project and Settings legacy Vue dependencies", () => {});test("migrated database surfaces do not use the legacy database store", () => {- const bannedImports = ["useDatabaseV1Store", "@/store/modules/v1/database"];+ const bannedImports = [+ "useDatabaseV1Store",+ "@/stores/modules/v1/database",+ ];const violations: string[] = [];for (const [file, source] of Object.entries(databaseMigrationSources)) {for (const bannedImport of bannedImports) {@@ -256,7 +254,7 @@ describe("React Project and Settings legacy Vue dependencies", () => {violations.push(`${file}: ${bannedImport}`);}}- if (file.endsWith("../store/modules/v1/index.ts")) {+ if (file.endsWith("../stores/modules/v1/index.ts")) {const bannedStoreModuleExport = "./database";if (source.includes(bannedStoreModuleExport)) {violations.push(`${file}: ${bannedStoreModuleExport}`);@@ -269,11 +267,11 @@ describe("React Project and Settings legacy Vue dependencies", () => {test("migrated DB schema surfaces do not expose the legacy DB schema store", () => {const violations: string[] = [];for (const [file, source] of Object.entries(dbSchemaMigrationSources)) {- if (file.endsWith("/no-legacy-vue-deps.test.ts")) {+ if (file.endsWith("/legacy-boundaries.test.ts")) {continue;}- if (source.includes("@/store/modules/v1/dbSchema")) {- violations.push(`${file}: @/store/modules/v1/dbSchema`);+ if (source.includes("@/stores/modules/v1/dbSchema")) {+ violations.push(`${file}: @/stores/modules/v1/dbSchema`);}if (!file.endsWith(".test.ts") &&@@ -283,7 +281,7 @@ describe("React Project and Settings legacy Vue dependencies", () => {violations.push(`${file}: useDBSchemaV1Store`);}if (- file.endsWith("../store/modules/v1/index.ts") &&+ file.endsWith("../stores/modules/v1/index.ts") &&source.includes("./dbSchema")) {violations.push(`${file}: ./dbSchema`);diff --git a/frontend/src/react/no-react-to-vue-imports.test.ts b/frontend/src/architecture/no-vue-imports.test.tssimilarity index 61%rename from frontend/src/react/no-react-to-vue-imports.test.tsrename to frontend/src/architecture/no-vue-imports.test.tsindex db9fb10d76..65ef431a8a 100644--- a/frontend/src/react/no-react-to-vue-imports.test.ts+++ b/frontend/src/architecture/no-vue-imports.test.ts@@ -1,23 +1,18 @@import { describe, expect, test } from "vitest";-// Every file under frontend/src/react/ that is *.ts or *.tsx (the React layer).-// .vue files are skipped: by definition .vue is Vue-side and is allowed to import-// other .vue files.-const sources = import.meta.glob("./**/*.{ts,tsx}", {+// Scan the entire application source tree. The only remaining Vue runtime is+// encapsulated by apps/explain-visualizer and does not expose .vue modules.+const sources = import.meta.glob("../**/*.{ts,tsx}", {query: "?raw",import: "default",eager: true,}) as Record<string, string>;-// Mount-bridge Vue files that React code is permitted to import until Phase B-// retires the Vue app shell. Adding new entries here requires explicit review.const allowedVueImports = new Set<string>();const vueImportPattern = /from\s+["']([^"']+\.vue)["']/g;-// Framework-neutral helpers that were moved out of components/ into the-// React layer. The Vue counterpart directories no longer exist; these-// entries lock the paths back from being recreated.+// Retired implementation prefixes must not be recreated.const bannedReactToVueModulePrefixes = ["@/components/MonacoEditor","@/components/Plan",@@ -28,16 +23,16 @@ const bannedReactToVueModulePrefixes = ["@/components/DatabaseGroup",];-describe("React layer must not import .vue files", () => {- test("no .tsx or .ts file under frontend/src/react/ imports a .vue file", () => {+describe("application source must not import .vue files", () => {+ test("no application TypeScript file imports a .vue file", () => {const violations: string[] = [];for (const [file, source] of Object.entries(sources)) {// Don't scan this guard itself (it contains .vue strings as test data// in the allowlist above).- if (file.endsWith("/no-react-to-vue-imports.test.ts")) continue;+ if (file.endsWith("/no-vue-imports.test.ts")) continue;// Don't scan the sibling guard (same reason — it has .vue strings as// banned-import test data).- if (file.endsWith("/no-legacy-vue-deps.test.ts")) continue;+ if (file.endsWith("/legacy-boundaries.test.ts")) continue;let match: RegExpExecArray | null;vueImportPattern.lastIndex = 0;@@ -51,12 +46,12 @@ describe("React layer must not import .vue files", () => {expect(violations).toEqual([]);});- test("no .tsx or .ts file under frontend/src/react/ imports Vue-side helper modules with React equivalents", () => {+ test("does not recreate retired implementation module prefixes", () => {const importPattern = /from\s+["']([^"']+)["']/g;const violations: string[] = [];for (const [file, source] of Object.entries(sources)) {- if (file.endsWith("/no-react-to-vue-imports.test.ts")) continue;- if (file.endsWith("/no-legacy-vue-deps.test.ts")) continue;+ if (file.endsWith("/no-vue-imports.test.ts")) continue;+ if (file.endsWith("/legacy-boundaries.test.ts")) continue;let match: RegExpExecArray | null;importPattern.lastIndex = 0;diff --git a/frontend/src/react/no-standalone-vue-reactivity.test.ts b/frontend/src/architecture/vue-boundary.test.tssimilarity index 97%rename from frontend/src/react/no-standalone-vue-reactivity.test.tsrename to frontend/src/architecture/vue-boundary.test.tsindex dbdc8c863d..47f1b61d43 100644--- a/frontend/src/react/no-standalone-vue-reactivity.test.ts+++ b/frontend/src/architecture/vue-boundary.test.ts@@ -5,7 +5,7 @@ import { describe, expect, test } from "vitest";const repoRoot = process.cwd();const srcRoot = join(repoRoot, "src");const allowedVueImportPaths = new Set([- "react/explain-visualizer/PostgresPlanView.tsx",+ "apps/explain-visualizer/PostgresPlanView.tsx",]);const sourceFilePattern = /\.(?:ts|tsx|d\.ts)$/;const bannedVueImportPattern = /from\s+["']vue["']/g;@@ -106,7 +106,7 @@ describe("Vue build tooling", () => {)).toEqual([]);expect(existsSync(join(repoRoot, "tsconfig.react.json"))).toBe(false);- expect(existsSync(join(srcRoot, "react", "tsconfig.json"))).toBe(false);+ expect(existsSync(join(srcRoot, "react"))).toBe(false);});});diff --git a/frontend/src/react/components/AccountMultiSelect.tsx b/frontend/src/components/AccountMultiSelect.tsxsimilarity index 98%rename from frontend/src/react/components/AccountMultiSelect.tsxrename to frontend/src/components/AccountMultiSelect.tsxindex ba717795a3..88dcf6d0d2 100644--- a/frontend/src/react/components/AccountMultiSelect.tsx+++ b/frontend/src/components/AccountMultiSelect.tsx@@ -1,18 +1,18 @@import { Check, ChevronDown, KeyRound, Shield, Users, X } from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { LAYER_SURFACE_CLASS } from "@/react/components/ui/layer";-import { SearchInput } from "@/react/components/ui/search-input";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { useClickOutside } from "@/react/hooks/useClickOutside";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";+import { LAYER_SURFACE_CLASS } from "@/components/ui/layer";+import { SearchInput } from "@/components/ui/search-input";+import { useCurrentUser } from "@/hooks/useAppState";+import { useClickOutside } from "@/hooks/useClickOutside";+import { cn } from "@/lib/utils";+import { useAppStore } from "@/stores/app";import {extractUserEmail,groupNamePrefix,serviceAccountNamePrefix,workloadIdentityNamePrefix,-} from "@/store/modules/v1/common";+} from "@/stores/modules/v1/common";import {AccountType,ALL_USERS_USER_EMAIL,diff --git a/frontend/src/react/components/AdvancedSearch.test.tsx b/frontend/src/components/AdvancedSearch.test.tsxsimilarity index 100%rename from frontend/src/react/components/AdvancedSearch.test.tsxrename to frontend/src/components/AdvancedSearch.test.tsxdiff --git a/frontend/src/react/components/AdvancedSearch.tsx b/frontend/src/components/AdvancedSearch.tsxsimilarity index 99%rename from frontend/src/react/components/AdvancedSearch.tsxrename to frontend/src/components/AdvancedSearch.tsxindex af532102b9..29ed2ca311 100644--- a/frontend/src/react/components/AdvancedSearch.tsx+++ b/frontend/src/components/AdvancedSearch.tsx@@ -1,9 +1,9 @@import { Filter, X } from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { HighlightLabelText } from "@/react/components/HighlightLabelText";-import { LAYER_SURFACE_CLASS } from "@/react/components/ui/layer";-import { cn } from "@/react/lib/utils";+import { HighlightLabelText } from "@/components/HighlightLabelText";+import { LAYER_SURFACE_CLASS } from "@/components/ui/layer";+import { cn } from "@/lib/utils";// ============================================================// Typesdiff --git a/frontend/src/react/components/AnnouncementBanner.tsx b/frontend/src/components/AnnouncementBanner.tsxsimilarity index 98%rename from frontend/src/react/components/AnnouncementBanner.tsxrename to frontend/src/components/AnnouncementBanner.tsxindex 2ea2be484f..3e44423663 100644--- a/frontend/src/react/components/AnnouncementBanner.tsx+++ b/frontend/src/components/AnnouncementBanner.tsx@@ -1,5 +1,5 @@import { ArrowRight } from "lucide-react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";interface AnnouncementBannerProps {/** Banner message. */diff --git a/frontend/src/react/components/AuditLogTable.test.tsx b/frontend/src/components/AuditLogTable.test.tsxsimilarity index 89%rename from frontend/src/react/components/AuditLogTable.test.tsxrename to frontend/src/components/AuditLogTable.test.tsxindex d438f4cc08..6767c0e4fc 100644--- a/frontend/src/react/components/AuditLogTable.test.tsx+++ b/frontend/src/components/AuditLogTable.test.tsx@@ -28,29 +28,29 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/connect", () => ({+vi.mock("@/api", () => ({auditLogServiceClientConnect: {searchAuditLogs: mocks.searchAuditLogs,exportAuditLogs: mocks.exportAuditLogs,},}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: mocks.pushNotification,}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: (selector: (state: unknown) => unknown) =>selector({listUsers: mocks.listUsers,}),}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({usePlanFeature: mocks.usePlanFeature,}));-vi.mock("@/store/modules/v1/common", () => ({+vi.mock("@/stores/modules/v1/common", () => ({extractUserEmail: (name: string) => name.replace("users/", ""),getProjectIdPlanUidStageUidFromRolloutName: () => ["project",@@ -62,28 +62,28 @@ vi.mock("@/store/modules/v1/common", () => ({userNamePrefix: "users/",}));-vi.mock("@/react/components/AdvancedSearch", () => ({+vi.mock("@/components/AdvancedSearch", () => ({AdvancedSearch: () => <div data-testid="advanced-search" />,}));-vi.mock("@/react/components/TimeRangePicker", () => ({+vi.mock("@/components/TimeRangePicker", () => ({TimeRangePicker: () => <div data-testid="time-range-picker" />,}));-vi.mock("@/react/components/FeatureAttention", () => ({+vi.mock("@/components/FeatureAttention", () => ({FeatureAttention: () => null,}));-vi.mock("@/react/hooks/usePagedData", () => ({+vi.mock("@/hooks/usePagedData", () => ({PagedTableFooter: () => <div data-testid="paged-table-footer" />,}));-vi.mock("@/react/hooks/useSessionPageSize", () => ({+vi.mock("@/hooks/useSessionPageSize", () => ({getPageSizeOptions: () => [10],useSessionPageSize: () => [10, vi.fn()],}));-vi.mock("@/connect/methods", () => ({+vi.mock("@/api/methods", () => ({ALL_METHODS_WITH_AUDIT: [],}));diff --git a/frontend/src/react/components/AuditLogTable.tsx b/frontend/src/components/AuditLogTable.tsxsimilarity index 96%rename from frontend/src/react/components/AuditLogTable.tsxrename to frontend/src/components/AuditLogTable.tsxindex a165760763..8d99b8433e 100644--- a/frontend/src/react/components/AuditLogTable.tsx+++ b/frontend/src/components/AuditLogTable.tsx@@ -5,28 +5,24 @@ import utc from "dayjs/plugin/utc";import { Download, ExternalLink, Maximize2, X } from "lucide-react";import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { auditLogServiceClientConnect } from "@/connect";-import { ALL_METHODS_WITH_AUDIT } from "@/connect/methods";+import { auditLogServiceClientConnect } from "@/api";+import { ALL_METHODS_WITH_AUDIT } from "@/api/methods";import {AdvancedSearch,type ScopeOption,type SearchParams,type ValueOption,-} from "@/react/components/AdvancedSearch";-import { RouterLink } from "@/react/components/RouterLink";-import { TimeRangePicker } from "@/react/components/TimeRangePicker";-import { Button } from "@/react/components/ui/button";-import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";+} from "@/components/AdvancedSearch";+import { RouterLink } from "@/components/RouterLink";+import { TimeRangePicker } from "@/components/TimeRangePicker";+import { Button } from "@/components/ui/button";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";+} from "@/components/ui/dropdown-menu";import {Table,TableBody,@@ -34,23 +30,23 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { usePlanFeature } from "@/react/hooks/useAppState";-import { useColumnWidths } from "@/react/hooks/useColumnWidths";-import { PagedTableFooter } from "@/react/hooks/usePagedData";+} from "@/components/ui/table";+import { usePlanFeature } from "@/hooks/useAppState";+import { useColumnWidths } from "@/hooks/useColumnWidths";+import { PagedTableFooter } from "@/hooks/usePagedData";import {getPageSizeOptions,useSessionPageSize,-} from "@/react/hooks/useSessionPageSize";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/hooks/useSessionPageSize";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import {extractUserEmail,getProjectIdPlanUidStageUidFromRolloutName,planNamePrefix,projectNamePrefix,userNamePrefix,-} from "@/store/modules/v1/common";+} from "@/stores/modules/v1/common";import { getDateForPbTimestampProtoEs } from "@/types";import { StatusSchema } from "@/types/proto-es/google/rpc/status_pb";import type { AuditLog } from "@/types/proto-es/v1/audit_log_service_pb";diff --git a/frontend/src/react/components/BannersWrapper.test.tsx b/frontend/src/components/BannersWrapper.test.tsxsimilarity index 98%rename from frontend/src/react/components/BannersWrapper.test.tsxrename to frontend/src/components/BannersWrapper.test.tsxindex df5bdb6eb2..4547e5fb0f 100644--- a/frontend/src/react/components/BannersWrapper.test.tsx+++ b/frontend/src/components/BannersWrapper.test.tsx@@ -66,7 +66,7 @@ vi.mock("react-i18next", () => ({}) => <span>{interpolate(i18nKey, values)}</span>,}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({usePlanFeature: mocks.usePlanFeature,useServerState: mocks.useServerState,useSubscriptionState: mocks.useSubscriptionState,@@ -74,7 +74,7 @@ vi.mock("@/react/hooks/useAppState", () => ({useWorkspaceProfile: mocks.useWorkspaceProfile,}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({SETTING_ROUTE_WORKSPACE_GENERAL: "setting.workspace.general",SETTING_ROUTE_WORKSPACE_SUBSCRIPTION: "setting.workspace.subscription",router: {@@ -83,7 +83,7 @@ vi.mock("@/react/router", () => ({},}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: mocks.useAppStore,}));diff --git a/frontend/src/react/components/BannersWrapper.tsx b/frontend/src/components/BannersWrapper.tsxsimilarity index 95%rename from frontend/src/react/components/BannersWrapper.tsxrename to frontend/src/components/BannersWrapper.tsxindex 52a7af829a..1aa2173e23 100644--- a/frontend/src/react/components/BannersWrapper.tsx+++ b/frontend/src/components/BannersWrapper.tsx@@ -1,31 +1,27 @@import { AlertCircle, ShoppingCart, Sparkles, Wrench, X } from "lucide-react";import { useMemo, useState } from "react";import { Trans, useTranslation } from "react-i18next";-import { AnnouncementBanner } from "@/react/components/AnnouncementBanner";-import { resolveAnnouncementTheme } from "@/react/components/announcement-theme";-import { RouterLink } from "@/react/components/RouterLink";-import { Button, buttonVariants } from "@/react/components/ui/button";import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";+ SETTING_ROUTE_WORKSPACE_GENERAL,+ SETTING_ROUTE_WORKSPACE_SUBSCRIPTION,+} from "@/app/router";+import { AnnouncementBanner } from "@/components/AnnouncementBanner";+import { resolveAnnouncementTheme } from "@/components/announcement-theme";+import { RouterLink } from "@/components/RouterLink";+import { Button, buttonVariants } from "@/components/ui/button";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";import {usePlanFeature,useServerState,useSubscriptionState,useWorkspacePermission,useWorkspaceProfile,-} from "@/react/hooks/useAppState";+} from "@/hooks/useAppState";import {EXTERNAL_URL_PRODUCT_INTRO,PRODUCT_INTRO_QUERY_KEY,-} from "@/react/lib/productIntro";-import {- SETTING_ROUTE_WORKSPACE_GENERAL,- SETTING_ROUTE_WORKSPACE_SUBSCRIPTION,-} from "@/react/router";-import { useAppStore } from "@/react/stores/app";+} from "@/lib/productIntro";+import { useAppStore } from "@/stores/app";import {PlanFeature,PlanType,diff --git a/frontend/src/react/components/BytebaseLogo.test.tsx b/frontend/src/components/BytebaseLogo.test.tsxsimilarity index 97%rename from frontend/src/react/components/BytebaseLogo.test.tsxrename to frontend/src/components/BytebaseLogo.test.tsxindex e95fdd7b76..e5e5332cf6 100644--- a/frontend/src/react/components/BytebaseLogo.test.tsx+++ b/frontend/src/components/BytebaseLogo.test.tsx@@ -23,7 +23,7 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useWorkspace: () => ({logo: mocks.workspaceLogo,}),@@ -32,7 +32,7 @@ vi.mock("@/react/hooks/useAppState", () => ({}),}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({router: {push: mocks.push,resolve: mocks.resolve,diff --git a/frontend/src/react/components/BytebaseLogo.tsx b/frontend/src/components/BytebaseLogo.tsxsimilarity index 88%rename from frontend/src/react/components/BytebaseLogo.tsxrename to frontend/src/components/BytebaseLogo.tsxindex ea03206aee..8d14eaf3b8 100644--- a/frontend/src/react/components/BytebaseLogo.tsx+++ b/frontend/src/components/BytebaseLogo.tsx@@ -1,9 +1,9 @@import { useTranslation } from "react-i18next";+import { useNavigate } from "@/app/router";import logoFull from "@/assets/logo-full.svg";-import { RouterLink } from "@/react/components/RouterLink";-import { useRecentVisit, useWorkspace } from "@/react/hooks/useAppState";-import { cn } from "@/react/lib/utils";-import { useNavigate } from "@/react/router";+import { RouterLink } from "@/components/RouterLink";+import { useRecentVisit, useWorkspace } from "@/hooks/useAppState";+import { cn } from "@/lib/utils";type Props = {/** Optional route name — when set, the logo is wrapped in a link that records the visit. */diff --git a/frontend/src/react/components/ClassificationTree.tsx b/frontend/src/components/ClassificationTree.tsxsimilarity index 97%rename from frontend/src/react/components/ClassificationTree.tsxrename to frontend/src/components/ClassificationTree.tsxindex 84f31982b7..4384f901f0 100644--- a/frontend/src/react/components/ClassificationTree.tsx+++ b/frontend/src/components/ClassificationTree.tsx@@ -1,9 +1,9 @@import { ChevronRight } from "lucide-react";import { type JSX, useCallback, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { SearchInput } from "@/react/components/ui/search-input";-import type { TreeDataNode } from "@/react/components/ui/tree";-import { Tree } from "@/react/components/ui/tree";+import { SearchInput } from "@/components/ui/search-input";+import type { TreeDataNode } from "@/components/ui/tree";+import { Tree } from "@/components/ui/tree";import type { DataClassificationSetting_DataClassificationConfig } from "@/types/proto-es/v1/setting_service_pb";interface TreeNode {diff --git a/frontend/src/react/components/ComponentPermissionGuard.tsx b/frontend/src/components/ComponentPermissionGuard.tsxsimilarity index 96%rename from frontend/src/react/components/ComponentPermissionGuard.tsxrename to frontend/src/components/ComponentPermissionGuard.tsxindex f4a8e64c1c..188e1497f8 100644--- a/frontend/src/react/components/ComponentPermissionGuard.tsx+++ b/frontend/src/components/ComponentPermissionGuard.tsx@@ -8,10 +8,10 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";-import { FeatureBadge } from "@/react/components/FeatureBadge";-import { Button } from "@/react/components/ui/button";-import { REQUEST_ROLE_REQUIRED_PERMISSIONS } from "@/react/pages/settings/requestRoleButton";-import { useAppStore } from "@/react/stores/app";+import { FeatureBadge } from "@/components/FeatureBadge";+import { Button } from "@/components/ui/button";+import { REQUEST_ROLE_REQUIRED_PERMISSIONS } from "@/modules/access-control/requestRoleButton";+import { useAppStore } from "@/stores/app";import { BASIC_WORKSPACE_PERMISSIONS, type Permission } from "@/types/iam";import { hasFeature as planHasFeature } from "@/types/plan";import type { Project } from "@/types/proto-es/v1/project_service_pb";@@ -21,7 +21,7 @@ import {} from "@/types/proto-es/v1/subscription_service_pb";const RequestRoleSheet = lazy(async () => {- const module = await import("@/react/pages/settings/RequestRoleSheet");+ const module = await import("@/modules/access-control/RequestRoleSheet");return { default: module.RequestRoleSheet };});diff --git a/frontend/src/react/components/CreateWorkloadIdentitySheet.test.tsx b/frontend/src/components/CreateWorkloadIdentitySheet.test.tsxsimilarity index 95%rename from frontend/src/react/components/CreateWorkloadIdentitySheet.test.tsxrename to frontend/src/components/CreateWorkloadIdentitySheet.test.tsxindex 12a70c8f58..abe4c93efd 100644--- a/frontend/src/react/components/CreateWorkloadIdentitySheet.test.tsx+++ b/frontend/src/components/CreateWorkloadIdentitySheet.test.tsx@@ -35,11 +35,11 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/components/RoleSelect", () => ({+vi.mock("@/components/RoleSelect", () => ({RoleSelect: () => <div data-testid="role-select" />,}));-vi.mock("@/react/components/ui/sheet", () => ({+vi.mock("@/components/ui/sheet", () => ({Sheet: ({ children, open }: { children: React.ReactNode; open: boolean }) =>open ? <div>{children}</div> : null,SheetBody: ({ children }: { children: React.ReactNode }) => (@@ -59,15 +59,15 @@ vi.mock("@/react/components/ui/sheet", () => ({),}));-vi.mock("@/react/hooks/useProjectByName", () => ({+vi.mock("@/hooks/useProjectByName", () => ({useProjectByName: () => undefined,}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: mocks.useAppStore,}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: vi.fn(),}));diff --git a/frontend/src/react/components/CreateWorkloadIdentitySheet.tsx b/frontend/src/components/CreateWorkloadIdentitySheet.tsxsimilarity index 97%rename from frontend/src/react/components/CreateWorkloadIdentitySheet.tsxrename to frontend/src/components/CreateWorkloadIdentitySheet.tsxindex 2d8753b96f..09ac9c3066 100644--- a/frontend/src/react/components/CreateWorkloadIdentitySheet.tsx+++ b/frontend/src/components/CreateWorkloadIdentitySheet.tsx@@ -3,10 +3,10 @@ import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { ChevronDown, ChevronUp } from "lucide-react";import { useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { RoleSelect } from "@/react/components/RoleSelect";-import { Button } from "@/react/components/ui/button";-import { FormField } from "@/react/components/ui/form";-import { Input } from "@/react/components/ui/input";+import { RoleSelect } from "@/components/RoleSelect";+import { Button } from "@/components/ui/button";+import { FormField } from "@/components/ui/form";+import { Input } from "@/components/ui/input";import {Sheet,SheetBody,@@ -14,11 +14,11 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { useAppStore } from "@/react/stores/app";-import { ensureWorkloadIdentityFullName } from "@/react/stores/app/workloadIdentity";-import { pushNotification } from "@/store";+} from "@/components/ui/sheet";+import { useProjectByName } from "@/hooks/useProjectByName";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import { ensureWorkloadIdentityFullName } from "@/stores/app/workloadIdentity";import {getWorkloadIdentityNameInBinding,getWorkloadIdentitySuffix,diff --git a/frontend/src/react/components/CustomApproval/ApprovalStepsTable.tsx b/frontend/src/components/CustomApproval/ApprovalStepsTable.tsxsimilarity index 98%rename from frontend/src/react/components/CustomApproval/ApprovalStepsTable.tsxrename to frontend/src/components/CustomApproval/ApprovalStepsTable.tsxindex 0f08687c02..87347e745d 100644--- a/frontend/src/react/components/CustomApproval/ApprovalStepsTable.tsx+++ b/frontend/src/components/CustomApproval/ApprovalStepsTable.tsx@@ -1,6 +1,6 @@import { ArrowDown, ArrowUp, Plus, Trash2 } from "lucide-react";import { useTranslation } from "react-i18next";-import { RoleSelect } from "@/react/components/RoleSelect";+import { RoleSelect } from "@/components/RoleSelect";import { PresetRoleType } from "@/types";import { displayRoleTitle } from "@/utils";import { Button } from "../ui/button";diff --git a/frontend/src/react/components/CustomApproval/RuleEditSheet.tsx b/frontend/src/components/CustomApproval/RuleEditSheet.tsxsimilarity index 94%rename from frontend/src/react/components/CustomApproval/RuleEditSheet.tsxrename to frontend/src/components/CustomApproval/RuleEditSheet.tsxindex 53f525e1c7..4739d54ec8 100644--- a/frontend/src/react/components/CustomApproval/RuleEditSheet.tsx+++ b/frontend/src/components/CustomApproval/RuleEditSheet.tsx@@ -2,23 +2,11 @@ import { create } from "@bufbuild/protobuf";import { cloneDeep } from "lodash-es";import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import type { ConditionGroupExpr } from "@/plugins/cel";-import {- buildCELExpr,- emptySimpleExpr,- resolveCELExpr,- validateSimpleExpr,- wrapAsGroup,-} from "@/plugins/cel";-import { ExprEditor } from "@/react/components/ExprEditor";-import { Alert } from "@/react/components/ui/alert";-import { Button } from "@/react/components/ui/button";-import {- FormField,- FormFieldGroup,- FormTitle,-} from "@/react/components/ui/form";-import { Input } from "@/react/components/ui/input";+import { ExprEditor } from "@/components/ExprEditor";+import { Alert } from "@/components/ui/alert";+import { Button } from "@/components/ui/button";+import { FormField, FormFieldGroup, FormTitle } from "@/components/ui/form";+import { Input } from "@/components/ui/input";import {Sheet,SheetBody,@@ -26,9 +14,17 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { Switch } from "@/react/components/ui/switch";-import { Textarea } from "@/react/components/ui/textarea";+} from "@/components/ui/sheet";+import { Switch } from "@/components/ui/switch";+import { Textarea } from "@/components/ui/textarea";+import type { ConditionGroupExpr } from "@/modules/cel";+import {+ buildCELExpr,+ emptySimpleExpr,+ resolveCELExpr,+ validateSimpleExpr,+ wrapAsGroup,+} from "@/modules/cel";import type { LocalApprovalRule } from "@/types";import { ApprovalFlowSchema } from "@/types/proto-es/v1/issue_service_pb";import type { WorkspaceApprovalSetting_Rule_Source } from "@/types/proto-es/v1/setting_service_pb";diff --git a/frontend/src/react/components/CustomApproval/RuleEditSheetLayout.test.ts b/frontend/src/components/CustomApproval/RuleEditSheetLayout.test.tssimilarity index 100%rename from frontend/src/react/components/CustomApproval/RuleEditSheetLayout.test.tsrename to frontend/src/components/CustomApproval/RuleEditSheetLayout.test.tsdiff --git a/frontend/src/react/components/CustomApproval/RulesSection.tsx b/frontend/src/components/CustomApproval/RulesSection.tsxsimilarity index 96%rename from frontend/src/react/components/CustomApproval/RulesSection.tsxrename to frontend/src/components/CustomApproval/RulesSection.tsxindex 3e04c4f0f4..050e5aa2fa 100644--- a/frontend/src/react/components/CustomApproval/RulesSection.tsx+++ b/frontend/src/components/CustomApproval/RulesSection.tsx@@ -22,12 +22,12 @@ import { useTranslation } from "react-i18next";import {PermissionGuard,usePermissionCheck,-} from "@/react/components/PermissionGuard";-import { Button } from "@/react/components/ui/button";-import { ColumnResizeHandle } from "@/react/components/ui/column-resize-handle";-import { useColumnWidths } from "@/react/hooks/useColumnWidths";-import { useWorkspaceApprovalSettingStore } from "@/react/stores/workspaceApprovalSetting";-import { pushNotification } from "@/store";+} from "@/components/PermissionGuard";+import { Button } from "@/components/ui/button";+import { ColumnResizeHandle } from "@/components/ui/column-resize-handle";+import { useColumnWidths } from "@/hooks/useColumnWidths";+import { pushNotification } from "@/stores";+import { useWorkspaceApprovalSettingStore } from "@/stores/workspaceApprovalSetting";import type { LocalApprovalRule } from "@/types";import type { WorkspaceApprovalSetting_Rule_Source } from "@/types/proto-es/v1/setting_service_pb";import { WorkspaceApprovalSetting_Rule_Source as RuleSource } from "@/types/proto-es/v1/setting_service_pb";diff --git a/frontend/src/react/components/CustomApproval/utils.test.ts b/frontend/src/components/CustomApproval/utils.test.tssimilarity index 100%rename from frontend/src/react/components/CustomApproval/utils.test.tsrename to frontend/src/components/CustomApproval/utils.test.tsdiff --git a/frontend/src/react/components/CustomApproval/utils.ts b/frontend/src/components/CustomApproval/utils.tssimilarity index 98%rename from frontend/src/react/components/CustomApproval/utils.tsrename to frontend/src/components/CustomApproval/utils.tsindex 95f8d116dc..53cbcfd94b 100644--- a/frontend/src/react/components/CustomApproval/utils.ts+++ b/frontend/src/components/CustomApproval/utils.ts@@ -1,10 +1,10 @@import { create } from "@bufbuild/protobuf";import { v4 as uuidv4 } from "uuid";-import type { ConditionGroupExpr } from "@/plugins/cel";-import { ExprType, type Factor, SQLTypeList, wrapAsGroup } from "@/plugins/cel";-import i18n from "@/react/i18n";-import { displayRoleTitleFromList } from "@/react/lib/role";-import { useAppStore } from "@/react/stores/app";+import i18n from "@/lib/i18n";+import { displayRoleTitleFromList } from "@/lib/role";+import type { ConditionGroupExpr } from "@/modules/cel";+import { ExprType, type Factor, SQLTypeList, wrapAsGroup } from "@/modules/cel";+import { useAppStore } from "@/stores/app";import type { LocalApprovalRule } from "@/types";import { PRESET_WORKSPACE_ROLES, PresetRoleType } from "@/types";import { Engine, RiskLevel } from "@/types/proto-es/v1/common_pb";diff --git a/frontend/src/react/components/DashboardBodyShell.test.tsx b/frontend/src/components/DashboardBodyShell.test.tsxsimilarity index 98%rename from frontend/src/react/components/DashboardBodyShell.test.tsxrename to frontend/src/components/DashboardBodyShell.test.tsxindex 3cf27867eb..37fc7b5f2e 100644--- a/frontend/src/react/components/DashboardBodyShell.test.tsx+++ b/frontend/src/components/DashboardBodyShell.test.tsx@@ -4,7 +4,7 @@ import { afterEach, describe, expect, test, vi } from "vitest";import type {DashboardBodyShellProps,DashboardShellTargets,-} from "@/react/dashboard-shell";+} from "@/app/dashboard-shell";import { DashboardBodyShell } from "./DashboardBodyShell";import { LAYER_ROOT_ID } from "./ui/layer";@@ -12,7 +12,7 @@ import { LAYER_ROOT_ID } from "./ui/layer";globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }).IS_REACT_ACT_ENVIRONMENT = true;-vi.mock("@/react/components/header/DashboardHeader", () => ({+vi.mock("@/components/header/DashboardHeader", () => ({DashboardHeader: ({showLogo,showMobileSidebarToggle,diff --git a/frontend/src/react/components/DashboardBodyShell.tsx b/frontend/src/components/DashboardBodyShell.tsxsimilarity index 93%rename from frontend/src/react/components/DashboardBodyShell.tsxrename to frontend/src/components/DashboardBodyShell.tsxindex 0c136e9f6d..0cdaf55440 100644--- a/frontend/src/react/components/DashboardBodyShell.tsx+++ b/frontend/src/components/DashboardBodyShell.tsx@@ -1,14 +1,14 @@import { useEffect, useRef, useState, useSyncExternalStore } from "react";import { createPortal } from "react-dom";import { useTranslation } from "react-i18next";-import { DashboardHeader } from "@/react/components/header/DashboardHeader";-import { getLayerRoot, LAYER_SURFACE_CLASS } from "@/react/components/ui/layer";import type {DashboardBodyShellProps,DashboardShellTargets,-} from "@/react/dashboard-shell";-import { cn } from "@/react/lib/utils";-import { MAIN_SCROLL_RESTORATION_ID } from "@/react/router/NavigationScrollRestoration";+} from "@/app/dashboard-shell";+import { MAIN_SCROLL_RESTORATION_ID } from "@/app/router/NavigationScrollRestoration";+import { DashboardHeader } from "@/components/header/DashboardHeader";+import { getLayerRoot, LAYER_SURFACE_CLASS } from "@/components/ui/layer";+import { cn } from "@/lib/utils";function subscribeToViewport(onStoreChange: () => void) {window.addEventListener("resize", onStoreChange);diff --git a/frontend/src/react/components/DashboardFrameShell.test.tsx b/frontend/src/components/DashboardFrameShell.test.tsxsimilarity index 97%rename from frontend/src/react/components/DashboardFrameShell.test.tsxrename to frontend/src/components/DashboardFrameShell.test.tsxindex 9720fc7967..75c843cb7a 100644--- a/frontend/src/react/components/DashboardFrameShell.test.tsx+++ b/frontend/src/components/DashboardFrameShell.test.tsx@@ -19,12 +19,12 @@ const mocks = vi.hoisted(() => ({useAppStore: vi.fn(),}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: mocks.useAppStore,}));-// The legacy-Pinia bootstrap block reads these from `@/store`.-vi.mock("@/store", () => ({+// The legacy-Pinia bootstrap block reads these from `@/stores`.+vi.mock("@/stores", () => ({useEnvironmentV1Store: () => ({fetchEnvironments: mocks.fetchEnvironments,}),diff --git a/frontend/src/react/components/DashboardFrameShell.tsx b/frontend/src/components/DashboardFrameShell.tsxsimilarity index 85%rename from frontend/src/react/components/DashboardFrameShell.tsxrename to frontend/src/components/DashboardFrameShell.tsxindex 4d2ff11755..6ccb87ef35 100644--- a/frontend/src/react/components/DashboardFrameShell.tsx+++ b/frontend/src/components/DashboardFrameShell.tsx@@ -1,7 +1,7 @@import { LoaderCircle } from "lucide-react";import { useEffect, useRef } from "react";-import type { DashboardFrameShellProps } from "@/react/dashboard-shell";-import { useEnsureWorkspaceCommonData } from "@/react/hooks/useEnsureWorkspaceCommonData";+import type { DashboardFrameShellProps } from "@/app/dashboard-shell";+import { useEnsureWorkspaceCommonData } from "@/hooks/useEnsureWorkspaceCommonData";import { BannersWrapper } from "./BannersWrapper";export function DashboardFrameShell({ onReady }: DashboardFrameShellProps) {diff --git a/frontend/src/react/components/DashboardSidebar.test.tsx b/frontend/src/components/DashboardSidebar.test.tsxsimilarity index 97%rename from frontend/src/react/components/DashboardSidebar.test.tsxrename to frontend/src/components/DashboardSidebar.test.tsxindex 1c68576b47..3fe55faeee 100644--- a/frontend/src/react/components/DashboardSidebar.test.tsx+++ b/frontend/src/components/DashboardSidebar.test.tsx@@ -7,7 +7,7 @@ import {SQL_EDITOR_HOME_MODULE,WORKSPACE_ROUTE_LANDING,WORKSPACE_ROUTE_MEMBERS,-} from "@/react/router";+} from "@/app/router";import { DatabaseChangeMode } from "@/types/proto-es/v1/setting_service_pb";(@@ -107,7 +107,7 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useAppFeature: () => mocks.databaseChangeMode,useIsSaaSMode: () => mocks.isSaaSMode,useProject: () => mocks.project,@@ -125,7 +125,7 @@ vi.mock("@/react/hooks/useAppState", () => ({useWorkspaceList: () => mocks.workspaceList,}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({useCurrentRoute: () => mocks.currentRoute,useNavigate: () => ({push: mocks.push,@@ -166,11 +166,11 @@ vi.mock("@/assets/logo-full.svg", () => ({default: "/assets/logo-full.svg",}));-vi.mock("@/react/components/header/ProjectCreateDialog", () => ({+vi.mock("@/components/header/ProjectCreateDialog", () => ({ProjectCreateDialog: () => null,}));-vi.mock("@/react/components/header/ProjectSwitchPanel", () => ({+vi.mock("@/components/header/ProjectSwitchPanel", () => ({ProjectSwitchPanel: () => <div data-testid="project-switch-panel" />,}));diff --git a/frontend/src/react/components/DashboardSidebar.tsx b/frontend/src/components/DashboardSidebar.tsxsimilarity index 98%rename from frontend/src/react/components/DashboardSidebar.tsxrename to frontend/src/components/DashboardSidebar.tsxindex e06e59a53b..025c86be58 100644--- a/frontend/src/react/components/DashboardSidebar.tsx+++ b/frontend/src/components/DashboardSidebar.tsx@@ -15,15 +15,6 @@ import {import type { ElementType } from "react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import logoFull from "@/assets/logo-full.svg";-import { MobileSidebarSwitchers } from "@/react/components/header/HeaderBreadcrumb";-import { RouterLink } from "@/react/components/RouterLink";-import {- useAppFeature,- useIsSaaSMode,- useRecentVisit,- useWorkspace,-} from "@/react/hooks/useAppState";import {DATABASE_ROUTE_DASHBOARD,ENVIRONMENT_V1_ROUTE_DASHBOARD,@@ -52,7 +43,16 @@ import {WORKSPACE_ROUTE_USER_PROFILE,WORKSPACE_ROUTE_USERS,WORKSPACE_ROUTE_WORKLOAD_IDENTITIES,-} from "@/react/router";+} from "@/app/router";+import logoFull from "@/assets/logo-full.svg";+import { MobileSidebarSwitchers } from "@/components/header/HeaderBreadcrumb";+import { RouterLink } from "@/components/RouterLink";+import {+ useAppFeature,+ useIsSaaSMode,+ useRecentVisit,+ useWorkspace,+} from "@/hooks/useAppState";import { DatabaseChangeMode } from "@/types/proto-es/v1/setting_service_pb";// ---------------------------------------------------------------------------diff --git a/frontend/src/react/components/DataExportButton.tsx b/frontend/src/components/DataExportButton.tsxsimilarity index 96%rename from frontend/src/react/components/DataExportButton.tsxrename to frontend/src/components/DataExportButton.tsxindex b610ed6796..f99c0db424 100644--- a/frontend/src/react/components/DataExportButton.tsx+++ b/frontend/src/components/DataExportButton.tsx@@ -11,20 +11,16 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";-import { Button, type ButtonProps } from "@/react/components/ui/button";-import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";+import { Button, type ButtonProps } from "@/components/ui/button";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";-import { Input } from "@/react/components/ui/input";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";+} from "@/components/ui/dropdown-menu";+import { Input } from "@/components/ui/input";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";import {Sheet,SheetBody,@@ -32,11 +28,11 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { Tooltip } from "@/react/components/ui/tooltip";-import { writeTextToClipboard } from "@/react/lib/clipboard";-import { cn } from "@/react/lib/utils";-import { pushNotification } from "@/store";+} from "@/components/ui/sheet";+import { Tooltip } from "@/components/ui/tooltip";+import { writeTextToClipboard } from "@/lib/clipboard";+import { cn } from "@/lib/utils";+import { pushNotification } from "@/stores";import { ExportFormat } from "@/types/proto-es/v1/common_pb";import { MaxRowCountSelect } from "./MaxRowCountSelect";diff --git a/frontend/src/react/components/DatabaseGroupDataTable.test.tsx b/frontend/src/components/DatabaseGroupDataTable.test.tsxsimilarity index 97%rename from frontend/src/react/components/DatabaseGroupDataTable.test.tsxrename to frontend/src/components/DatabaseGroupDataTable.test.tsxindex 5ab51fa264..3599a7c1b3 100644--- a/frontend/src/react/components/DatabaseGroupDataTable.test.tsx+++ b/frontend/src/components/DatabaseGroupDataTable.test.tsx@@ -11,12 +11,12 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: { resolve: vi.fn(() => ({ fullPath: "/x" })) },}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({getProjectNameAndDatabaseGroupName: (name: string) => name.split("/"),}));diff --git a/frontend/src/react/components/DatabaseGroupDataTable.tsx b/frontend/src/components/DatabaseGroupDataTable.tsxsimilarity index 95%rename from frontend/src/react/components/DatabaseGroupDataTable.tsxrename to frontend/src/components/DatabaseGroupDataTable.tsxindex d064585516..1555beef0e 100644--- a/frontend/src/react/components/DatabaseGroupDataTable.tsx+++ b/frontend/src/components/DatabaseGroupDataTable.tsx@@ -1,14 +1,16 @@import { EllipsisVertical, ExternalLink } from "lucide-react";import { useCallback, useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";+import { router } from "@/app/router";+import { PROJECT_V1_ROUTE_DATABASE_GROUP_DETAIL } from "@/app/router/handles";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";+} from "@/components/ui/dropdown-menu";import {Table,TableBody,@@ -16,11 +18,9 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { cn } from "@/react/lib/utils";-import { router } from "@/react/router";-import { PROJECT_V1_ROUTE_DATABASE_GROUP_DETAIL } from "@/react/router/handles";-import { getProjectNameAndDatabaseGroupName } from "@/store";+} from "@/components/ui/table";+import { cn } from "@/lib/utils";+import { getProjectNameAndDatabaseGroupName } from "@/stores";import type { DatabaseGroup } from "@/types/proto-es/v1/database_group_service_pb";type Props = {diff --git a/frontend/src/react/components/DatabaseGroupForm.tsx b/frontend/src/components/DatabaseGroupForm.tsxsimilarity index 92%rename from frontend/src/react/components/DatabaseGroupForm.tsxrename to frontend/src/components/DatabaseGroupForm.tsxindex ba1c5e4a08..bae4887869 100644--- a/frontend/src/react/components/DatabaseGroupForm.tsx+++ b/frontend/src/components/DatabaseGroupForm.tsx@@ -2,30 +2,30 @@ import { create } from "@bufbuild/protobuf";import { cloneDeep, head, isEqual } from "lodash-es";import { useCallback, useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import type { ConditionGroupExpr } from "@/plugins/cel";+import { ExprEditor } from "@/components/ExprEditor";+import { MatchedDatabaseView } from "@/components/MatchedDatabaseView";+import { ResourceIdField } from "@/components/ResourceIdField";+import { Button } from "@/components/ui/button";+import { Input } from "@/components/ui/input";+import { StickyActionFooter } from "@/components/ui/sticky-action-footer";+import {+ FactorList,+ getDatabaseGroupOptionConfigMap,+} from "@/lib/database-group/utils";+import type { ConditionGroupExpr } from "@/modules/cel";import {buildCELExpr,emptySimpleExpr,resolveCELExpr,validateSimpleExpr,wrapAsGroup,-} from "@/plugins/cel";-import { ExprEditor } from "@/react/components/ExprEditor";-import { MatchedDatabaseView } from "@/react/components/MatchedDatabaseView";-import { ResourceIdField } from "@/react/components/ResourceIdField";-import { Button } from "@/react/components/ui/button";-import { Input } from "@/react/components/ui/input";-import { StickyActionFooter } from "@/react/components/ui/sticky-action-footer";-import {- FactorList,- getDatabaseGroupOptionConfigMap,-} from "@/react/lib/database-group/utils";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/modules/cel";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import {databaseGroupNamePrefix,getProjectNameAndDatabaseGroupName,-} from "@/store/modules/v1/common";+} from "@/stores/modules/v1/common";import type { ValidatedMessage } from "@/types";import { isValidDatabaseGroupName } from "@/types";import type { Expr as CELExpr } from "@/types/proto-es/google/api/expr/v1alpha1/syntax_pb";diff --git a/frontend/src/react/components/DatabaseGroupTable.test.tsx b/frontend/src/components/DatabaseGroupTable.test.tsxsimilarity index 98%rename from frontend/src/react/components/DatabaseGroupTable.test.tsxrename to frontend/src/components/DatabaseGroupTable.test.tsxindex 7b9e573a78..a5bb57f244 100644--- a/frontend/src/react/components/DatabaseGroupTable.test.tsx+++ b/frontend/src/components/DatabaseGroupTable.test.tsx@@ -17,7 +17,7 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const state = {fetchDBGroupListByProjectName: mocks.fetchDBGroupListByProjectName,};diff --git a/frontend/src/react/components/DatabaseGroupTable.tsx b/frontend/src/components/DatabaseGroupTable.tsxsimilarity index 95%rename from frontend/src/react/components/DatabaseGroupTable.tsxrename to frontend/src/components/DatabaseGroupTable.tsxindex ed9a99a96c..d0521ef745 100644--- a/frontend/src/react/components/DatabaseGroupTable.tsx+++ b/frontend/src/components/DatabaseGroupTable.tsx@@ -1,10 +1,10 @@import type { ReactNode } from "react";import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { DatabaseGroupDataTable } from "@/react/components/DatabaseGroupDataTable";-import { SearchInput } from "@/react/components/ui/search-input";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";+import { DatabaseGroupDataTable } from "@/components/DatabaseGroupDataTable";+import { SearchInput } from "@/components/ui/search-input";+import { cn } from "@/lib/utils";+import { useAppStore } from "@/stores/app";import type { DatabaseGroup } from "@/types/proto-es/v1/database_group_service_pb";import { DatabaseGroupView } from "@/types/proto-es/v1/database_group_service_pb";diff --git a/frontend/src/react/components/DatabaseResourceSelector.test.tsx b/frontend/src/components/DatabaseResourceSelector.test.tsxsimilarity index 98%rename from frontend/src/react/components/DatabaseResourceSelector.test.tsxrename to frontend/src/components/DatabaseResourceSelector.test.tsxindex 01d30d7fda..31d3c93885 100644--- a/frontend/src/react/components/DatabaseResourceSelector.test.tsx+++ b/frontend/src/components/DatabaseResourceSelector.test.tsx@@ -39,13 +39,13 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/i18n", () => ({+vi.mock("@/lib/i18n", () => ({default: {t: (key: string) => key,},}));-vi.mock("@/react/components/AdvancedSearch", () => ({+vi.mock("@/components/AdvancedSearch", () => ({getValueFromScopes: (params: { scopes: { id: string; value: string }[] },id: string@@ -74,7 +74,7 @@ vi.mock("@/react/components/AdvancedSearch", () => ({),}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const appState = () => ({getOrFetchDatabaseMetadata: mocks.getOrFetchDatabaseMetadata,fetchInstanceList: mocks.fetchInstanceList,@@ -89,7 +89,7 @@ vi.mock("@/react/stores/app", () => {};});-vi.mock("@/react/components/EnvironmentLabel", () => ({+vi.mock("@/components/EnvironmentLabel", () => ({EnvironmentLabel: ({ environmentName }: { environmentName: string }) => (<span>{environmentName}</span>),diff --git a/frontend/src/react/components/DatabaseResourceSelector.tsx b/frontend/src/components/DatabaseResourceSelector.tsxsimilarity index 99%rename from frontend/src/react/components/DatabaseResourceSelector.tsxrename to frontend/src/components/DatabaseResourceSelector.tsxindex c5b7d2b39d..26a1ba4ac8 100644--- a/frontend/src/react/components/DatabaseResourceSelector.tsx+++ b/frontend/src/components/DatabaseResourceSelector.tsx@@ -15,10 +15,10 @@ import {type ScopeOption,type SearchParams,type ValueOption,-} from "@/react/components/AdvancedSearch";-import { EnvironmentLabel } from "@/react/components/EnvironmentLabel";-import { Checkbox } from "@/react/components/ui/checkbox";-import { useAppStore } from "@/react/stores/app";+} from "@/components/AdvancedSearch";+import { EnvironmentLabel } from "@/components/EnvironmentLabel";+import { Checkbox } from "@/components/ui/checkbox";+import { useAppStore } from "@/stores/app";import type { DatabaseResource } from "@/types";import { Engine } from "@/types/proto-es/v1/common_pb";import type {diff --git a/frontend/src/react/components/DatabaseSelect.test.tsx b/frontend/src/components/DatabaseSelect.test.tsxsimilarity index 98%rename from frontend/src/react/components/DatabaseSelect.test.tsxrename to frontend/src/components/DatabaseSelect.test.tsxindex 731ee56387..277b42f3dd 100644--- a/frontend/src/react/components/DatabaseSelect.test.tsx+++ b/frontend/src/components/DatabaseSelect.test.tsx@@ -38,7 +38,7 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (k: string) => k }),}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const state = () => ({fetchDatabases: mocks.fetchDatabases,workspaceResourceName: mocks.workspaceResourceName,@@ -53,7 +53,7 @@ vi.mock("@/react/stores/app", () => {});// Capture-only Combobox mock (repo convention). Renders nothing interactive.-vi.mock("@/react/components/ui/combobox", () => ({+vi.mock("@/components/ui/combobox", () => ({Combobox: (props: ComboProps) => {combo.props = props;return null;@@ -62,8 +62,8 @@ vi.mock("@/react/components/ui/combobox", () => ({// EngineIcon / EnvironmentLabel are only used inside option.render — never// invoked by these tests — but stub them so the module imports cleanly.-vi.mock("@/react/components/EngineIcon", () => ({ EngineIcon: () => null }));-vi.mock("@/react/components/EnvironmentLabel", () => ({+vi.mock("@/components/EngineIcon", () => ({ EngineIcon: () => null }));+vi.mock("@/components/EnvironmentLabel", () => ({EnvironmentLabel: () => null,}));diff --git a/frontend/src/react/components/DatabaseSelect.tsx b/frontend/src/components/DatabaseSelect.tsxsimilarity index 96%rename from frontend/src/react/components/DatabaseSelect.tsxrename to frontend/src/components/DatabaseSelect.tsxindex f71245fa32..5e20510743 100644--- a/frontend/src/react/components/DatabaseSelect.tsx+++ b/frontend/src/components/DatabaseSelect.tsx@@ -1,9 +1,9 @@import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { EngineIcon } from "@/react/components/EngineIcon";-import { EnvironmentLabel } from "@/react/components/EnvironmentLabel";-import { Combobox, type ComboboxOption } from "@/react/components/ui/combobox";-import { useAppStore } from "@/react/stores/app";+import { EngineIcon } from "@/components/EngineIcon";+import { EnvironmentLabel } from "@/components/EnvironmentLabel";+import { Combobox, type ComboboxOption } from "@/components/ui/combobox";+import { useAppStore } from "@/stores/app";import type { Engine } from "@/types/proto-es/v1/common_pb";import type { Database } from "@/types/proto-es/v1/database_service_pb";import {diff --git a/frontend/src/react/components/DatabaseTargetDisplay.test.tsx b/frontend/src/components/DatabaseTargetDisplay.test.tsxsimilarity index 97%rename from frontend/src/react/components/DatabaseTargetDisplay.test.tsxrename to frontend/src/components/DatabaseTargetDisplay.test.tsxindex bcb71dc273..d78ba9cdea 100644--- a/frontend/src/react/components/DatabaseTargetDisplay.test.tsx+++ b/frontend/src/components/DatabaseTargetDisplay.test.tsx@@ -14,7 +14,7 @@ const mocks = vi.hoisted(() => ({getEnvironmentByName: vi.fn(),}));-vi.mock("@/react/components/EngineIcon", () => ({+vi.mock("@/components/EngineIcon", () => ({EngineIcon: ({className,engine,@@ -28,12 +28,12 @@ vi.mock("@/react/components/EngineIcon", () => ({),}));-vi.mock("@/react/lib/utils", () => ({+vi.mock("@/lib/utils", () => ({cn: (...classes: Array<string | false | null | undefined>) =>classes.filter(Boolean).join(" "),}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const getState = () => ({databasesByName: mocks.databasesByName,environmentList: mocks.environmentList,diff --git a/frontend/src/react/components/DatabaseTargetDisplay.tsx b/frontend/src/components/DatabaseTargetDisplay.tsxsimilarity index 95%rename from frontend/src/react/components/DatabaseTargetDisplay.tsxrename to frontend/src/components/DatabaseTargetDisplay.tsxindex f8262bb7b5..7700f7c512 100644--- a/frontend/src/react/components/DatabaseTargetDisplay.tsx+++ b/frontend/src/components/DatabaseTargetDisplay.tsx@@ -1,8 +1,8 @@import { ChevronRight } from "lucide-react";import { useMemo } from "react";-import { EngineIcon } from "@/react/components/EngineIcon";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";+import { EngineIcon } from "@/components/EngineIcon";+import { cn } from "@/lib/utils";+import { useAppStore } from "@/stores/app";import { isValidDatabaseName } from "@/types";import { unknownDatabase } from "@/types/v1/database";import { extractDatabaseResourceName, getInstanceResource } from "@/utils";diff --git a/frontend/src/react/components/EditEnvironmentSheet.tsx b/frontend/src/components/EditEnvironmentSheet.tsxsimilarity index 86%rename from frontend/src/react/components/EditEnvironmentSheet.tsxrename to frontend/src/components/EditEnvironmentSheet.tsxindex 71693f834a..89f5029885 100644--- a/frontend/src/react/components/EditEnvironmentSheet.tsx+++ b/frontend/src/components/EditEnvironmentSheet.tsx@@ -1,8 +1,8 @@import { useEffect, useState } from "react";import { useTranslation } from "react-i18next";-import { EnvironmentLabel } from "@/react/components/EnvironmentLabel";-import { Button } from "@/react/components/ui/button";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";+import { EnvironmentLabel } from "@/components/EnvironmentLabel";+import { Button } from "@/components/ui/button";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";import {Sheet,SheetBody,@@ -10,9 +10,9 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { useEnvironmentList } from "@/react/hooks/useAppState";-import { cn } from "@/react/lib/utils";+} from "@/components/ui/sheet";+import { useEnvironmentList } from "@/hooks/useAppState";+import { cn } from "@/lib/utils";export function EditEnvironmentSheet({open,diff --git a/frontend/src/react/components/EngineIcon.tsx b/frontend/src/components/EngineIcon.tsxsimilarity index 84%rename from frontend/src/react/components/EngineIcon.tsxrename to frontend/src/components/EngineIcon.tsxindex 1ea13da458..ef4e2f87d3 100644--- a/frontend/src/react/components/EngineIcon.tsx+++ b/frontend/src/components/EngineIcon.tsx@@ -1,6 +1,6 @@import type { ComponentPropsWithoutRef } from "react";-import { EngineIconPath } from "@/react/components/instance/constants";-import { cn } from "@/react/lib/utils";+import { EngineIconPath } from "@/components/instance/constants";+import { cn } from "@/lib/utils";import type { Engine } from "@/types/proto-es/v1/common_pb";type EngineIconProps = Omit<ComponentPropsWithoutRef<"img">, "src"> & {diff --git a/frontend/src/react/components/EnvironmentLabel.test.tsx b/frontend/src/components/EnvironmentLabel.test.tsxsimilarity index 97%rename from frontend/src/react/components/EnvironmentLabel.test.tsxrename to frontend/src/components/EnvironmentLabel.test.tsxindex 95372a01f5..2d4a3dfe2f 100644--- a/frontend/src/react/components/EnvironmentLabel.test.tsx+++ b/frontend/src/components/EnvironmentLabel.test.tsx@@ -14,7 +14,7 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/components/RouterLink", () => ({+vi.mock("@/components/RouterLink", () => ({RouterLink: ({children,className,diff --git a/frontend/src/react/components/EnvironmentLabel.tsx b/frontend/src/components/EnvironmentLabel.tsxsimilarity index 95%rename from frontend/src/react/components/EnvironmentLabel.tsxrename to frontend/src/components/EnvironmentLabel.tsxindex 3dd1ea5ab6..35cd24997f 100644--- a/frontend/src/react/components/EnvironmentLabel.tsx+++ b/frontend/src/components/EnvironmentLabel.tsx@@ -1,9 +1,9 @@import { ShieldAlert } from "lucide-react";import { memo } from "react";import { useTranslation } from "react-i18next";-import { RouterLink } from "@/react/components/RouterLink";-import { useEnvironment, usePlanFeature } from "@/react/hooks/useAppState";-import { cn } from "@/react/lib/utils";+import { RouterLink } from "@/components/RouterLink";+import { useEnvironment, usePlanFeature } from "@/hooks/useAppState";+import { cn } from "@/lib/utils";import type { Environment } from "@/types";import {DEFAULT_ENVIRONMENT_COLOR,diff --git a/frontend/src/react/components/EnvironmentSelect.tsx b/frontend/src/components/EnvironmentSelect.tsxsimilarity index 93%rename from frontend/src/react/components/EnvironmentSelect.tsxrename to frontend/src/components/EnvironmentSelect.tsxindex cffac597df..ac7bcec0fa 100644--- a/frontend/src/react/components/EnvironmentSelect.tsx+++ b/frontend/src/components/EnvironmentSelect.tsx@@ -1,8 +1,8 @@import { useMemo } from "react";import { useTranslation } from "react-i18next";-import { EnvironmentLabel } from "@/react/components/EnvironmentLabel";-import { Combobox } from "@/react/components/ui/combobox";-import { useEnvironmentList } from "@/react/hooks/useAppState";+import { EnvironmentLabel } from "@/components/EnvironmentLabel";+import { Combobox } from "@/components/ui/combobox";+import { useEnvironmentList } from "@/hooks/useAppState";import { formatEnvironmentName } from "@/types";import type { Environment } from "@/types/v1/environment";diff --git a/frontend/src/react/components/ExprEditor.test.tsx b/frontend/src/components/ExprEditor.test.tsxsimilarity index 98%rename from frontend/src/react/components/ExprEditor.test.tsxrename to frontend/src/components/ExprEditor.test.tsxindex b6085e47a8..7e53605d16 100644--- a/frontend/src/react/components/ExprEditor.test.tsx+++ b/frontend/src/components/ExprEditor.test.tsx@@ -2,8 +2,8 @@ import * as stylex from "@stylexjs/stylex";import { act, type ReactElement, useState } from "react";import { createRoot } from "react-dom/client";import { afterEach, describe, expect, test, vi } from "vitest";-import type { Factor } from "@/plugins/cel/types/factor";-import { type ConditionGroupExpr, ExprType } from "@/plugins/cel/types/simple";+import type { Factor } from "@/modules/cel/types/factor";+import { type ConditionGroupExpr, ExprType } from "@/modules/cel/types/simple";import {CEL_ATTRIBUTE_RESOURCE_DATABASE,CEL_ATTRIBUTE_RESOURCE_TABLE_NAME,@@ -40,7 +40,7 @@ const { MockExprType } = vi.hoisted(() => ({} as const,}));-vi.mock("@/plugins/cel", () => ({+vi.mock("@/modules/cel", () => ({ExprType: MockExprType,LogicalOperatorList: ["_&&_", "_||_"],getOperatorListByFactor: () => ["_==_", "@in"],@@ -76,13 +76,13 @@ vi.mock("@/utils", () => ({}),}));-vi.mock("@/react/components/EnvironmentLabel", () => ({+vi.mock("@/components/EnvironmentLabel", () => ({EnvironmentLabel: ({ environmentName }: { environmentName: string }) => (<span>{environmentName}</span>),}));-vi.mock("@/store/modules/v1/common", () => ({+vi.mock("@/stores/modules/v1/common", () => ({environmentNamePrefix: "environments/",}));diff --git a/frontend/src/react/components/ExprEditor.tsx b/frontend/src/components/ExprEditor.tsxsimilarity index 98%rename from frontend/src/react/components/ExprEditor.tsxrename to frontend/src/components/ExprEditor.tsxindex fc76aba82c..38026bce19 100644--- a/frontend/src/react/components/ExprEditor.tsx+++ b/frontend/src/components/ExprEditor.tsx@@ -13,6 +13,20 @@ import {} from "react";import { createPortal } from "react-dom";import { useTranslation } from "react-i18next";+import { EnvironmentLabel } from "@/components/EnvironmentLabel";+import { Checkbox } from "@/components/ui/checkbox";+import { Input } from "@/components/ui/input";+import { getLayerRoot, LAYER_SURFACE_CLASS } from "@/components/ui/layer";+import { SearchInput } from "@/components/ui/search-input";+import {+ Select,+ SelectContent,+ SelectItem,+ SelectTrigger,+ SelectValue,+} from "@/components/ui/select";+import { Tooltip } from "@/components/ui/tooltip";+import { cn } from "@/lib/utils";import type {ConditionExpr,ConditionGroupExpr,@@ -21,7 +35,7 @@ import type {LogicalOperator,Operator,RawStringExpr,-} from "@/plugins/cel";+} from "@/modules/cel";import {ExprType,getOperatorListByFactor as getRawOperatorListByFactor,@@ -36,22 +50,8 @@ import {isTimestampFactor,LogicalOperatorList,operatorDisplayLabel,-} from "@/plugins/cel";-import { EnvironmentLabel } from "@/react/components/EnvironmentLabel";-import { Checkbox } from "@/react/components/ui/checkbox";-import { Input } from "@/react/components/ui/input";-import { getLayerRoot, LAYER_SURFACE_CLASS } from "@/react/components/ui/layer";-import { SearchInput } from "@/react/components/ui/search-input";-import {- Select,- SelectContent,- SelectItem,- SelectTrigger,- SelectValue,-} from "@/react/components/ui/select";-import { Tooltip } from "@/react/components/ui/tooltip";-import { cn } from "@/react/lib/utils";-import { environmentNamePrefix } from "@/store/modules/v1/common";+} from "@/modules/cel";+import { environmentNamePrefix } from "@/stores/modules/v1/common";import { getDefaultPagination } from "@/utils";import { CEL_ATTRIBUTE_RESOURCE_ENVIRONMENT_ID } from "@/utils/cel-attributes";import type { OptionConfig } from "@/utils/expr";diff --git a/frontend/src/react/components/ExternalUrlAlert.test.tsx b/frontend/src/components/ExternalUrlAlert.test.tsxsimilarity index 95%rename from frontend/src/react/components/ExternalUrlAlert.test.tsxrename to frontend/src/components/ExternalUrlAlert.test.tsxindex 847e1345e0..c13a818db1 100644--- a/frontend/src/react/components/ExternalUrlAlert.test.tsx+++ b/frontend/src/components/ExternalUrlAlert.test.tsx@@ -17,18 +17,18 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/router/handles", () => ({+vi.mock("@/app/router/handles", () => ({SETTING_ROUTE_WORKSPACE_GENERAL: "setting.workspace.general",}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({router: {push: mocks.routerPush,resolve: (to: unknown) => ({ href: JSON.stringify(to) }),},}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useServerState: mocks.useServerState,}));diff --git a/frontend/src/react/components/ExternalUrlAlert.tsx b/frontend/src/components/ExternalUrlAlert.tsxsimilarity index 79%rename from frontend/src/react/components/ExternalUrlAlert.tsxrename to frontend/src/components/ExternalUrlAlert.tsxindex f7ca73f76a..aa6b26dae3 100644--- a/frontend/src/react/components/ExternalUrlAlert.tsx+++ b/frontend/src/components/ExternalUrlAlert.tsx@@ -1,13 +1,13 @@import { useTranslation } from "react-i18next";-import { RouterLink } from "@/react/components/RouterLink";-import { Alert, type AlertProps } from "@/react/components/ui/alert";-import { type ButtonProps, buttonVariants } from "@/react/components/ui/button";-import { useServerState } from "@/react/hooks/useAppState";+import { SETTING_ROUTE_WORKSPACE_GENERAL } from "@/app/router/handles";+import { RouterLink } from "@/components/RouterLink";+import { Alert, type AlertProps } from "@/components/ui/alert";+import { type ButtonProps, buttonVariants } from "@/components/ui/button";+import { useServerState } from "@/hooks/useAppState";import {EXTERNAL_URL_PRODUCT_INTRO,PRODUCT_INTRO_QUERY_KEY,-} from "@/react/lib/productIntro";-import { SETTING_ROUTE_WORKSPACE_GENERAL } from "@/react/router/handles";+} from "@/lib/productIntro";import { hasWorkspacePermissionV2 } from "@/utils";type ExternalUrlAlertProps = Omit<AlertProps, "title" | "description"> & {diff --git a/frontend/src/react/components/FeatureAttention.test.tsx b/frontend/src/components/FeatureAttention.test.tsxsimilarity index 95%rename from frontend/src/react/components/FeatureAttention.test.tsxrename to frontend/src/components/FeatureAttention.test.tsxindex 98820eabc1..10e3ffe9c2 100644--- a/frontend/src/react/components/FeatureAttention.test.tsx+++ b/frontend/src/components/FeatureAttention.test.tsx@@ -44,23 +44,23 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useSubscriptionState: mocks.useSubscriptionState,useServerState: mocks.useServerState,}));-vi.mock("@/react/components/InstanceAssignmentSheet", () => ({+vi.mock("@/components/InstanceAssignmentSheet", () => ({InstanceAssignmentSheet: () => null,}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {push: mocks.routerPush,},}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: mocks.useAppStore,}));diff --git a/frontend/src/react/components/FeatureAttention.tsx b/frontend/src/components/FeatureAttention.tsxsimilarity index 93%rename from frontend/src/react/components/FeatureAttention.tsxrename to frontend/src/components/FeatureAttention.tsxindex 42cad54f69..e6bb354156 100644--- a/frontend/src/react/components/FeatureAttention.tsx+++ b/frontend/src/components/FeatureAttention.tsx@@ -1,13 +1,10 @@import { useState } from "react";import { useTranslation } from "react-i18next";-import { Alert } from "@/react/components/ui/alert";-import { Button } from "@/react/components/ui/button";-import {- useServerState,- useSubscriptionState,-} from "@/react/hooks/useAppState";-import { router } from "@/react/router";-import { useAppStore } from "@/react/stores/app";+import { router } from "@/app/router";+import { Alert } from "@/components/ui/alert";+import { Button } from "@/components/ui/button";+import { useServerState, useSubscriptionState } from "@/hooks/useAppState";+import { useAppStore } from "@/stores/app";import { ENTERPRISE_INQUIRE_LINK, instanceLimitFeature } from "@/types";import type {Instance,diff --git a/frontend/src/react/components/FeatureBadge.tsx b/frontend/src/components/FeatureBadge.tsxsimilarity index 94%rename from frontend/src/react/components/FeatureBadge.tsxrename to frontend/src/components/FeatureBadge.tsxindex c457d375b7..e2d8a888dd 100644--- a/frontend/src/react/components/FeatureBadge.tsx+++ b/frontend/src/components/FeatureBadge.tsx@@ -1,9 +1,9 @@import { Lock, Sparkles } from "lucide-react";import type { ReactNode } from "react";import { useTranslation } from "react-i18next";-import { RouterLink } from "@/react/components/RouterLink";-import { useSubscriptionState } from "@/react/hooks/useAppState";-import { useAppStore } from "@/react/stores/app";+import { RouterLink } from "@/components/RouterLink";+import { useSubscriptionState } from "@/hooks/useAppState";+import { useAppStore } from "@/stores/app";import type {Instance,InstanceResource,diff --git a/frontend/src/react/components/HeaderProfileMenuMount.tsx b/frontend/src/components/HeaderProfileMenuMount.tsxsimilarity index 64%rename from frontend/src/react/components/HeaderProfileMenuMount.tsxrename to frontend/src/components/HeaderProfileMenuMount.tsxindex a9aa8a73d2..c0ce4d6daf 100644--- a/frontend/src/react/components/HeaderProfileMenuMount.tsx+++ b/frontend/src/components/HeaderProfileMenuMount.tsx@@ -1,4 +1,4 @@-import { ProfileMenuTrigger } from "@/react/components/header/ProfileMenuTrigger";+import { ProfileMenuTrigger } from "@/components/header/ProfileMenuTrigger";export function HeaderProfileMenuMount({size = "small",diff --git a/frontend/src/react/components/HighlightLabelText.tsx b/frontend/src/components/HighlightLabelText.tsxsimilarity index 100%rename from frontend/src/react/components/HighlightLabelText.tsxrename to frontend/src/components/HighlightLabelText.tsxdiff --git a/frontend/src/react/components/HumanizeTs.test.tsx b/frontend/src/components/HumanizeTs.test.tsxsimilarity index 100%rename from frontend/src/react/components/HumanizeTs.test.tsxrename to frontend/src/components/HumanizeTs.test.tsxdiff --git a/frontend/src/react/components/HumanizeTs.tsx b/frontend/src/components/HumanizeTs.tsxsimilarity index 95%rename from frontend/src/react/components/HumanizeTs.tsxrename to frontend/src/components/HumanizeTs.tsxindex fe053aa90a..ed2dc2b1eb 100644--- a/frontend/src/react/components/HumanizeTs.tsx+++ b/frontend/src/components/HumanizeTs.tsx@@ -1,5 +1,5 @@import { useTranslation } from "react-i18next";-import { Tooltip } from "@/react/components/ui/tooltip";+import { Tooltip } from "@/components/ui/tooltip";import { formatAbsoluteDateTime, formatRelativeTime } from "@/utils";interface HumanizeTsProps {diff --git a/frontend/src/react/components/IAMRemindDialog.tsx b/frontend/src/components/IAMRemindDialog.tsxsimilarity index 93%rename from frontend/src/react/components/IAMRemindDialog.tsxrename to frontend/src/components/IAMRemindDialog.tsxindex 47c93430bb..00b9db13d2 100644--- a/frontend/src/react/components/IAMRemindDialog.tsx+++ b/frontend/src/components/IAMRemindDialog.tsx@@ -1,24 +1,20 @@import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";-import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";import {PROJECT_V1_ROUTE_DATABASES,useCurrentRoute,useNavigate,-} from "@/react/router";-import { useAppStore } from "@/react/stores/app";+} from "@/app/router";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";+import { useAppStore } from "@/stores/app";import {bindingMatchesUser,getBindingExpirationDate,readJson,writeJson,-} from "@/react/stores/app/utils";+} from "@/stores/app/utils";import type { Project } from "@/types/proto-es/v1/project_service_pb";import { displayRoleTitle, formatAbsoluteDateTime } from "@/utils";import { storageKeyIamRemind, workspaceCacheScope } from "@/utils/storage-keys";diff --git a/frontend/src/react/components/InstanceAssignmentSheet.tsx b/frontend/src/components/InstanceAssignmentSheet.tsxsimilarity index 94%rename from frontend/src/react/components/InstanceAssignmentSheet.tsxrename to frontend/src/components/InstanceAssignmentSheet.tsxindex 94c93e840a..1bab9bb29b 100644--- a/frontend/src/react/components/InstanceAssignmentSheet.tsx+++ b/frontend/src/components/InstanceAssignmentSheet.tsx@@ -3,11 +3,11 @@ import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { Check } from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { EnvironmentLabel } from "@/react/components/EnvironmentLabel";-import { LearnMoreLink } from "@/react/components/LearnMoreLink";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";-import { EllipsisText } from "@/react/components/ui/ellipsis-text";+import { EnvironmentLabel } from "@/components/EnvironmentLabel";+import { LearnMoreLink } from "@/components/LearnMoreLink";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";+import { EllipsisText } from "@/components/ui/ellipsis-text";import {Sheet,SheetBody,@@ -15,14 +15,11 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import {- useServerState,- useSubscriptionState,-} from "@/react/hooks/useAppState";-import { PagedTableFooter } from "@/react/hooks/usePagedData";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/components/ui/sheet";+import { useServerState, useSubscriptionState } from "@/hooks/useAppState";+import { PagedTableFooter } from "@/hooks/usePagedData";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import { isValidInstanceName } from "@/types";import type {Instance,diff --git a/frontend/src/react/components/InstanceRouteShell.tsx b/frontend/src/components/InstanceRouteShell.tsxsimilarity index 90%rename from frontend/src/react/components/InstanceRouteShell.tsxrename to frontend/src/components/InstanceRouteShell.tsxindex b983235ff0..4af285e279 100644--- a/frontend/src/react/components/InstanceRouteShell.tsx+++ b/frontend/src/components/InstanceRouteShell.tsx@@ -1,9 +1,9 @@import { LoaderCircle } from "lucide-react";import { useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import type { ReactRouteShellTargets } from "@/react/dashboard-shell";-import { instanceNamePrefix } from "@/react/lib/resourceName";-import { useAppStore } from "@/react/stores/app";+import type { ReactRouteShellTargets } from "@/app/dashboard-shell";+import { instanceNamePrefix } from "@/lib/resourceName";+import { useAppStore } from "@/stores/app";import { isValidInstanceName } from "@/types/v1/instance";interface InstanceRouteShellProps {diff --git a/frontend/src/react/components/InstanceSelect.tsx b/frontend/src/components/InstanceSelect.tsxsimilarity index 93%rename from frontend/src/react/components/InstanceSelect.tsxrename to frontend/src/components/InstanceSelect.tsxindex f41b565991..67785cf2ca 100644--- a/frontend/src/react/components/InstanceSelect.tsx+++ b/frontend/src/components/InstanceSelect.tsx@@ -1,9 +1,9 @@import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { EngineIcon } from "@/react/components/EngineIcon";-import { EnvironmentLabel } from "@/react/components/EnvironmentLabel";-import { Combobox } from "@/react/components/ui/combobox";-import { useAppStore } from "@/react/stores/app";+import { EngineIcon } from "@/components/EngineIcon";+import { EnvironmentLabel } from "@/components/EnvironmentLabel";+import { Combobox } from "@/components/ui/combobox";+import { useAppStore } from "@/stores/app";import type { Engine } from "@/types/proto-es/v1/common_pb";import type { Instance } from "@/types/proto-es/v1/instance_service_pb";import { extractInstanceResourceName, getDefaultPagination } from "@/utils";diff --git a/frontend/src/react/components/IssueLabelSelect.tsx b/frontend/src/components/IssueLabelSelect.tsxsimilarity index 95%rename from frontend/src/react/components/IssueLabelSelect.tsxrename to frontend/src/components/IssueLabelSelect.tsxindex 27f997573e..e5870ff9dd 100644--- a/frontend/src/react/components/IssueLabelSelect.tsx+++ b/frontend/src/components/IssueLabelSelect.tsx@@ -1,10 +1,10 @@import { ChevronDown, X } from "lucide-react";import { useCallback, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { Checkbox } from "@/react/components/ui/checkbox";-import { LAYER_SURFACE_CLASS } from "@/react/components/ui/layer";-import { useClickOutside } from "@/react/hooks/useClickOutside";-import { cn } from "@/react/lib/utils";+import { Checkbox } from "@/components/ui/checkbox";+import { LAYER_SURFACE_CLASS } from "@/components/ui/layer";+import { useClickOutside } from "@/hooks/useClickOutside";+import { cn } from "@/lib/utils";import type { Color } from "@/types/proto-es/google/type/color_pb";import { colorToHex } from "@/utils";diff --git a/frontend/src/react/components/IssueTable.test.tsx b/frontend/src/components/IssueTable.test.tsxsimilarity index 97%rename from frontend/src/react/components/IssueTable.test.tsxrename to frontend/src/components/IssueTable.test.tsxindex cedbd1547b..5f46264b68 100644--- a/frontend/src/react/components/IssueTable.test.tsx+++ b/frontend/src/components/IssueTable.test.tsx@@ -8,7 +8,7 @@ import {import { emptySearchParams } from "./AdvancedSearch";import { IssueListItem, IssueSearchBar, PresetButtons } from "./IssueTable";-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useCurrentUser: () => ({ email: "[email protected]" }),}));@@ -22,7 +22,7 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/components/TimeRangePicker", () => ({+vi.mock("@/components/TimeRangePicker", () => ({TimeRangePicker: () => <div data-testid="time-range-picker" />,}));diff --git a/frontend/src/react/components/IssueTable.tsx b/frontend/src/components/IssueTable.tsxsimilarity index 96%rename from frontend/src/react/components/IssueTable.tsxrename to frontend/src/components/IssueTable.tsxindex 3b2b1a32d5..d409adfd13 100644--- a/frontend/src/react/components/IssueTable.tsx+++ b/frontend/src/components/IssueTable.tsx@@ -2,28 +2,33 @@ import { create } from "@bufbuild/protobuf";import { ArrowUpDown, Check, Loader2 } from "lucide-react";import { memo, useCallback, useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { issueServiceClientConnect } from "@/connect";+import { issueServiceClientConnect } from "@/api";+import { router } from "@/app/router";+import {+ PROJECT_V1_ROUTE_DETAIL,+ WORKSPACE_ROUTE_USER_PROFILE,+} from "@/app/router/handles";import {AdvancedSearch,type ScopeOption,type SearchParams,type ValueOption,-} from "@/react/components/AdvancedSearch";-import { HighlightLabelText } from "@/react/components/HighlightLabelText";-import { HumanizeTs } from "@/react/components/HumanizeTs";-import { RouterLink } from "@/react/components/RouterLink";-import { SelectionActionBar } from "@/react/components/SelectionActionBar";-import { TimeRangePicker } from "@/react/components/TimeRangePicker";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";+} from "@/components/AdvancedSearch";+import { HighlightLabelText } from "@/components/HighlightLabelText";+import { HumanizeTs } from "@/components/HumanizeTs";+import { RouterLink } from "@/components/RouterLink";+import { SelectionActionBar } from "@/components/SelectionActionBar";+import { TimeRangePicker } from "@/components/TimeRangePicker";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuLabel,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";-import { EllipsisText } from "@/react/components/ui/ellipsis-text";+} from "@/components/ui/dropdown-menu";+import { EllipsisText } from "@/components/ui/ellipsis-text";import {Sheet,SheetBody,@@ -31,20 +36,15 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { Tabs, TabsList, TabsTrigger } from "@/react/components/ui/tabs";-import { Tooltip } from "@/react/components/ui/tooltip";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { useEscapeKey } from "@/react/hooks/useEscapeKey";-import { displayRoleTitleFromList } from "@/react/lib/role";-import { cn } from "@/react/lib/utils";-import { router } from "@/react/router";-import {- PROJECT_V1_ROUTE_DETAIL,- WORKSPACE_ROUTE_USER_PROFILE,-} from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/components/ui/sheet";+import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";+import { Tooltip } from "@/components/ui/tooltip";+import { useCurrentUser } from "@/hooks/useAppState";+import { useEscapeKey } from "@/hooks/useEscapeKey";+import { displayRoleTitleFromList } from "@/lib/role";+import { cn } from "@/lib/utils";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import {getTimeForPbTimestampProtoEs,isValidProjectName,diff --git a/frontend/src/react/components/IssuesRouteShell.tsx b/frontend/src/components/IssuesRouteShell.tsxsimilarity index 86%rename from frontend/src/react/components/IssuesRouteShell.tsxrename to frontend/src/components/IssuesRouteShell.tsxindex c12762e9db..db5cb3a17f 100644--- a/frontend/src/react/components/IssuesRouteShell.tsx+++ b/frontend/src/components/IssuesRouteShell.tsx@@ -1,9 +1,9 @@import { useCallback } from "react";-import { DashboardBodyShell } from "@/react/components/DashboardBodyShell";import type {DashboardShellTargets,ReactRouteShellTargets,-} from "@/react/dashboard-shell";+} from "@/app/dashboard-shell";+import { DashboardBodyShell } from "@/components/DashboardBodyShell";interface IssuesRouteShellProps {routeKey?: string;diff --git a/frontend/src/react/components/LabelListEditor.tsx b/frontend/src/components/LabelListEditor.tsxsimilarity index 98%rename from frontend/src/react/components/LabelListEditor.tsxrename to frontend/src/components/LabelListEditor.tsxindex 76678b7d05..185fc8284d 100644--- a/frontend/src/react/components/LabelListEditor.tsx+++ b/frontend/src/components/LabelListEditor.tsx@@ -1,8 +1,8 @@import { Plus, Trash2 } from "lucide-react";import { useEffect, useMemo } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { Input } from "@/react/components/ui/input";+import { Button } from "@/components/ui/button";+import { Input } from "@/components/ui/input";import { MAX_LABEL_VALUE_LENGTH } from "@/utils";export interface LabelListEditorItem {diff --git a/frontend/src/react/components/LabelsDisplay.tsx b/frontend/src/components/LabelsDisplay.tsxsimilarity index 100%rename from frontend/src/react/components/LabelsDisplay.tsxrename to frontend/src/components/LabelsDisplay.tsxdiff --git a/frontend/src/react/components/LearnMoreLink.tsx b/frontend/src/components/LearnMoreLink.tsxsimilarity index 93%rename from frontend/src/react/components/LearnMoreLink.tsxrename to frontend/src/components/LearnMoreLink.tsxindex 42907f9cf4..299b1bb00c 100644--- a/frontend/src/react/components/LearnMoreLink.tsx+++ b/frontend/src/components/LearnMoreLink.tsx@@ -1,6 +1,6 @@import { ExternalLink } from "lucide-react";import { useTranslation } from "react-i18next";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";interface LearnMoreLinkProps {href: string;diff --git a/frontend/src/react/components/MarkdownEditor/MarkdownEditor.test.tsx b/frontend/src/components/MarkdownEditor/MarkdownEditor.test.tsxsimilarity index 100%rename from frontend/src/react/components/MarkdownEditor/MarkdownEditor.test.tsxrename to frontend/src/components/MarkdownEditor/MarkdownEditor.test.tsxdiff --git a/frontend/src/react/components/MarkdownEditor/MarkdownEditor.tsx b/frontend/src/components/MarkdownEditor/MarkdownEditor.tsxsimilarity index 98%rename from frontend/src/react/components/MarkdownEditor/MarkdownEditor.tsxrename to frontend/src/components/MarkdownEditor/MarkdownEditor.tsxindex ea45d89928..765c81f7db 100644--- a/frontend/src/react/components/MarkdownEditor/MarkdownEditor.tsx+++ b/frontend/src/components/MarkdownEditor/MarkdownEditor.tsx@@ -3,8 +3,8 @@ import { Bold, Code2, Hash, Heading1, Link2 } from "lucide-react";import MarkdownIt from "markdown-it";import { type ReactNode, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { Textarea } from "@/react/components/ui/textarea";-import { cn } from "@/react/lib/utils";+import { Textarea } from "@/components/ui/textarea";+import { cn } from "@/lib/utils";const markdown = new MarkdownIt({html: true,diff --git a/frontend/src/react/components/MarkdownEditor/index.ts b/frontend/src/components/MarkdownEditor/index.tssimilarity index 100%rename from frontend/src/react/components/MarkdownEditor/index.tsrename to frontend/src/components/MarkdownEditor/index.tsdiff --git a/frontend/src/react/components/MatchedDatabaseView.test.tsx b/frontend/src/components/MatchedDatabaseView.test.tsxsimilarity index 97%rename from frontend/src/react/components/MatchedDatabaseView.test.tsxrename to frontend/src/components/MatchedDatabaseView.test.tsxindex 28b04b40ac..498fa090e3 100644--- a/frontend/src/react/components/MatchedDatabaseView.test.tsx+++ b/frontend/src/components/MatchedDatabaseView.test.tsx@@ -23,11 +23,11 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/plugins/cel", () => ({+vi.mock("@/modules/cel", () => ({validateSimpleExpr: () => true,}));-vi.mock("@/react/components/EngineIcon", () => ({+vi.mock("@/components/EngineIcon", () => ({EngineIcon: ({className,engine,@@ -41,12 +41,12 @@ vi.mock("@/react/components/EngineIcon", () => ({),}));-vi.mock("@/react/lib/utils", () => ({+vi.mock("@/lib/utils", () => ({cn: (...classes: Array<string | false | null | undefined>) =>classes.filter(Boolean).join(" "),}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const getState = () => ({batchGetOrFetchDatabases: mocks.batchGetOrFetchDatabases,databasesByName: mocks.databasesByName,diff --git a/frontend/src/react/components/MatchedDatabaseView.tsx b/frontend/src/components/MatchedDatabaseView.tsxsimilarity index 98%rename from frontend/src/react/components/MatchedDatabaseView.tsxrename to frontend/src/components/MatchedDatabaseView.tsxindex 90a5f793b8..8a51640901 100644--- a/frontend/src/react/components/MatchedDatabaseView.tsx+++ b/frontend/src/components/MatchedDatabaseView.tsx@@ -1,10 +1,10 @@import { ChevronRight } from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import type { ConditionGroupExpr } from "@/plugins/cel";-import { validateSimpleExpr } from "@/plugins/cel";-import { DatabaseTargetDisplay } from "@/react/components/DatabaseTargetDisplay";-import { useAppStore } from "@/react/stores/app";+import { DatabaseTargetDisplay } from "@/components/DatabaseTargetDisplay";+import type { ConditionGroupExpr } from "@/modules/cel";+import { validateSimpleExpr } from "@/modules/cel";+import { useAppStore } from "@/stores/app";import { DEBOUNCE_SEARCH_DELAY, isValidDatabaseName } from "@/types";import type { Database } from "@/types/proto-es/v1/database_service_pb";import { getDefaultPagination } from "@/utils";diff --git a/frontend/src/react/components/MaxRowCountSelect.test.tsx b/frontend/src/components/MaxRowCountSelect.test.tsxsimilarity index 99%rename from frontend/src/react/components/MaxRowCountSelect.test.tsxrename to frontend/src/components/MaxRowCountSelect.test.tsxindex efbcc09dc9..59e6638626 100644--- a/frontend/src/react/components/MaxRowCountSelect.test.tsx+++ b/frontend/src/components/MaxRowCountSelect.test.tsx@@ -41,7 +41,7 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/react/components/ui/popover", () => ({+vi.mock("@/components/ui/popover", () => ({Popover: mocks.Popover,PopoverTrigger: mocks.PopoverTrigger,PopoverContent: mocks.PopoverContent,diff --git a/frontend/src/react/components/MaxRowCountSelect.tsx b/frontend/src/components/MaxRowCountSelect.tsxsimilarity index 95%rename from frontend/src/react/components/MaxRowCountSelect.tsxrename to frontend/src/components/MaxRowCountSelect.tsxindex e92e89b325..d0181de660 100644--- a/frontend/src/react/components/MaxRowCountSelect.tsx+++ b/frontend/src/components/MaxRowCountSelect.tsx@@ -2,13 +2,13 @@ import { first, last } from "lodash-es";import { ChevronRight } from "lucide-react";import { useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";+import { Button } from "@/components/ui/button";import {Popover,PopoverContent,PopoverTrigger,-} from "@/react/components/ui/popover";-import { cn } from "@/react/lib/utils";+} from "@/components/ui/popover";+import { cn } from "@/lib/utils";import { minmax } from "@/utils";type MaxRowCountSelectProps = {diff --git a/frontend/src/react/components/PermissionGuard.test.tsx b/frontend/src/components/PermissionGuard.test.tsxsimilarity index 98%rename from frontend/src/react/components/PermissionGuard.test.tsxrename to frontend/src/components/PermissionGuard.test.tsxindex e3e116246d..f7cf8f19ab 100644--- a/frontend/src/react/components/PermissionGuard.test.tsx+++ b/frontend/src/components/PermissionGuard.test.tsx@@ -23,7 +23,7 @@ vi.mock(() => ({}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: (selector: (state: {currentUser: { name: string };@@ -59,7 +59,7 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: ({ children }: { children: ReactNode }) => <>{children}</>,BlockTooltip: ({ children }: { children: ReactNode }) => <>{children}</>,}));diff --git a/frontend/src/react/components/PermissionGuard.tsx b/frontend/src/components/PermissionGuard.tsxsimilarity index 97%rename from frontend/src/react/components/PermissionGuard.tsxrename to frontend/src/components/PermissionGuard.tsxindex b876e8dc24..648ecee77c 100644--- a/frontend/src/react/components/PermissionGuard.tsx+++ b/frontend/src/components/PermissionGuard.tsx@@ -1,6 +1,6 @@import type { ReactNode } from "react";import { useTranslation } from "react-i18next";-import { useComponentPermissionState } from "@/react/components/ComponentPermissionGuard";+import { useComponentPermissionState } from "@/components/ComponentPermissionGuard";import type { Permission } from "@/types";import type { Project } from "@/types/proto-es/v1/project_service_pb";import { BlockTooltip, Tooltip } from "./ui/tooltip";diff --git a/frontend/src/react/components/ProjectLabel.test.tsx b/frontend/src/components/ProjectLabel.test.tsxsimilarity index 98%rename from frontend/src/react/components/ProjectLabel.test.tsxrename to frontend/src/components/ProjectLabel.test.tsxindex bed5379afc..fa8de5e6c7 100644--- a/frontend/src/react/components/ProjectLabel.test.tsx+++ b/frontend/src/components/ProjectLabel.test.tsx@@ -19,7 +19,7 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/components/RouterLink", () => ({+vi.mock("@/components/RouterLink", () => ({RouterLink: ({children,className,@@ -42,11 +42,11 @@ vi.mock("@/react/components/RouterLink", () => ({),}));-vi.mock("@/react/hooks/useProjectByName", () => ({+vi.mock("@/hooks/useProjectByName", () => ({useProjectByName: mocks.useProjectByName,}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: {getState: () => ({getOrFetchProjectByName: mocks.getOrFetchProjectByName,diff --git a/frontend/src/react/components/ProjectLabel.tsx b/frontend/src/components/ProjectLabel.tsxsimilarity index 88%rename from frontend/src/react/components/ProjectLabel.tsxrename to frontend/src/components/ProjectLabel.tsxindex 5203b247bd..376d679e1b 100644--- a/frontend/src/react/components/ProjectLabel.tsx+++ b/frontend/src/components/ProjectLabel.tsx@@ -1,13 +1,10 @@import { type MouseEventHandler, type ReactNode, useEffect } from "react";import { useTranslation } from "react-i18next";-import {- RouterLink,- type RouterLinkProps,-} from "@/react/components/RouterLink";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { cn } from "@/react/lib/utils";-import { PROJECT_V1_ROUTE_DETAIL } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";+import { PROJECT_V1_ROUTE_DETAIL } from "@/app/router/handles";+import { RouterLink, type RouterLinkProps } from "@/components/RouterLink";+import { useProjectByName } from "@/hooks/useProjectByName";+import { cn } from "@/lib/utils";+import { useAppStore } from "@/stores/app";import { isDefaultProject, isValidProjectName } from "@/types/v1/project";import { extractProjectResourceName, hasWorkspacePermissionV2 } from "@/utils";diff --git a/frontend/src/react/components/ProjectPageLayout.tsx b/frontend/src/components/ProjectPageLayout.tsxsimilarity index 98%rename from frontend/src/react/components/ProjectPageLayout.tsxrename to frontend/src/components/ProjectPageLayout.tsxindex afd6b94057..bbc3aba2dd 100644--- a/frontend/src/react/components/ProjectPageLayout.tsx+++ b/frontend/src/components/ProjectPageLayout.tsx@@ -1,6 +1,6 @@import * as stylex from "@stylexjs/stylex";import type { ComponentProps } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";import { Alert, type AlertProps } from "./ui/alert";const styles = stylex.create({diff --git a/frontend/src/react/components/ProjectRouteShell.tsx b/frontend/src/components/ProjectRouteShell.tsxsimilarity index 91%rename from frontend/src/react/components/ProjectRouteShell.tsxrename to frontend/src/components/ProjectRouteShell.tsxindex 8d3ed9f521..8201fe9ccd 100644--- a/frontend/src/react/components/ProjectRouteShell.tsx+++ b/frontend/src/components/ProjectRouteShell.tsx@@ -1,18 +1,18 @@import { LoaderCircle } from "lucide-react";import { useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { IAMRemindDialog } from "@/react/components/IAMRemindDialog";-import { RoutePermissionGuardShell } from "@/react/components/RoutePermissionGuardShell";-import { Alert } from "@/react/components/ui/alert";-import type { ReactRouteShellTargets } from "@/react/dashboard-shell";-import { useNotify } from "@/react/hooks/useAppState";+import type { ReactRouteShellTargets } from "@/app/dashboard-shell";import {PROJECT_V1_ROUTE_DETAIL,useCurrentRoute,useNavigate,WORKSPACE_ROUTE_LANDING,-} from "@/react/router";-import { projectResourceNameFromId, useAppStore } from "@/react/stores/app";+} from "@/app/router";+import { IAMRemindDialog } from "@/components/IAMRemindDialog";+import { RoutePermissionGuardShell } from "@/components/RoutePermissionGuardShell";+import { Alert } from "@/components/ui/alert";+import { useNotify } from "@/hooks/useAppState";+import { projectResourceNameFromId, useAppStore } from "@/stores/app";import { State } from "@/types/proto-es/v1/common_pb";import { setDocumentTitle } from "@/utils";diff --git a/frontend/src/react/components/ProjectSelect.tsx b/frontend/src/components/ProjectSelect.tsxsimilarity index 97%rename from frontend/src/react/components/ProjectSelect.tsxrename to frontend/src/components/ProjectSelect.tsxindex d2156a5a65..1d6380ed76 100644--- a/frontend/src/react/components/ProjectSelect.tsx+++ b/frontend/src/components/ProjectSelect.tsx@@ -1,8 +1,8 @@import type { ReactNode } from "react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { Combobox } from "@/react/components/ui/combobox";-import { useAppStore } from "@/react/stores/app";+import { Combobox } from "@/components/ui/combobox";+import { useAppStore } from "@/stores/app";import { isValidProjectName } from "@/types";import type { Project } from "@/types/proto-es/v1/project_service_pb";import { extractProjectResourceName, getDefaultPagination } from "@/utils";diff --git a/frontend/src/react/components/ProjectSidebar.test.tsx b/frontend/src/components/ProjectSidebar.test.tsxsimilarity index 96%rename from frontend/src/react/components/ProjectSidebar.test.tsxrename to frontend/src/components/ProjectSidebar.test.tsxindex 1efad758ad..d76ffc41f2 100644--- a/frontend/src/react/components/ProjectSidebar.test.tsx+++ b/frontend/src/components/ProjectSidebar.test.tsx@@ -69,17 +69,17 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useWorkspace: () => mocks.workspace,}));-vi.mock("@/react/hooks/useRecentVisit", () => ({+vi.mock("@/hooks/useRecentVisit", () => ({useRecentVisit: () => ({record: mocks.record,}),}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({router: {push: mocks.push,resolve: mocks.resolve,@@ -87,7 +87,7 @@ vi.mock("@/react/router", () => ({useCurrentRoute: () => mocks.currentRoute,}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const useAppStore = (selector: (state: {getOrFetchProjectByName: typeof mocks.getOrFetchProjectByName;diff --git a/frontend/src/react/components/ProjectSidebar.tsx b/frontend/src/components/ProjectSidebar.tsxsimilarity index 97%rename from frontend/src/react/components/ProjectSidebar.tsxrename to frontend/src/components/ProjectSidebar.tsxindex 0433c0bb88..945bd345d5 100644--- a/frontend/src/react/components/ProjectSidebar.tsx+++ b/frontend/src/components/ProjectSidebar.tsx@@ -11,11 +11,7 @@ import {import type { ElementType } from "react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import logoFull from "@/assets/logo-full.svg";-import { RouterLink } from "@/react/components/RouterLink";-import { useWorkspace } from "@/react/hooks/useAppState";-import { useRecentVisit } from "@/react/hooks/useRecentVisit";-import { router, useCurrentRoute } from "@/react/router";+import { router, useCurrentRoute } from "@/app/router";import {PROJECT_V1_ROUTE_ACCESS_GRANTS,PROJECT_V1_ROUTE_AUDIT_LOGS,@@ -33,9 +29,13 @@ import {PROJECT_V1_ROUTE_SYNC_SCHEMA,PROJECT_V1_ROUTE_WEBHOOKS,PROJECT_V1_ROUTE_WORKLOAD_IDENTITIES,-} from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { projectNamePrefix } from "@/store/modules/v1/common";+} from "@/app/router/handles";+import logoFull from "@/assets/logo-full.svg";+import { RouterLink } from "@/components/RouterLink";+import { useWorkspace } from "@/hooks/useAppState";+import { useRecentVisit } from "@/hooks/useRecentVisit";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";// ---------------------------------------------------------------------------// Typesdiff --git a/frontend/src/react/components/ProjectTable.test.tsx b/frontend/src/components/ProjectTable.test.tsxsimilarity index 97%rename from frontend/src/react/components/ProjectTable.test.tsxrename to frontend/src/components/ProjectTable.test.tsxindex 05e98f23a7..04c8ddb116 100644--- a/frontend/src/react/components/ProjectTable.test.tsx+++ b/frontend/src/components/ProjectTable.test.tsx@@ -15,13 +15,13 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/components/ui/ellipsis-text", () => ({+vi.mock("@/components/ui/ellipsis-text", () => ({EllipsisText: ({ children }: { children: React.ReactNode }) => (<span>{children}</span>),}));-vi.mock("@/react/components/ProjectLabel", () => ({+vi.mock("@/components/ProjectLabel", () => ({ProjectLabel: ({children,className,diff --git a/frontend/src/react/components/ProjectTable.tsx b/frontend/src/components/ProjectTable.tsxsimilarity index 96%rename from frontend/src/react/components/ProjectTable.tsxrename to frontend/src/components/ProjectTable.tsxindex 0b3789eaa8..e95d0d3d4f 100644--- a/frontend/src/react/components/ProjectTable.tsx+++ b/frontend/src/components/ProjectTable.tsx@@ -2,11 +2,11 @@ import { Check } from "lucide-react";import type { MouseEvent as ReactMouseEvent, ReactNode } from "react";import { memo, useCallback, useMemo, useRef } from "react";import { useTranslation } from "react-i18next";-import { HighlightLabelText } from "@/react/components/HighlightLabelText";-import { ProjectLabel } from "@/react/components/ProjectLabel";-import { Badge } from "@/react/components/ui/badge";-import { Checkbox } from "@/react/components/ui/checkbox";-import { EllipsisText } from "@/react/components/ui/ellipsis-text";+import { HighlightLabelText } from "@/components/HighlightLabelText";+import { ProjectLabel } from "@/components/ProjectLabel";+import { Badge } from "@/components/ui/badge";+import { Checkbox } from "@/components/ui/checkbox";+import { EllipsisText } from "@/components/ui/ellipsis-text";import {Table,TableBody,@@ -14,10 +14,10 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { Tooltip } from "@/react/components/ui/tooltip";-import { getProjectName } from "@/react/lib/resourceName";-import { cn } from "@/react/lib/utils";+} from "@/components/ui/table";+import { Tooltip } from "@/components/ui/tooltip";+import { getProjectName } from "@/lib/resourceName";+import { cn } from "@/lib/utils";import { State } from "@/types/proto-es/v1/common_pb";import type { Project } from "@/types/proto-es/v1/project_service_pb";diff --git a/frontend/src/react/components/Quickstart.test.tsx b/frontend/src/components/Quickstart.test.tsxsimilarity index 96%rename from frontend/src/react/components/Quickstart.test.tsxrename to frontend/src/components/Quickstart.test.tsxindex 0c28e95c7c..736c4bd060 100644--- a/frontend/src/react/components/Quickstart.test.tsx+++ b/frontend/src/components/Quickstart.test.tsx@@ -24,7 +24,7 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/components/RouterLink", () => ({+vi.mock("@/components/RouterLink", () => ({RouterLink: ({children,to,@@ -39,7 +39,7 @@ vi.mock("@/react/components/RouterLink", () => ({),}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const state = {quickStartEnabled: () => true,getIntroStateByKey: mocks.getIntroStateByKey,@@ -57,7 +57,7 @@ vi.mock("@/react/stores/app", () => {return { useAppStore };});-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: vi.fn(),}));diff --git a/frontend/src/react/components/Quickstart.tsx b/frontend/src/components/Quickstart.tsxsimilarity index 97%rename from frontend/src/react/components/Quickstart.tsxrename to frontend/src/components/Quickstart.tsxindex aeea161e50..748a2818bf 100644--- a/frontend/src/react/components/Quickstart.tsx+++ b/frontend/src/components/Quickstart.tsx@@ -1,9 +1,7 @@import { CheckCircle, X } from "lucide-react";import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { RouterLink } from "@/react/components/RouterLink";-import { cn } from "@/react/lib/utils";-import type { RouteTarget } from "@/react/router";+import type { RouteTarget } from "@/app/router";import {DATABASE_ROUTE_DASHBOARD,ENVIRONMENT_V1_ROUTE_DASHBOARD,@@ -12,10 +10,12 @@ import {PROJECT_V1_ROUTE_ISSUE_DETAIL,SQL_EDITOR_WORKSHEET_MODULE,WORKSPACE_ROUTE_MEMBERS,-} from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";-import { projectNamePrefix } from "@/store/modules/v1/common";+} from "@/app/router/handles";+import { RouterLink } from "@/components/RouterLink";+import { cn } from "@/lib/utils";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";import type { Permission } from "@/types";import { isValidProjectName, UNKNOWN_PROJECT_NAME } from "@/types";import type { Project } from "@/types/proto-es/v1/project_service_pb";diff --git a/frontend/src/react/components/ResourceIdField.tsx b/frontend/src/components/ResourceIdField.tsxsimilarity index 98%rename from frontend/src/react/components/ResourceIdField.tsxrename to frontend/src/components/ResourceIdField.tsxindex c62a2da958..6a84951038 100644--- a/frontend/src/react/components/ResourceIdField.tsx+++ b/frontend/src/components/ResourceIdField.tsx@@ -7,8 +7,8 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";-import { CopyButton } from "@/react/components/ui/copy-button";-import { Input } from "@/react/components/ui/input";+import { CopyButton } from "@/components/ui/copy-button";+import { Input } from "@/components/ui/input";import type { ValidatedMessage } from "@/types";import { randomString } from "@/utils";diff --git a/frontend/src/react/components/RoleSelect.tsx b/frontend/src/components/RoleSelect.tsxsimilarity index 94%rename from frontend/src/react/components/RoleSelect.tsxrename to frontend/src/components/RoleSelect.tsxindex 208d5a3173..3400d770c4 100644--- a/frontend/src/react/components/RoleSelect.tsx+++ b/frontend/src/components/RoleSelect.tsx@@ -1,12 +1,12 @@import { useMemo } from "react";import { useTranslation } from "react-i18next";-import { FeatureBadge } from "@/react/components/FeatureBadge";-import { Combobox, type ComboboxGroup } from "@/react/components/ui/combobox";+import { FeatureBadge } from "@/components/FeatureBadge";+import { Combobox, type ComboboxGroup } from "@/components/ui/combobox";import {displayRoleDescriptionFromList,displayRoleTitleFromList,-} from "@/react/lib/role";-import { useAppStore } from "@/react/stores/app";+} from "@/lib/role";+import { useAppStore } from "@/stores/app";import {PRESET_PROJECT_ROLES,PRESET_ROLES,diff --git a/frontend/src/react/components/RoutePermissionGuardShell.test.tsx b/frontend/src/components/RoutePermissionGuardShell.test.tsxsimilarity index 98%rename from frontend/src/react/components/RoutePermissionGuardShell.test.tsxrename to frontend/src/components/RoutePermissionGuardShell.test.tsxindex 4976687ab3..c63c15089c 100644--- a/frontend/src/react/components/RoutePermissionGuardShell.test.tsx+++ b/frontend/src/components/RoutePermissionGuardShell.test.tsx@@ -23,19 +23,19 @@ const mocks = vi.hoisted(() => ({loadSubscription: vi.fn(async () => undefined),}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({useCurrentRoute: () => mocks.route,}));-vi.mock("@/react/components/FeatureBadge", () => ({+vi.mock("@/components/FeatureBadge", () => ({FeatureBadge: () => <span data-testid="feature-badge" />,}));-vi.mock("@/react/pages/settings/RequestRoleSheet", () => ({+vi.mock("@/modules/access-control/RequestRoleSheet", () => ({RequestRoleSheet: () => <div data-testid="request-role-sheet" />,}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: (selector: (state: {currentUser: { name: string };diff --git a/frontend/src/react/components/RoutePermissionGuardShell.tsx b/frontend/src/components/RoutePermissionGuardShell.tsxsimilarity index 94%rename from frontend/src/react/components/RoutePermissionGuardShell.tsxrename to frontend/src/components/RoutePermissionGuardShell.tsxindex 828142eb7a..2f255ea025 100644--- a/frontend/src/react/components/RoutePermissionGuardShell.tsx+++ b/frontend/src/components/RoutePermissionGuardShell.tsx@@ -1,10 +1,10 @@import { useEffect, useRef } from "react";+import { useCurrentRoute } from "@/app/router";import {PermissionDeniedFallback,useComponentPermissionState,usePermissionDataReady,-} from "@/react/components/ComponentPermissionGuard";-import { useCurrentRoute } from "@/react/router";+} from "@/components/ComponentPermissionGuard";import type { Project } from "@/types/proto-es/v1/project_service_pb";export interface RoutePermissionGuardShellProps {diff --git a/frontend/src/react/components/RouterLink.test.tsx b/frontend/src/components/RouterLink.test.tsxsimilarity index 98%rename from frontend/src/react/components/RouterLink.test.tsxrename to frontend/src/components/RouterLink.test.tsxindex 2faca870e8..47a3e10b3b 100644--- a/frontend/src/react/components/RouterLink.test.tsx+++ b/frontend/src/components/RouterLink.test.tsx@@ -2,7 +2,7 @@ import type { ReactElement, MouseEvent as ReactMouseEvent } from "react";import { act } from "react";import { createRoot } from "react-dom/client";import { beforeEach, describe, expect, test, vi } from "vitest";-import type { RouteTarget } from "@/react/router";+import type { RouteTarget } from "@/app/router";(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }@@ -16,7 +16,7 @@ const mocks = vi.hoisted(() => ({})),}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({router: {push: mocks.push,resolve: mocks.resolve,diff --git a/frontend/src/react/components/RouterLink.tsx b/frontend/src/components/RouterLink.tsxsimilarity index 95%rename from frontend/src/react/components/RouterLink.tsxrename to frontend/src/components/RouterLink.tsxindex 4ec5b3b810..d19c10d92a 100644--- a/frontend/src/react/components/RouterLink.tsx+++ b/frontend/src/components/RouterLink.tsx@@ -1,5 +1,5 @@import type { AnchorHTMLAttributes, MouseEvent, ReactNode } from "react";-import { type RouteTarget, router } from "@/react/router";+import { type RouteTarget, router } from "@/app/router";export type RouterLinkProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>,diff --git a/frontend/src/react/components/SelectionActionBar.test.tsx b/frontend/src/components/SelectionActionBar.test.tsxsimilarity index 100%rename from frontend/src/react/components/SelectionActionBar.test.tsxrename to frontend/src/components/SelectionActionBar.test.tsxdiff --git a/frontend/src/react/components/SelectionActionBar.tsx b/frontend/src/components/SelectionActionBar.tsxsimilarity index 95%rename from frontend/src/react/components/SelectionActionBar.tsxrename to frontend/src/components/SelectionActionBar.tsxindex 4472d7bb44..c9a66c5029 100644--- a/frontend/src/react/components/SelectionActionBar.tsx+++ b/frontend/src/components/SelectionActionBar.tsx@@ -6,18 +6,18 @@ import {useSyncExternalStore,} from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";-import { LAYER_SURFACE_CLASS } from "@/react/components/ui/layer";-import { Separator } from "@/react/components/ui/separator";-import { Tooltip } from "@/react/components/ui/tooltip";-import { cn } from "@/react/lib/utils";+} from "@/components/ui/dropdown-menu";+import { LAYER_SURFACE_CLASS } from "@/components/ui/layer";+import { Separator } from "@/components/ui/separator";+import { Tooltip } from "@/components/ui/tooltip";+import { cn } from "@/lib/utils";export interface SelectionAction {/** Stable key for React reconciliation. */diff --git a/frontend/src/react/components/SettingRouteShell.tsx b/frontend/src/components/SettingRouteShell.tsxsimilarity index 83%rename from frontend/src/react/components/SettingRouteShell.tsxrename to frontend/src/components/SettingRouteShell.tsxindex 653db44345..260f10f546 100644--- a/frontend/src/react/components/SettingRouteShell.tsx+++ b/frontend/src/components/SettingRouteShell.tsx@@ -1,8 +1,8 @@import { useEffect, useMemo, useRef } from "react";import { useTranslation } from "react-i18next";-import type { ReactRouteShellTargets } from "@/react/dashboard-shell";-import { useWorkspacePermission } from "@/react/hooks/useAppState";-import { useCurrentRoute } from "@/react/router";+import type { ReactRouteShellTargets } from "@/app/dashboard-shell";+import { useCurrentRoute } from "@/app/router";+import { useWorkspacePermission } from "@/hooks/useAppState";import { setDocumentTitle } from "@/utils";interface SettingRouteShellProps {diff --git a/frontend/src/react/components/TableSchemaViewer.tsx b/frontend/src/components/TableSchemaViewer.tsxsimilarity index 89%rename from frontend/src/react/components/TableSchemaViewer.tsxrename to frontend/src/components/TableSchemaViewer.tsxindex 853229412c..d1617e1513 100644--- a/frontend/src/react/components/TableSchemaViewer.tsx+++ b/frontend/src/components/TableSchemaViewer.tsx@@ -2,11 +2,11 @@ import { create } from "@bufbuild/protobuf";import { Copy } from "lucide-react";import { useEffect, useState } from "react";import { useTranslation } from "react-i18next";-import { databaseServiceClientConnect } from "@/connect";-import { ReadonlyMonaco } from "@/react/components/monaco/ReadonlyMonaco";-import { Button } from "@/react/components/ui/button";-import { Tooltip } from "@/react/components/ui/tooltip";-import { writeTextToClipboard } from "@/react/lib/clipboard";+import { databaseServiceClientConnect } from "@/api";+import { ReadonlyMonaco } from "@/components/monaco/ReadonlyMonaco";+import { Button } from "@/components/ui/button";+import { Tooltip } from "@/components/ui/tooltip";+import { writeTextToClipboard } from "@/lib/clipboard";import {type Database,type GetSchemaStringRequest_ObjectType,diff --git a/frontend/src/react/components/TaskRunStatusIcon.tsx b/frontend/src/components/TaskRunStatusIcon.tsxsimilarity index 94%rename from frontend/src/react/components/TaskRunStatusIcon.tsxrename to frontend/src/components/TaskRunStatusIcon.tsxindex 1b59f3bcae..e02b62620f 100644--- a/frontend/src/react/components/TaskRunStatusIcon.tsx+++ b/frontend/src/components/TaskRunStatusIcon.tsx@@ -1,4 +1,4 @@-import { TaskStatusIcon } from "@/react/components/TaskStatusIcon";+import { TaskStatusIcon } from "@/components/TaskStatusIcon";import {Task_Status,TaskRun_Status,diff --git a/frontend/src/react/components/TaskStatusIcon.tsx b/frontend/src/components/TaskStatusIcon.tsxsimilarity index 97%rename from frontend/src/react/components/TaskStatusIcon.tsxrename to frontend/src/components/TaskStatusIcon.tsxindex 4181f8ac73..6255a6f34a 100644--- a/frontend/src/react/components/TaskStatusIcon.tsx+++ b/frontend/src/components/TaskStatusIcon.tsx@@ -1,7 +1,7 @@import { Ban, Check, Clock, SkipForward, X } from "lucide-react";import { useTranslation } from "react-i18next";-import { Tooltip } from "@/react/components/ui/tooltip";-import { cn } from "@/react/lib/utils";+import { Tooltip } from "@/components/ui/tooltip";+import { cn } from "@/lib/utils";import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";import { stringifyTaskStatus } from "@/utils";diff --git a/frontend/src/react/components/TimeRangePicker.tsx b/frontend/src/components/TimeRangePicker.tsxsimilarity index 100%rename from frontend/src/react/components/TimeRangePicker.tsxrename to frontend/src/components/TimeRangePicker.tsxdiff --git a/frontend/src/react/components/UserAvatar.tsx b/frontend/src/components/UserAvatar.tsxsimilarity index 96%rename from frontend/src/react/components/UserAvatar.tsxrename to frontend/src/components/UserAvatar.tsxindex 7b78a367c2..2f425b986a 100644--- a/frontend/src/react/components/UserAvatar.tsx+++ b/frontend/src/components/UserAvatar.tsx@@ -1,4 +1,4 @@-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";const AVATAR_COLORS = ["#F59E0B",diff --git a/frontend/src/react/components/UserCell.test.tsx b/frontend/src/components/UserCell.test.tsxsimilarity index 98%rename from frontend/src/react/components/UserCell.test.tsxrename to frontend/src/components/UserCell.test.tsxindex fb8c86e745..38175ee295 100644--- a/frontend/src/react/components/UserCell.test.tsx+++ b/frontend/src/components/UserCell.test.tsx@@ -36,7 +36,7 @@ vi.mock("./RouterLink", () => ({),}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,onClick,diff --git a/frontend/src/react/components/UserCell.tsx b/frontend/src/components/UserCell.tsxsimilarity index 92%rename from frontend/src/react/components/UserCell.tsxrename to frontend/src/components/UserCell.tsxindex d517b56efd..5429e77395 100644--- a/frontend/src/react/components/UserCell.tsx+++ b/frontend/src/components/UserCell.tsx@@ -1,8 +1,8 @@import type { ReactNode } from "react";-import { RouterLink } from "@/react/components/RouterLink";-import { Button } from "@/react/components/ui/button";-import { cn } from "@/react/lib/utils";-import type { RouteTarget } from "@/react/router";+import type { RouteTarget } from "@/app/router";+import { RouterLink } from "@/components/RouterLink";+import { Button } from "@/components/ui/button";+import { cn } from "@/lib/utils";import { UserAvatar } from "./UserAvatar";interface UserCellProps {diff --git a/frontend/src/react/components/UserSelect.tsx b/frontend/src/components/UserSelect.tsxsimilarity index 95%rename from frontend/src/react/components/UserSelect.tsxrename to frontend/src/components/UserSelect.tsxindex 7aaa925bdb..825ba8036c 100644--- a/frontend/src/react/components/UserSelect.tsx+++ b/frontend/src/components/UserSelect.tsx@@ -1,7 +1,7 @@import { useCallback, useEffect, useMemo, useRef, useState } from "react";-import { Combobox, type ComboboxOption } from "@/react/components/ui/combobox";-import { useAppStore } from "@/react/stores/app";-import { userNamePrefix } from "@/store/modules/v1/common";+import { Combobox, type ComboboxOption } from "@/components/ui/combobox";+import { useAppStore } from "@/stores/app";+import { userNamePrefix } from "@/stores/modules/v1/common";import { ALL_USERS_USER_EMAIL } from "@/types";import type { User } from "@/types/proto-es/v1/user_service_pb";import { getDefaultPagination, isValidEmail } from "@/utils";diff --git a/frontend/src/react/components/Watermark.tsx b/frontend/src/components/Watermark.tsxsimilarity index 97%rename from frontend/src/react/components/Watermark.tsxrename to frontend/src/components/Watermark.tsxindex e5f978370d..aaea355895 100644--- a/frontend/src/react/components/Watermark.tsx+++ b/frontend/src/components/Watermark.tsx@@ -6,8 +6,8 @@ import {usePlanFeature,useServerInfo,useWorkspaceProfile,-} from "@/react/hooks/useAppState";-import { extractUserEmail } from "@/store/modules/v1/common";+} from "@/hooks/useAppState";+import { extractUserEmail } from "@/stores/modules/v1/common";import { UNKNOWN_USER_NAME } from "@/types";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { getLayerRoot } from "./ui/layer";diff --git a/frontend/src/react/components/WebhookTypeIcon.tsx b/frontend/src/components/WebhookTypeIcon.tsxsimilarity index 100%rename from frontend/src/react/components/WebhookTypeIcon.tsxrename to frontend/src/components/WebhookTypeIcon.tsxdiff --git a/frontend/src/react/components/WorkspacePageLayout.tsx b/frontend/src/components/WorkspacePageLayout.tsxsimilarity index 98%rename from frontend/src/react/components/WorkspacePageLayout.tsxrename to frontend/src/components/WorkspacePageLayout.tsxindex d818363e5a..38b525bff1 100644--- a/frontend/src/react/components/WorkspacePageLayout.tsx+++ b/frontend/src/components/WorkspacePageLayout.tsx@@ -1,6 +1,6 @@import * as stylex from "@stylexjs/stylex";import type { ComponentProps } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";import { Alert, type AlertProps } from "./ui/alert";const styles = stylex.create({diff --git a/frontend/src/react/components/announcement-theme.ts b/frontend/src/components/announcement-theme.tssimilarity index 100%rename from frontend/src/react/components/announcement-theme.tsrename to frontend/src/components/announcement-theme.tsdiff --git a/frontend/src/react/components/auth/AuthDivider.tsx b/frontend/src/components/auth/AuthDivider.tsxsimilarity index 93%rename from frontend/src/react/components/auth/AuthDivider.tsxrename to frontend/src/components/auth/AuthDivider.tsxindex e0a2727dde..c1d4ad1dd8 100644--- a/frontend/src/react/components/auth/AuthDivider.tsx+++ b/frontend/src/components/auth/AuthDivider.tsx@@ -1,4 +1,4 @@-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";type Props = {readonly className?: string;diff --git a/frontend/src/react/components/auth/AuthFooter.test.tsx b/frontend/src/components/auth/AuthFooter.test.tsxsimilarity index 96%rename from frontend/src/react/components/auth/AuthFooter.test.tsxrename to frontend/src/components/auth/AuthFooter.test.tsxindex ebd10ae0f7..575e2a5ef8 100644--- a/frontend/src/react/components/auth/AuthFooter.test.tsx+++ b/frontend/src/components/auth/AuthFooter.test.tsx@@ -49,12 +49,12 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/i18n", () => ({+vi.mock("@/lib/i18n", () => ({default: { changeLanguage: mocks.changeLanguage },}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {currentRoute: mocks.currentRoute,},diff --git a/frontend/src/react/components/auth/AuthFooter.tsx b/frontend/src/components/auth/AuthFooter.tsxsimilarity index 96%rename from frontend/src/react/components/auth/AuthFooter.tsxrename to frontend/src/components/auth/AuthFooter.tsxindex 7ef68439b5..aacfed08c6 100644--- a/frontend/src/react/components/auth/AuthFooter.tsx+++ b/frontend/src/components/auth/AuthFooter.tsx@@ -1,6 +1,6 @@import { useTranslation } from "react-i18next";-import reactI18n from "@/react/i18n";-import { router } from "@/react/router";+import { router } from "@/app/router";+import reactI18n from "@/lib/i18n";import { emitStorageChangedEvent, setDocumentTitle } from "@/utils";import { STORAGE_KEY_LANGUAGE } from "@/utils/storage-keys";diff --git a/frontend/src/react/components/auth/EmailCodeSigninForm.test.tsx b/frontend/src/components/auth/EmailCodeSigninForm.test.tsxsimilarity index 98%rename from frontend/src/react/components/auth/EmailCodeSigninForm.test.tsxrename to frontend/src/components/auth/EmailCodeSigninForm.test.tsxindex 567ca4c55f..67136c76b5 100644--- a/frontend/src/react/components/auth/EmailCodeSigninForm.test.tsx+++ b/frontend/src/components/auth/EmailCodeSigninForm.test.tsx@@ -15,11 +15,11 @@ const mocks = vi.hoisted(() => ({pushNotification: vi.fn(),}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: mocks.pushNotification,}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: Object.assign(() => ({}), {getState: () => ({sendEmailLoginCode: mocks.sendEmailLoginCode,diff --git a/frontend/src/react/components/auth/EmailCodeSigninForm.tsx b/frontend/src/components/auth/EmailCodeSigninForm.tsxsimilarity index 93%rename from frontend/src/react/components/auth/EmailCodeSigninForm.tsxrename to frontend/src/components/auth/EmailCodeSigninForm.tsxindex 4f2da5c0c5..ac5192582b 100644--- a/frontend/src/react/components/auth/EmailCodeSigninForm.tsx+++ b/frontend/src/components/auth/EmailCodeSigninForm.tsx@@ -1,12 +1,12 @@import { create } from "@bufbuild/protobuf";import { useEffect, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { Input } from "@/react/components/ui/input";-import { OtpInput } from "@/react/components/ui/otp-input";-import { resolveWorkspaceName } from "@/react/lib/workspace";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+import { Button } from "@/components/ui/button";+import { Input } from "@/components/ui/input";+import { OtpInput } from "@/components/ui/otp-input";+import { resolveWorkspaceName } from "@/lib/workspace";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import {type LoginRequest,LoginRequestSchema,diff --git a/frontend/src/react/components/auth/IdpBrandIcon.test.tsx b/frontend/src/components/auth/IdpBrandIcon.test.tsxsimilarity index 100%rename from frontend/src/react/components/auth/IdpBrandIcon.test.tsxrename to frontend/src/components/auth/IdpBrandIcon.test.tsxdiff --git a/frontend/src/react/components/auth/IdpBrandIcon.tsx b/frontend/src/components/auth/IdpBrandIcon.tsxsimilarity index 100%rename from frontend/src/react/components/auth/IdpBrandIcon.tsxrename to frontend/src/components/auth/IdpBrandIcon.tsxdiff --git a/frontend/src/react/components/auth/InactiveRemindModal.tsx b/frontend/src/components/auth/InactiveRemindModal.tsxsimilarity index 94%rename from frontend/src/react/components/auth/InactiveRemindModal.tsxrename to frontend/src/components/auth/InactiveRemindModal.tsxindex 7164d1ab0f..622972dd55 100644--- a/frontend/src/react/components/auth/InactiveRemindModal.tsx+++ b/frontend/src/components/auth/InactiveRemindModal.tsx@@ -1,14 +1,14 @@import { useEffect, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";+import { Button } from "@/components/ui/button";import {Dialog,DialogContent,DialogDescription,DialogTitle,-} from "@/react/components/ui/dialog";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { useAppStore } from "@/react/stores/app";+} from "@/components/ui/dialog";+import { useCurrentUser } from "@/hooks/useAppState";+import { useAppStore } from "@/stores/app";import { storageKeyLastActivity } from "@/utils/storage-keys";const SHOW_THRESHOLD_MIN = 3;diff --git a/frontend/src/react/components/auth/PasswordSigninForm.tsx b/frontend/src/components/auth/PasswordSigninForm.tsxsimilarity index 92%rename from frontend/src/react/components/auth/PasswordSigninForm.tsxrename to frontend/src/components/auth/PasswordSigninForm.tsxindex fde9f4130b..f183b1739e 100644--- a/frontend/src/react/components/auth/PasswordSigninForm.tsx+++ b/frontend/src/components/auth/PasswordSigninForm.tsx@@ -2,12 +2,12 @@ import { create } from "@bufbuild/protobuf";import { Eye, EyeOff } from "lucide-react";import { useEffect, useState } from "react";import { useTranslation } from "react-i18next";-import { RouterLink } from "@/react/components/RouterLink";-import { Button } from "@/react/components/ui/button";-import { Input } from "@/react/components/ui/input";-import { resolveWorkspaceName } from "@/react/lib/workspace";-import { router } from "@/react/router";-import { AUTH_PASSWORD_FORGOT_MODULE } from "@/react/router/handles";+import { router } from "@/app/router";+import { AUTH_PASSWORD_FORGOT_MODULE } from "@/app/router/handles";+import { RouterLink } from "@/components/RouterLink";+import { Button } from "@/components/ui/button";+import { Input } from "@/components/ui/input";+import { resolveWorkspaceName } from "@/lib/workspace";import {type LoginRequest,LoginRequestSchema,diff --git a/frontend/src/react/components/auth/UserPasswordFields.tsx b/frontend/src/components/auth/UserPasswordFields.tsxsimilarity index 97%rename from frontend/src/react/components/auth/UserPasswordFields.tsxrename to frontend/src/components/auth/UserPasswordFields.tsxindex edee8786cd..6b9eee199a 100644--- a/frontend/src/react/components/auth/UserPasswordFields.tsx+++ b/frontend/src/components/auth/UserPasswordFields.tsx@@ -7,9 +7,9 @@ import {} from "lucide-react";import { useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { Input } from "@/react/components/ui/input";-import { Tooltip } from "@/react/components/ui/tooltip";+import { Button } from "@/components/ui/button";+import { Input } from "@/components/ui/input";+import { Tooltip } from "@/components/ui/tooltip";import type { WorkspaceProfileSetting_PasswordRestriction } from "@/types/proto-es/v1/setting_service_pb";import {computePasswordValidation,diff --git a/frontend/src/react/components/auth/userPasswordValidation.ts b/frontend/src/components/auth/userPasswordValidation.tssimilarity index 100%rename from frontend/src/react/components/auth/userPasswordValidation.tsrename to frontend/src/components/auth/userPasswordValidation.tsdiff --git a/frontend/src/react/components/database/CreateDatabaseSheet.test.tsx b/frontend/src/components/database/CreateDatabaseSheet.test.tsxsimilarity index 97%rename from frontend/src/react/components/database/CreateDatabaseSheet.test.tsxrename to frontend/src/components/database/CreateDatabaseSheet.test.tsxindex d4aaa62895..256fe55e99 100644--- a/frontend/src/react/components/database/CreateDatabaseSheet.test.tsx+++ b/frontend/src/components/database/CreateDatabaseSheet.test.tsx@@ -12,7 +12,7 @@ import { Engine } from "@/types/proto-es/v1/common_pb";globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }).IS_REACT_ACT_ENVIRONMENT = true;-vi.mock("@/react/components/InstanceSelect", () => ({+vi.mock("@/components/InstanceSelect", () => ({InstanceSelect: (props: {onChange: (name: string, instance: unknown) => void;portal?: boolean;@@ -27,11 +27,11 @@ vi.mock("@/react/components/InstanceSelect", () => ({}),}));-vi.mock("@/react/components/EnvironmentLabel", () => ({+vi.mock("@/components/EnvironmentLabel", () => ({EnvironmentLabel: () => null,}));-vi.mock("@/react/components/ui/sheet", () => ({+vi.mock("@/components/ui/sheet", () => ({Sheet: ({ children, open }: { children: ReactNode; open: boolean }) =>open ? createElement("div", { "data-testid": "sheet" }, children) : null,SheetContent: ({ children }: { children: ReactNode }) =>@@ -46,7 +46,7 @@ vi.mock("@/react/components/ui/sheet", () => ({createElement("div", {}, children),}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,disabled,@@ -56,7 +56,7 @@ vi.mock("@/react/components/ui/button", () => ({createElement("button", { disabled, onClick }, children),}));-vi.mock("@/react/components/PermissionGuard", () => ({+vi.mock("@/components/PermissionGuard", () => ({PermissionGuard: ({ children }: { children: ReactNode }) => children,usePermissionCheck: (permissions: string[]) => [permissions.every((permission) => mocks.permissions[permission] !== false),@@ -64,12 +64,12 @@ vi.mock("@/react/components/PermissionGuard", () => ({],}));-vi.mock("@/react/components/ui/input", () => ({+vi.mock("@/components/ui/input", () => ({Input: ({ className: _c, ...props }: InputHTMLAttributes<HTMLInputElement>) =>createElement("input", props),}));-vi.mock("@/react/components/ui/combobox", () => ({+vi.mock("@/components/ui/combobox", () => ({Combobox: ({value,onChange,@@ -95,11 +95,11 @@ vi.mock("@/react/components/ui/combobox", () => ({}),}));-vi.mock("@/react/hooks/useClickOutside", () => ({+vi.mock("@/hooks/useClickOutside", () => ({useClickOutside: () => undefined,}));-vi.mock("@/react/lib/utils", () => ({+vi.mock("@/lib/utils", () => ({cn: (...cls: (string | false | null | undefined)[]) =>cls.filter(Boolean).join(" "),}));@@ -134,7 +134,7 @@ const mocks = vi.hoisted(() => ({routerPush: vi.fn(),}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: mocks.pushNotification,}));@@ -176,7 +176,7 @@ const appStoreState = {}>,};-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: Object.assign((selector: (state: typeof appStoreState) => unknown) =>useSyncExternalStore(@@ -193,12 +193,12 @@ vi.mock("@/react/stores/app", () => ({),}));-vi.mock("@/connect", () => ({+vi.mock("@/api", () => ({issueServiceClientConnect: { createIssue: mocks.createIssue },planServiceClientConnect: { createPlan: mocks.createPlan },}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useCurrentUser: () => mocks.currentUser,}));@@ -206,7 +206,7 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({router: { push: mocks.routerPush },}));@@ -230,7 +230,7 @@ vi.mock("@/utils", () => ({normalizeTitle: (s: string) => s.trim(),}));-import { nativeChange } from "@/react/test-utils/nativeChange";+import { nativeChange } from "@/test-utils/nativeChange";import { CreateDatabaseSheet } from "./CreateDatabaseSheet";const TEST_INSTANCE = {diff --git a/frontend/src/react/components/database/CreateDatabaseSheet.tsx b/frontend/src/components/database/CreateDatabaseSheet.tsxsimilarity index 94%rename from frontend/src/react/components/database/CreateDatabaseSheet.tsxrename to frontend/src/components/database/CreateDatabaseSheet.tsxindex a8e9017717..975ea7c176 100644--- a/frontend/src/react/components/database/CreateDatabaseSheet.tsx+++ b/frontend/src/components/database/CreateDatabaseSheet.tsx@@ -2,26 +2,28 @@ import { create } from "@bufbuild/protobuf";import { useCallback, useEffect, useRef, useState } from "react";import { useTranslation } from "react-i18next";import { v4 as uuidv4 } from "uuid";-import { issueServiceClientConnect, planServiceClientConnect } from "@/connect";-import { EnvironmentLabel } from "@/react/components/EnvironmentLabel";-import { InstanceSelect } from "@/react/components/InstanceSelect";-import type { IssueLabel } from "@/react/components/IssueLabelSelect";-import { IssueLabelSelect } from "@/react/components/IssueLabelSelect";+import { issueServiceClientConnect, planServiceClientConnect } from "@/api";+import { router } from "@/app/router";+import { PROJECT_V1_ROUTE_PLAN_DETAIL } from "@/app/router/handles";+import { EnvironmentLabel } from "@/components/EnvironmentLabel";+import { InstanceSelect } from "@/components/InstanceSelect";+import type { IssueLabel } from "@/components/IssueLabelSelect";+import { IssueLabelSelect } from "@/components/IssueLabelSelect";import {PermissionGuard,usePermissionCheck,-} from "@/react/components/PermissionGuard";-import { ProjectSelect } from "@/react/components/ProjectSelect";-import { Alert } from "@/react/components/ui/alert";-import { Button } from "@/react/components/ui/button";-import { Combobox } from "@/react/components/ui/combobox";+} from "@/components/PermissionGuard";+import { ProjectSelect } from "@/components/ProjectSelect";+import { Alert } from "@/components/ui/alert";+import { Button } from "@/components/ui/button";+import { Combobox } from "@/components/ui/combobox";import {FormError,FormField,FormFieldGroup,FormTitle,-} from "@/react/components/ui/form";-import { Input } from "@/react/components/ui/input";+} from "@/components/ui/form";+import { Input } from "@/components/ui/input";import {Sheet,SheetBody,@@ -29,18 +31,16 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { cn } from "@/react/lib/utils";+} from "@/components/ui/sheet";+import { useCurrentUser } from "@/hooks/useAppState";+import { useProjectByName } from "@/hooks/useProjectByName";import {createPlanWithDraftReview,DraftReviewIssueCreationError,-} from "@/react/pages/project/plan-detail/utils/header";-import { router } from "@/react/router";-import { PROJECT_V1_ROUTE_PLAN_DETAIL } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/lib/plan/workflow";+import { cn } from "@/lib/utils";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import {defaultCharsetOfEngineV1,defaultCollationOfEngineV1,diff --git a/frontend/src/react/components/database/CreateDatabaseSheetLayout.test.ts b/frontend/src/components/database/CreateDatabaseSheetLayout.test.tssimilarity index 100%rename from frontend/src/react/components/database/CreateDatabaseSheetLayout.test.tsrename to frontend/src/components/database/CreateDatabaseSheetLayout.test.tsdiff --git a/frontend/src/react/components/database/DatabaseBatchOperationsBar.tsx b/frontend/src/components/database/DatabaseBatchOperationsBar.tsxsimilarity index 98%rename from frontend/src/react/components/database/DatabaseBatchOperationsBar.tsxrename to frontend/src/components/database/DatabaseBatchOperationsBar.tsxindex 9e709c9f79..95d50f12a3 100644--- a/frontend/src/react/components/database/DatabaseBatchOperationsBar.tsx+++ b/frontend/src/components/database/DatabaseBatchOperationsBar.tsx@@ -10,7 +10,7 @@ import { useTranslation } from "react-i18next";import {type SelectionAction,SelectionActionBar,-} from "@/react/components/SelectionActionBar";+} from "@/components/SelectionActionBar";import type { Permission } from "@/types";import type { Database } from "@/types/proto-es/v1/database_service_pb";import type { Project } from "@/types/proto-es/v1/project_service_pb";diff --git a/frontend/src/react/pages/project/database-detail/overview/DatabaseOverviewInfo.tsx b/frontend/src/components/database/DatabaseOverviewInfo.tsxsimilarity index 95%rename from frontend/src/react/pages/project/database-detail/overview/DatabaseOverviewInfo.tsxrename to frontend/src/components/database/DatabaseOverviewInfo.tsxindex de34f0a19e..eb13fbd4ae 100644--- a/frontend/src/react/pages/project/database-detail/overview/DatabaseOverviewInfo.tsx+++ b/frontend/src/components/database/DatabaseOverviewInfo.tsx@@ -1,6 +1,6 @@import { useTranslation } from "react-i18next";-import { HumanizeTs } from "@/react/components/HumanizeTs";-import { useAppDatabaseMetadata } from "@/react/hooks/useAppDatabaseMetadata";+import { HumanizeTs } from "@/components/HumanizeTs";+import { useAppDatabaseMetadata } from "@/hooks/useAppDatabaseMetadata";import { Engine, State } from "@/types/proto-es/v1/common_pb";import {type Database,diff --git a/frontend/src/react/components/database/DatabaseTable.test.tsx b/frontend/src/components/database/DatabaseTable.test.tsxsimilarity index 96%rename from frontend/src/react/components/database/DatabaseTable.test.tsxrename to frontend/src/components/database/DatabaseTable.test.tsxindex ad21718465..e770e35aeb 100644--- a/frontend/src/react/components/database/DatabaseTable.test.tsx+++ b/frontend/src/components/database/DatabaseTable.test.tsx@@ -1,7 +1,7 @@import { act, useMemo, useState } from "react";import { createRoot, type Root } from "react-dom/client";import { afterEach, describe, expect, test, vi } from "vitest";-import type { DatabaseFilter } from "@/react/lib/databaseFilter";+import type { DatabaseFilter } from "@/lib/databaseFilter";import type { Database } from "@/types/proto-es/v1/database_service_pb";import { DatabaseTable } from "./DatabaseTable";@@ -13,7 +13,7 @@ const mocks = vi.hoisted(() => ({fetchDatabases: vi.fn(),}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const state = {fetchDatabases: mocks.fetchDatabases,workspaceResourceName: () => "workspaces/-",@@ -23,7 +23,7 @@ vi.mock("@/react/stores/app", () => {return { useAppStore };});-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({router: {resolve: () => ({ fullPath: "/database" }),push: vi.fn(),@@ -34,12 +34,12 @@ vi.mock("@/utils", () => ({autoDatabaseRoute: () => ({ name: "database" }),}));-vi.mock("@/react/hooks/useSessionPageSize", () => ({+vi.mock("@/hooks/useSessionPageSize", () => ({getPageSizeOptions: () => [50],useSessionPageSize: () => [50, vi.fn()],}));-vi.mock("@/react/hooks/usePagedData", () => ({+vi.mock("@/hooks/usePagedData", () => ({PagedTableFooter: ({hasMore,isFetchingMore,diff --git a/frontend/src/react/components/database/DatabaseTable.tsx b/frontend/src/components/database/DatabaseTable.tsxsimilarity index 94%rename from frontend/src/react/components/database/DatabaseTable.tsxrename to frontend/src/components/database/DatabaseTable.tsxindex 2ccde3d579..623e36b5be 100644--- a/frontend/src/react/components/database/DatabaseTable.tsx+++ b/frontend/src/components/database/DatabaseTable.tsx@@ -1,13 +1,13 @@import { useCallback, useEffect, useMemo, useRef, useState } from "react";-import { PagedTableFooter } from "@/react/hooks/usePagedData";+import { router } from "@/app/router";+import { useScrollRestorationLoadMore } from "@/app/router/NavigationScrollRestoration";+import { PagedTableFooter } from "@/hooks/usePagedData";import {getPageSizeOptions,useSessionPageSize,-} from "@/react/hooks/useSessionPageSize";-import type { DatabaseFilter } from "@/react/lib/databaseFilter";-import { router } from "@/react/router";-import { useScrollRestorationLoadMore } from "@/react/router/NavigationScrollRestoration";-import { useAppStore } from "@/react/stores/app";+} from "@/hooks/useSessionPageSize";+import type { DatabaseFilter } from "@/lib/databaseFilter";+import { useAppStore } from "@/stores/app";import type { Database } from "@/types/proto-es/v1/database_service_pb";import { autoDatabaseRoute } from "@/utils";import {diff --git a/frontend/src/react/components/database/DatabaseTableView.test.tsx b/frontend/src/components/database/DatabaseTableView.test.tsxsimilarity index 98%rename from frontend/src/react/components/database/DatabaseTableView.test.tsxrename to frontend/src/components/database/DatabaseTableView.test.tsxindex 3e13afebdb..40b2f7d56e 100644--- a/frontend/src/react/components/database/DatabaseTableView.test.tsx+++ b/frontend/src/components/database/DatabaseTableView.test.tsx@@ -13,7 +13,7 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useEnvironmentList: () => [],usePlanFeature: () => false,}));diff --git a/frontend/src/react/components/database/DatabaseTableView.tsx b/frontend/src/components/database/DatabaseTableView.tsxsimilarity index 96%rename from frontend/src/react/components/database/DatabaseTableView.tsxrename to frontend/src/components/database/DatabaseTableView.tsxindex dfd480105b..a239ae2b31 100644--- a/frontend/src/react/components/database/DatabaseTableView.tsx+++ b/frontend/src/components/database/DatabaseTableView.tsx@@ -8,12 +8,12 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";-import { EngineIcon } from "@/react/components/EngineIcon";-import { EnvironmentBadge } from "@/react/components/EnvironmentLabel";-import { LabelsDisplay } from "@/react/components/LabelsDisplay";-import { ProjectLabel } from "@/react/components/ProjectLabel";-import { Checkbox } from "@/react/components/ui/checkbox";-import { EllipsisText } from "@/react/components/ui/ellipsis-text";+import { EngineIcon } from "@/components/EngineIcon";+import { EnvironmentBadge } from "@/components/EnvironmentLabel";+import { LabelsDisplay } from "@/components/LabelsDisplay";+import { ProjectLabel } from "@/components/ProjectLabel";+import { Checkbox } from "@/components/ui/checkbox";+import { EllipsisText } from "@/components/ui/ellipsis-text";import {Table,TableBody,@@ -22,10 +22,10 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { useEnvironmentList, usePlanFeature } from "@/react/hooks/useAppState";-import { useColumnWidths } from "@/react/hooks/useColumnWidths";-import { cn } from "@/react/lib/utils";+} from "@/components/ui/table";+import { useEnvironmentList, usePlanFeature } from "@/hooks/useAppState";+import { useColumnWidths } from "@/hooks/useColumnWidths";+import { cn } from "@/lib/utils";import type { Environment } from "@/types";import {isValidEnvironmentName,diff --git a/frontend/src/react/components/database/LabelEditorSheet.tsx b/frontend/src/components/database/LabelEditorSheet.tsxsimilarity index 96%rename from frontend/src/react/components/database/LabelEditorSheet.tsxrename to frontend/src/components/database/LabelEditorSheet.tsxindex ab6a8fad93..9ec374d3cd 100644--- a/frontend/src/react/components/database/LabelEditorSheet.tsx+++ b/frontend/src/components/database/LabelEditorSheet.tsx@@ -1,9 +1,9 @@import { Plus, X } from "lucide-react";import { useEffect, useState } from "react";import { useTranslation } from "react-i18next";-import { Alert } from "@/react/components/ui/alert";-import { Button } from "@/react/components/ui/button";-import { Input } from "@/react/components/ui/input";+import { Alert } from "@/components/ui/alert";+import { Button } from "@/components/ui/button";+import { Input } from "@/components/ui/input";import {Sheet,SheetBody,@@ -11,7 +11,7 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";+} from "@/components/ui/sheet";import type { Database } from "@/types/proto-es/v1/database_service_pb";export function LabelEditorSheet({diff --git a/frontend/src/react/components/database/TransferProjectSheet.tsx b/frontend/src/components/database/TransferProjectSheet.tsxsimilarity index 90%rename from frontend/src/react/components/database/TransferProjectSheet.tsxrename to frontend/src/components/database/TransferProjectSheet.tsxindex 71c348b02e..a1d71d2350 100644--- a/frontend/src/react/components/database/TransferProjectSheet.tsx+++ b/frontend/src/components/database/TransferProjectSheet.tsx@@ -1,9 +1,9 @@import { useEffect, useState } from "react";import { useTranslation } from "react-i18next";-import { DatabaseTableView } from "@/react/components/database";-import { ProjectSelect } from "@/react/components/ProjectSelect";-import { Button } from "@/react/components/ui/button";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";+import { DatabaseTableView } from "@/components/database";+import { ProjectSelect } from "@/components/ProjectSelect";+import { Button } from "@/components/ui/button";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";import {Sheet,SheetBody,@@ -11,8 +11,8 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { useAppStore } from "@/react/stores/app";+} from "@/components/ui/sheet";+import { useAppStore } from "@/stores/app";import type { Database } from "@/types/proto-es/v1/database_service_pb";export function TransferProjectSheet({diff --git a/frontend/src/react/components/database/index.tsx b/frontend/src/components/database/index.tsxsimilarity index 100%rename from frontend/src/react/components/database/index.tsxrename to frontend/src/components/database/index.tsxdiff --git a/frontend/src/react/components/ghost/GhostFlagsButton.test.tsx b/frontend/src/components/ghost/GhostFlagsButton.test.tsxsimilarity index 99%rename from frontend/src/react/components/ghost/GhostFlagsButton.test.tsxrename to frontend/src/components/ghost/GhostFlagsButton.test.tsxindex b30d25a074..16b9f87c93 100644--- a/frontend/src/react/components/ghost/GhostFlagsButton.test.tsx+++ b/frontend/src/components/ghost/GhostFlagsButton.test.tsx@@ -11,7 +11,7 @@ vi.mock("react-i18next", () => ({// Render the sheet content inline when open — jsdom has no portal/positioning,// and the save/cancel batching is what we want to assert.-vi.mock("@/react/components/ui/sheet", () => ({+vi.mock("@/components/ui/sheet", () => ({Sheet: ({ children, open }: { children: ReactNode; open: boolean }) =>open ? <div>{children}</div> : null,SheetContent: ({ children }: { children: ReactNode }) => (diff --git a/frontend/src/react/components/ghost/GhostFlagsButton.tsx b/frontend/src/components/ghost/GhostFlagsButton.tsxsimilarity index 95%rename from frontend/src/react/components/ghost/GhostFlagsButton.tsxrename to frontend/src/components/ghost/GhostFlagsButton.tsxindex f8beed104a..fb5953b925 100644--- a/frontend/src/react/components/ghost/GhostFlagsButton.tsx+++ b/frontend/src/components/ghost/GhostFlagsButton.tsx@@ -2,8 +2,8 @@ import { isEqual } from "lodash-es";import { SlidersHorizontal } from "lucide-react";import { useState } from "react";import { useTranslation } from "react-i18next";-import { Badge } from "@/react/components/ui/badge";-import { Button } from "@/react/components/ui/button";+import { Badge } from "@/components/ui/badge";+import { Button } from "@/components/ui/button";import {Sheet,SheetBody,@@ -11,7 +11,7 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";+} from "@/components/ui/sheet";import { GhostFlagsForm } from "./GhostFlagsForm";interface GhostFlagsButtonProps {diff --git a/frontend/src/react/components/ghost/GhostFlagsForm.tsx b/frontend/src/components/ghost/GhostFlagsForm.tsxsimilarity index 93%rename from frontend/src/react/components/ghost/GhostFlagsForm.tsxrename to frontend/src/components/ghost/GhostFlagsForm.tsxindex 40a66c2def..b97c7dc0c3 100644--- a/frontend/src/react/components/ghost/GhostFlagsForm.tsx+++ b/frontend/src/components/ghost/GhostFlagsForm.tsx@@ -1,6 +1,6 @@-import { Input } from "@/react/components/ui/input";-import { NumberInput } from "@/react/components/ui/number-input";-import { Switch } from "@/react/components/ui/switch";+import { Input } from "@/components/ui/input";+import { NumberInput } from "@/components/ui/number-input";+import { Switch } from "@/components/ui/switch";import { GHOST_PARAMETERS, type GhostParameter, withFlag } from "./constants";interface GhostFlagsFormProps {diff --git a/frontend/src/react/components/ghost/constants.ts b/frontend/src/components/ghost/constants.tssimilarity index 100%rename from frontend/src/react/components/ghost/constants.tsrename to frontend/src/components/ghost/constants.tsdiff --git a/frontend/src/react/components/ghost/flags.json b/frontend/src/components/ghost/flags.jsonsimilarity index 100%rename from frontend/src/react/components/ghost/flags.jsonrename to frontend/src/components/ghost/flags.jsondiff --git a/frontend/src/react/components/header/DashboardHeader.test.tsx b/frontend/src/components/header/DashboardHeader.test.tsxsimilarity index 94%rename from frontend/src/react/components/header/DashboardHeader.test.tsxrename to frontend/src/components/header/DashboardHeader.test.tsxindex 50822a4005..f317c54f06 100644--- a/frontend/src/react/components/header/DashboardHeader.test.tsx+++ b/frontend/src/components/header/DashboardHeader.test.tsx@@ -5,7 +5,7 @@ import { beforeEach, describe, expect, test, vi } from "vitest";import {SQL_EDITOR_DATABASE_MODULE,WORKSPACE_ROUTE_MY_ISSUES,-} from "@/react/router";+} from "@/app/router";import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";(@@ -45,7 +45,7 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useRecentVisit: () => ({record: mocks.record,}),@@ -56,21 +56,21 @@ vi.mock("@/react/hooks/useAppState", () => ({}),}));-vi.mock("@/react/components/BytebaseLogo", () => ({+vi.mock("@/components/BytebaseLogo", () => ({BytebaseLogo: ({ redirect }: { redirect?: string }) => (<div data-testid="bytebase-logo" data-redirect={redirect} />),}));-vi.mock("@/react/components/header/HeaderBreadcrumb", () => ({+vi.mock("@/components/header/HeaderBreadcrumb", () => ({HeaderBreadcrumb: () => <div data-testid="header-breadcrumb" />,}));-vi.mock("@/react/components/header/ProfileMenuTrigger", () => ({+vi.mock("@/components/header/ProfileMenuTrigger", () => ({ProfileMenuTrigger: () => <div data-testid="profile-menu-trigger" />,}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({useCurrentRoute: () => mocks.currentRoute,useNavigate: () => ({resolve: mocks.resolve,@@ -90,7 +90,7 @@ vi.mock("@/utils/storage-keys", async (importOriginal) => {};});-vi.mock("@/react/plugins/agent/store/agent", () => ({+vi.mock("@/modules/agent/store/agent", () => ({useAgentStore: {getState: () => ({toggle: mocks.toggleAgent,diff --git a/frontend/src/react/components/header/DashboardHeader.tsx b/frontend/src/components/header/DashboardHeader.tsxsimilarity index 94%rename from frontend/src/react/components/header/DashboardHeader.tsxrename to frontend/src/components/header/DashboardHeader.tsxindex 3f0bea6dc9..ab2d260d7d 100644--- a/frontend/src/react/components/header/DashboardHeader.tsx+++ b/frontend/src/components/header/DashboardHeader.tsx@@ -8,10 +8,6 @@ import {import { useMemo, useSyncExternalStore } from "react";import { useTranslation } from "react-i18next";import { v4 as uuidv4 } from "uuid";-import { BytebaseLogo } from "@/react/components/BytebaseLogo";-import { Button } from "@/react/components/ui/button";-import { useRecentVisit, useSubscription } from "@/react/hooks/useAppState";-import { cn } from "@/react/lib/utils";import {SQL_EDITOR_DATABASE_MODULE,SQL_EDITOR_HOME_MODULE,@@ -20,7 +16,11 @@ import {useNavigate,WORKSPACE_ROUTE_LANDING,WORKSPACE_ROUTE_MY_ISSUES,-} from "@/react/router";+} from "@/app/router";+import { BytebaseLogo } from "@/components/BytebaseLogo";+import { Button } from "@/components/ui/button";+import { useRecentVisit, useSubscription } from "@/hooks/useAppState";+import { cn } from "@/lib/utils";import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";import { STORAGE_KEY_MY_ISSUES_TAB } from "@/utils/storage-keys";import { HeaderBreadcrumb } from "./HeaderBreadcrumb";@@ -134,7 +134,7 @@ export function DashboardHeader({aria-label={t("agent.self")}title={t("agent.self")}onClick={() => {- void import("@/react/plugins/agent/store/agent").then(+ void import("@/modules/agent/store/agent").then(({ useAgentStore }) => {useAgentStore.getState().toggle();}diff --git a/frontend/src/react/components/header/HeaderBreadcrumb.tsx b/frontend/src/components/header/HeaderBreadcrumb.tsxsimilarity index 96%rename from frontend/src/react/components/header/HeaderBreadcrumb.tsxrename to frontend/src/components/header/HeaderBreadcrumb.tsxindex 331ef9a83d..c38ab20a5e 100644--- a/frontend/src/react/components/header/HeaderBreadcrumb.tsx+++ b/frontend/src/components/header/HeaderBreadcrumb.tsx@@ -1,13 +1,18 @@import { Building2, Check, ChevronDown, FolderKanban } from "lucide-react";import { useCallback, useEffect, useState } from "react";import { useTranslation } from "react-i18next";-import { RouterLink } from "@/react/components/RouterLink";-import { Badge } from "@/react/components/ui/badge";+import {+ useCurrentRoute,+ useNavigate,+ WORKSPACE_ROUTE_LANDING,+} from "@/app/router";+import { RouterLink } from "@/components/RouterLink";+import { Badge } from "@/components/ui/badge";import {Popover,PopoverContent,PopoverTrigger,-} from "@/react/components/ui/popover";+} from "@/components/ui/popover";import {useProject,useRecentVisit,@@ -15,18 +20,13 @@ import {useSwitchWorkspace,useWorkspace,useWorkspaceList,-} from "@/react/hooks/useAppState";+} from "@/hooks/useAppState";import {isValidProjectName,projectNamePrefix,workspaceNamePrefix,-} from "@/react/lib/resourceName";-import { cn } from "@/react/lib/utils";-import {- useCurrentRoute,- useNavigate,- WORKSPACE_ROUTE_LANDING,-} from "@/react/router";+} from "@/lib/resourceName";+import { cn } from "@/lib/utils";import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";import { ProjectCreateDialog } from "./ProjectCreateDialog";import { ProjectSwitchPanel } from "./ProjectSwitchPanel";diff --git a/frontend/src/react/components/header/ProfileMenuTrigger.test.tsx b/frontend/src/components/header/ProfileMenuTrigger.test.tsxsimilarity index 95%rename from frontend/src/react/components/header/ProfileMenuTrigger.test.tsxrename to frontend/src/components/header/ProfileMenuTrigger.test.tsxindex 37952eeac0..2be7e7085a 100644--- a/frontend/src/react/components/header/ProfileMenuTrigger.test.tsx+++ b/frontend/src/components/header/ProfileMenuTrigger.test.tsx@@ -2,7 +2,7 @@ import type { ReactElement } from "react";import { act } from "react";import { createRoot } from "react-dom/client";import { beforeEach, describe, expect, test, vi } from "vitest";-import { WORKSPACE_ROUTE_LANDING } from "@/react/router";+import { WORKSPACE_ROUTE_LANDING } from "@/app/router";import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";(@@ -48,11 +48,11 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/components/UserAvatar", () => ({+vi.mock("@/components/UserAvatar", () => ({UserAvatar: () => <div data-testid="user-avatar" />,}));-vi.mock("@/react/components/ui/dropdown-menu", () => ({+vi.mock("@/components/ui/dropdown-menu", () => ({DropdownMenu: ({ children }: { children: ReactElement[] }) => (<div>{children}</div>),@@ -91,7 +91,7 @@ vi.mock("@/react/components/ui/dropdown-menu", () => ({),}));-vi.mock("@/react/components/header/VersionMenuItem", () => ({+vi.mock("@/components/header/VersionMenuItem", () => ({VersionMenuItem: () => <div data-testid="version-item" />,}));@@ -100,7 +100,7 @@ vi.mock("./common", () => ({setAppLocale: mocks.emitStorageChangedEvent,}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({useCurrentRoute: () => mocks.currentRoute,useNavigate: () => ({push: mocks.push,@@ -113,7 +113,7 @@ vi.mock("@/react/router", () => ({SQL_EDITOR_HOME_MODULE: "sql-editor.home",}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useOptionalCurrentUser: () => ({title: "Alice",email: "[email protected]",@@ -133,7 +133,7 @@ vi.mock("@/react/hooks/useAppState", () => ({useQuickstartReset: () => mocks.resetQuickstart,}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: {getState: () => ({logout: mocks.logout,diff --git a/frontend/src/react/components/header/ProfileMenuTrigger.tsx b/frontend/src/components/header/ProfileMenuTrigger.tsxsimilarity index 96%rename from frontend/src/react/components/header/ProfileMenuTrigger.tsxrename to frontend/src/components/header/ProfileMenuTrigger.tsxindex dc9e2e578b..249423cafb 100644--- a/frontend/src/react/components/header/ProfileMenuTrigger.tsx+++ b/frontend/src/components/header/ProfileMenuTrigger.tsx@@ -1,7 +1,15 @@import { ChevronRight } from "lucide-react";import { useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { UserAvatar } from "@/react/components/UserAvatar";+import {+ isSqlEditorRouteName,+ SETTING_ROUTE_PROFILE,+ SQL_EDITOR_HOME_MODULE,+ useCurrentRoute,+ useNavigate,+ WORKSPACE_ROUTE_LANDING,+} from "@/app/router";+import { UserAvatar } from "@/components/UserAvatar";import {DropdownMenu,DropdownMenuContent,@@ -11,8 +19,8 @@ import {DropdownMenuSubmenuContent,DropdownMenuSubmenuTrigger,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";+} from "@/components/ui/dropdown-menu";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";import {useAppFeature,useOptionalCurrentUser,@@ -20,16 +28,8 @@ import {useServerInfo,useSubscription,useWorkspace,-} from "@/react/hooks/useAppState";-import {- isSqlEditorRouteName,- SETTING_ROUTE_PROFILE,- SQL_EDITOR_HOME_MODULE,- useCurrentRoute,- useNavigate,- WORKSPACE_ROUTE_LANDING,-} from "@/react/router";-import { useAppStore } from "@/react/stores/app";+} from "@/hooks/useAppState";+import { useAppStore } from "@/stores/app";import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";import { isDev } from "@/utils/util";import { HEADER_LANGUAGE_OPTIONS, setAppLocale } from "./common";diff --git a/frontend/src/react/components/header/ProjectCreateDialog.tsx b/frontend/src/components/header/ProjectCreateDialog.tsxsimilarity index 89%rename from frontend/src/react/components/header/ProjectCreateDialog.tsxrename to frontend/src/components/header/ProjectCreateDialog.tsxindex 872bc97cb9..0c38580671 100644--- a/frontend/src/react/components/header/ProjectCreateDialog.tsx+++ b/frontend/src/components/header/ProjectCreateDialog.tsx@@ -1,17 +1,15 @@import { Code, ConnectError } from "@connectrpc/connect";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";+import { useNavigate } from "@/app/router";+import { PROJECT_V1_ROUTE_DATABASES } from "@/app/router/handles";import {ResourceIdField,type ResourceIdFieldRef,-} from "@/react/components/ResourceIdField";-import { Button } from "@/react/components/ui/button";-import {- FormField,- FormFieldGroup,- FormTitle,-} from "@/react/components/ui/form";-import { Input } from "@/react/components/ui/input";+} from "@/components/ResourceIdField";+import { Button } from "@/components/ui/button";+import { FormField, FormFieldGroup, FormTitle } from "@/components/ui/form";+import { Input } from "@/components/ui/input";import {Sheet,SheetBody,@@ -19,18 +17,16 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";+} from "@/components/ui/sheet";import {isConnectAlreadyExists,useCreateProject,useNotify,useWorkspacePermission,-} from "@/react/hooks/useAppState";-import { CONNECT_DATABASE_PRODUCT_INTRO } from "@/react/lib/productIntro";-import { projectNamePrefix } from "@/react/lib/resourceName";-import { useNavigate } from "@/react/router";-import { PROJECT_V1_ROUTE_DATABASES } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";+} from "@/hooks/useAppState";+import { CONNECT_DATABASE_PRODUCT_INTRO } from "@/lib/productIntro";+import { projectNamePrefix } from "@/lib/resourceName";+import { useAppStore } from "@/stores/app";import type { Project } from "@/types/proto-es/v1/project_service_pb";import { extractProjectResourceName } from "@/utils";diff --git a/frontend/src/react/components/header/ProjectCreateDialogLayout.test.ts b/frontend/src/components/header/ProjectCreateDialogLayout.test.tssimilarity index 100%rename from frontend/src/react/components/header/ProjectCreateDialogLayout.test.tsrename to frontend/src/components/header/ProjectCreateDialogLayout.test.tsdiff --git a/frontend/src/react/components/header/ProjectSwitchPanel.test.tsx b/frontend/src/components/header/ProjectSwitchPanel.test.tsxsimilarity index 97%rename from frontend/src/react/components/header/ProjectSwitchPanel.test.tsxrename to frontend/src/components/header/ProjectSwitchPanel.test.tsxindex 8c470a697b..510beafd0d 100644--- a/frontend/src/react/components/header/ProjectSwitchPanel.test.tsx+++ b/frontend/src/components/header/ProjectSwitchPanel.test.tsx@@ -2,7 +2,7 @@ import type { ChangeEvent, InputHTMLAttributes, ReactElement } from "react";import { act } from "react";import { createRoot } from "react-dom/client";import { beforeEach, describe, expect, test, vi } from "vitest";-import { PROJECT_V1_ROUTE_DETAIL } from "@/react/router";+import { PROJECT_V1_ROUTE_DETAIL } from "@/app/router";(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }@@ -75,7 +75,7 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useRecentVisit: () => ({record: mocks.record,}),@@ -99,7 +99,7 @@ vi.mock("@/react/hooks/useAppState", () => ({project.name.toLowerCase().includes(keyword.toLowerCase()),}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({useCurrentRoute: () => mocks.currentRoute,useNavigate: () => ({resolve: mocks.resolve,@@ -109,14 +109,14 @@ vi.mock("@/react/router", () => ({WORKSPACE_ROUTE_LANDING: "workspace.landing",}));-vi.mock("@/react/components/ui/input", () => ({+vi.mock("@/components/ui/input", () => ({Input: (props: InputHTMLAttributes<HTMLInputElement>) => {mocks.inputOnChange = props.onChange;return <input {...props} />;},}));-vi.mock("@/react/components/ui/tabs", () => ({+vi.mock("@/components/ui/tabs", () => ({Tabs: ({ children }: { children: ReactElement[] }) => <div>{children}</div>,TabsList: ({ children }: { children: ReactElement[] }) => (<div>{children}</div>diff --git a/frontend/src/react/components/header/ProjectSwitchPanel.tsx b/frontend/src/components/header/ProjectSwitchPanel.tsxsimilarity index 95%rename from frontend/src/react/components/header/ProjectSwitchPanel.tsxrename to frontend/src/components/header/ProjectSwitchPanel.tsxindex 2c4c161b24..64c42d560f 100644--- a/frontend/src/react/components/header/ProjectSwitchPanel.tsx+++ b/frontend/src/components/header/ProjectSwitchPanel.tsx@@ -7,22 +7,23 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";-import { ProjectTable } from "@/react/components/ProjectTable";-import { Button } from "@/react/components/ui/button";-import { Input } from "@/react/components/ui/input";+import {+ PROJECT_V1_ROUTE_DETAIL,+ useCurrentRoute,+ useNavigate,+ WORKSPACE_ROUTE_LANDING,+} from "@/app/router";+import { ProjectTable } from "@/components/ProjectTable";+import { Button } from "@/components/ui/button";+import { Input } from "@/components/ui/input";import {Select,SelectContent,SelectItem,SelectTrigger,SelectValue,-} from "@/react/components/ui/select";-import {- Tabs,- TabsList,- TabsPanel,- TabsTrigger,-} from "@/react/components/ui/tabs";+} from "@/components/ui/select";+import { Tabs, TabsList, TabsPanel, TabsTrigger } from "@/components/ui/tabs";import {projectMatchesKeyword,useProject,@@ -30,18 +31,12 @@ import {useRecentProjects,useRecentVisit,useWorkspacePermission,-} from "@/react/hooks/useAppState";+} from "@/hooks/useAppState";import {getProjectName,isValidProjectName,projectNamePrefix,-} from "@/react/lib/resourceName";-import {- PROJECT_V1_ROUTE_DETAIL,- useCurrentRoute,- useNavigate,- WORKSPACE_ROUTE_LANDING,-} from "@/react/router";+} from "@/lib/resourceName";import type { Project } from "@/types/proto-es/v1/project_service_pb";export interface ProjectSwitchPanelProps {diff --git a/frontend/src/react/components/header/VersionMenuItem.test.tsx b/frontend/src/components/header/VersionMenuItem.test.tsxsimilarity index 93%rename from frontend/src/react/components/header/VersionMenuItem.test.tsxrename to frontend/src/components/header/VersionMenuItem.test.tsxindex ccf2a7727a..e79e130422 100644--- a/frontend/src/react/components/header/VersionMenuItem.test.tsx+++ b/frontend/src/components/header/VersionMenuItem.test.tsx@@ -2,7 +2,7 @@ import type { ReactElement } from "react";import { act } from "react";import { createRoot } from "react-dom/client";import { beforeEach, describe, expect, test, vi } from "vitest";-import { SETTING_ROUTE_WORKSPACE_SUBSCRIPTION } from "@/react/router";+import { SETTING_ROUTE_WORKSPACE_SUBSCRIPTION } from "@/app/router";import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";(@@ -41,7 +41,7 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useServerInfo: () => mocks.serverInfo,useSubscription: () => ({subscription: mocks.subscription,@@ -49,7 +49,7 @@ vi.mock("@/react/hooks/useAppState", () => ({useWorkspacePermission: () => mocks.canManageSettings,}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({SETTING_ROUTE_WORKSPACE_SUBSCRIPTION: "setting.workspace.subscription",router: {push: mocks.push,@@ -60,13 +60,13 @@ vi.mock("@/react/router", () => ({}),}));-vi.mock("@/react/components/ui/badge", () => ({+vi.mock("@/components/ui/badge", () => ({Badge: ({ children }: { children: ReactElement | string }) => (<span>{children}</span>),}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,onClick,@@ -76,7 +76,7 @@ vi.mock("@/react/components/ui/button", () => ({}) => <button onClick={onClick}>{children}</button>,}));-vi.mock("@/react/components/ui/dialog", () => ({+vi.mock("@/components/ui/dialog", () => ({Dialog: ({children,open,diff --git a/frontend/src/react/components/header/VersionMenuItem.tsx b/frontend/src/components/header/VersionMenuItem.tsxsimilarity index 93%rename from frontend/src/react/components/header/VersionMenuItem.tsxrename to frontend/src/components/header/VersionMenuItem.tsxindex daac73a02b..2cada4dbdc 100644--- a/frontend/src/react/components/header/VersionMenuItem.tsx+++ b/frontend/src/components/header/VersionMenuItem.tsx@@ -1,12 +1,12 @@import { useMemo } from "react";import { useTranslation } from "react-i18next";-import { RouterLink } from "@/react/components/RouterLink";+import { SETTING_ROUTE_WORKSPACE_SUBSCRIPTION } from "@/app/router";+import { RouterLink } from "@/components/RouterLink";import {useServerInfo,useSubscription,useWorkspacePermission,-} from "@/react/hooks/useAppState";-import { SETTING_ROUTE_WORKSPACE_SUBSCRIPTION } from "@/react/router";+} from "@/hooks/useAppState";import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";export function VersionMenuItem({ onCloseMenu }: { onCloseMenu: () => void }) {diff --git a/frontend/src/react/components/header/common.ts b/frontend/src/components/header/common.tssimilarity index 83%rename from frontend/src/react/components/header/common.tsrename to frontend/src/components/header/common.tsindex b9095a8c72..2fbfa91fc9 100644--- a/frontend/src/react/components/header/common.ts+++ b/frontend/src/components/header/common.ts@@ -1,5 +1,4 @@-import i18n from "@/react/i18n";-import { emitReactLocaleChange } from "@/react/shell-bridge";+import i18n from "@/lib/i18n";import { STORAGE_KEY_LANGUAGE } from "@/utils/storage-keys";import { emitStorageChangedEvent } from "@/utils/util";@@ -20,5 +19,4 @@ export function setAppLocale(lang: string) {void i18n.changeLanguage(lang);localStorage.setItem(STORAGE_KEY_LANGUAGE, lang);emitStorageChangedEvent();- emitReactLocaleChange(lang);}diff --git a/frontend/src/react/components/header/no-vue-deps.test.ts b/frontend/src/components/header/no-vue-deps.test.tssimilarity index 99%rename from frontend/src/react/components/header/no-vue-deps.test.tsrename to frontend/src/components/header/no-vue-deps.test.tsindex b93ea2f551..044fa5a474 100644--- a/frontend/src/react/components/header/no-vue-deps.test.ts+++ b/frontend/src/components/header/no-vue-deps.test.ts@@ -20,7 +20,7 @@ const appStateSources = import.meta.glob(const forbidden = ["useVueState",- "@/store",+ '"@/store"',"@/components/Project/useRecentProjects","hasWorkspacePermissionV2","hasProjectPermissionV2",diff --git a/frontend/src/react/components/instance/ConnectionRecovery.test.ts b/frontend/src/components/instance/ConnectionRecovery.test.tssimilarity index 86%rename from frontend/src/react/components/instance/ConnectionRecovery.test.tsrename to frontend/src/components/instance/ConnectionRecovery.test.tsindex f36ef5286a..d4283fbb49 100644--- a/frontend/src/react/components/instance/ConnectionRecovery.test.ts+++ b/frontend/src/components/instance/ConnectionRecovery.test.ts@@ -19,14 +19,11 @@ describe("ConnectionRecovery", () => {test("renders recovery with the shared warning alert", () => {const source = readFileSync(- join(- process.cwd(),- "src/react/components/instance/ConnectionRecovery.tsx"- ),+ join(process.cwd(), "src/components/instance/ConnectionRecovery.tsx"),"utf-8");- expect(source).toContain('from "@/react/components/ui/alert"');+ expect(source).toContain('from "@/components/ui/alert"');expect(source).toContain("<Alert");expect(source).toContain('variant="warning"');expect(source).not.toContain("border-control-border bg-control-bg");@@ -35,10 +32,7 @@ describe("ConnectionRecovery", () => {test("shows category-specific recovery steps", () => {const source = readFileSync(- join(- process.cwd(),- "src/react/components/instance/ConnectionRecovery.tsx"- ),+ join(process.cwd(), "src/components/instance/ConnectionRecovery.tsx"),"utf-8");@@ -57,10 +51,7 @@ describe("ConnectionRecovery", () => {test("links to official connection docs instead of backend-only guidance", () => {const source = readFileSync(- join(- process.cwd(),- "src/react/components/instance/ConnectionRecovery.tsx"- ),+ join(process.cwd(), "src/components/instance/ConnectionRecovery.tsx"),"utf-8");const enUS = readFileSync(diff --git a/frontend/src/react/components/instance/ConnectionRecovery.tsx b/frontend/src/components/instance/ConnectionRecovery.tsxsimilarity index 98%rename from frontend/src/react/components/instance/ConnectionRecovery.tsxrename to frontend/src/components/instance/ConnectionRecovery.tsxindex 0298a1f224..d3186a415f 100644--- a/frontend/src/react/components/instance/ConnectionRecovery.tsx+++ b/frontend/src/components/instance/ConnectionRecovery.tsx@@ -1,6 +1,6 @@import { ExternalLink } from "lucide-react";import { useTranslation } from "react-i18next";-import { Alert } from "@/react/components/ui/alert";+import { Alert } from "@/components/ui/alert";export type ConnectionFailureCategory =| "auth_failed"diff --git a/frontend/src/react/components/instance/CreateDataSourceExample.tsx b/frontend/src/components/instance/CreateDataSourceExample.tsxsimilarity index 99%rename from frontend/src/react/components/instance/CreateDataSourceExample.tsxrename to frontend/src/components/instance/CreateDataSourceExample.tsxindex ac6c062227..bc382b0119 100644--- a/frontend/src/react/components/instance/CreateDataSourceExample.tsx+++ b/frontend/src/components/instance/CreateDataSourceExample.tsx@@ -1,7 +1,7 @@import { useCallback, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { Alert } from "@/react/components/ui/alert";-import { writeTextToClipboard } from "@/react/lib/clipboard";+import { Alert } from "@/components/ui/alert";+import { writeTextToClipboard } from "@/lib/clipboard";import {DATASOURCE_ADMIN_USER_NAME,DATASOURCE_READONLY_USER_NAME,diff --git a/frontend/src/react/components/instance/CredentialSourceForm.test.tsx b/frontend/src/components/instance/CredentialSourceForm.test.tsxsimilarity index 98%rename from frontend/src/react/components/instance/CredentialSourceForm.test.tsxrename to frontend/src/components/instance/CredentialSourceForm.test.tsxindex 4618d7d199..77f7bf698d 100644--- a/frontend/src/react/components/instance/CredentialSourceForm.test.tsx+++ b/frontend/src/components/instance/CredentialSourceForm.test.tsx@@ -27,7 +27,7 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useServerState: () => ({isSaaSMode: false,}),diff --git a/frontend/src/react/components/instance/CredentialSourceForm.tsx b/frontend/src/components/instance/CredentialSourceForm.tsxsimilarity index 98%rename from frontend/src/react/components/instance/CredentialSourceForm.tsxrename to frontend/src/components/instance/CredentialSourceForm.tsxindex d5e7cfb7bc..bcc6910d06 100644--- a/frontend/src/react/components/instance/CredentialSourceForm.tsx+++ b/frontend/src/components/instance/CredentialSourceForm.tsx@@ -7,10 +7,10 @@ import {useState,} from "react";import { Trans, useTranslation } from "react-i18next";-import { Input } from "@/react/components/ui/input";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";-import { Textarea } from "@/react/components/ui/textarea";-import { useServerState } from "@/react/hooks/useAppState";+import { Input } from "@/components/ui/input";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";+import { Textarea } from "@/components/ui/textarea";+import { useServerState } from "@/hooks/useAppState";import { Engine } from "@/types/proto-es/v1/common_pb";import {DataSource_AuthenticationType,diff --git a/frontend/src/react/components/instance/DataSourceForm.tsx b/frontend/src/components/instance/DataSourceForm.tsxsimilarity index 99%rename from frontend/src/react/components/instance/DataSourceForm.tsxrename to frontend/src/components/instance/DataSourceForm.tsxindex 6a0e2994cc..6528c1d8dd 100644--- a/frontend/src/react/components/instance/DataSourceForm.tsx+++ b/frontend/src/components/instance/DataSourceForm.tsx@@ -2,17 +2,17 @@ import { create } from "@bufbuild/protobuf";import { Info } from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { LearnMoreLink } from "@/react/components/LearnMoreLink";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";+import { LearnMoreLink } from "@/components/LearnMoreLink";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";import {FormControlGroup,FormControlRow,FormField,-} from "@/react/components/ui/form";-import { Input } from "@/react/components/ui/input";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";-import { useAppStore } from "@/react/stores/app";+} from "@/components/ui/form";+import { Input } from "@/components/ui/input";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";+import { useAppStore } from "@/stores/app";import { Engine } from "@/types/proto-es/v1/common_pb";import {DataSource_AuthenticationType,diff --git a/frontend/src/react/components/instance/DataSourceSection.tsx b/frontend/src/components/instance/DataSourceSection.tsxsimilarity index 97%rename from frontend/src/react/components/instance/DataSourceSection.tsxrename to frontend/src/components/instance/DataSourceSection.tsxindex f46c821fa0..426f243855 100644--- a/frontend/src/react/components/instance/DataSourceSection.tsx+++ b/frontend/src/components/instance/DataSourceSection.tsx@@ -1,9 +1,9 @@import { Plus } from "lucide-react";import { useCallback } from "react";import { useTranslation } from "react-i18next";-import { Alert } from "@/react/components/ui/alert";-import { Button } from "@/react/components/ui/button";-import { useAppStore } from "@/react/stores/app";+import { Alert } from "@/components/ui/alert";+import { Button } from "@/components/ui/button";+import { useAppStore } from "@/stores/app";import { DATASOURCE_READONLY_USER_NAME } from "@/types";import { Engine } from "@/types/proto-es/v1/common_pb";import { DataSourceType } from "@/types/proto-es/v1/instance_service_pb";diff --git a/frontend/src/react/components/instance/InfoPanel.i18n.test.tsx b/frontend/src/components/instance/InfoPanel.i18n.test.tsxsimilarity index 98%rename from frontend/src/react/components/instance/InfoPanel.i18n.test.tsxrename to frontend/src/components/instance/InfoPanel.i18n.test.tsxindex 235ea7343b..f4982e79cd 100644--- a/frontend/src/react/components/instance/InfoPanel.i18n.test.tsx+++ b/frontend/src/components/instance/InfoPanel.i18n.test.tsx@@ -25,7 +25,7 @@ vi.mock("@/types", () => ({// CopyButton pulls in the app store (and its connect/i18n chain), which isn't// available in this minimal render harness. The i18n assertions don't touch it.-vi.mock("@/react/components/ui/copy-button", () => ({+vi.mock("@/components/ui/copy-button", () => ({CopyButton: () => null,}));diff --git a/frontend/src/react/components/instance/InfoPanel.tsx b/frontend/src/components/instance/InfoPanel.tsxsimilarity index 98%rename from frontend/src/react/components/instance/InfoPanel.tsxrename to frontend/src/components/instance/InfoPanel.tsxindex c082d9377f..29f6123191 100644--- a/frontend/src/react/components/instance/InfoPanel.tsx+++ b/frontend/src/components/instance/InfoPanel.tsx@@ -3,14 +3,14 @@ import { X } from "lucide-react";import type { ReactNode } from "react";import { useCallback, useEffect, useState } from "react";import { useTranslation } from "react-i18next";-import { CopyButton } from "@/react/components/ui/copy-button";+import { CopyButton } from "@/components/ui/copy-button";import {Sheet,SheetBody,SheetContent,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";+} from "@/components/ui/sheet";import type { Engine } from "@/types/proto-es/v1/common_pb";import {getInfoContent,diff --git a/frontend/src/react/components/instance/InstanceActionDropdown.test.tsx b/frontend/src/components/instance/InstanceActionDropdown.test.tsxsimilarity index 98%rename from frontend/src/react/components/instance/InstanceActionDropdown.test.tsxrename to frontend/src/components/instance/InstanceActionDropdown.test.tsxindex 34d429628d..a9178338aa 100644--- a/frontend/src/react/components/instance/InstanceActionDropdown.test.tsx+++ b/frontend/src/components/instance/InstanceActionDropdown.test.tsx@@ -32,13 +32,13 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({router: {replace: mocks.routerReplace,},}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: {getState: () => ({archiveInstance: mocks.archiveInstance,@@ -48,7 +48,7 @@ vi.mock("@/react/stores/app", () => ({},}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: vi.fn(),}));diff --git a/frontend/src/react/components/instance/InstanceActionDropdown.tsx b/frontend/src/components/instance/InstanceActionDropdown.tsxsimilarity index 93%rename from frontend/src/react/components/instance/InstanceActionDropdown.tsxrename to frontend/src/components/instance/InstanceActionDropdown.tsxindex f2c3b0a6a3..7fab52d929 100644--- a/frontend/src/react/components/instance/InstanceActionDropdown.tsx+++ b/frontend/src/components/instance/InstanceActionDropdown.tsx@@ -1,16 +1,16 @@import { EllipsisVertical } from "lucide-react";import { useCallback, useState } from "react";import { useTranslation } from "react-i18next";+import { router } from "@/app/router";+import { INSTANCE_ROUTE_DASHBOARD } from "@/app/router/handles";import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";-import { router } from "@/react/router";-import { INSTANCE_ROUTE_DASHBOARD } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/components/ui/dropdown-menu";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import { State } from "@/types/proto-es/v1/common_pb";import type { Instance } from "@/types/proto-es/v1/instance_service_pb";import { hasWorkspacePermissionV2 } from "@/utils";diff --git a/frontend/src/react/components/instance/InstanceDeleteDialog.tsx b/frontend/src/components/instance/InstanceDeleteDialog.tsxsimilarity index 92%rename from frontend/src/react/components/instance/InstanceDeleteDialog.tsxrename to frontend/src/components/instance/InstanceDeleteDialog.tsxindex 3747506488..a4e8a3206d 100644--- a/frontend/src/react/components/instance/InstanceDeleteDialog.tsx+++ b/frontend/src/components/instance/InstanceDeleteDialog.tsx@@ -5,11 +5,11 @@ import {AlertDialogContent,AlertDialogDescription,AlertDialogTitle,-} from "@/react/components/ui/alert-dialog";-import { Button } from "@/react/components/ui/button";-import { Input } from "@/react/components/ui/input";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/components/ui/alert-dialog";+import { Button } from "@/components/ui/button";+import { Input } from "@/components/ui/input";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import { State } from "@/types/proto-es/v1/common_pb";import type { Instance } from "@/types/proto-es/v1/instance_service_pb";import { extractInstanceResourceName } from "@/utils";diff --git a/frontend/src/react/components/instance/InstanceFormBody.i18n.test.ts b/frontend/src/components/instance/InstanceFormBody.i18n.test.tssimilarity index 100%rename from frontend/src/react/components/instance/InstanceFormBody.i18n.test.tsrename to frontend/src/components/instance/InstanceFormBody.i18n.test.tsdiff --git a/frontend/src/react/components/instance/InstanceFormBody.test.ts b/frontend/src/components/instance/InstanceFormBody.test.tssimilarity index 88%rename from frontend/src/react/components/instance/InstanceFormBody.test.tsrename to frontend/src/components/instance/InstanceFormBody.test.tsindex fd66160880..33271548e5 100644--- a/frontend/src/react/components/instance/InstanceFormBody.test.ts+++ b/frontend/src/components/instance/InstanceFormBody.test.ts@@ -5,7 +5,7 @@ import { describe, expect, test } from "vitest";describe("InstanceFormBody", () => {test("uses boolean values for inert collapsible sections", () => {const source = readFileSync(- join(process.cwd(), "src/react/components/instance/InstanceFormBody.tsx"),+ join(process.cwd(), "src/components/instance/InstanceFormBody.tsx"),"utf-8");@@ -25,7 +25,7 @@ describe("InstanceFormBody", () => {test("renders database sync controls inside the connection card", () => {const source = readFileSync(- join(process.cwd(), "src/react/components/instance/InstanceFormBody.tsx"),+ join(process.cwd(), "src/components/instance/InstanceFormBody.tsx"),"utf-8");@@ -44,7 +44,7 @@ describe("InstanceFormBody", () => {test("renders database sync controls only once", () => {const source = readFileSync(- join(process.cwd(), "src/react/components/instance/InstanceFormBody.tsx"),+ join(process.cwd(), "src/components/instance/InstanceFormBody.tsx"),"utf-8");@@ -53,7 +53,7 @@ describe("InstanceFormBody", () => {test("explains project-aware database sync in the instance form", () => {const source = readFileSync(- join(process.cwd(), "src/react/components/instance/InstanceFormBody.tsx"),+ join(process.cwd(), "src/components/instance/InstanceFormBody.tsx"),"utf-8");@@ -75,7 +75,7 @@ describe("InstanceFormBody", () => {test("lets users load more database sync options", () => {const source = readFileSync(- join(process.cwd(), "src/react/components/instance/InstanceFormBody.tsx"),+ join(process.cwd(), "src/components/instance/InstanceFormBody.tsx"),"utf-8");@@ -95,7 +95,7 @@ describe("InstanceFormBody", () => {test("shows cloud connection instruction under the connection section title", () => {const source = readFileSync(- join(process.cwd(), "src/react/components/instance/InstanceFormBody.tsx"),+ join(process.cwd(), "src/components/instance/InstanceFormBody.tsx"),"utf-8");@@ -126,7 +126,7 @@ describe("InstanceFormBody", () => {test("shows connection recovery for explicit test connection failures", () => {const source = readFileSync(- join(process.cwd(), "src/react/components/instance/InstanceFormBody.tsx"),+ join(process.cwd(), "src/components/instance/InstanceFormBody.tsx"),"utf-8");@@ -142,7 +142,7 @@ describe("InstanceFormBody", () => {test("refetches database previews when pending create instance changes", () => {const source = readFileSync(- join(process.cwd(), "src/react/components/instance/InstanceFormBody.tsx"),+ join(process.cwd(), "src/components/instance/InstanceFormBody.tsx"),"utf-8");@@ -153,7 +153,7 @@ describe("InstanceFormBody", () => {test("distinguishes sync-all from empty selected database list", () => {const source = readFileSync(- join(process.cwd(), "src/react/components/instance/InstanceFormBody.tsx"),+ join(process.cwd(), "src/components/instance/InstanceFormBody.tsx"),"utf-8");@@ -168,7 +168,7 @@ describe("InstanceFormBody", () => {test("preserves an explicitly empty database sync selection", () => {const source = readFileSync(- join(process.cwd(), "src/react/components/instance/InstanceFormBody.tsx"),+ join(process.cwd(), "src/components/instance/InstanceFormBody.tsx"),"utf-8");diff --git a/frontend/src/react/components/instance/InstanceFormBody.tsx b/frontend/src/components/instance/InstanceFormBody.tsxsimilarity index 98%rename from frontend/src/react/components/instance/InstanceFormBody.tsxrename to frontend/src/components/instance/InstanceFormBody.tsxindex 598292f772..5e405eeaa9 100644--- a/frontend/src/react/components/instance/InstanceFormBody.tsx+++ b/frontend/src/components/instance/InstanceFormBody.tsx@@ -10,34 +10,34 @@ import {} from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { Trans, useTranslation } from "react-i18next";-import { EngineIcon } from "@/react/components/EngineIcon";-import { EnvironmentSelect } from "@/react/components/EnvironmentSelect";-import { FeatureBadge } from "@/react/components/FeatureBadge";-import { LabelListEditor } from "@/react/components/LabelListEditor";-import { LearnMoreLink } from "@/react/components/LearnMoreLink";-import { ResourceIdField } from "@/react/components/ResourceIdField";-import { RouterLink } from "@/react/components/RouterLink";-import { ResourceLink } from "@/react/components/sql-review/ResourceLink";-import { Alert } from "@/react/components/ui/alert";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";+import { router } from "@/app/router";+import { EngineIcon } from "@/components/EngineIcon";+import { EnvironmentSelect } from "@/components/EnvironmentSelect";+import { FeatureBadge } from "@/components/FeatureBadge";+import { LabelListEditor } from "@/components/LabelListEditor";+import { LearnMoreLink } from "@/components/LearnMoreLink";+import { ResourceIdField } from "@/components/ResourceIdField";+import { RouterLink } from "@/components/RouterLink";+import { ResourceLink } from "@/components/sql-review/ResourceLink";+import { Alert } from "@/components/ui/alert";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";import {FormControlGroup,FormControlRow,FormField,FormLabel,-} from "@/react/components/ui/form";-import { Input } from "@/react/components/ui/input";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";-import { cn } from "@/react/lib/utils";-import { router } from "@/react/router";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/components/ui/form";+import { Input } from "@/components/ui/input";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";+import { cn } from "@/lib/utils";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import {environmentNamePrefix,instanceNamePrefix,projectNamePrefix,-} from "@/store/modules/v1/common";+} from "@/stores/modules/v1/common";import {isValidEnvironmentName,UNKNOWN_ID,diff --git a/frontend/src/react/components/instance/InstanceFormButtons.test.tsx b/frontend/src/components/instance/InstanceFormButtons.test.tsxsimilarity index 98%rename from frontend/src/react/components/instance/InstanceFormButtons.test.tsxrename to frontend/src/components/instance/InstanceFormButtons.test.tsxindex 33135afb26..c097604fa5 100644--- a/frontend/src/react/components/instance/InstanceFormButtons.test.tsx+++ b/frontend/src/components/instance/InstanceFormButtons.test.tsx@@ -30,13 +30,13 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/i18n", () => ({+vi.mock("@/lib/i18n", () => ({default: {t: (key: string) => key,},}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({router: {push: mocks.routerPush,currentRoute: {@@ -47,7 +47,7 @@ vi.mock("@/react/router", () => ({},}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const appState = {hasFeature: () => true,createInstance: mocks.createInstance,@@ -61,7 +61,7 @@ vi.mock("@/react/stores/app", () => {return { useAppStore };});-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: mocks.pushNotification,}));diff --git a/frontend/src/react/components/instance/InstanceFormButtons.tsx b/frontend/src/components/instance/InstanceFormButtons.tsxsimilarity index 97%rename from frontend/src/react/components/instance/InstanceFormButtons.tsxrename to frontend/src/components/instance/InstanceFormButtons.tsxindex 1d38d7ba63..28eba841ea 100644--- a/frontend/src/react/components/instance/InstanceFormButtons.tsx+++ b/frontend/src/components/instance/InstanceFormButtons.tsx@@ -2,13 +2,13 @@ import { create } from "@bufbuild/protobuf";import { cloneDeep, isEqual } from "lodash-es";import { useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { CONNECT_DATABASE_PRODUCT_INTRO } from "@/react/lib/productIntro";-import { cn } from "@/react/lib/utils";-import { router } from "@/react/router";-import { PROJECT_V1_ROUTE_DATABASES } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";-import { projectNamePrefix } from "@/store/modules/v1/common";+import { router } from "@/app/router";+import { PROJECT_V1_ROUTE_DATABASES } from "@/app/router/handles";+import { CONNECT_DATABASE_PRODUCT_INTRO } from "@/lib/productIntro";+import { cn } from "@/lib/utils";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";import { Engine } from "@/types/proto-es/v1/common_pb";import type {DataSource,diff --git a/frontend/src/react/components/instance/InstanceFormContext.test.tsx b/frontend/src/components/instance/InstanceFormContext.test.tsxsimilarity index 98%rename from frontend/src/react/components/instance/InstanceFormContext.test.tsxrename to frontend/src/components/instance/InstanceFormContext.test.tsxindex a08a859452..7ad123d2b5 100644--- a/frontend/src/react/components/instance/InstanceFormContext.test.tsx+++ b/frontend/src/components/instance/InstanceFormContext.test.tsx@@ -22,7 +22,7 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/i18n", () => ({+vi.mock("@/lib/i18n", () => ({default: {t: (key: string) => key,},@@ -50,13 +50,13 @@ vi.mock("@/types", () => ({}),}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: vi.fn(),}));let mockEnvironmentList: { id: string; name: string }[] = [];-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const appState = () => ({createDataSource: vi.fn(),createInstance: vi.fn(),@@ -94,7 +94,7 @@ vi.mock("@/utils/connect", () => ({error instanceof Error ? error.message : String(error),}));-vi.mock("@/react/components/ui/feature-modal", () => ({+vi.mock("@/components/ui/feature-modal", () => ({FeatureModal: ({open,feature,diff --git a/frontend/src/react/components/instance/InstanceFormContext.tsx b/frontend/src/components/instance/InstanceFormContext.tsxsimilarity index 99%rename from frontend/src/react/components/instance/InstanceFormContext.tsxrename to frontend/src/components/instance/InstanceFormContext.tsxindex 4d1b088f3f..afff9fbe09 100644--- a/frontend/src/react/components/instance/InstanceFormContext.tsx+++ b/frontend/src/components/instance/InstanceFormContext.tsx@@ -12,8 +12,8 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import { Engine, State } from "@/types/proto-es/v1/common_pb";import type {DataSource,diff --git a/frontend/src/react/components/instance/InstanceRoleTable.tsx b/frontend/src/components/instance/InstanceRoleTable.tsxsimilarity index 97%rename from frontend/src/react/components/instance/InstanceRoleTable.tsxrename to frontend/src/components/instance/InstanceRoleTable.tsxindex af728d9c3c..de7e9ef97c 100644--- a/frontend/src/react/components/instance/InstanceRoleTable.tsx+++ b/frontend/src/components/instance/InstanceRoleTable.tsx@@ -6,7 +6,7 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";+} from "@/components/ui/table";import type { InstanceRole } from "@/types/proto-es/v1/instance_role_service_pb";interface InstanceRoleTableProps {diff --git a/frontend/src/react/components/instance/InstanceSyncButton.tsx b/frontend/src/components/instance/InstanceSyncButton.tsxsimilarity index 95%rename from frontend/src/react/components/instance/InstanceSyncButton.tsxrename to frontend/src/components/instance/InstanceSyncButton.tsxindex 6e7c0c5571..e2dbdc60ad 100644--- a/frontend/src/react/components/instance/InstanceSyncButton.tsx+++ b/frontend/src/components/instance/InstanceSyncButton.tsx@@ -1,15 +1,15 @@import { ChevronDown } from "lucide-react";import { useCallback, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";+import { Button } from "@/components/ui/button";import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/components/ui/dropdown-menu";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import { SyncStatus } from "@/types/proto-es/v1/database_service_pb";import { hasWorkspacePermissionV2 } from "@/utils";diff --git a/frontend/src/react/components/instance/SshConnectionForm.test.tsx b/frontend/src/components/instance/SshConnectionForm.test.tsxsimilarity index 100%rename from frontend/src/react/components/instance/SshConnectionForm.test.tsxrename to frontend/src/components/instance/SshConnectionForm.test.tsxdiff --git a/frontend/src/react/components/instance/SshConnectionForm.tsx b/frontend/src/components/instance/SshConnectionForm.tsxsimilarity index 97%rename from frontend/src/react/components/instance/SshConnectionForm.tsxrename to frontend/src/components/instance/SshConnectionForm.tsxindex ab962dddef..11e6369964 100644--- a/frontend/src/react/components/instance/SshConnectionForm.tsx+++ b/frontend/src/components/instance/SshConnectionForm.tsx@@ -1,7 +1,7 @@import { type DragEvent, useCallback, useEffect, useState } from "react";import { useTranslation } from "react-i18next";-import { Input } from "@/react/components/ui/input";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";+import { Input } from "@/components/ui/input";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";import type { Instance } from "@/types/proto-es/v1/instance_service_pb";const SSH_TYPES = ["NONE", "TUNNEL+PK"] as const;diff --git a/frontend/src/react/components/instance/SslCertificateForm.test.tsx b/frontend/src/components/instance/SslCertificateForm.test.tsxsimilarity index 99%rename from frontend/src/react/components/instance/SslCertificateForm.test.tsxrename to frontend/src/components/instance/SslCertificateForm.test.tsxindex 24ab28eb64..d6473159ef 100644--- a/frontend/src/react/components/instance/SslCertificateForm.test.tsx+++ b/frontend/src/components/instance/SslCertificateForm.test.tsx@@ -3,7 +3,7 @@ import type { ReactNode } from "react";import { act } from "react";import { createRoot } from "react-dom/client";import { afterEach, describe, expect, test, vi } from "vitest";-import { controlMinHeightStyle } from "@/react/components/ui/styles.stylex";+import { controlMinHeightStyle } from "@/components/ui/styles.stylex";import { Engine } from "@/types/proto-es/v1/common_pb";import { SslCertificateForm } from "./SslCertificateForm";@@ -17,7 +17,7 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: ({content,children,diff --git a/frontend/src/react/components/instance/SslCertificateForm.tsx b/frontend/src/components/instance/SslCertificateForm.tsxsimilarity index 98%rename from frontend/src/react/components/instance/SslCertificateForm.tsxrename to frontend/src/components/instance/SslCertificateForm.tsxindex 0b3d88201b..28db09ff9d 100644--- a/frontend/src/react/components/instance/SslCertificateForm.tsx+++ b/frontend/src/components/instance/SslCertificateForm.tsx@@ -1,21 +1,16 @@import { Info } from "lucide-react";import { type DragEvent, useCallback } from "react";import { useTranslation } from "react-i18next";-import { Badge } from "@/react/components/ui/badge";-import { FormField } from "@/react/components/ui/form";-import { Input } from "@/react/components/ui/input";+import { Badge } from "@/components/ui/badge";+import { FormField } from "@/components/ui/form";+import { Input } from "@/components/ui/input";import {SegmentedControl,type SegmentedControlOption,-} from "@/react/components/ui/segmented-control";-import { Switch } from "@/react/components/ui/switch";-import {- Tabs,- TabsList,- TabsPanel,- TabsTrigger,-} from "@/react/components/ui/tabs";-import { Tooltip } from "@/react/components/ui/tooltip";+} from "@/components/ui/segmented-control";+import { Switch } from "@/components/ui/switch";+import { Tabs, TabsList, TabsPanel, TabsTrigger } from "@/components/ui/tabs";+import { Tooltip } from "@/components/ui/tooltip";import { Engine } from "@/types/proto-es/v1/common_pb";import {getLocalTlsCaSource,diff --git a/frontend/src/react/components/instance/common.test.ts b/frontend/src/components/instance/common.test.tssimilarity index 100%rename from frontend/src/react/components/instance/common.test.tsrename to frontend/src/components/instance/common.test.tsdiff --git a/frontend/src/react/components/instance/common.ts b/frontend/src/components/instance/common.tssimilarity index 98%rename from frontend/src/react/components/instance/common.tsrename to frontend/src/components/instance/common.tsindex 60143c3330..c07970aacc 100644--- a/frontend/src/react/components/instance/common.ts+++ b/frontend/src/components/instance/common.ts@@ -1,6 +1,6 @@import { cloneDeep, first } from "lodash-es";-import i18n from "@/react/i18n";-import { useAppStore } from "@/react/stores/app";+import i18n from "@/lib/i18n";+import { useAppStore } from "@/stores/app";import { UNKNOWN_INSTANCE_NAME, unknownDataSource } from "@/types";import { Engine, State } from "@/types/proto-es/v1/common_pb";import type {diff --git a/frontend/src/react/components/instance/constants.test.ts b/frontend/src/components/instance/constants.test.tssimilarity index 100%rename from frontend/src/react/components/instance/constants.test.tsrename to frontend/src/components/instance/constants.test.tsdiff --git a/frontend/src/react/components/instance/constants.ts b/frontend/src/components/instance/constants.tssimilarity index 100%rename from frontend/src/react/components/instance/constants.tsrename to frontend/src/components/instance/constants.tsdiff --git a/frontend/src/react/components/instance/index.tsx b/frontend/src/components/instance/index.tsxsimilarity index 100%rename from frontend/src/react/components/instance/index.tsxrename to frontend/src/components/instance/index.tsxdiff --git a/frontend/src/react/components/instance/info-content.ts b/frontend/src/components/instance/info-content.tssimilarity index 100%rename from frontend/src/react/components/instance/info-content.tsrename to frontend/src/components/instance/info-content.tsdiff --git a/frontend/src/react/components/instance/specs.ts b/frontend/src/components/instance/specs.tssimilarity index 100%rename from frontend/src/react/components/instance/specs.tsrename to frontend/src/components/instance/specs.tsdiff --git a/frontend/src/react/components/instance/tls.ts b/frontend/src/components/instance/tls.tssimilarity index 100%rename from frontend/src/react/components/instance/tls.tsrename to frontend/src/components/instance/tls.tsdiff --git a/frontend/src/react/components/issue-activity/IssueCommentActivity.test.tsx b/frontend/src/components/issue-activity/IssueCommentActivity.test.tsxsimilarity index 93%rename from frontend/src/react/components/issue-activity/IssueCommentActivity.test.tsxrename to frontend/src/components/issue-activity/IssueCommentActivity.test.tsxindex 2dbaba3f02..6324c2f23e 100644--- a/frontend/src/react/components/issue-activity/IssueCommentActivity.test.tsx+++ b/frontend/src/components/issue-activity/IssueCommentActivity.test.tsx@@ -12,7 +12,7 @@ import { PlanSchema } from "@/types/proto-es/v1/plan_service_pb";import {getIssueCommentType,IssueCommentType,-} from "@/react/stores/app/issueComment";+} from "@/stores/app/issueComment";import { IssueCommentRow } from "./IssueCommentActivity";vi.mock("react-i18next", async (importOriginal) => ({@@ -25,7 +25,7 @@ vi.mock("react-i18next", async (importOriginal) => ({}),}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: (selector: (state: unknown) => unknown) =>selector({getUserByIdentifier: (identifier: string) =>@@ -42,15 +42,15 @@ vi.mock("@/react/stores/app", () => ({}),}));-vi.mock("@/react/components/HumanizeTs", () => ({+vi.mock("@/components/HumanizeTs", () => ({HumanizeTs: () => null,}));-vi.mock("@/react/components/monaco", () => ({+vi.mock("@/components/monaco", () => ({ReadonlyDiffMonaco: () => null,}));-vi.mock("@/react/components/UserAvatar", () => ({+vi.mock("@/components/UserAvatar", () => ({UserAvatar: () => <span data-testid="user-avatar" />,}));diff --git a/frontend/src/react/components/issue-activity/IssueCommentActivity.tsx b/frontend/src/components/issue-activity/IssueCommentActivity.tsxsimilarity index 97%rename from frontend/src/react/components/issue-activity/IssueCommentActivity.tsxrename to frontend/src/components/issue-activity/IssueCommentActivity.tsxindex 5cbc336825..263fc76fd6 100644--- a/frontend/src/react/components/issue-activity/IssueCommentActivity.tsx+++ b/frontend/src/components/issue-activity/IssueCommentActivity.tsx@@ -5,37 +5,33 @@import { Loader2, Send } from "lucide-react";import { Fragment, type ReactNode, useEffect, useState } from "react";import { useTranslation } from "react-i18next";-import { HumanizeTs } from "@/react/components/HumanizeTs";+import { router } from "@/app/router";+import { buildPlanDeployRouteFromPlanName } from "@/app/router/routeHelpers";+import { HumanizeTs } from "@/components/HumanizeTs";import {type ActivityIconSpec,ICON_BADGE_TONE,ISSUE_EVENT_ICON,PLAN_CHANGE_ICON,REVIEW_DECISION_ICON,-} from "@/react/components/issue-activity/activityIcons";-import { ReadonlyDiffMonaco } from "@/react/components/monaco";-import { RouterLink } from "@/react/components/RouterLink";-import { UserAvatar } from "@/react/components/UserAvatar";-import { Badge } from "@/react/components/ui/badge";-import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";+} from "@/components/issue-activity/activityIcons";+import { ReadonlyDiffMonaco } from "@/components/monaco";+import { RouterLink } from "@/components/RouterLink";+import { UserAvatar } from "@/components/UserAvatar";+import { Badge } from "@/components/ui/badge";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";import {diffEntryKey,diffPlanSpecsForEvent,type SpecDiffEntry,-} from "@/react/lib/plan/diffPlanSpecs";-import { cn } from "@/react/lib/utils";-import { router } from "@/react/router";-import { buildPlanDeployRouteFromPlanName } from "@/react/router/routeHelpers";-import { useAppStore } from "@/react/stores/app";+} from "@/lib/plan/diffPlanSpecs";+import { cn } from "@/lib/utils";+import { extractUserEmail } from "@/stores";+import { useAppStore } from "@/stores/app";import {getIssueCommentType,IssueCommentType,-} from "@/react/stores/app/issueComment";-import { extractUserEmail } from "@/store";+} from "@/stores/app/issueComment";import { getTimeForPbTimestampProtoEs, unknownUser } from "@/types";import { ApprovalStatus } from "@/types/proto-es/v1/common_pb";import type { Issue, IssueComment } from "@/types/proto-es/v1/issue_service_pb";diff --git a/frontend/src/react/components/issue-activity/activityIcons.ts b/frontend/src/components/issue-activity/activityIcons.tssimilarity index 100%rename from frontend/src/react/components/issue-activity/activityIcons.tsrename to frontend/src/components/issue-activity/activityIcons.tsdiff --git a/frontend/src/react/components/monaco/DiffMonaco.tsx b/frontend/src/components/monaco/DiffMonaco.tsxsimilarity index 99%rename from frontend/src/react/components/monaco/DiffMonaco.tsxrename to frontend/src/components/monaco/DiffMonaco.tsxindex 601d63b8a5..251a18cae5 100644--- a/frontend/src/react/components/monaco/DiffMonaco.tsx+++ b/frontend/src/components/monaco/DiffMonaco.tsx@@ -1,6 +1,6 @@import { Loader2 } from "lucide-react";import { useEffect, useMemo, useRef, useState } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";import type { Language } from "@/types";import {createMonacoDiffEditor,diff --git a/frontend/src/react/components/monaco/MonacoEditor.test.tsx b/frontend/src/components/monaco/MonacoEditor.test.tsxsimilarity index 99%rename from frontend/src/react/components/monaco/MonacoEditor.test.tsxrename to frontend/src/components/monaco/MonacoEditor.test.tsxindex 44d04d82c0..1638480637 100644--- a/frontend/src/react/components/monaco/MonacoEditor.test.tsx+++ b/frontend/src/components/monaco/MonacoEditor.test.tsx@@ -66,7 +66,7 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: ({children,content,diff --git a/frontend/src/react/components/monaco/MonacoEditor.tsx b/frontend/src/components/monaco/MonacoEditor.tsxsimilarity index 99%rename from frontend/src/react/components/monaco/MonacoEditor.tsxrename to frontend/src/components/monaco/MonacoEditor.tsxindex a668e698c6..830e52850f 100644--- a/frontend/src/react/components/monaco/MonacoEditor.tsx+++ b/frontend/src/components/monaco/MonacoEditor.tsx@@ -11,8 +11,8 @@ import {} from "react";import { useTranslation } from "react-i18next";import { v4 as uuidv4 } from "uuid";-import { Tooltip } from "@/react/components/ui/tooltip";-import { cn } from "@/react/lib/utils";+import { Tooltip } from "@/components/ui/tooltip";+import { cn } from "@/lib/utils";import type { Language, SQLDialect } from "@/types";import { UNKNOWN_ID } from "@/types";import { PositionSchema } from "@/types/proto-es/v1/common_pb";diff --git a/frontend/src/react/components/monaco/ReadonlyDiffMonaco.tsx b/frontend/src/components/monaco/ReadonlyDiffMonaco.tsxsimilarity index 100%rename from frontend/src/react/components/monaco/ReadonlyDiffMonaco.tsxrename to frontend/src/components/monaco/ReadonlyDiffMonaco.tsxdiff --git a/frontend/src/react/components/monaco/ReadonlyMonaco.test.tsx b/frontend/src/components/monaco/ReadonlyMonaco.test.tsxsimilarity index 100%rename from frontend/src/react/components/monaco/ReadonlyMonaco.test.tsxrename to frontend/src/components/monaco/ReadonlyMonaco.test.tsxdiff --git a/frontend/src/react/components/monaco/ReadonlyMonaco.tsx b/frontend/src/components/monaco/ReadonlyMonaco.tsxsimilarity index 100%rename from frontend/src/react/components/monaco/ReadonlyMonaco.tsxrename to frontend/src/components/monaco/ReadonlyMonaco.tsxdiff --git a/frontend/src/react/components/monaco/core.test.ts b/frontend/src/components/monaco/core.test.tssimilarity index 100%rename from frontend/src/react/components/monaco/core.test.tsrename to frontend/src/components/monaco/core.test.tsdiff --git a/frontend/src/react/components/monaco/core.ts b/frontend/src/components/monaco/core.tssimilarity index 100%rename from frontend/src/react/components/monaco/core.tsrename to frontend/src/components/monaco/core.tsdiff --git a/frontend/src/react/components/monaco/editorThemes.ts b/frontend/src/components/monaco/editorThemes.tssimilarity index 100%rename from frontend/src/react/components/monaco/editorThemes.tsrename to frontend/src/components/monaco/editorThemes.tsdiff --git a/frontend/src/react/components/monaco/height.test.ts b/frontend/src/components/monaco/height.test.tssimilarity index 100%rename from frontend/src/react/components/monaco/height.test.tsrename to frontend/src/components/monaco/height.test.tsdiff --git a/frontend/src/react/components/monaco/height.ts b/frontend/src/components/monaco/height.tssimilarity index 100%rename from frontend/src/react/components/monaco/height.tsrename to frontend/src/components/monaco/height.tsdiff --git a/frontend/src/react/components/monaco/index.ts b/frontend/src/components/monaco/index.tssimilarity index 100%rename from frontend/src/react/components/monaco/index.tsrename to frontend/src/components/monaco/index.tsdiff --git a/frontend/src/react/components/monaco/lsp-client.ts b/frontend/src/components/monaco/lsp-client.tssimilarity index 99%rename from frontend/src/react/components/monaco/lsp-client.tsrename to frontend/src/components/monaco/lsp-client.tsindex ef810da007..5eb3156aa4 100644--- a/frontend/src/react/components/monaco/lsp-client.ts+++ b/frontend/src/components/monaco/lsp-client.ts@@ -15,7 +15,7 @@ import {WebSocketMessageReader,WebSocketMessageWriter,} from "vscode-ws-jsonrpc";-import { refreshTokens } from "@/connect/refreshToken";+import { refreshTokens } from "@/api/refreshToken";import { sleep } from "@/utils";import { initializeMonacoServices } from "./services";import {diff --git a/frontend/src/react/components/monaco/services.ts b/frontend/src/components/monaco/services.tssimilarity index 100%rename from frontend/src/react/components/monaco/services.tsrename to frontend/src/components/monaco/services.tsdiff --git a/frontend/src/react/components/monaco/sqlFormatter.ts b/frontend/src/components/monaco/sqlFormatter.tssimilarity index 100%rename from frontend/src/react/components/monaco/sqlFormatter.tsrename to frontend/src/components/monaco/sqlFormatter.tsdiff --git a/frontend/src/react/components/monaco/statement-range-store.ts b/frontend/src/components/monaco/statement-range-store.tssimilarity index 100%rename from frontend/src/react/components/monaco/statement-range-store.tsrename to frontend/src/components/monaco/statement-range-store.tsdiff --git a/frontend/src/react/components/monaco/suggest-icons.ts b/frontend/src/components/monaco/suggest-icons.tssimilarity index 100%rename from frontend/src/react/components/monaco/suggest-icons.tsrename to frontend/src/components/monaco/suggest-icons.tsdiff --git a/frontend/src/react/components/monaco/text-model.ts b/frontend/src/components/monaco/text-model.tssimilarity index 100%rename from frontend/src/react/components/monaco/text-model.tsrename to frontend/src/components/monaco/text-model.tsdiff --git a/frontend/src/react/components/monaco/types.ts b/frontend/src/components/monaco/types.tssimilarity index 100%rename from frontend/src/react/components/monaco/types.tsrename to frontend/src/components/monaco/types.tsdiff --git a/frontend/src/react/components/monaco/utils.ts b/frontend/src/components/monaco/utils.tssimilarity index 98%rename from frontend/src/react/components/monaco/utils.tsrename to frontend/src/components/monaco/utils.tsindex 6dca781bb7..b0b623e3c8 100644--- a/frontend/src/react/components/monaco/utils.ts+++ b/frontend/src/components/monaco/utils.ts@@ -1,5 +1,5 @@import { Range } from "monaco-editor";-import { pushNotification } from "@/store";+import { pushNotification } from "@/stores";import type { Language, SQLDialect } from "@/types";import { callCssVariable, escapeMarkdown, minmax } from "@/utils";import { formatSQL } from "./sqlFormatter";diff --git a/frontend/src/react/components/plan-check/PlanCheckSection.tsx b/frontend/src/components/plan-check/PlanCheckSection.tsxsimilarity index 98%rename from frontend/src/react/components/plan-check/PlanCheckSection.tsxrename to frontend/src/components/plan-check/PlanCheckSection.tsxindex 3828a40826..775e622437 100644--- a/frontend/src/react/components/plan-check/PlanCheckSection.tsx+++ b/frontend/src/components/plan-check/PlanCheckSection.tsx@@ -11,21 +11,21 @@ import {} from "lucide-react";import { type ReactNode, useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";+import { Button } from "@/components/ui/button";import {Sheet,SheetBody,SheetContent,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { Tooltip } from "@/react/components/ui/tooltip";-import { cn } from "@/react/lib/utils";+} from "@/components/ui/sheet";+import { Tooltip } from "@/components/ui/tooltip";import {getFilteredResultGroups,getPlanCheckSummary,type PlanCheckSummary,-} from "@/react/pages/project/plan-detail/utils/planCheck";+} from "@/lib/plan/check";+import { cn } from "@/lib/utils";import {getDateForPbTimestampProtoEs,getRuleLocalization,diff --git a/frontend/src/react/components/release/ReleaseFileDetailPanel.tsx b/frontend/src/components/release/ReleaseFileDetailPanel.tsxsimilarity index 90%rename from frontend/src/react/components/release/ReleaseFileDetailPanel.tsxrename to frontend/src/components/release/ReleaseFileDetailPanel.tsxindex 0bbf3c552c..3442433997 100644--- a/frontend/src/react/components/release/ReleaseFileDetailPanel.tsx+++ b/frontend/src/components/release/ReleaseFileDetailPanel.tsx@@ -1,10 +1,10 @@import { Loader2 } from "lucide-react";import { useEffect, useState } from "react";import { useTranslation } from "react-i18next";-import { sheetServiceClientConnect } from "@/connect";-import { ReadonlyMonaco } from "@/react/components/monaco/ReadonlyMonaco";-import { CopyButton } from "@/react/components/ui/copy-button";-import { Separator } from "@/react/components/ui/separator";+import { sheetServiceClientConnect } from "@/api";+import { ReadonlyMonaco } from "@/components/monaco/ReadonlyMonaco";+import { CopyButton } from "@/components/ui/copy-button";+import { Separator } from "@/components/ui/separator";import type { Release_File } from "@/types/proto-es/v1/release_service_pb";export interface ReleaseFileDetailPanelProps {diff --git a/frontend/src/react/components/release/ReleaseFileTable.test.tsx b/frontend/src/components/release/ReleaseFileTable.test.tsxsimilarity index 100%rename from frontend/src/react/components/release/ReleaseFileTable.test.tsxrename to frontend/src/components/release/ReleaseFileTable.test.tsxdiff --git a/frontend/src/react/components/release/ReleaseFileTable.tsx b/frontend/src/components/release/ReleaseFileTable.tsxsimilarity index 96%rename from frontend/src/react/components/release/ReleaseFileTable.tsxrename to frontend/src/components/release/ReleaseFileTable.tsxindex fe836f4cfc..a22c6fb3c1 100644--- a/frontend/src/react/components/release/ReleaseFileTable.tsx+++ b/frontend/src/components/release/ReleaseFileTable.tsx@@ -1,8 +1,8 @@import type { MouseEvent } from "react";import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";import {Table,TableBody,@@ -10,8 +10,8 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { cn } from "@/react/lib/utils";+} from "@/components/ui/table";+import { cn } from "@/lib/utils";import {type Release_File,Release_Type,diff --git a/frontend/src/react/components/release/ReleaseInfoCard.test.tsx b/frontend/src/components/release/ReleaseInfoCard.test.tsxsimilarity index 100%rename from frontend/src/react/components/release/ReleaseInfoCard.test.tsxrename to frontend/src/components/release/ReleaseInfoCard.test.tsxdiff --git a/frontend/src/react/components/release/ReleaseInfoCard.tsx b/frontend/src/components/release/ReleaseInfoCard.tsxsimilarity index 98%rename from frontend/src/react/components/release/ReleaseInfoCard.tsxrename to frontend/src/components/release/ReleaseInfoCard.tsxindex 9efc2cf84c..dfee9908e9 100644--- a/frontend/src/react/components/release/ReleaseInfoCard.tsx+++ b/frontend/src/components/release/ReleaseInfoCard.tsx@@ -4,8 +4,8 @@ import { ExternalLink, Loader2, Package } from "lucide-react";import type { ReactNode } from "react";import { useMemo } from "react";import { useTranslation } from "react-i18next";-import { RouterLink } from "@/react/components/RouterLink";-import { cn } from "@/react/lib/utils";+import { RouterLink } from "@/components/RouterLink";+import { cn } from "@/lib/utils";import { State, VCSType } from "@/types/proto-es/v1/common_pb";import type { Release } from "@/types/proto-es/v1/release_service_pb";import { Release_Type } from "@/types/proto-es/v1/release_service_pb";diff --git a/frontend/src/react/components/revision/RevisionDetailPanel.tsx b/frontend/src/components/revision/RevisionDetailPanel.tsxsimilarity index 91%rename from frontend/src/react/components/revision/RevisionDetailPanel.tsxrename to frontend/src/components/revision/RevisionDetailPanel.tsxindex 5ea39babef..8311b4ea99 100644--- a/frontend/src/react/components/revision/RevisionDetailPanel.tsx+++ b/frontend/src/components/revision/RevisionDetailPanel.tsx@@ -1,13 +1,13 @@import { ArrowUpRight, LoaderCircle } from "lucide-react";import { useEffect, useState } from "react";import { useTranslation } from "react-i18next";-import { sheetServiceClientConnect } from "@/connect";-import { ReadonlyMonaco } from "@/react/components/monaco";-import { RouterLink } from "@/react/components/RouterLink";-import { TaskRunLogViewer } from "@/react/components/task-run-log";-import { CopyButton } from "@/react/components/ui/copy-button";-import { useRevisionByName } from "@/react/hooks/useAppState";-import { useAppStore } from "@/react/stores/app";+import { sheetServiceClientConnect } from "@/api";+import { ReadonlyMonaco } from "@/components/monaco";+import { RouterLink } from "@/components/RouterLink";+import { TaskRunLogViewer } from "@/components/task-run-log";+import { CopyButton } from "@/components/ui/copy-button";+import { useRevisionByName } from "@/hooks/useAppState";+import { useAppStore } from "@/stores/app";import { getTimeForPbTimestampProtoEs } from "@/types";import { bytesToString, formatAbsoluteDateTime } from "@/utils";import { extractTaskLink, getRevisionType } from "@/utils/v1/revision";diff --git a/frontend/src/react/components/revision/index.ts b/frontend/src/components/revision/index.tssimilarity index 100%rename from frontend/src/react/components/revision/index.tsrename to frontend/src/components/revision/index.tsdiff --git a/frontend/src/react/components/role-grant/DDLWarningCallout.locale.test.ts b/frontend/src/components/role-grant/DDLWarningCallout.locale.test.tssimilarity index 100%rename from frontend/src/react/components/role-grant/DDLWarningCallout.locale.test.tsrename to frontend/src/components/role-grant/DDLWarningCallout.locale.test.tsdiff --git a/frontend/src/react/components/role-grant/DDLWarningCallout.test.tsx b/frontend/src/components/role-grant/DDLWarningCallout.test.tsxsimilarity index 100%rename from frontend/src/react/components/role-grant/DDLWarningCallout.test.tsxrename to frontend/src/components/role-grant/DDLWarningCallout.test.tsxdiff --git a/frontend/src/react/components/role-grant/DDLWarningCallout.tsx b/frontend/src/components/role-grant/DDLWarningCallout.tsxsimilarity index 90%rename from frontend/src/react/components/role-grant/DDLWarningCallout.tsxrename to frontend/src/components/role-grant/DDLWarningCallout.tsxindex f547031fe1..f04b3fad36 100644--- a/frontend/src/react/components/role-grant/DDLWarningCallout.tsx+++ b/frontend/src/components/role-grant/DDLWarningCallout.tsx@@ -1,6 +1,6 @@import { useTranslation } from "react-i18next";-import { Alert } from "@/react/components/ui/alert";-import type { EnvLimitationKind } from "@/react/lib/project-member/utils";+import { Alert } from "@/components/ui/alert";+import type { EnvLimitationKind } from "@/lib/project-member/utils";type DDLWarningProps =| { type: "drawer"; kind: EnvLimitationKind }diff --git a/frontend/src/react/components/schema/icons.tsx b/frontend/src/components/schema/icons.tsxsimilarity index 94%rename from frontend/src/react/components/schema/icons.tsxrename to frontend/src/components/schema/icons.tsxindex ce6ef18a8e..cf94067a0f 100644--- a/frontend/src/react/components/schema/icons.tsx+++ b/frontend/src/components/schema/icons.tsx@@ -1,4 +1,4 @@-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";interface IconProps {className?: string;diff --git a/frontend/src/react/components/sql-review/Panels.test.tsx b/frontend/src/components/sql-review/Panels.test.tsxsimilarity index 94%rename from frontend/src/react/components/sql-review/Panels.test.tsxrename to frontend/src/components/sql-review/Panels.test.tsxindex 9bfc8a9d4a..6de7edd058 100644--- a/frontend/src/react/components/sql-review/Panels.test.tsx+++ b/frontend/src/components/sql-review/Panels.test.tsx@@ -31,11 +31,11 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/hooks/useEscapeKey", () => ({+vi.mock("@/hooks/useEscapeKey", () => ({useEscapeKey: vi.fn(),}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: Object.assign((selector: (state: typeof appStoreState) => unknown) =>selector(appStoreState),@@ -45,7 +45,7 @@ vi.mock("@/react/stores/app", () => ({),}));-vi.mock("@/react/stores/sqlReview", () => ({+vi.mock("@/stores/sqlReview", () => ({useSQLReviewStore: () => ({getReviewPolicyByResouce: mocks.getReviewPolicyByResouce,removeResourceForReview: mocks.removeResourceForReview,@@ -58,13 +58,13 @@ vi.mock("@/utils", async (importOriginal) => ({hasWorkspacePermissionV2: vi.fn(() => true),}));-vi.mock("@/react/components/ui/alert", () => ({+vi.mock("@/components/ui/alert", () => ({Alert: ({ description }: { description: React.ReactNode }) => (<div>{description}</div>),}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,onClick,@@ -74,11 +74,11 @@ vi.mock("@/react/components/ui/button", () => ({}) => <button onClick={onClick}>{children}</button>,}));-vi.mock("@/react/components/ui/checkbox", () => ({+vi.mock("@/components/ui/checkbox", () => ({Checkbox: () => <input type="checkbox" readOnly />,}));-vi.mock("@/react/components/ui/sheet", () => ({+vi.mock("@/components/ui/sheet", () => ({Sheet: ({ children, open }: { children: React.ReactNode; open: boolean }) =>open ? <div>{children}</div> : null,SheetBody: ({ children }: { children: React.ReactNode }) => (diff --git a/frontend/src/react/components/sql-review/Panels.tsx b/frontend/src/components/sql-review/Panels.tsxsimilarity index 97%rename from frontend/src/react/components/sql-review/Panels.tsxrename to frontend/src/components/sql-review/Panels.tsxindex 0d4da30ed7..ea9f921517 100644--- a/frontend/src/react/components/sql-review/Panels.tsx+++ b/frontend/src/components/sql-review/Panels.tsx@@ -1,9 +1,9 @@import { ExternalLink } from "lucide-react";import { useCallback, useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { Alert } from "@/react/components/ui/alert";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";+import { Alert } from "@/components/ui/alert";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";import {Sheet,SheetBody,@@ -11,16 +11,16 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { useEscapeKey } from "@/react/hooks/useEscapeKey";-import { getRuleKey } from "@/react/lib/sql-review/utils";-import { useAppStore } from "@/react/stores/app";-import { useSQLReviewStore } from "@/react/stores/sqlReview";-import { pushNotification } from "@/store";+} from "@/components/ui/sheet";+import { useEscapeKey } from "@/hooks/useEscapeKey";+import { getRuleKey } from "@/lib/sql-review/utils";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import {environmentNamePrefix,projectNamePrefix,-} from "@/store/modules/v1/common";+} from "@/stores/modules/v1/common";+import { useSQLReviewStore } from "@/stores/sqlReview";import type { SQLReviewPolicy } from "@/types";import type { Engine } from "@/types/proto-es/v1/common_pb";import { State } from "@/types/proto-es/v1/common_pb";diff --git a/frontend/src/react/components/sql-review/ResourceLink.test.tsx b/frontend/src/components/sql-review/ResourceLink.test.tsxsimilarity index 95%rename from frontend/src/react/components/sql-review/ResourceLink.test.tsxrename to frontend/src/components/sql-review/ResourceLink.test.tsxindex 9850fbbdd3..32389343d3 100644--- a/frontend/src/react/components/sql-review/ResourceLink.test.tsx+++ b/frontend/src/components/sql-review/ResourceLink.test.tsx@@ -19,7 +19,7 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/components/RouterLink", () => ({+vi.mock("@/components/RouterLink", () => ({RouterLink: ({children,className,@@ -37,16 +37,16 @@ vi.mock("@/react/components/RouterLink", () => ({),}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useEnvironment: mocks.useEnvironment,usePlanFeature: mocks.usePlanFeature,}));-vi.mock("@/react/hooks/useProjectByName", () => ({+vi.mock("@/hooks/useProjectByName", () => ({useProjectByName: mocks.useProjectByName,}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: Object.assign((selector: (state: { projectsByName: Record<string, unknown> }) => unknowndiff --git a/frontend/src/react/components/sql-review/ResourceLink.tsx b/frontend/src/components/sql-review/ResourceLink.tsxsimilarity index 86%rename from frontend/src/react/components/sql-review/ResourceLink.tsxrename to frontend/src/components/sql-review/ResourceLink.tsxindex 2e8645f49f..5ce2626011 100644--- a/frontend/src/react/components/sql-review/ResourceLink.tsx+++ b/frontend/src/components/sql-review/ResourceLink.tsx@@ -1,16 +1,13 @@import { ShieldAlert } from "lucide-react";import { useTranslation } from "react-i18next";-import { ProjectLabel } from "@/react/components/ProjectLabel";-import {- RouterLink,- type RouterLinkProps,-} from "@/react/components/RouterLink";-import { useEnvironment, usePlanFeature } from "@/react/hooks/useAppState";-import { cn } from "@/react/lib/utils";+import { ProjectLabel } from "@/components/ProjectLabel";+import { RouterLink, type RouterLinkProps } from "@/components/RouterLink";+import { useEnvironment, usePlanFeature } from "@/hooks/useAppState";+import { cn } from "@/lib/utils";import {environmentNamePrefix,projectNamePrefix,-} from "@/store/modules/v1/common";+} from "@/stores/modules/v1/common";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";type ResourceLinkAnchorProps = Pick<diff --git a/frontend/src/react/components/sql-review/ReviewCreation.test.tsx b/frontend/src/components/sql-review/ReviewCreation.test.tsxsimilarity index 96%rename from frontend/src/react/components/sql-review/ReviewCreation.test.tsxrename to frontend/src/components/sql-review/ReviewCreation.test.tsxindex 39eab38b14..109e441a23 100644--- a/frontend/src/react/components/sql-review/ReviewCreation.test.tsx+++ b/frontend/src/components/sql-review/ReviewCreation.test.tsx@@ -32,24 +32,24 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/hooks/useUnsavedChangesGuard", () => ({+vi.mock("@/hooks/useUnsavedChangesGuard", () => ({useUnsavedChangesGuard: mocks.useUnsavedChangesGuard,}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({router: {push: vi.fn(),},}));-vi.mock("@/react/stores/sqlReview", () => ({+vi.mock("@/stores/sqlReview", () => ({useSQLReviewStore: () => ({upsertReviewPolicy: mocks.upsertReviewPolicy,getOrFetchReviewPolicyByName: mocks.getOrFetchReviewPolicyByName,}),}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: vi.fn(),}));@@ -79,7 +79,7 @@ vi.mock("@/types", async (importOriginal) => {};});-vi.mock("@/react/components/ResourceIdField", () => ({+vi.mock("@/components/ResourceIdField", () => ({ResourceIdField: ({value,onChange,@@ -98,7 +98,7 @@ vi.mock("@/react/components/ResourceIdField", () => ({},}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,disabled,@@ -114,7 +114,7 @@ vi.mock("@/react/components/ui/button", () => ({),}));-vi.mock("@/react/components/ui/input", () => ({+vi.mock("@/components/ui/input", () => ({Input: (props: React.InputHTMLAttributes<HTMLInputElement>) => {mocks.inputOnChange = vi.fn(props.onChange);return <input {...props} />;diff --git a/frontend/src/react/components/sql-review/ReviewCreation.tsx b/frontend/src/components/sql-review/ReviewCreation.tsxsimilarity index 96%rename from frontend/src/react/components/sql-review/ReviewCreation.tsxrename to frontend/src/components/sql-review/ReviewCreation.tsxindex e46c5b622c..62c9aeefaa 100644--- a/frontend/src/react/components/sql-review/ReviewCreation.tsx+++ b/frontend/src/components/sql-review/ReviewCreation.tsx@@ -4,27 +4,27 @@ import { Plus } from "lucide-react";import { useCallback, useState } from "react";import { flushSync } from "react-dom";import { useTranslation } from "react-i18next";-import { ResourceIdField } from "@/react/components/ResourceIdField";-import { Button } from "@/react/components/ui/button";-import { Input } from "@/react/components/ui/input";-import { StickyActionFooter } from "@/react/components/ui/sticky-action-footer";-import { useUnsavedChangesGuard } from "@/react/hooks/useUnsavedChangesGuard";+import { router } from "@/app/router";+import {+ WORKSPACE_ROUTE_SQL_REVIEW,+ WORKSPACE_ROUTE_SQL_REVIEW_DETAIL,+} from "@/app/router/handles";+import { ResourceIdField } from "@/components/ResourceIdField";+import { Button } from "@/components/ui/button";+import { Input } from "@/components/ui/input";+import { StickyActionFooter } from "@/components/ui/sticky-action-footer";+import { useUnsavedChangesGuard } from "@/hooks/useUnsavedChangesGuard";import {getRuleKey,getRuleMapValidationErrorTitle,getTemplateId,-} from "@/react/lib/sql-review/utils";-import { router } from "@/react/router";-import {- WORKSPACE_ROUTE_SQL_REVIEW,- WORKSPACE_ROUTE_SQL_REVIEW_DETAIL,-} from "@/react/router/handles";-import { useSQLReviewStore } from "@/react/stores/sqlReview";-import { pushNotification } from "@/store";+} from "@/lib/sql-review/utils";+import { pushNotification } from "@/stores";import {getReviewConfigId,reviewConfigNamePrefix,-} from "@/store/modules/v1/common";+} from "@/stores/modules/v1/common";+import { useSQLReviewStore } from "@/stores/sqlReview";import type {RuleTemplateV2,SQLReviewPolicy,diff --git a/frontend/src/react/components/sql-review/RuleComponents.test.tsx b/frontend/src/components/sql-review/RuleComponents.test.tsxsimilarity index 94%rename from frontend/src/react/components/sql-review/RuleComponents.test.tsxrename to frontend/src/components/sql-review/RuleComponents.test.tsxindex 225c9681d6..36c3e370c2 100644--- a/frontend/src/react/components/sql-review/RuleComponents.test.tsx+++ b/frontend/src/components/sql-review/RuleComponents.test.tsx@@ -22,26 +22,26 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/components/EngineIcon", () => ({+vi.mock("@/components/EngineIcon", () => ({EngineIcon: ({ engine }: { engine: Engine }) => (<span data-engine={engine} data-testid="engine-icon" />),}));-vi.mock("@/react/i18n", () => ({+vi.mock("@/lib/i18n", () => ({default: {exists: vi.fn(() => false),t: vi.fn((key: string) => key),},}));-vi.mock("@/react/components/ui/badge", () => ({+vi.mock("@/components/ui/badge", () => ({Badge: ({ children }: { children: React.ReactNode }) => (<span>{children}</span>),}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,...props@@ -50,11 +50,11 @@ vi.mock("@/react/components/ui/button", () => ({),}));-vi.mock("@/react/components/ui/checkbox", () => ({+vi.mock("@/components/ui/checkbox", () => ({Checkbox: () => <input type="checkbox" readOnly />,}));-vi.mock("@/react/components/ui/dialog", () => ({+vi.mock("@/components/ui/dialog", () => ({Dialog: ({ children }: { children: React.ReactNode }) => (<div>{children}</div>),@@ -66,13 +66,13 @@ vi.mock("@/react/components/ui/dialog", () => ({),}));-vi.mock("@/react/components/ui/input", () => ({+vi.mock("@/components/ui/input", () => ({Input: (props: React.InputHTMLAttributes<HTMLInputElement>) => (<input {...props} />),}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: ({ children }: { children: React.ReactNode }) => (<span>{children}</span>),diff --git a/frontend/src/react/components/sql-review/RuleComponents.tsx b/frontend/src/components/sql-review/RuleComponents.tsxsimilarity index 95%rename from frontend/src/react/components/sql-review/RuleComponents.tsxrename to frontend/src/components/sql-review/RuleComponents.tsxindex 77cd4051a7..0b8339a328 100644--- a/frontend/src/react/components/sql-review/RuleComponents.tsx+++ b/frontend/src/components/sql-review/RuleComponents.tsx@@ -1,22 +1,18 @@import { CircleHelpIcon, XIcon } from "lucide-react";import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { EngineIcon } from "@/react/components/EngineIcon";-import { Badge } from "@/react/components/ui/badge";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";-import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";-import { Input } from "@/react/components/ui/input";-import { Tooltip } from "@/react/components/ui/tooltip";-import i18n from "@/react/i18n";-import type { PayloadValueType } from "@/react/lib/sql-review/rule-config-types";-import { getRulePayload } from "@/react/lib/sql-review/rule-config-utils";-import { payloadValueListToComponentList } from "@/react/lib/sql-review/utils";-import { cn } from "@/react/lib/utils";+import { EngineIcon } from "@/components/EngineIcon";+import { Badge } from "@/components/ui/badge";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";+import { Input } from "@/components/ui/input";+import { Tooltip } from "@/components/ui/tooltip";+import i18n from "@/lib/i18n";+import type { PayloadValueType } from "@/lib/sql-review/rule-config-types";+import { getRulePayload } from "@/lib/sql-review/rule-config-utils";+import { payloadValueListToComponentList } from "@/lib/sql-review/utils";+import { cn } from "@/lib/utils";import { Engine } from "@/types/proto-es/v1/common_pb";import { SQLReviewRule_Level } from "@/types/proto-es/v1/review_config_service_pb";import type {diff --git a/frontend/src/react/components/sql-review/RuleTable.test.tsx b/frontend/src/components/sql-review/RuleTable.test.tsxsimilarity index 96%rename from frontend/src/react/components/sql-review/RuleTable.test.tsxrename to frontend/src/components/sql-review/RuleTable.test.tsxindex 062655ef5e..fc26adbdc0 100644--- a/frontend/src/react/components/sql-review/RuleTable.test.tsx+++ b/frontend/src/components/sql-review/RuleTable.test.tsx@@ -2,7 +2,7 @@ import type { ReactElement } from "react";import { act } from "react";import { createRoot } from "react-dom/client";import { beforeEach, describe, expect, test, vi } from "vitest";-import { getRuleKey } from "@/react/lib/sql-review/utils";+import { getRuleKey } from "@/lib/sql-review/utils";import { Engine } from "@/types/proto-es/v1/common_pb";import type { RuleTemplateV2 } from "@/types/sqlReview";import { getRuleLocalization, ruleTemplateMapV2 } from "@/types/sqlReview";@@ -29,7 +29,7 @@ vi.mock("@/types/sqlReview", async (importOriginal) => {};});-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,onClick,@@ -44,11 +44,11 @@ vi.mock("@/react/components/ui/button", () => ({),}));-vi.mock("@/react/components/ui/checkbox", () => ({+vi.mock("@/components/ui/checkbox", () => ({Checkbox: () => <input type="checkbox" readOnly />,}));-vi.mock("@/react/components/ui/table", () => ({+vi.mock("@/components/ui/table", () => ({Table: ({ children }: { children: React.ReactNode }) => (<table>{children}</table>),@@ -78,14 +78,14 @@ vi.mock("@/react/components/ui/table", () => ({),}));-vi.mock("@/react/components/ui/search-input", () => ({+vi.mock("@/components/ui/search-input", () => ({SearchInput: (props: React.InputHTMLAttributes<HTMLInputElement>) => {mocks.searchInputOnChange = vi.fn(props.onChange);return <input aria-label="rule-search" {...props} />;},}));-vi.mock("@/react/components/ui/tabs", () => ({+vi.mock("@/components/ui/tabs", () => ({Tabs: ({children,onValueChange: _onValueChange,diff --git a/frontend/src/react/components/sql-review/RuleTable.tsx b/frontend/src/components/sql-review/RuleTable.tsxsimilarity index 98%rename from frontend/src/react/components/sql-review/RuleTable.tsxrename to frontend/src/components/sql-review/RuleTable.tsxindex 65b8a0986c..f3e601bde0 100644--- a/frontend/src/react/components/sql-review/RuleTable.tsx+++ b/frontend/src/components/sql-review/RuleTable.tsx@@ -7,9 +7,9 @@ import {} from "lucide-react";import { memo, useCallback, useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";-import { SearchInput } from "@/react/components/ui/search-input";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";+import { SearchInput } from "@/components/ui/search-input";import {Table,TableBody,@@ -17,10 +17,10 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { Tabs, TabsList, TabsTrigger } from "@/react/components/ui/tabs";-import { getRuleKey } from "@/react/lib/sql-review/utils";-import { cn } from "@/react/lib/utils";+} from "@/components/ui/table";+import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";+import { getRuleKey } from "@/lib/sql-review/utils";+import { cn } from "@/lib/utils";import type { Engine } from "@/types/proto-es/v1/common_pb";import { SQLReviewRule_Level } from "@/types/proto-es/v1/review_config_service_pb";import type { RuleTemplateV2 } from "@/types/sqlReview";diff --git a/frontend/src/react/components/sql-review/TabsByEngine.test.tsx b/frontend/src/components/sql-review/TabsByEngine.test.tsxsimilarity index 98%rename from frontend/src/react/components/sql-review/TabsByEngine.test.tsxrename to frontend/src/components/sql-review/TabsByEngine.test.tsxindex fed0e572d6..cc3022971c 100644--- a/frontend/src/react/components/sql-review/TabsByEngine.test.tsx+++ b/frontend/src/components/sql-review/TabsByEngine.test.tsx@@ -12,7 +12,7 @@ import type { RuleTemplateV2 } from "@/types/sqlReview";let TabsByEngine: typeof import("./TabsByEngine").TabsByEngine;-vi.mock("@/react/components/EngineIcon", () => ({+vi.mock("@/components/EngineIcon", () => ({EngineIcon: () => <span data-testid="engine-icon" />,}));diff --git a/frontend/src/react/components/sql-review/TabsByEngine.tsx b/frontend/src/components/sql-review/TabsByEngine.tsxsimilarity index 96%rename from frontend/src/react/components/sql-review/TabsByEngine.tsxrename to frontend/src/components/sql-review/TabsByEngine.tsxindex ed10640077..86489cce83 100644--- a/frontend/src/react/components/sql-review/TabsByEngine.tsx+++ b/frontend/src/components/sql-review/TabsByEngine.tsx@@ -1,11 +1,6 @@import { useEffect, useMemo, useState } from "react";-import { EngineIcon } from "@/react/components/EngineIcon";-import {- Tabs,- TabsList,- TabsPanel,- TabsTrigger,-} from "@/react/components/ui/tabs";+import { EngineIcon } from "@/components/EngineIcon";+import { Tabs, TabsList, TabsPanel, TabsTrigger } from "@/components/ui/tabs";import { Engine } from "@/types/proto-es/v1/common_pb";import type { SQLReviewRule_Type } from "@/types/proto-es/v1/review_config_service_pb";import type { RuleTemplateV2 } from "@/types/sqlReview";diff --git a/frontend/src/react/components/sql-review/TemplateSelector.test.tsx b/frontend/src/components/sql-review/TemplateSelector.test.tsxsimilarity index 95%rename from frontend/src/react/components/sql-review/TemplateSelector.test.tsxrename to frontend/src/components/sql-review/TemplateSelector.test.tsxindex 91cf2afd18..8a9c99e552 100644--- a/frontend/src/react/components/sql-review/TemplateSelector.test.tsx+++ b/frontend/src/components/sql-review/TemplateSelector.test.tsx@@ -36,11 +36,11 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/react/lib/sql-review/utils", () => ({+vi.mock("@/lib/sql-review/utils", () => ({rulesToTemplate: mocks.rulesToTemplate,}));-vi.mock("@/react/components/EnvironmentLabel", () => ({+vi.mock("@/components/EnvironmentLabel", () => ({EnvironmentLabel: ({ environmentName }: { environmentName: string }) => (<span>{environmentName}</span>),@@ -67,7 +67,7 @@ const appStoreState = {},projectsByName: {},};-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: Object.assign((selector: (state: unknown) => unknown) => selector(appStoreState),{@@ -76,7 +76,7 @@ vi.mock("@/react/stores/app", () => ({),}));-vi.mock("@/react/stores/sqlReview", () => ({+vi.mock("@/stores/sqlReview", () => ({useSQLReviewStore: mocks.useSQLReviewStore,}));diff --git a/frontend/src/react/components/sql-review/TemplateSelector.tsx b/frontend/src/components/sql-review/TemplateSelector.tsxsimilarity index 92%rename from frontend/src/react/components/sql-review/TemplateSelector.tsxrename to frontend/src/components/sql-review/TemplateSelector.tsxindex 41bc000bbb..95c954d9d5 100644--- a/frontend/src/react/components/sql-review/TemplateSelector.tsx+++ b/frontend/src/components/sql-review/TemplateSelector.tsx@@ -1,18 +1,18 @@import { CheckCircle } from "lucide-react";import { useEffect, useMemo } from "react";import { useTranslation } from "react-i18next";-import { EnvironmentLabel } from "@/react/components/EnvironmentLabel";-import { Badge } from "@/react/components/ui/badge";-import { Separator } from "@/react/components/ui/separator";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { rulesToTemplate } from "@/react/lib/sql-review/utils";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";-import { useSQLReviewStore } from "@/react/stores/sqlReview";+import { EnvironmentLabel } from "@/components/EnvironmentLabel";+import { Badge } from "@/components/ui/badge";+import { Separator } from "@/components/ui/separator";+import { useProjectByName } from "@/hooks/useProjectByName";+import { rulesToTemplate } from "@/lib/sql-review/utils";+import { cn } from "@/lib/utils";+import { useAppStore } from "@/stores/app";import {environmentNamePrefix,projectNamePrefix,-} from "@/store/modules/v1/common";+} from "@/stores/modules/v1/common";+import { useSQLReviewStore } from "@/stores/sqlReview";import type { SQLReviewPolicyTemplateV2 } from "@/types";import { TEMPLATE_LIST_V2 as builtInTemplateList } from "@/types";diff --git a/frontend/src/react/components/task-run-log/SectionContent.tsx b/frontend/src/components/task-run-log/SectionContent.tsxsimilarity index 96%rename from frontend/src/react/components/task-run-log/SectionContent.tsxrename to frontend/src/components/task-run-log/SectionContent.tsxindex 39ce65a1de..d370fc12fc 100644--- a/frontend/src/react/components/task-run-log/SectionContent.tsx+++ b/frontend/src/components/task-run-log/SectionContent.tsx@@ -1,7 +1,7 @@import { useEffect, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { cn } from "@/react/lib/utils";+import { Button } from "@/components/ui/button";+import { cn } from "@/lib/utils";import type { Section } from "./types";const ITEM_HEIGHT = 20;diff --git a/frontend/src/react/components/task-run-log/SectionHeader.tsx b/frontend/src/components/task-run-log/SectionHeader.tsxsimilarity index 98%rename from frontend/src/react/components/task-run-log/SectionHeader.tsxrename to frontend/src/components/task-run-log/SectionHeader.tsxindex a28d475855..5a4d8a2147 100644--- a/frontend/src/react/components/task-run-log/SectionHeader.tsx+++ b/frontend/src/components/task-run-log/SectionHeader.tsx@@ -1,6 +1,6 @@import { ChevronDown, ChevronRight } from "lucide-react";import type { ButtonHTMLAttributes } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";import type { Section } from "./types";// The status glyph shared by the collapsible header and the sole-sectiondiff --git a/frontend/src/react/components/task-run-log/TaskRunLogViewer.i18n.test.ts b/frontend/src/components/task-run-log/TaskRunLogViewer.i18n.test.tssimilarity index 100%rename from frontend/src/react/components/task-run-log/TaskRunLogViewer.i18n.test.tsrename to frontend/src/components/task-run-log/TaskRunLogViewer.i18n.test.tsdiff --git a/frontend/src/react/components/task-run-log/TaskRunLogViewer.test.tsx b/frontend/src/components/task-run-log/TaskRunLogViewer.test.tsxsimilarity index 100%rename from frontend/src/react/components/task-run-log/TaskRunLogViewer.test.tsxrename to frontend/src/components/task-run-log/TaskRunLogViewer.test.tsxdiff --git a/frontend/src/react/components/task-run-log/TaskRunLogViewer.tsx b/frontend/src/components/task-run-log/TaskRunLogViewer.tsxsimilarity index 99%rename from frontend/src/react/components/task-run-log/TaskRunLogViewer.tsxrename to frontend/src/components/task-run-log/TaskRunLogViewer.tsxindex 6091321539..99b5348eb6 100644--- a/frontend/src/react/components/task-run-log/TaskRunLogViewer.tsx+++ b/frontend/src/components/task-run-log/TaskRunLogViewer.tsx@@ -8,7 +8,7 @@ import {} from "lucide-react";import { memo, useCallback, useMemo } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";+import { Button } from "@/components/ui/button";import {type TaskRun_Status,TaskRunLogEntry_Type,diff --git a/frontend/src/react/components/task-run-log/index.ts b/frontend/src/components/task-run-log/index.tssimilarity index 100%rename from frontend/src/react/components/task-run-log/index.tsrename to frontend/src/components/task-run-log/index.tsdiff --git a/frontend/src/react/components/task-run-log/model.test.ts b/frontend/src/components/task-run-log/model.test.tssimilarity index 99%rename from frontend/src/react/components/task-run-log/model.test.tsrename to frontend/src/components/task-run-log/model.test.tsindex ba5ece80ac..694ce5250b 100644--- a/frontend/src/react/components/task-run-log/model.test.ts+++ b/frontend/src/components/task-run-log/model.test.ts@@ -26,12 +26,12 @@ import {useTaskRunLogSections,} from "./useTaskRunLogSections";-vi.mock("@/connect", () => ({+vi.mock("@/api", () => ({rolloutServiceClientConnect: {},sheetServiceClientConnect: {},}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: () => vi.fn(),}));diff --git a/frontend/src/react/components/task-run-log/model.ts b/frontend/src/components/task-run-log/model.tssimilarity index 100%rename from frontend/src/react/components/task-run-log/model.tsrename to frontend/src/components/task-run-log/model.tsdiff --git a/frontend/src/react/components/task-run-log/types.ts b/frontend/src/components/task-run-log/types.tssimilarity index 100%rename from frontend/src/react/components/task-run-log/types.tsrename to frontend/src/components/task-run-log/types.tsdiff --git a/frontend/src/react/components/task-run-log/useTaskRunLogData.test.tsx b/frontend/src/components/task-run-log/useTaskRunLogData.test.tsxsimilarity index 99%rename from frontend/src/react/components/task-run-log/useTaskRunLogData.test.tsxrename to frontend/src/components/task-run-log/useTaskRunLogData.test.tsxindex 8ba5569380..74994a3307 100644--- a/frontend/src/react/components/task-run-log/useTaskRunLogData.test.tsx+++ b/frontend/src/components/task-run-log/useTaskRunLogData.test.tsx@@ -22,11 +22,11 @@ const mocks = vi.hoisted(() => ({rolloutsByName: {} as Record<string, unknown>,}));-vi.mock("@/connect", () => ({+vi.mock("@/api", () => ({rolloutServiceClientConnect: { getTaskRunLog: mocks.getTaskRunLog },}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const state = () => ({fetchRelease: mocks.fetchRelease,fetchRolloutByName: mocks.fetchRolloutByName,diff --git a/frontend/src/react/components/task-run-log/useTaskRunLogData.ts b/frontend/src/components/task-run-log/useTaskRunLogData.tssimilarity index 97%rename from frontend/src/react/components/task-run-log/useTaskRunLogData.tsrename to frontend/src/components/task-run-log/useTaskRunLogData.tsindex fecf6fde04..5249e0cf37 100644--- a/frontend/src/react/components/task-run-log/useTaskRunLogData.ts+++ b/frontend/src/components/task-run-log/useTaskRunLogData.ts@@ -1,13 +1,13 @@import { create } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";import { useCallback, useEffect, useMemo, useRef } from "react";-import { rolloutServiceClientConnect } from "@/connect";-import { silentContextKey } from "@/connect/context-key";-import { useLatestRef } from "@/react/hooks/useLatestRef";-import { usePolling } from "@/react/hooks/usePolling";-import { useSeededState } from "@/react/hooks/useSeededState";-import { sameMessageList } from "@/react/lib/protoIdentity";-import { useAppStore } from "@/react/stores/app";+import { rolloutServiceClientConnect } from "@/api";+import { silentContextKey } from "@/api/context-key";+import { useLatestRef } from "@/hooks/useLatestRef";+import { usePolling } from "@/hooks/usePolling";+import { useSeededState } from "@/hooks/useSeededState";+import { sameMessageList } from "@/lib/protoIdentity";+import { useAppStore } from "@/stores/app";import { unknownRollout } from "@/types";import {GetTaskRunLogRequestSchema,diff --git a/frontend/src/react/components/task-run-log/useTaskRunLogSections.ts b/frontend/src/components/task-run-log/useTaskRunLogSections.tssimilarity index 100%rename from frontend/src/react/components/task-run-log/useTaskRunLogSections.tsrename to frontend/src/components/task-run-log/useTaskRunLogSections.tsdiff --git a/frontend/src/react/components/ui/alert-dialog.tsx b/frontend/src/components/ui/alert-dialog.tsxsimilarity index 98%rename from frontend/src/react/components/ui/alert-dialog.tsxrename to frontend/src/components/ui/alert-dialog.tsxindex 704cd09dd1..26425ba841 100644--- a/frontend/src/react/components/ui/alert-dialog.tsx+++ b/frontend/src/components/ui/alert-dialog.tsx@@ -1,6 +1,6 @@import { AlertDialog as BaseAlertDialog } from "@base-ui/react/alert-dialog";import type { ComponentProps } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";import {getLayerRoot,LAYER_BACKDROP_CLASS,diff --git a/frontend/src/react/components/ui/alert.test.tsx b/frontend/src/components/ui/alert.test.tsxsimilarity index 100%rename from frontend/src/react/components/ui/alert.test.tsxrename to frontend/src/components/ui/alert.test.tsxdiff --git a/frontend/src/react/components/ui/alert.tsx b/frontend/src/components/ui/alert.tsxsimilarity index 98%rename from frontend/src/react/components/ui/alert.tsxrename to frontend/src/components/ui/alert.tsxindex 2a81c2e513..16f101b04f 100644--- a/frontend/src/react/components/ui/alert.tsx+++ b/frontend/src/components/ui/alert.tsx@@ -7,7 +7,7 @@ import {X,} from "lucide-react";import type { ComponentProps, ReactNode } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";const alertVariants = cva("relative flex w-full items-start gap-x-3 rounded-xs border px-4 py-3 text-sm leading-5 shadow-xs",diff --git a/frontend/src/react/components/ui/badge.tsx b/frontend/src/components/ui/badge.tsxsimilarity index 95%rename from frontend/src/react/components/ui/badge.tsxrename to frontend/src/components/ui/badge.tsxindex d9bbee39b6..b8dd2382a2 100644--- a/frontend/src/react/components/ui/badge.tsx+++ b/frontend/src/components/ui/badge.tsx@@ -1,6 +1,6 @@import { cva, type VariantProps } from "class-variance-authority";import type { ComponentProps } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";const badgeVariants = cva("inline-flex items-center rounded-full px-3 py-0.5 text-sm font-medium",diff --git a/frontend/src/react/components/ui/button.test.tsx b/frontend/src/components/ui/button.test.tsxsimilarity index 100%rename from frontend/src/react/components/ui/button.test.tsxrename to frontend/src/components/ui/button.test.tsxdiff --git a/frontend/src/react/components/ui/button.tsx b/frontend/src/components/ui/button.tsxsimilarity index 98%rename from frontend/src/react/components/ui/button.tsxrename to frontend/src/components/ui/button.tsxindex ed60a0fbe5..d716663203 100644--- a/frontend/src/react/components/ui/button.tsx+++ b/frontend/src/components/ui/button.tsx@@ -2,7 +2,7 @@ import { Button as BaseButton } from "@base-ui/react/button";import { cva, type VariantProps } from "class-variance-authority";import type { ClassValue } from "clsx";import type { ComponentProps } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";const buttonStyles = cva("inline-flex items-center justify-center rounded-xs font-medium whitespace-nowrap cursor-pointer transition-colors focus:outline-hidden focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",diff --git a/frontend/src/react/components/ui/calendar.tsx b/frontend/src/components/ui/calendar.tsxsimilarity index 95%rename from frontend/src/react/components/ui/calendar.tsxrename to frontend/src/components/ui/calendar.tsxindex a17d80f74a..e4f446e9ad 100644--- a/frontend/src/react/components/ui/calendar.tsx+++ b/frontend/src/components/ui/calendar.tsx@@ -1,8 +1,8 @@import { ChevronLeft, ChevronRight } from "lucide-react";import type { ComponentProps } from "react";import { DayPicker } from "react-day-picker";-import { buttonVariants } from "@/react/components/ui/button";-import { cn } from "@/react/lib/utils";+import { buttonVariants } from "@/components/ui/button";+import { cn } from "@/lib/utils";export type CalendarProps = ComponentProps<typeof DayPicker>;diff --git a/frontend/src/react/components/ui/checkbox.test.tsx b/frontend/src/components/ui/checkbox.test.tsxsimilarity index 100%rename from frontend/src/react/components/ui/checkbox.test.tsxrename to frontend/src/components/ui/checkbox.test.tsxdiff --git a/frontend/src/react/components/ui/checkbox.tsx b/frontend/src/components/ui/checkbox.tsxsimilarity index 98%rename from frontend/src/react/components/ui/checkbox.tsxrename to frontend/src/components/ui/checkbox.tsxindex 7c73b9c956..171bc51a7a 100644--- a/frontend/src/react/components/ui/checkbox.tsx+++ b/frontend/src/components/ui/checkbox.tsx@@ -1,7 +1,7 @@import { Checkbox as BaseCheckbox } from "@base-ui/react/checkbox";import { Check, Minus } from "lucide-react";import type * as React from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";type CheckboxSize = "sm" | "md";diff --git a/frontend/src/react/components/ui/color-input.tsx b/frontend/src/components/ui/color-input.tsxsimilarity index 97%rename from frontend/src/react/components/ui/color-input.tsxrename to frontend/src/components/ui/color-input.tsxindex b0125ec151..9bf17268ab 100644--- a/frontend/src/react/components/ui/color-input.tsx+++ b/frontend/src/components/ui/color-input.tsx@@ -1,7 +1,7 @@import { throttle } from "lodash-es";import { useEffect, useMemo, useRef, useState } from "react";-import { Input } from "@/react/components/ui/input";-import { cn } from "@/react/lib/utils";+import { Input } from "@/components/ui/input";+import { cn } from "@/lib/utils";const HEX_RE = /^#?([0-9a-fA-F]{6})$/;diff --git a/frontend/src/react/components/ui/column-resize-handle.tsx b/frontend/src/components/ui/column-resize-handle.tsxsimilarity index 94%rename from frontend/src/react/components/ui/column-resize-handle.tsxrename to frontend/src/components/ui/column-resize-handle.tsxindex fe782bf149..1bcc1e6d94 100644--- a/frontend/src/react/components/ui/column-resize-handle.tsx+++ b/frontend/src/components/ui/column-resize-handle.tsx@@ -1,4 +1,4 @@-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";interface ColumnResizeHandleProps {onMouseDown: (e: React.MouseEvent) => void;diff --git a/frontend/src/react/components/ui/combobox-position.test.ts b/frontend/src/components/ui/combobox-position.test.tssimilarity index 100%rename from frontend/src/react/components/ui/combobox-position.test.tsrename to frontend/src/components/ui/combobox-position.test.tsdiff --git a/frontend/src/react/components/ui/combobox-position.ts b/frontend/src/components/ui/combobox-position.tssimilarity index 100%rename from frontend/src/react/components/ui/combobox-position.tsrename to frontend/src/components/ui/combobox-position.tsdiff --git a/frontend/src/react/components/ui/combobox.test.tsx b/frontend/src/components/ui/combobox.test.tsxsimilarity index 100%rename from frontend/src/react/components/ui/combobox.test.tsxrename to frontend/src/components/ui/combobox.test.tsxdiff --git a/frontend/src/react/components/ui/combobox.tsx b/frontend/src/components/ui/combobox.tsxsimilarity index 99%rename from frontend/src/react/components/ui/combobox.tsxrename to frontend/src/components/ui/combobox.tsxindex 7c6fb33a5b..5c2f885a50 100644--- a/frontend/src/react/components/ui/combobox.tsx+++ b/frontend/src/components/ui/combobox.tsx@@ -9,7 +9,7 @@ import {useState,} from "react";import { createPortal } from "react-dom";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";import { HighlightLabelText } from "../HighlightLabelText";import {getPortalDropdownStyle,diff --git a/frontend/src/react/components/ui/context-menu.test.tsx b/frontend/src/components/ui/context-menu.test.tsxsimilarity index 100%rename from frontend/src/react/components/ui/context-menu.test.tsxrename to frontend/src/components/ui/context-menu.test.tsxdiff --git a/frontend/src/react/components/ui/context-menu.tsx b/frontend/src/components/ui/context-menu.tsxsimilarity index 98%rename from frontend/src/react/components/ui/context-menu.tsxrename to frontend/src/components/ui/context-menu.tsxindex 8b651fed2a..266b1d6771 100644--- a/frontend/src/react/components/ui/context-menu.tsx+++ b/frontend/src/components/ui/context-menu.tsx@@ -1,7 +1,7 @@import { ContextMenu as BaseContextMenu } from "@base-ui/react/context-menu";import * as stylex from "@stylexjs/stylex";import type { ComponentProps } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";import {getLayerRoot,LAYER_SURFACE_CLASS,diff --git a/frontend/src/react/components/ui/copy-button.tsx b/frontend/src/components/ui/copy-button.tsxsimilarity index 86%rename from frontend/src/react/components/ui/copy-button.tsxrename to frontend/src/components/ui/copy-button.tsxindex 225abac5ab..c062561c72 100644--- a/frontend/src/react/components/ui/copy-button.tsx+++ b/frontend/src/components/ui/copy-button.tsx@@ -1,11 +1,11 @@import { Check, Copy } from "lucide-react";import { useCallback, useEffect, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { Button, type ButtonProps } from "@/react/components/ui/button";-import { Tooltip } from "@/react/components/ui/tooltip";-import { writeTextToClipboard } from "@/react/lib/clipboard";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";+import { Button, type ButtonProps } from "@/components/ui/button";+import { Tooltip } from "@/components/ui/tooltip";+import { writeTextToClipboard } from "@/lib/clipboard";+import { cn } from "@/lib/utils";+import { useAppStore } from "@/stores/app";interface CopyButtonProps {// The text to copy. Pass a function to defer resolution until click.diff --git a/frontend/src/react/components/ui/date-time-picker.tsx b/frontend/src/components/ui/date-time-picker.tsxsimilarity index 96%rename from frontend/src/react/components/ui/date-time-picker.tsxrename to frontend/src/components/ui/date-time-picker.tsxindex 610b3a6ef2..d92986c9ef 100644--- a/frontend/src/react/components/ui/date-time-picker.tsx+++ b/frontend/src/components/ui/date-time-picker.tsx@@ -1,20 +1,20 @@import dayjs from "dayjs";import { Calendar as CalendarIcon } from "lucide-react";import { useState } from "react";-import { Calendar } from "@/react/components/ui/calendar";+import { Calendar } from "@/components/ui/calendar";import {Popover,PopoverContent,PopoverTrigger,-} from "@/react/components/ui/popover";+} from "@/components/ui/popover";import {Select,SelectContent,SelectItem,SelectTrigger,SelectValue,-} from "@/react/components/ui/select";-import { cn } from "@/react/lib/utils";+} from "@/components/ui/select";+import { cn } from "@/lib/utils";const HOURS = Array.from({ length: 24 }, (_, i) => i);const MINUTES = Array.from({ length: 60 }, (_, i) => i);diff --git a/frontend/src/react/components/ui/dialog.test.tsx b/frontend/src/components/ui/dialog.test.tsxsimilarity index 100%rename from frontend/src/react/components/ui/dialog.test.tsxrename to frontend/src/components/ui/dialog.test.tsxdiff --git a/frontend/src/react/components/ui/dialog.tsx b/frontend/src/components/ui/dialog.tsxsimilarity index 98%rename from frontend/src/react/components/ui/dialog.tsxrename to frontend/src/components/ui/dialog.tsxindex a3f291ff5c..0df45f395c 100644--- a/frontend/src/react/components/ui/dialog.tsx+++ b/frontend/src/components/ui/dialog.tsx@@ -1,6 +1,6 @@import { Dialog as BaseDialog } from "@base-ui/react/dialog";import type { ComponentProps } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";import {getLayerRoot,LAYER_BACKDROP_CLASS,diff --git a/frontend/src/react/components/ui/dropdown-menu.test.tsx b/frontend/src/components/ui/dropdown-menu.test.tsxsimilarity index 100%rename from frontend/src/react/components/ui/dropdown-menu.test.tsxrename to frontend/src/components/ui/dropdown-menu.test.tsxdiff --git a/frontend/src/react/components/ui/dropdown-menu.tsx b/frontend/src/components/ui/dropdown-menu.tsxsimilarity index 99%rename from frontend/src/react/components/ui/dropdown-menu.tsxrename to frontend/src/components/ui/dropdown-menu.tsxindex f393b5eed2..edfac921c4 100644--- a/frontend/src/react/components/ui/dropdown-menu.tsx+++ b/frontend/src/components/ui/dropdown-menu.tsx@@ -1,7 +1,7 @@import { Menu as BaseMenu } from "@base-ui/react/menu";import * as stylex from "@stylexjs/stylex";import type { ComponentProps } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";import { getLayerRoot, LAYER_SURFACE_CLASS } from "./layer";import {menuRowStateClassName,diff --git a/frontend/src/react/components/ui/ellipsis-text.tsx b/frontend/src/components/ui/ellipsis-text.tsxsimilarity index 98%rename from frontend/src/react/components/ui/ellipsis-text.tsxrename to frontend/src/components/ui/ellipsis-text.tsxindex c9134ba41c..d49f47c476 100644--- a/frontend/src/react/components/ui/ellipsis-text.tsx+++ b/frontend/src/components/ui/ellipsis-text.tsx@@ -1,7 +1,7 @@import { Tooltip as BaseTooltip } from "@base-ui/react/tooltip";import type { ReactNode } from "react";import { useEffect, useRef, useState } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";import { getLayerRoot, LAYER_SURFACE_CLASS } from "./layer";interface EllipsisTextProps {diff --git a/frontend/src/react/components/ui/error-boundary.tsx b/frontend/src/components/ui/error-boundary.tsxsimilarity index 100%rename from frontend/src/react/components/ui/error-boundary.tsxrename to frontend/src/components/ui/error-boundary.tsxdiff --git a/frontend/src/react/components/ui/expiration-picker.tsx b/frontend/src/components/ui/expiration-picker.tsxsimilarity index 94%rename from frontend/src/react/components/ui/expiration-picker.tsxrename to frontend/src/components/ui/expiration-picker.tsxindex c1fdc72166..46ee74ec7d 100644--- a/frontend/src/react/components/ui/expiration-picker.tsx+++ b/frontend/src/components/ui/expiration-picker.tsx@@ -1,7 +1,7 @@import dayjs from "dayjs";import { X } from "lucide-react";import { useTranslation } from "react-i18next";-import { DateTimePicker } from "@/react/components/ui/date-time-picker";+import { DateTimePicker } from "@/components/ui/date-time-picker";/*** ExpirationPicker — a datetime picker with inline clear button.diff --git a/frontend/src/react/components/ui/feature-modal.test.tsx b/frontend/src/components/ui/feature-modal.test.tsxsimilarity index 95%rename from frontend/src/react/components/ui/feature-modal.test.tsxrename to frontend/src/components/ui/feature-modal.test.tsxindex aec9b8df01..6fd9bd00a3 100644--- a/frontend/src/react/components/ui/feature-modal.test.tsx+++ b/frontend/src/components/ui/feature-modal.test.tsx@@ -20,16 +20,16 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useSubscriptionState: mocks.useSubscriptionState,}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: mocks.useAppStore,}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: { push: vi.fn() },}));@@ -59,7 +59,7 @@ vi.mock("@/utils", () => ({hasWorkspacePermissionV2: mocks.hasWorkspacePermissionV2,}));-vi.mock("@/react/components/ui/dialog", () => ({+vi.mock("@/components/ui/dialog", () => ({Dialog: ({open,children,@@ -97,7 +97,7 @@ vi.mock("@/react/components/ui/dialog", () => ({),}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,onClick,diff --git a/frontend/src/react/components/ui/feature-modal.tsx b/frontend/src/components/ui/feature-modal.tsxsimilarity index 94%rename from frontend/src/react/components/ui/feature-modal.tsxrename to frontend/src/components/ui/feature-modal.tsxindex 0b3e1391b5..df65fd84f7 100644--- a/frontend/src/react/components/ui/feature-modal.tsx+++ b/frontend/src/components/ui/feature-modal.tsx@@ -1,16 +1,16 @@import { Lock, Sparkles, X } from "lucide-react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";+import { router } from "@/app/router";+import { INSTANCE_ROUTE_DASHBOARD } from "@/app/router/handles";+import { Button } from "@/components/ui/button";import {Dialog,DialogClose,DialogContent,DialogTitle,-} from "@/react/components/ui/dialog";-import { useSubscriptionState } from "@/react/hooks/useAppState";-import { router } from "@/react/router";-import { INSTANCE_ROUTE_DASHBOARD } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";+} from "@/components/ui/dialog";+import { useSubscriptionState } from "@/hooks/useAppState";+import { useAppStore } from "@/stores/app";import { ENTERPRISE_INQUIRE_LINK } from "@/types";import type {Instance,diff --git a/frontend/src/react/components/ui/form.test.tsx b/frontend/src/components/ui/form.test.tsxsimilarity index 100%rename from frontend/src/react/components/ui/form.test.tsxrename to frontend/src/components/ui/form.test.tsxdiff --git a/frontend/src/react/components/ui/form.tsx b/frontend/src/components/ui/form.tsxsimilarity index 99%rename from frontend/src/react/components/ui/form.tsxrename to frontend/src/components/ui/form.tsxindex 07732ec7fc..2e32ad7666 100644--- a/frontend/src/react/components/ui/form.tsx+++ b/frontend/src/components/ui/form.tsx@@ -1,6 +1,6 @@import * as stylex from "@stylexjs/stylex";import type { ComponentProps, ReactNode } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";import {formControlGroupStyle,formControlRowStyle,diff --git a/frontend/src/react/components/ui/input.tsx b/frontend/src/components/ui/input.tsxsimilarity index 96%rename from frontend/src/react/components/ui/input.tsxrename to frontend/src/components/ui/input.tsxindex e5f3500c0a..37286c09ed 100644--- a/frontend/src/react/components/ui/input.tsx+++ b/frontend/src/components/ui/input.tsx@@ -2,7 +2,7 @@ import { Input as BaseInput } from "@base-ui/react/input";import * as stylex from "@stylexjs/stylex";import { cva } from "class-variance-authority";import type { ComponentProps } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";import { type ControlSize, controlSizeStyle } from "./styles.stylex";const inputVariants = cva(diff --git a/frontend/src/react/components/ui/layer.test.tsx b/frontend/src/components/ui/layer.test.tsxsimilarity index 100%rename from frontend/src/react/components/ui/layer.test.tsxrename to frontend/src/components/ui/layer.test.tsxdiff --git a/frontend/src/react/components/ui/layer.ts b/frontend/src/components/ui/layer.tssimilarity index 100%rename from frontend/src/react/components/ui/layer.tsrename to frontend/src/components/ui/layer.tsdiff --git a/frontend/src/react/components/ui/number-input.test.tsx b/frontend/src/components/ui/number-input.test.tsxsimilarity index 100%rename from frontend/src/react/components/ui/number-input.test.tsxrename to frontend/src/components/ui/number-input.test.tsxdiff --git a/frontend/src/react/components/ui/number-input.tsx b/frontend/src/components/ui/number-input.tsxsimilarity index 98%rename from frontend/src/react/components/ui/number-input.tsxrename to frontend/src/components/ui/number-input.tsxindex 23ecafd4ce..2d2412c736 100644--- a/frontend/src/react/components/ui/number-input.tsx+++ b/frontend/src/components/ui/number-input.tsx@@ -2,7 +2,7 @@ import { NumberField } from "@base-ui/react/number-field";import * as stylex from "@stylexjs/stylex";import { cva } from "class-variance-authority";import type { ComponentPropsWithoutRef, ReactNode } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";import { type ControlSize, controlSizeStyle } from "./styles.stylex";// Mirrors the sizing/appearance of ./input.tsx so NumberInput visually matchesdiff --git a/frontend/src/react/components/ui/otp-input.tsx b/frontend/src/components/ui/otp-input.tsxsimilarity index 98%rename from frontend/src/react/components/ui/otp-input.tsxrename to frontend/src/components/ui/otp-input.tsxindex f23babcb15..82aff4bb89 100644--- a/frontend/src/react/components/ui/otp-input.tsx+++ b/frontend/src/components/ui/otp-input.tsx@@ -1,5 +1,5 @@import { useCallback, useRef } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";interface OtpInputProps {value: string[];diff --git a/frontend/src/react/components/ui/popover.test.tsx b/frontend/src/components/ui/popover.test.tsxsimilarity index 100%rename from frontend/src/react/components/ui/popover.test.tsxrename to frontend/src/components/ui/popover.test.tsxdiff --git a/frontend/src/react/components/ui/popover.tsx b/frontend/src/components/ui/popover.tsxsimilarity index 97%rename from frontend/src/react/components/ui/popover.tsxrename to frontend/src/components/ui/popover.tsxindex 82ed96635a..996b154de7 100644--- a/frontend/src/react/components/ui/popover.tsx+++ b/frontend/src/components/ui/popover.tsx@@ -1,6 +1,6 @@import { Popover as BasePopover } from "@base-ui/react/popover";import type { ComponentProps } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";import { getLayerRoot, LAYER_SURFACE_CLASS } from "./layer";// ---- Root ----diff --git a/frontend/src/react/components/ui/radio-group.test.tsx b/frontend/src/components/ui/radio-group.test.tsxsimilarity index 100%rename from frontend/src/react/components/ui/radio-group.test.tsxrename to frontend/src/components/ui/radio-group.test.tsxdiff --git a/frontend/src/react/components/ui/radio-group.tsx b/frontend/src/components/ui/radio-group.tsxsimilarity index 97%rename from frontend/src/react/components/ui/radio-group.tsxrename to frontend/src/components/ui/radio-group.tsxindex adc635c6aa..33a1cd97fb 100644--- a/frontend/src/react/components/ui/radio-group.tsx+++ b/frontend/src/components/ui/radio-group.tsx@@ -1,6 +1,6 @@import { Radio } from "@base-ui/react/radio";import { RadioGroup as BaseRadioGroup } from "@base-ui/react/radio-group";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";function RadioGroup({className,diff --git a/frontend/src/react/components/ui/search-input.tsx b/frontend/src/components/ui/search-input.tsxsimilarity index 96%rename from frontend/src/react/components/ui/search-input.tsxrename to frontend/src/components/ui/search-input.tsxindex e2ac69c425..22f835014f 100644--- a/frontend/src/react/components/ui/search-input.tsx+++ b/frontend/src/components/ui/search-input.tsx@@ -2,7 +2,7 @@ import { Search } from "lucide-react";import type { ComponentProps } from "react";import { forwardRef } from "react";import { useTranslation } from "react-i18next";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";import { Input } from "./input";type SearchInputProps = Omit<ComponentProps<typeof Input>, "className"> & {diff --git a/frontend/src/react/components/ui/segmented-control.tsx b/frontend/src/components/ui/segmented-control.tsxsimilarity index 97%rename from frontend/src/react/components/ui/segmented-control.tsxrename to frontend/src/components/ui/segmented-control.tsxindex 905155c366..b3d8a53a31 100644--- a/frontend/src/react/components/ui/segmented-control.tsx+++ b/frontend/src/components/ui/segmented-control.tsx@@ -2,8 +2,8 @@ import { Radio } from "@base-ui/react/radio";import { RadioGroup as BaseRadioGroup } from "@base-ui/react/radio-group";import * as stylex from "@stylexjs/stylex";import type { ReactNode } from "react";-import { Tooltip } from "@/react/components/ui/tooltip";-import { cn } from "@/react/lib/utils";+import { Tooltip } from "@/components/ui/tooltip";+import { cn } from "@/lib/utils";import { type ControlSize, controlMinHeightStyle } from "./styles.stylex";export interface SegmentedControlOption<T extends string> {diff --git a/frontend/src/react/components/ui/select.test.tsx b/frontend/src/components/ui/select.test.tsxsimilarity index 100%rename from frontend/src/react/components/ui/select.test.tsxrename to frontend/src/components/ui/select.test.tsxdiff --git a/frontend/src/react/components/ui/select.tsx b/frontend/src/components/ui/select.tsxsimilarity index 98%rename from frontend/src/react/components/ui/select.tsxrename to frontend/src/components/ui/select.tsxindex 02cb90ae80..83d636354c 100644--- a/frontend/src/react/components/ui/select.tsx+++ b/frontend/src/components/ui/select.tsx@@ -3,7 +3,7 @@ import * as stylex from "@stylexjs/stylex";import { cva } from "class-variance-authority";import { Check, ChevronDown } from "lucide-react";import type { ComponentProps } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";import { getLayerRoot, LAYER_SURFACE_CLASS } from "./layer";import {type ControlSize,diff --git a/frontend/src/react/components/ui/separator.tsx b/frontend/src/components/ui/separator.tsxsimilarity index 93%rename from frontend/src/react/components/ui/separator.tsxrename to frontend/src/components/ui/separator.tsxindex 54c63e0eb2..a5b3f2ae96 100644--- a/frontend/src/react/components/ui/separator.tsx+++ b/frontend/src/components/ui/separator.tsx@@ -1,5 +1,5 @@import type { ComponentProps } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";function Separator({className,diff --git a/frontend/src/react/components/ui/sheet.test.tsx b/frontend/src/components/ui/sheet.test.tsxsimilarity index 84%rename from frontend/src/react/components/ui/sheet.test.tsxrename to frontend/src/components/ui/sheet.test.tsxindex 436550fc24..95f2b0decf 100644--- a/frontend/src/react/components/ui/sheet.test.tsx+++ b/frontend/src/components/ui/sheet.test.tsx@@ -5,7 +5,7 @@ import { describe, expect, test } from "vitest";describe("Sheet layering policy", () => {test("does not keep stale raw z-index tokens in the shared sheet surface", () => {const source = readFileSync(- join(process.cwd(), "src/react/components/ui/sheet.tsx"),+ join(process.cwd(), "src/components/ui/sheet.tsx"),"utf8");diff --git a/frontend/src/react/components/ui/sheet.tsx b/frontend/src/components/ui/sheet.tsxsimilarity index 99%rename from frontend/src/react/components/ui/sheet.tsxrename to frontend/src/components/ui/sheet.tsxindex f51217139f..47d4aa32f5 100644--- a/frontend/src/react/components/ui/sheet.tsx+++ b/frontend/src/components/ui/sheet.tsx@@ -3,7 +3,7 @@ import { cva, type VariantProps } from "class-variance-authority";import { X } from "lucide-react";import type { ComponentProps, ReactNode } from "react";import { useTranslation } from "react-i18next";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";import {getLayerRoot,LAYER_BACKDROP_CLASS,diff --git a/frontend/src/react/components/ui/sticky-action-footer.test.tsx b/frontend/src/components/ui/sticky-action-footer.test.tsxsimilarity index 100%rename from frontend/src/react/components/ui/sticky-action-footer.test.tsxrename to frontend/src/components/ui/sticky-action-footer.test.tsxdiff --git a/frontend/src/react/components/ui/sticky-action-footer.tsx b/frontend/src/components/ui/sticky-action-footer.tsxsimilarity index 97%rename from frontend/src/react/components/ui/sticky-action-footer.tsxrename to frontend/src/components/ui/sticky-action-footer.tsxindex 5444f21aa5..de43642d41 100644--- a/frontend/src/react/components/ui/sticky-action-footer.tsx+++ b/frontend/src/components/ui/sticky-action-footer.tsx@@ -1,6 +1,6 @@import * as stylex from "@stylexjs/stylex";import type { ComponentProps, ReactNode } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";import {stickyActionFooterContentStyle,stickyActionFooterRightStyle,diff --git a/frontend/src/react/components/ui/styles.stylex.test.tsx b/frontend/src/components/ui/styles.stylex.test.tsxsimilarity index 99%rename from frontend/src/react/components/ui/styles.stylex.test.tsxrename to frontend/src/components/ui/styles.stylex.test.tsxindex 7e0de2ae65..ad16fbc56d 100644--- a/frontend/src/react/components/ui/styles.stylex.test.tsx+++ b/frontend/src/components/ui/styles.stylex.test.tsx@@ -78,7 +78,7 @@ const expectClasses = (className: string | undefined, expected: string) => {};const styleSource = readFileSync(- "src/react/components/ui/styles.stylex.ts",+ "src/components/ui/styles.stylex.ts","utf8");diff --git a/frontend/src/react/components/ui/styles.stylex.ts b/frontend/src/components/ui/styles.stylex.tssimilarity index 100%rename from frontend/src/react/components/ui/styles.stylex.tsrename to frontend/src/components/ui/styles.stylex.tsdiff --git a/frontend/src/react/components/ui/switch.tsx b/frontend/src/components/ui/switch.tsxsimilarity index 97%rename from frontend/src/react/components/ui/switch.tsxrename to frontend/src/components/ui/switch.tsxindex 5b2a33633b..715849f441 100644--- a/frontend/src/react/components/ui/switch.tsx+++ b/frontend/src/components/ui/switch.tsx@@ -1,5 +1,5 @@import { Switch as BaseSwitch } from "@base-ui/react/switch";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";type SwitchSize = "xs" | "sm" | "md" | "lg";diff --git a/frontend/src/react/components/ui/table.test.tsx b/frontend/src/components/ui/table.test.tsxsimilarity index 100%rename from frontend/src/react/components/ui/table.test.tsxrename to frontend/src/components/ui/table.test.tsxdiff --git a/frontend/src/react/components/ui/table.tsx b/frontend/src/components/ui/table.tsxsimilarity index 97%rename from frontend/src/react/components/ui/table.tsxrename to frontend/src/components/ui/table.tsxindex e55cd08328..93867cc6de 100644--- a/frontend/src/react/components/ui/table.tsx+++ b/frontend/src/components/ui/table.tsx@@ -1,7 +1,7 @@import { ArrowDown, ArrowUp, ArrowUpDown } from "lucide-react";import type { ComponentPropsWithoutRef, CSSProperties, ReactNode } from "react";-import { ColumnResizeHandle } from "@/react/components/ui/column-resize-handle";-import { cn } from "@/react/lib/utils";+import { ColumnResizeHandle } from "@/components/ui/column-resize-handle";+import { cn } from "@/lib/utils";function Table({ className, ...props }: ComponentPropsWithoutRef<"table">) {return (diff --git a/frontend/src/react/components/ui/tabs.tsx b/frontend/src/components/ui/tabs.tsxsimilarity index 97%rename from frontend/src/react/components/ui/tabs.tsxrename to frontend/src/components/ui/tabs.tsxindex 5be8ab6711..a39d95b3b1 100644--- a/frontend/src/react/components/ui/tabs.tsx+++ b/frontend/src/components/ui/tabs.tsx@@ -1,6 +1,6 @@import { Tabs as BaseTabs } from "@base-ui/react/tabs";import type { ComponentProps } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";function Tabs({ className, ...props }: ComponentProps<typeof BaseTabs.Root>) {return <BaseTabs.Root className={cn("w-full", className)} {...props} />;diff --git a/frontend/src/react/components/ui/textarea.tsx b/frontend/src/components/ui/textarea.tsxsimilarity index 96%rename from frontend/src/react/components/ui/textarea.tsxrename to frontend/src/components/ui/textarea.tsxindex a40ec35814..3a41c3c7fd 100644--- a/frontend/src/react/components/ui/textarea.tsx+++ b/frontend/src/components/ui/textarea.tsx@@ -1,7 +1,7 @@import * as stylex from "@stylexjs/stylex";import { cva } from "class-variance-authority";import type { ComponentProps } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";import { type ControlSize, controlMultilineSizeStyle } from "./styles.stylex";const textareaVariants = cva(diff --git a/frontend/src/react/components/ui/toast.tsx b/frontend/src/components/ui/toast.tsxsimilarity index 98%rename from frontend/src/react/components/ui/toast.tsxrename to frontend/src/components/ui/toast.tsxindex 669bbc0853..4f602501c3 100644--- a/frontend/src/react/components/ui/toast.tsx+++ b/frontend/src/components/ui/toast.tsx@@ -2,7 +2,7 @@ import { Toast as BaseToast } from "@base-ui/react/toast";import { cva } from "class-variance-authority";import { AlertTriangle, CheckCircle2, Info, X, XCircle } from "lucide-react";import type { ComponentProps, ReactNode } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";// Map BBNotificationStyle ("SUCCESS" | "INFO" | "WARN" | "CRITICAL") onto// the visual variant of the toast container.diff --git a/frontend/src/react/components/ui/toaster.tsx b/frontend/src/components/ui/toaster.tsxsimilarity index 97%rename from frontend/src/react/components/ui/toaster.tsxrename to frontend/src/components/ui/toaster.tsxindex b8fc6f1c3c..f656eb6fad 100644--- a/frontend/src/react/components/ui/toaster.tsx+++ b/frontend/src/components/ui/toaster.tsx@@ -1,6 +1,6 @@import { Toast as BaseToast } from "@base-ui/react/toast";import { useTranslation } from "react-i18next";-import { toastManager } from "@/react/lib/toast";+import { toastManager } from "@/lib/toast";import { getLayerRoot, LAYER_Z_INDEX } from "./layer";import {ToastAction,diff --git a/frontend/src/react/components/ui/tooltip.test.tsx b/frontend/src/components/ui/tooltip.test.tsxsimilarity index 100%rename from frontend/src/react/components/ui/tooltip.test.tsxrename to frontend/src/components/ui/tooltip.test.tsxdiff --git a/frontend/src/react/components/ui/tooltip.tsx b/frontend/src/components/ui/tooltip.tsxsimilarity index 100%rename from frontend/src/react/components/ui/tooltip.tsxrename to frontend/src/components/ui/tooltip.tsxdiff --git a/frontend/src/react/components/ui/tree-utils.test.ts b/frontend/src/components/ui/tree-utils.test.tssimilarity index 100%rename from frontend/src/react/components/ui/tree-utils.test.tsrename to frontend/src/components/ui/tree-utils.test.tsdiff --git a/frontend/src/react/components/ui/tree-utils.ts b/frontend/src/components/ui/tree-utils.tssimilarity index 100%rename from frontend/src/react/components/ui/tree-utils.tsrename to frontend/src/components/ui/tree-utils.tsdiff --git a/frontend/src/react/components/ui/tree.test.tsx b/frontend/src/components/ui/tree.test.tsxsimilarity index 100%rename from frontend/src/react/components/ui/tree.test.tsxrename to frontend/src/components/ui/tree.test.tsxdiff --git a/frontend/src/react/components/ui/tree.tsx b/frontend/src/components/ui/tree.tsxsimilarity index 98%rename from frontend/src/react/components/ui/tree.tsxrename to frontend/src/components/ui/tree.tsxindex 469c139de5..fb72a109d3 100644--- a/frontend/src/react/components/ui/tree.tsx+++ b/frontend/src/components/ui/tree.tsx@@ -3,8 +3,8 @@ import { useLayoutEffect, useRef } from "react";import type { MoveHandler, NodeApi, TreeApi } from "react-arborist";import { Tree as ArboristTree } from "react-arborist";import { useTranslation } from "react-i18next";-import { ErrorBoundary } from "@/react/components/ui/error-boundary";-import { cn } from "@/react/lib/utils";+import { ErrorBoundary } from "@/components/ui/error-boundary";+import { cn } from "@/lib/utils";export interface TreeDataNode<T> {readonly id: string;diff --git a/frontend/src/react/components/useCommonSearchScopeOptions.tsx b/frontend/src/components/useCommonSearchScopeOptions.tsxsimilarity index 94%rename from frontend/src/react/components/useCommonSearchScopeOptions.tsxrename to frontend/src/components/useCommonSearchScopeOptions.tsxindex 355ffe44d4..60f45db954 100644--- a/frontend/src/react/components/useCommonSearchScopeOptions.tsx+++ b/frontend/src/components/useCommonSearchScopeOptions.tsx@@ -1,11 +1,8 @@import { useCallback, useMemo } from "react";import { useTranslation } from "react-i18next";-import type {- ScopeOption,- ValueOption,-} from "@/react/components/AdvancedSearch";-import { EngineIcon } from "@/react/components/EngineIcon";-import { useAppStore } from "@/react/stores/app";+import type { ScopeOption, ValueOption } from "@/components/AdvancedSearch";+import { EngineIcon } from "@/components/EngineIcon";+import { useAppStore } from "@/stores/app";import { Engine } from "@/types/proto-es/v1/common_pb";import {extractEnvironmentResourceName,diff --git a/frontend/src/react/hooks/pagedDataCache.test.ts b/frontend/src/hooks/pagedDataCache.test.tssimilarity index 100%rename from frontend/src/react/hooks/pagedDataCache.test.tsrename to frontend/src/hooks/pagedDataCache.test.tsdiff --git a/frontend/src/react/hooks/pagedDataCache.ts b/frontend/src/hooks/pagedDataCache.tssimilarity index 100%rename from frontend/src/react/hooks/pagedDataCache.tsrename to frontend/src/hooks/pagedDataCache.tsdiff --git a/frontend/src/react/hooks/useAppDatabase.ts b/frontend/src/hooks/useAppDatabase.tssimilarity index 96%rename from frontend/src/react/hooks/useAppDatabase.tsrename to frontend/src/hooks/useAppDatabase.tsindex fddb818884..a044bfb845 100644--- a/frontend/src/react/hooks/useAppDatabase.ts+++ b/frontend/src/hooks/useAppDatabase.ts@@ -1,5 +1,5 @@import { useEffect, useMemo } from "react";-import { useAppStore } from "@/react/stores/app";+import { useAppStore } from "@/stores/app";import type { Database } from "@/types/proto-es/v1/database_service_pb";import { isValidDatabaseName } from "@/types/v1/database";diff --git a/frontend/src/react/hooks/useAppDatabaseMetadata.ts b/frontend/src/hooks/useAppDatabaseMetadata.tssimilarity index 98%rename from frontend/src/react/hooks/useAppDatabaseMetadata.tsrename to frontend/src/hooks/useAppDatabaseMetadata.tsindex 73946ec12d..bbdee43724 100644--- a/frontend/src/react/hooks/useAppDatabaseMetadata.ts+++ b/frontend/src/hooks/useAppDatabaseMetadata.ts@@ -1,5 +1,5 @@import { useEffect, useMemo } from "react";-import { useAppStore } from "@/react/stores/app";+import { useAppStore } from "@/stores/app";import { isValidDatabaseName } from "@/types";import type { DatabaseMetadata } from "@/types/proto-es/v1/database_service_pb";diff --git a/frontend/src/react/hooks/useAppProject.ts b/frontend/src/hooks/useAppProject.tssimilarity index 91%rename from frontend/src/react/hooks/useAppProject.tsrename to frontend/src/hooks/useAppProject.tsindex f9acd48f0f..fb5c419c0d 100644--- a/frontend/src/react/hooks/useAppProject.ts+++ b/frontend/src/hooks/useAppProject.ts@@ -1,6 +1,6 @@import { useEffect, useMemo } from "react";-import { isValidProjectName } from "@/react/lib/resourceName";-import { useAppStore } from "@/react/stores/app";+import { isValidProjectName } from "@/lib/resourceName";+import { useAppStore } from "@/stores/app";import type { Project } from "@/types/proto-es/v1/project_service_pb";/**diff --git a/frontend/src/react/hooks/useAppState.ts b/frontend/src/hooks/useAppState.tssimilarity index 99%rename from frontend/src/react/hooks/useAppState.tsrename to frontend/src/hooks/useAppState.tsindex a8b9c96d2c..1918bbb3bb 100644--- a/frontend/src/react/hooks/useAppState.ts+++ b/frontend/src/hooks/useAppState.ts@@ -5,7 +5,7 @@ import {isConnectAlreadyExists,isDefaultProjectName,useAppStore,-} from "@/react/stores/app";+} from "@/stores/app";import type { AppFeatures } from "@/types/appProfile";import type { Permission } from "@/types/iam/permission";import type { Project } from "@/types/proto-es/v1/project_service_pb";diff --git a/frontend/src/react/hooks/useClickOutside.ts b/frontend/src/hooks/useClickOutside.tssimilarity index 100%rename from frontend/src/react/hooks/useClickOutside.tsrename to frontend/src/hooks/useClickOutside.tsdiff --git a/frontend/src/react/hooks/useColumnWidths.test.tsx b/frontend/src/hooks/useColumnWidths.test.tsxsimilarity index 100%rename from frontend/src/react/hooks/useColumnWidths.test.tsxrename to frontend/src/hooks/useColumnWidths.test.tsxdiff --git a/frontend/src/react/hooks/useColumnWidths.ts b/frontend/src/hooks/useColumnWidths.tssimilarity index 100%rename from frontend/src/react/hooks/useColumnWidths.tsrename to frontend/src/hooks/useColumnWidths.tsdiff --git a/frontend/src/react/hooks/useDatabaseCatalog.ts b/frontend/src/hooks/useDatabaseCatalog.tssimilarity index 93%rename from frontend/src/react/hooks/useDatabaseCatalog.tsrename to frontend/src/hooks/useDatabaseCatalog.tsindex f31c63009d..46d305a268 100644--- a/frontend/src/react/hooks/useDatabaseCatalog.ts+++ b/frontend/src/hooks/useDatabaseCatalog.ts@@ -1,9 +1,9 @@import { useEffect, useMemo } from "react";-import { useAppStore } from "@/react/stores/app";+import { useAppStore } from "@/stores/app";import {catalogResourceName,emptyDatabaseCatalog,-} from "@/react/stores/app/databaseCatalog";+} from "@/stores/app/databaseCatalog";import { UNKNOWN_ID } from "@/types";import type { DatabaseCatalog } from "@/types/proto-es/v1/database_catalog_service_pb";import {diff --git a/frontend/src/react/hooks/useDelayedValue.test.tsx b/frontend/src/hooks/useDelayedValue.test.tsxsimilarity index 100%rename from frontend/src/react/hooks/useDelayedValue.test.tsxrename to frontend/src/hooks/useDelayedValue.test.tsxdiff --git a/frontend/src/react/hooks/useDelayedValue.ts b/frontend/src/hooks/useDelayedValue.tssimilarity index 100%rename from frontend/src/react/hooks/useDelayedValue.tsrename to frontend/src/hooks/useDelayedValue.tsdiff --git a/frontend/src/react/hooks/useEnsureWorkspaceCommonData.ts b/frontend/src/hooks/useEnsureWorkspaceCommonData.tssimilarity index 98%rename from frontend/src/react/hooks/useEnsureWorkspaceCommonData.tsrename to frontend/src/hooks/useEnsureWorkspaceCommonData.tsindex 73d578b641..143fd13622 100644--- a/frontend/src/react/hooks/useEnsureWorkspaceCommonData.ts+++ b/frontend/src/hooks/useEnsureWorkspaceCommonData.ts@@ -1,5 +1,5 @@import { useEffect, useState } from "react";-import { useAppStore } from "@/react/stores/app";+import { useAppStore } from "@/stores/app";/*** Workspace-scope common data bootstrap.diff --git a/frontend/src/react/hooks/useEscapeKey.ts b/frontend/src/hooks/useEscapeKey.tssimilarity index 100%rename from frontend/src/react/hooks/useEscapeKey.tsrename to frontend/src/hooks/useEscapeKey.tsdiff --git a/frontend/src/react/hooks/useExecuteSQL.ts b/frontend/src/hooks/useExecuteSQL.tssimilarity index 97%rename from frontend/src/react/hooks/useExecuteSQL.tsrename to frontend/src/hooks/useExecuteSQL.tsindex ffed255fa4..8cb75ae8f6 100644--- a/frontend/src/react/hooks/useExecuteSQL.ts+++ b/frontend/src/hooks/useExecuteSQL.ts@@ -4,15 +4,16 @@ import { cloneDeep, isEmpty } from "lodash-es";import { useCallback, useEffect, useRef } from "react";import { useTranslation } from "react-i18next";import { v4 as uuidv4 } from "uuid";-import { isConnectedSQLEditorTab } from "@/react/lib/sqlEditorConnection";-import { getValidDataSourceByPolicy } from "@/react/lib/sqlEditorDataSource";-import { useAppStore } from "@/react/stores/app";-import { useSQLEditorStore as useSQLEditorReactStore } from "@/react/stores/sqlEditor";-import { getSQLEditorEditorState } from "@/react/stores/sqlEditor/editor";+import { isConnectedSQLEditorTab } from "@/lib/sqlEditorConnection";+import { getValidDataSourceByPolicy } from "@/lib/sqlEditorDataSource";+import { sqlEditorEvents } from "@/modules/sql-editor/model/events";+import { useSQLEditorStore as useSQLEditorReactStore } from "@/modules/sql-editor/store";+import { getSQLEditorEditorState } from "@/modules/sql-editor/store/editor";import {getDatabaseQueryContext,getSQLEditorTabsState,-} from "@/react/stores/sqlEditor/tab";+} from "@/modules/sql-editor/store/tab";+import { useAppStore } from "@/stores/app";import type {BBNotificationStyle,QueryContextStatus,@@ -37,7 +38,6 @@ import {hasPermissionToCreateChangeDatabaseIssueInProject,} from "@/utils";import { flattenNoSQLResult } from "@/utils/sqlResult";-import { sqlEditorEvents } from "@/views/sql-editor/events";// QUERY_INTERVAL_LIMIT is the minimal gap between two queriesconst QUERY_INTERVAL_LIMIT = 1000;diff --git a/frontend/src/react/hooks/useLatestRef.ts b/frontend/src/hooks/useLatestRef.tssimilarity index 100%rename from frontend/src/react/hooks/useLatestRef.tsrename to frontend/src/hooks/useLatestRef.tsdiff --git a/frontend/src/react/hooks/useMediaQuery.test.tsx b/frontend/src/hooks/useMediaQuery.test.tsxsimilarity index 100%rename from frontend/src/react/hooks/useMediaQuery.test.tsxrename to frontend/src/hooks/useMediaQuery.test.tsxdiff --git a/frontend/src/react/hooks/useMediaQuery.ts b/frontend/src/hooks/useMediaQuery.tssimilarity index 100%rename from frontend/src/react/hooks/useMediaQuery.tsrename to frontend/src/hooks/useMediaQuery.tsdiff --git a/frontend/src/react/hooks/useOnKeyChange.ts b/frontend/src/hooks/useOnKeyChange.tssimilarity index 100%rename from frontend/src/react/hooks/useOnKeyChange.tsrename to frontend/src/hooks/useOnKeyChange.tsdiff --git a/frontend/src/react/hooks/usePagedData.test.tsx b/frontend/src/hooks/usePagedData.test.tsxsimilarity index 99%rename from frontend/src/react/hooks/usePagedData.test.tsxrename to frontend/src/hooks/usePagedData.test.tsxindex 9a6a455560..e4befd0f11 100644--- a/frontend/src/react/hooks/usePagedData.test.tsx+++ b/frontend/src/hooks/usePagedData.test.tsx@@ -11,7 +11,7 @@ import { PagedTableFooter, usePagedData } from "./usePagedData";const pageSizeState = vi.hoisted(() => ({ value: 50 }));-vi.mock("@/react/hooks/useSessionPageSize", () => ({+vi.mock("@/hooks/useSessionPageSize", () => ({getPageSizeOptions: () => [50, 100],useSessionPageSize: () => [pageSizeState.value, vi.fn()],}));diff --git a/frontend/src/react/hooks/usePagedData.tsx b/frontend/src/hooks/usePagedData.tsxsimilarity index 98%rename from frontend/src/react/hooks/usePagedData.tsxrename to frontend/src/hooks/usePagedData.tsxindex 1fd0874569..885a5b996f 100644--- a/frontend/src/react/hooks/usePagedData.tsx+++ b/frontend/src/hooks/usePagedData.tsx@@ -7,18 +7,18 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";+import { Button } from "@/components/ui/button";import {Select,SelectContent,SelectItem,SelectTrigger,SelectValue,-} from "@/react/components/ui/select";+} from "@/components/ui/select";import {getPageSizeOptions,useSessionPageSize,-} from "@/react/hooks/useSessionPageSize";+} from "@/hooks/useSessionPageSize";import {deletePagedDataCache,type PagedDataCacheSnapshot,diff --git a/frontend/src/react/hooks/usePolling.test.tsx b/frontend/src/hooks/usePolling.test.tsxsimilarity index 100%rename from frontend/src/react/hooks/usePolling.test.tsxrename to frontend/src/hooks/usePolling.test.tsxdiff --git a/frontend/src/react/hooks/usePolling.ts b/frontend/src/hooks/usePolling.tssimilarity index 100%rename from frontend/src/react/hooks/usePolling.tsrename to frontend/src/hooks/usePolling.tsdiff --git a/frontend/src/react/hooks/useProjectByName.ts b/frontend/src/hooks/useProjectByName.tssimilarity index 94%rename from frontend/src/react/hooks/useProjectByName.tsrename to frontend/src/hooks/useProjectByName.tsindex cf070f4ad4..14a6eff988 100644--- a/frontend/src/react/hooks/useProjectByName.ts+++ b/frontend/src/hooks/useProjectByName.ts@@ -1,5 +1,5 @@import { useMemo } from "react";-import { useAppStore } from "@/react/stores/app";+import { useAppStore } from "@/stores/app";import type { Project } from "@/types/proto-es/v1/project_service_pb";/**diff --git a/frontend/src/react/hooks/useReactiveRoute.ts b/frontend/src/hooks/useReactiveRoute.tssimilarity index 89%rename from frontend/src/react/hooks/useReactiveRoute.tsrename to frontend/src/hooks/useReactiveRoute.tsindex c119dcf8a8..f8a07142c6 100644--- a/frontend/src/react/hooks/useReactiveRoute.ts+++ b/frontend/src/hooks/useReactiveRoute.ts@@ -1,6 +1,6 @@import { useSyncExternalStore } from "react";-import type { ReactRoute } from "@/react/router";-import { router } from "@/react/router";+import type { ReactRoute } from "@/app/router";+import { router } from "@/app/router";// `router.afterEach` returns its own unregister fn — wraps it as a React// `useSyncExternalStore` subscription so route changes trigger re-renders@@ -17,7 +17,7 @@ const getSnapshot = (): ReactRoute => router.currentRoute.value;/*** Reactively reads the current route, re-rendering on navigation (URL* changes, param updates). Backed by the react-router data router via the- * `@/react/router` shim.+ * `@/app/router` shim.*/export const useReactiveRoute = (): ReactRoute => {return useSyncExternalStore(subscribe, getSnapshot, getSnapshot);diff --git a/frontend/src/react/hooks/useRecentVisit.ts b/frontend/src/hooks/useRecentVisit.tssimilarity index 95%rename from frontend/src/react/hooks/useRecentVisit.tsrename to frontend/src/hooks/useRecentVisit.tsindex 76797b6cb7..81d75b47ff 100644--- a/frontend/src/react/hooks/useRecentVisit.ts+++ b/frontend/src/hooks/useRecentVisit.ts@@ -1,6 +1,6 @@import { useCallback } from "react";-import { useAppStore } from "@/react/stores/app";-import { projectNamePrefix } from "@/store/modules/v1/common";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";import { storageKeyRecentVisit, workspaceCacheScope } from "@/utils";const MAX_HISTORY = 10;diff --git a/frontend/src/react/hooks/useSQLEditorEvent.test.tsx b/frontend/src/hooks/useSQLEditorEvent.test.tsxsimilarity index 97%rename from frontend/src/react/hooks/useSQLEditorEvent.test.tsxrename to frontend/src/hooks/useSQLEditorEvent.test.tsxindex dcd0761625..5dfa839d60 100644--- a/frontend/src/react/hooks/useSQLEditorEvent.test.tsx+++ b/frontend/src/hooks/useSQLEditorEvent.test.tsx@@ -1,7 +1,7 @@import { act } from "react";import { createRoot, type Root } from "react-dom/client";import { afterEach, describe, expect, test, vi } from "vitest";-import { sqlEditorEvents } from "@/views/sql-editor/events";+import { sqlEditorEvents } from "@/modules/sql-editor/model/events";import { useSQLEditorEvent } from "./useSQLEditorEvent";(diff --git a/frontend/src/react/hooks/useSQLEditorEvent.ts b/frontend/src/hooks/useSQLEditorEvent.tssimilarity index 91%rename from frontend/src/react/hooks/useSQLEditorEvent.tsrename to frontend/src/hooks/useSQLEditorEvent.tsindex a779010b04..bfc9f3a64f 100644--- a/frontend/src/react/hooks/useSQLEditorEvent.ts+++ b/frontend/src/hooks/useSQLEditorEvent.ts@@ -2,7 +2,7 @@ import { useEffect, useRef } from "react";import {type SQLEditorEvents,sqlEditorEvents,-} from "@/views/sql-editor/events";+} from "@/modules/sql-editor/model/events";export function useSQLEditorEvent<E extends keyof SQLEditorEvents>(event: E,diff --git a/frontend/src/react/hooks/useSeededState.ts b/frontend/src/hooks/useSeededState.tssimilarity index 100%rename from frontend/src/react/hooks/useSeededState.tsrename to frontend/src/hooks/useSeededState.tsdiff --git a/frontend/src/react/hooks/useSessionPageSize.ts b/frontend/src/hooks/useSessionPageSize.tssimilarity index 96%rename from frontend/src/react/hooks/useSessionPageSize.tsrename to frontend/src/hooks/useSessionPageSize.tsindex 31b8597d00..d2d790101a 100644--- a/frontend/src/react/hooks/useSessionPageSize.ts+++ b/frontend/src/hooks/useSessionPageSize.ts@@ -1,6 +1,6 @@import { sortBy, uniq } from "lodash-es";import { useCallback, useEffect, useRef, useState } from "react";-import { useCurrentUser } from "@/react/hooks/useAppState";+import { useCurrentUser } from "@/hooks/useAppState";import { getDefaultPagination } from "@/utils";const PAGE_SIZE_OPTIONS = [50, 100, 200, 500];diff --git a/frontend/src/react/hooks/useSheetStatement.test.tsx b/frontend/src/hooks/useSheetStatement.test.tsxsimilarity index 98%rename from frontend/src/react/hooks/useSheetStatement.test.tsxrename to frontend/src/hooks/useSheetStatement.test.tsxindex 86c6ec977f..918499c745 100644--- a/frontend/src/react/hooks/useSheetStatement.test.tsx+++ b/frontend/src/hooks/useSheetStatement.test.tsx@@ -10,7 +10,7 @@ import {const getSheetByName = vi.fn();const getOrFetchSheetByName = vi.fn();-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: {getState: () => ({ getSheetByName, getOrFetchSheetByName }),},diff --git a/frontend/src/react/hooks/useSheetStatement.ts b/frontend/src/hooks/useSheetStatement.tssimilarity index 98%rename from frontend/src/react/hooks/useSheetStatement.tsrename to frontend/src/hooks/useSheetStatement.tsindex 56bb7a0c76..0eca8354ab 100644--- a/frontend/src/react/hooks/useSheetStatement.ts+++ b/frontend/src/hooks/useSheetStatement.ts@@ -1,5 +1,5 @@import { useEffect, useState } from "react";-import { useAppStore } from "@/react/stores/app";+import { useAppStore } from "@/stores/app";import type { Sheet } from "@/types/proto-es/v1/sheet_service_pb";import { getStatementSize } from "@/utils/sheet";import { extractSheetUID, getSheetStatement } from "@/utils/v1/sheet";diff --git a/frontend/src/react/hooks/useURLSearchParam.test.tsx b/frontend/src/hooks/useURLSearchParam.test.tsxsimilarity index 100%rename from frontend/src/react/hooks/useURLSearchParam.test.tsxrename to frontend/src/hooks/useURLSearchParam.test.tsxdiff --git a/frontend/src/react/hooks/useURLSearchParam.ts b/frontend/src/hooks/useURLSearchParam.tssimilarity index 100%rename from frontend/src/react/hooks/useURLSearchParam.tsrename to frontend/src/hooks/useURLSearchParam.tsdiff --git a/frontend/src/react/hooks/useUnsavedChangesGuard.ts b/frontend/src/hooks/useUnsavedChangesGuard.tssimilarity index 93%rename from frontend/src/react/hooks/useUnsavedChangesGuard.tsrename to frontend/src/hooks/useUnsavedChangesGuard.tsindex 9ee7421751..1560110c48 100644--- a/frontend/src/react/hooks/useUnsavedChangesGuard.ts+++ b/frontend/src/hooks/useUnsavedChangesGuard.ts@@ -1,12 +1,12 @@import { useEffect, useRef } from "react";import { useTranslation } from "react-i18next";-import { router } from "@/react/router";+import { router } from "@/app/router";/*** Warn the user before they lose unsaved edits.** - Browser refresh / tab close: fires the native `beforeunload` prompt.- * - In-app Vue router navigation (sidebar links, back button, etc.):+ * - In-app React Router navigation (sidebar links, back button, etc.):* shows a `window.confirm` with `common.leave-without-saving` and aborts* the navigation if the user cancels.*diff --git a/frontend/src/react/hooks/useWorksheetAndTab.ts b/frontend/src/hooks/useWorksheetAndTab.tssimilarity index 85%rename from frontend/src/react/hooks/useWorksheetAndTab.tsrename to frontend/src/hooks/useWorksheetAndTab.tsindex 6618ae34a7..a0009e6b91 100644--- a/frontend/src/react/hooks/useWorksheetAndTab.ts+++ b/frontend/src/hooks/useWorksheetAndTab.ts@@ -1,7 +1,7 @@-import { useCurrentUser } from "@/react/hooks/useAppState";-import { useAppStore } from "@/react/stores/app";-import { useCurrentSQLEditorTab } from "@/react/stores/sqlEditor/tab";-import { extractUserEmail } from "@/store/modules/v1/common";+import { useCurrentUser } from "@/hooks/useAppState";+import { useCurrentSQLEditorTab } from "@/modules/sql-editor/store/tab";+import { useAppStore } from "@/stores/app";+import { extractUserEmail } from "@/stores/modules/v1/common";import type { Worksheet } from "@/types/proto-es/v1/worksheet_service_pb";import {getSheetStatement,diff --git a/frontend/src/layouts/README.md b/frontend/src/layouts/README.mddeleted file mode 100644index 15a47055db..0000000000--- a/frontend/src/layouts/README.md+++ /dev/null@@ -1 +0,0 @@-Any component containing <router-view> is considered a layout and should be put under this folder.diff --git a/frontend/src/react/lib/cancelableTimer.ts b/frontend/src/lib/cancelableTimer.tssimilarity index 100%rename from frontend/src/react/lib/cancelableTimer.tsrename to frontend/src/lib/cancelableTimer.tsdiff --git a/frontend/src/react/lib/clipboard.test.ts b/frontend/src/lib/clipboard.test.tssimilarity index 100%rename from frontend/src/react/lib/clipboard.test.tsrename to frontend/src/lib/clipboard.test.tsdiff --git a/frontend/src/react/lib/clipboard.ts b/frontend/src/lib/clipboard.tssimilarity index 100%rename from frontend/src/react/lib/clipboard.tsrename to frontend/src/lib/clipboard.tsdiff --git a/frontend/src/react/lib/column-data-table/utils.ts b/frontend/src/lib/column-data-table/utils.tssimilarity index 96%rename from frontend/src/react/lib/column-data-table/utils.tsrename to frontend/src/lib/column-data-table/utils.tsindex 00ab015a83..afc119b263 100644--- a/frontend/src/react/lib/column-data-table/utils.ts+++ b/frontend/src/lib/column-data-table/utils.ts@@ -1,8 +1,8 @@import { create } from "@bufbuild/protobuf";import { cloneDeep } from "lodash-es";-import i18n from "@/react/i18n";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+import i18n from "@/lib/i18n";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import type {ColumnCatalog,TableCatalog,diff --git a/frontend/src/react/lib/database-group/utils.ts b/frontend/src/lib/database-group/utils.tssimilarity index 96%rename from frontend/src/react/lib/database-group/utils.tsrename to frontend/src/lib/database-group/utils.tsindex cb89fc1060..e18bc79f3d 100644--- a/frontend/src/react/lib/database-group/utils.ts+++ b/frontend/src/lib/database-group/utils.ts@@ -1,4 +1,4 @@-import type { Factor } from "@/plugins/cel";+import type { Factor } from "@/modules/cel";import type { ResourceSelectOption } from "@/types/v2-shared";import {getDatabaseIdOptionConfig,diff --git a/frontend/src/react/lib/databaseFilter.ts b/frontend/src/lib/databaseFilter.tssimilarity index 77%rename from frontend/src/react/lib/databaseFilter.tsrename to frontend/src/lib/databaseFilter.tsindex 20e917d72d..04b039c102 100644--- a/frontend/src/react/lib/databaseFilter.ts+++ b/frontend/src/lib/databaseFilter.ts@@ -2,8 +2,8 @@ import type { Engine } from "@/types/proto-es/v1/common_pb";/*** Structured filter consumed by the app store's `fetchDatabases` and the- * Pinia `useDatabaseV1Store.fetchDatabases`. Lives under `@/react/lib/` so- * React code can import it without reaching into `@/store/modules/v1/`.+ * Pinia `useDatabaseV1Store.fetchDatabases`. Lives under `@/lib/` so+ * React code can import it without reaching into `@/stores/modules/v1/`.* The Pinia store re-exports this type for back-compat.*/export interface DatabaseFilter {diff --git a/frontend/src/plugins/dayjs.ts b/frontend/src/lib/dayjs.tssimilarity index 100%rename from frontend/src/plugins/dayjs.tsrename to frontend/src/lib/dayjs.tsdiff --git a/frontend/src/plugins/highlight.ts b/frontend/src/lib/highlight.tssimilarity index 100%rename from frontend/src/plugins/highlight.tsrename to frontend/src/lib/highlight.tsdiff --git a/frontend/src/plugins/i18n-canonical-locales.test.ts b/frontend/src/lib/i18n/canonical-locales.test.tssimilarity index 93%rename from frontend/src/plugins/i18n-canonical-locales.test.tsrename to frontend/src/lib/i18n/canonical-locales.test.tsindex 523debf232..034e5064bc 100644--- a/frontend/src/plugins/i18n-canonical-locales.test.ts+++ b/frontend/src/lib/i18n/canonical-locales.test.ts@@ -4,7 +4,7 @@ import { fileURLToPath } from "node:url";import { describe, expect, test } from "vitest";const __dirname = dirname(fileURLToPath(import.meta.url));-const srcDir = resolve(__dirname, "..");+const srcDir = resolve(__dirname, "../..");const sourceFilePattern = /\.(?:ts|tsx|vue)$/;function listSourceFiles(dir: string): string[] {@@ -27,10 +27,9 @@ describe("canonical locale resources", () => {});test("loads React i18n resources from the canonical locale root", () => {- const source = readFileSync(resolve(srcDir, "react/i18n.ts"), "utf-8");+ const source = readFileSync(resolve(srcDir, "lib/i18n/index.ts"), "utf-8");expect(source).toContain("@/locales/");- expect(source).not.toContain("@/react/locales/");});test("keeps SQL Review messages in the SQL Review locale slice only", () => {diff --git a/frontend/src/react/i18n.ts b/frontend/src/lib/i18n/index.tssimilarity index 100%rename from frontend/src/react/i18n.tsrename to frontend/src/lib/i18n/index.tsdiff --git a/frontend/src/plugins/i18n.test.ts b/frontend/src/lib/i18n/messages.test.tssimilarity index 98%rename from frontend/src/plugins/i18n.test.tsrename to frontend/src/lib/i18n/messages.test.tsindex 7ce5cd792b..32442b61cd 100644--- a/frontend/src/plugins/i18n.test.ts+++ b/frontend/src/lib/i18n/messages.test.ts@@ -9,8 +9,8 @@ import {getRuleLocalizationKey,ruleTypeToString,TEMPLATE_LIST_V2,-} from "../types/sqlReview";-import { type LocaleMessageObject, mergedLocalMessage } from "./i18n-messages";+} from "@/types/sqlReview";+import { type LocaleMessageObject, mergedLocalMessage } from "./messages";// Helper to safely access nested locale objectsconst getNestedObject = (@@ -169,7 +169,7 @@ const checkKeysSorted = (};describe("Locale keys are sorted alphabetically", () => {- const localesDirs = [resolve(__dirname, "../locales")];+ const localesDirs = [resolve(__dirname, "../../locales")];for (const dir of localesDirs) {const files = readdirSync(dir).filter((f) => f.endsWith(".json"));diff --git a/frontend/src/plugins/i18n-messages.ts b/frontend/src/lib/i18n/messages.tssimilarity index 90%rename from frontend/src/plugins/i18n-messages.tsrename to frontend/src/lib/i18n/messages.tsindex e4c4052d41..c28abcf5d0 100644--- a/frontend/src/plugins/i18n-messages.ts+++ b/frontend/src/lib/i18n/messages.ts@@ -1,13 +1,15 @@import { merge } from "lodash-es";-const localPathPrefix = "../locales/";+const localPathPrefix = "../../locales/";type LocaleModule = { default: Record<string, unknown> };export type LocaleMessageObject = {[key: string]: string | LocaleMessageObject;};-const localeModules = import.meta.glob("../locales/**/*.json", { eager: true });+const localeModules = import.meta.glob("../../locales/**/*.json", {+ eager: true,+});const rootMessages: Record<string, Record<string, unknown>> = {};const sectionMessages: Record<string, Record<string, unknown>> = {};diff --git a/frontend/src/react/lib/issue/issueListRefresh.ts b/frontend/src/lib/issue/issueListRefresh.tssimilarity index 100%rename from frontend/src/react/lib/issue/issueListRefresh.tsrename to frontend/src/lib/issue/issueListRefresh.tsdiff --git a/frontend/src/react/lib/keyValueStorage.ts b/frontend/src/lib/keyValueStorage.tssimilarity index 100%rename from frontend/src/react/lib/keyValueStorage.tsrename to frontend/src/lib/keyValueStorage.tsdiff --git a/frontend/src/react/lib/keyWithPosition.ts b/frontend/src/lib/keyWithPosition.tssimilarity index 100%rename from frontend/src/react/lib/keyWithPosition.tsrename to frontend/src/lib/keyWithPosition.tsdiff --git a/frontend/src/react/lib/memberBindings.test.ts b/frontend/src/lib/memberBindings.test.tssimilarity index 100%rename from frontend/src/react/lib/memberBindings.test.tsrename to frontend/src/lib/memberBindings.test.tsdiff --git a/frontend/src/react/lib/memberBindings.ts b/frontend/src/lib/memberBindings.tssimilarity index 92%rename from frontend/src/react/lib/memberBindings.tsrename to frontend/src/lib/memberBindings.tsindex da7217dd19..9fc1316d27 100644--- a/frontend/src/react/lib/memberBindings.ts+++ b/frontend/src/lib/memberBindings.ts@@ -1,15 +1,15 @@import { create } from "@bufbuild/protobuf";import { orderBy } from "lodash-es";-import { useAppStore } from "@/react/stores/app";-import { serviceAccountToUser } from "@/react/stores/app/serviceAccount";-import { workloadIdentityToUser } from "@/react/stores/app/workloadIdentity";-import { extractGroupEmail } from "@/store";+import { extractGroupEmail } from "@/stores";+import { useAppStore } from "@/stores/app";+import { serviceAccountToUser } from "@/stores/app/serviceAccount";+import { workloadIdentityToUser } from "@/stores/app/workloadIdentity";import {extractUserEmail,groupNamePrefix,serviceAccountNamePrefix,workloadIdentityNamePrefix,-} from "@/store/modules/v1/common";+} from "@/stores/modules/v1/common";import {getGroupEmailInBinding,groupBindingPrefix,@@ -22,8 +22,8 @@ import { type User, UserSchema } from "@/types/proto-es/v1/user_service_pb";import type { GroupBinding, MemberBinding } from "@/types/v1/member";import { convertMemberToFullname, hasWorkspacePermissionV2 } from "@/utils";-// Lives under `@/react/lib/` (not `@/utils/`) so the app-store reads don't-// drag `@/react/stores/app` into the `@/utils` import graph — that would+// Lives under `@/lib/` (not `@/utils/`) so the app-store reads don't+// drag `@/stores/app` into the `@/utils` import graph — that would// recreate the static ESM cycle the SQL editor connection move fixed.// Members surfaces are React-only, so a React-side location is natural.diff --git a/frontend/src/react/pages/project/plan-detail/utils/planCheck.test.ts b/frontend/src/lib/plan/check.test.tssimilarity index 99%rename from frontend/src/react/pages/project/plan-detail/utils/planCheck.test.tsrename to frontend/src/lib/plan/check.test.tsindex 0a5e492741..5e90e187ea 100644--- a/frontend/src/react/pages/project/plan-detail/utils/planCheck.test.ts+++ b/frontend/src/lib/plan/check.test.ts@@ -7,7 +7,7 @@ import {PlanCheckRunSchema,} from "@/types/proto-es/v1/plan_service_pb";import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";-import { getFilteredResultGroups, getPlanCheckSummary } from "./planCheck";+import { getFilteredResultGroups, getPlanCheckSummary } from "./check";describe("plan check helpers", () => {test("summarizes run-level and result-level statuses", () => {diff --git a/frontend/src/react/pages/project/plan-detail/utils/planCheck.ts b/frontend/src/lib/plan/check.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/utils/planCheck.tsrename to frontend/src/lib/plan/check.tsdiff --git a/frontend/src/react/lib/plan/diffPlanSpecs.test.ts b/frontend/src/lib/plan/diffPlanSpecs.test.tssimilarity index 100%rename from frontend/src/react/lib/plan/diffPlanSpecs.test.tsrename to frontend/src/lib/plan/diffPlanSpecs.test.tsdiff --git a/frontend/src/react/lib/plan/diffPlanSpecs.ts b/frontend/src/lib/plan/diffPlanSpecs.tssimilarity index 100%rename from frontend/src/react/lib/plan/diffPlanSpecs.tsrename to frontend/src/lib/plan/diffPlanSpecs.tsdiff --git a/frontend/src/react/lib/plan/issue.ts b/frontend/src/lib/plan/issue.tssimilarity index 91%rename from frontend/src/react/lib/plan/issue.tsrename to frontend/src/lib/plan/issue.tsindex 74cb8603a3..da92a258c3 100644--- a/frontend/src/react/lib/plan/issue.ts+++ b/frontend/src/lib/plan/issue.ts@@ -1,6 +1,6 @@-import { router } from "@/react/router";-import { PROJECT_V1_ROUTE_PLAN_DETAIL_SPEC_DETAIL } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";+import { router } from "@/app/router";+import { PROJECT_V1_ROUTE_PLAN_DETAIL_SPEC_DETAIL } from "@/app/router/handles";+import { useAppStore } from "@/stores/app";import { isValidDatabaseGroupName, isValidDatabaseName } from "@/types";import {extractDatabaseGroupName,diff --git a/frontend/src/react/lib/plan/title.test.ts b/frontend/src/lib/plan/title.test.tssimilarity index 100%rename from frontend/src/react/lib/plan/title.test.tsrename to frontend/src/lib/plan/title.test.tsdiff --git a/frontend/src/react/lib/plan/title.ts b/frontend/src/lib/plan/title.tssimilarity index 100%rename from frontend/src/react/lib/plan/title.tsrename to frontend/src/lib/plan/title.tsdiff --git a/frontend/src/react/pages/project/plan-detail/utils/header.test.ts b/frontend/src/lib/plan/workflow.test.tssimilarity index 99%rename from frontend/src/react/pages/project/plan-detail/utils/header.test.tsrename to frontend/src/lib/plan/workflow.test.tsindex 31f41cf84b..ce381524ef 100644--- a/frontend/src/react/pages/project/plan-detail/utils/header.test.ts+++ b/frontend/src/lib/plan/workflow.test.ts@@ -20,7 +20,7 @@ import {hasChecksWarning,shouldStayOnPlanDetailPage,submitDraftReview,-} from "./header";+} from "./workflow";const t = (key: string) => key;diff --git a/frontend/src/react/pages/project/plan-detail/utils/header.ts b/frontend/src/lib/plan/workflow.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/utils/header.tsrename to frontend/src/lib/plan/workflow.tsdiff --git a/frontend/src/react/lib/productIntro.css b/frontend/src/lib/productIntro.csssimilarity index 100%rename from frontend/src/react/lib/productIntro.cssrename to frontend/src/lib/productIntro.cssdiff --git a/frontend/src/react/lib/productIntro.test.ts b/frontend/src/lib/productIntro.test.tssimilarity index 99%rename from frontend/src/react/lib/productIntro.test.tsrename to frontend/src/lib/productIntro.test.tsindex f0bce9a511..f5be4faa38 100644--- a/frontend/src/react/lib/productIntro.test.ts+++ b/frontend/src/lib/productIntro.test.ts@@ -6,7 +6,7 @@ import { act, createElement } from "react";import { createRoot } from "react-dom/client";import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({router: {replace: ({ fullPath }: { fullPath: string }) => {window.history.replaceState(window.history.state, "", fullPath);diff --git a/frontend/src/react/lib/productIntro.ts b/frontend/src/lib/productIntro.tssimilarity index 99%rename from frontend/src/react/lib/productIntro.tsrename to frontend/src/lib/productIntro.tsindex 41a5837a6d..90ae10748f 100644--- a/frontend/src/react/lib/productIntro.ts+++ b/frontend/src/lib/productIntro.ts@@ -1,5 +1,5 @@import { useEffect } from "react";-import { router, useCurrentRoute } from "@/react/router";+import { router, useCurrentRoute } from "@/app/router";import "./productIntro.css";diff --git a/frontend/src/react/lib/project-member/utils.test.ts b/frontend/src/lib/project-member/utils.test.tssimilarity index 97%rename from frontend/src/react/lib/project-member/utils.test.tsrename to frontend/src/lib/project-member/utils.test.tsindex 701abf3dfd..7ea5cae90e 100644--- a/frontend/src/react/lib/project-member/utils.test.ts+++ b/frontend/src/lib/project-member/utils.test.ts@@ -8,7 +8,7 @@ const fixtures: Record<string, string[]> = {"roles/queryOnly": ["bb.sql.select"],"roles/projectViewer": [],};-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: Object.assign((selector: (state: unknown) => unknown) =>selector({diff --git a/frontend/src/react/lib/project-member/utils.ts b/frontend/src/lib/project-member/utils.tssimilarity index 92%rename from frontend/src/react/lib/project-member/utils.tsrename to frontend/src/lib/project-member/utils.tsindex 5cd3c7ff83..fdae14162e 100644--- a/frontend/src/react/lib/project-member/utils.ts+++ b/frontend/src/lib/project-member/utils.ts@@ -1,5 +1,5 @@-import { displayRoleTitleFromList } from "@/react/lib/role";-import { useAppStore } from "@/react/stores/app";+import { displayRoleTitleFromList } from "@/lib/role";+import { useAppStore } from "@/stores/app";import type { Binding } from "@/types/proto-es/v1/iam_policy_pb";import { checkRoleContainsAnyPermission } from "@/utils";diff --git a/frontend/src/react/lib/protoIdentity.ts b/frontend/src/lib/protoIdentity.tssimilarity index 100%rename from frontend/src/react/lib/protoIdentity.tsrename to frontend/src/lib/protoIdentity.tsdiff --git a/frontend/src/react/lib/resourceName.ts b/frontend/src/lib/resourceName.tssimilarity index 100%rename from frontend/src/react/lib/resourceName.tsrename to frontend/src/lib/resourceName.tsdiff --git a/frontend/src/react/lib/role.ts b/frontend/src/lib/role.tssimilarity index 98%rename from frontend/src/react/lib/role.tsrename to frontend/src/lib/role.tsindex 03d3f64366..18c22db98e 100644--- a/frontend/src/react/lib/role.ts+++ b/frontend/src/lib/role.ts@@ -1,4 +1,4 @@-import i18n from "@/react/i18n";+import i18n from "@/lib/i18n";import type { Role } from "@/types/proto-es/v1/role_service_pb";const PresetRoleType = {diff --git a/frontend/src/react/lib/sensitive-data/classification-example.json b/frontend/src/lib/sensitive-data/classification-example.jsonsimilarity index 100%rename from frontend/src/react/lib/sensitive-data/classification-example.jsonrename to frontend/src/lib/sensitive-data/classification-example.jsondiff --git a/frontend/src/react/lib/sensitive-data/components-utils.ts b/frontend/src/lib/sensitive-data/components-utils.tssimilarity index 95%rename from frontend/src/react/lib/sensitive-data/components-utils.tsrename to frontend/src/lib/sensitive-data/components-utils.tsindex 619923df04..ff21b4a414 100644--- a/frontend/src/react/lib/sensitive-data/components-utils.ts+++ b/frontend/src/lib/sensitive-data/components-utils.ts@@ -1,8 +1,8 @@import { create } from "@bufbuild/protobuf";import { uniq } from "lodash-es";-import type { Factor, Operator } from "@/plugins/cel";-import { CollectionOperatorList, EqualityOperatorList } from "@/plugins/cel";-import { useAppStore } from "@/react/stores/app";+import type { Factor, Operator } from "@/modules/cel";+import { CollectionOperatorList, EqualityOperatorList } from "@/modules/cel";+import { useAppStore } from "@/stores/app";import type { Algorithm } from "@/types/proto-es/v1/setting_service_pb";import { AlgorithmSchema } from "@/types/proto-es/v1/setting_service_pb";import type { ResourceSelectOption } from "@/types/v2-shared";diff --git a/frontend/src/react/lib/sensitive-data/exemptionDataUtils.test.ts b/frontend/src/lib/sensitive-data/exemptionDataUtils.test.tssimilarity index 99%rename from frontend/src/react/lib/sensitive-data/exemptionDataUtils.test.tsrename to frontend/src/lib/sensitive-data/exemptionDataUtils.test.tsindex 219bec746f..989a74c4de 100644--- a/frontend/src/react/lib/sensitive-data/exemptionDataUtils.test.ts+++ b/frontend/src/lib/sensitive-data/exemptionDataUtils.test.ts@@ -1,6 +1,6 @@import { describe, expect, test, vi } from "vitest";-vi.mock("@/react/i18n", () => ({+vi.mock("@/lib/i18n", () => ({default: {language: "en-US",t: (key: string, params?: Record<string, unknown>) => {diff --git a/frontend/src/react/lib/sensitive-data/exemptionDataUtils.ts b/frontend/src/lib/sensitive-data/exemptionDataUtils.tssimilarity index 99%rename from frontend/src/react/lib/sensitive-data/exemptionDataUtils.tsrename to frontend/src/lib/sensitive-data/exemptionDataUtils.tsindex 998168e22b..f76b762c2a 100644--- a/frontend/src/react/lib/sensitive-data/exemptionDataUtils.ts+++ b/frontend/src/lib/sensitive-data/exemptionDataUtils.ts@@ -1,4 +1,4 @@-import i18n from "@/react/i18n";+import i18n from "@/lib/i18n";import type {AccessUser,ClassificationLevel,diff --git a/frontend/src/react/lib/sensitive-data/maskingExemption.test.ts b/frontend/src/lib/sensitive-data/maskingExemption.test.tssimilarity index 97%rename from frontend/src/react/lib/sensitive-data/maskingExemption.test.tsrename to frontend/src/lib/sensitive-data/maskingExemption.test.tsindex 6e432947dd..d6cda48038 100644--- a/frontend/src/react/lib/sensitive-data/maskingExemption.test.ts+++ b/frontend/src/lib/sensitive-data/maskingExemption.test.ts@@ -1,5 +1,5 @@import { describe, expect, test } from "vitest";-import { emptySimpleExpr, wrapAsGroup } from "@/plugins/cel";+import { emptySimpleExpr, wrapAsGroup } from "@/modules/cel";import type { DatabaseResource } from "@/types";import { buildMaskingExemption } from "./maskingExemption";diff --git a/frontend/src/react/lib/sensitive-data/maskingExemption.ts b/frontend/src/lib/sensitive-data/maskingExemption.tssimilarity index 96%rename from frontend/src/react/lib/sensitive-data/maskingExemption.tsrename to frontend/src/lib/sensitive-data/maskingExemption.tsindex 263b554831..3cdc164adf 100644--- a/frontend/src/react/lib/sensitive-data/maskingExemption.ts+++ b/frontend/src/lib/sensitive-data/maskingExemption.ts@@ -1,8 +1,8 @@import { create } from "@bufbuild/protobuf";import { useMemo } from "react";-import type { ConditionGroupExpr, Factor, Operator } from "@/plugins/cel";-import { buildCELExpr } from "@/plugins/cel";-import { useAppStore } from "@/react/stores/app";+import type { ConditionGroupExpr, Factor, Operator } from "@/modules/cel";+import { buildCELExpr } from "@/modules/cel";+import { useAppStore } from "@/stores/app";import type { DatabaseResource } from "@/types";import { ExprSchema } from "@/types/proto-es/google/type/expr_pb";import {diff --git a/frontend/src/react/lib/sensitive-data/types.ts b/frontend/src/lib/sensitive-data/types.tssimilarity index 100%rename from frontend/src/react/lib/sensitive-data/types.tsrename to frontend/src/lib/sensitive-data/types.tsdiff --git a/frontend/src/react/lib/sensitive-data/utils.test.ts b/frontend/src/lib/sensitive-data/utils.test.tssimilarity index 100%rename from frontend/src/react/lib/sensitive-data/utils.test.tsrename to frontend/src/lib/sensitive-data/utils.test.tsdiff --git a/frontend/src/react/lib/sensitive-data/utils.ts b/frontend/src/lib/sensitive-data/utils.tssimilarity index 100%rename from frontend/src/react/lib/sensitive-data/utils.tsrename to frontend/src/lib/sensitive-data/utils.tsdiff --git a/frontend/src/react/lib/sql-review/rule-config-types.ts b/frontend/src/lib/sql-review/rule-config-types.tssimilarity index 100%rename from frontend/src/react/lib/sql-review/rule-config-types.tsrename to frontend/src/lib/sql-review/rule-config-types.tsdiff --git a/frontend/src/react/lib/sql-review/rule-config-utils.ts b/frontend/src/lib/sql-review/rule-config-utils.tssimilarity index 100%rename from frontend/src/react/lib/sql-review/rule-config-utils.tsrename to frontend/src/lib/sql-review/rule-config-utils.tsdiff --git a/frontend/src/react/lib/sql-review/utils.ts b/frontend/src/lib/sql-review/utils.tssimilarity index 98%rename from frontend/src/react/lib/sql-review/utils.tsrename to frontend/src/lib/sql-review/utils.tsindex df0d1c85de..e082a3d6b7 100644--- a/frontend/src/react/lib/sql-review/utils.ts+++ b/frontend/src/lib/sql-review/utils.ts@@ -1,4 +1,4 @@-import i18n from "@/react/i18n";+import i18n from "@/lib/i18n";import type {RuleConfigComponent,RuleMapValidationError,diff --git a/frontend/src/react/lib/sqlEditorConnection.ts b/frontend/src/lib/sqlEditorConnection.tssimilarity index 93%rename from frontend/src/react/lib/sqlEditorConnection.tsrename to frontend/src/lib/sqlEditorConnection.tsindex 9a465660f0..6215ab4def 100644--- a/frontend/src/react/lib/sqlEditorConnection.ts+++ b/frontend/src/lib/sqlEditorConnection.ts@@ -1,4 +1,4 @@-import { useAppStore } from "@/react/stores/app";+import { useAppStore } from "@/stores/app";import type { SQLEditorConnection, SQLEditorTab } from "@/types";import { isValidDatabaseName, isValidInstanceName } from "@/types";import type { Database } from "@/types/proto-es/v1/database_service_pb";@@ -9,9 +9,9 @@ import { instanceV1AllowsCrossDatabaseQuery } from "@/utils/v1/instance";/*** Resolves the live `Database` + `InstanceResource` for a SQL editor tab's- * connection. Lives under `@/react/lib/` (not `@/utils/`) because the lookup+ * connection. Lives under `@/lib/` (not `@/utils/`) because the lookup* goes through the React app store — putting it under `@/utils/` would- * create a static ESM cycle: `@/utils` → `@/react/stores/app` → ...slices...+ * create a static ESM cycle: `@/utils` → `@/stores/app` → ...slices...* → `@/types` → ... → back into `@/utils`. Hosting on the React side breaks* the import graph cleanly while keeping the migration off Pinia.*/diff --git a/frontend/src/react/lib/sqlEditorDataSource.ts b/frontend/src/lib/sqlEditorDataSource.tssimilarity index 97%rename from frontend/src/react/lib/sqlEditorDataSource.tsrename to frontend/src/lib/sqlEditorDataSource.tsindex 7e006c8b2c..5f794770c1 100644--- a/frontend/src/react/lib/sqlEditorDataSource.ts+++ b/frontend/src/lib/sqlEditorDataSource.ts@@ -1,5 +1,5 @@import { head } from "lodash-es";-import { useAppStore } from "@/react/stores/app";+import { useAppStore } from "@/stores/app";import type { QueryDataSourceType } from "@/types";import type { Database } from "@/types/proto-es/v1/database_service_pb";import { DataSourceType } from "@/types/proto-es/v1/instance_service_pb";diff --git a/frontend/src/react/lib/taskRun.test.ts b/frontend/src/lib/taskRun.test.tssimilarity index 100%rename from frontend/src/react/lib/taskRun.test.tsrename to frontend/src/lib/taskRun.test.tsdiff --git a/frontend/src/react/lib/taskRun.ts b/frontend/src/lib/taskRun.tssimilarity index 98%rename from frontend/src/react/lib/taskRun.tsrename to frontend/src/lib/taskRun.tsindex 452164debc..fcc7640290 100644--- a/frontend/src/react/lib/taskRun.ts+++ b/frontend/src/lib/taskRun.ts@@ -2,7 +2,7 @@ import { create } from "@bufbuild/protobuf";import type { Duration } from "@bufbuild/protobuf/wkt";import { DurationSchema } from "@bufbuild/protobuf/wkt";import type { TFunction } from "i18next";-import { extractUserEmail } from "@/store/modules/v1/common";+import { extractUserEmail } from "@/stores/modules/v1/common";import { getTimeForPbTimestampProtoEs } from "@/types";import type { TaskRun } from "@/types/proto-es/v1/rollout_service_pb";import { TaskRun_Status } from "@/types/proto-es/v1/rollout_service_pb";diff --git a/frontend/src/react/lib/toast.test.ts b/frontend/src/lib/toast.test.tssimilarity index 100%rename from frontend/src/react/lib/toast.test.tsrename to frontend/src/lib/toast.test.tsdiff --git a/frontend/src/react/lib/toast.ts b/frontend/src/lib/toast.tssimilarity index 66%rename from frontend/src/react/lib/toast.tsrename to frontend/src/lib/toast.tsindex 8cc6f67c1e..d49f5b45ac 100644--- a/frontend/src/react/lib/toast.ts+++ b/frontend/src/lib/toast.ts@@ -2,7 +2,6 @@ import {Toast as BaseToast,type ToastManagerAddOptions,} from "@base-ui/react/toast";-import { VueShellBridgeEvent } from "@/react/shell-bridge";import type { BBNotificationStyle, NotificationCreate } from "@/types";const NOTIFICATION_DURATION_MS = 6000;@@ -59,21 +58,3 @@ export function pushReactNotification(item: NotificationCreate): void {if (item.module !== "bytebase") return;toastManager.add(mapNotificationToToast(item));}--// Bridge from the Vue side: pushNotification() in the Pinia store dispatches-// a window CustomEvent. Register at module-eval so events fired during app-// bootstrap (e.g. auth/error interceptors before <Toaster /> mounts) are-// caught and queued in toastManager; the Provider drains the queue on mount.-// main.ts imports this module synchronously to make that ordering reliable.-if (typeof window !== "undefined") {- const handler = (event: Event) => {- const detail = (event as CustomEvent<NotificationCreate>).detail;- if (detail) pushReactNotification(detail);- };- window.addEventListener(VueShellBridgeEvent.notification, handler);- if (import.meta.hot) {- import.meta.hot.dispose(() => {- window.removeEventListener(VueShellBridgeEvent.notification, handler);- });- }-}diff --git a/frontend/src/react/lib/utils.ts b/frontend/src/lib/utils.tssimilarity index 100%rename from frontend/src/react/lib/utils.tsrename to frontend/src/lib/utils.tsdiff --git a/frontend/src/react/lib/workspace.ts b/frontend/src/lib/workspace.tssimilarity index 94%rename from frontend/src/react/lib/workspace.tsrename to frontend/src/lib/workspace.tsindex e0f69395b6..6f2a1965ea 100644--- a/frontend/src/react/lib/workspace.ts+++ b/frontend/src/lib/workspace.ts@@ -1,4 +1,4 @@-import { useAppStore } from "@/react/stores/app";+import { useAppStore } from "@/stores/app";/*** Resolve the active workspace resource name for auth flows (signin, MFA,diff --git a/frontend/src/main.ts b/frontend/src/main.tsindex 3f8add21d3..e31ddbcc6d 100644--- a/frontend/src/main.ts+++ b/frontend/src/main.ts@@ -6,13 +6,9 @@ import "./assets/css/tailwind.css";import "./stylex-dev-css";// Side-effect: configures the shared dayjs singleton (localizedFormat) and// registers the SQL highlight.js language + theme used across the app.-import "./plugins/dayjs";-import "./plugins/highlight";-// Side-effect: registers the bb.vue-notification window listener and-// constructs the toastManager singleton. Must load before any auth/error-// interceptor can fire pushNotification during bootstrap RPCs.-import "./react/lib/toast";-import { useAppStore } from "./react/stores/app";+import "./lib/dayjs";+import "./lib/highlight";+import { useAppStore } from "./stores/app";import { isDev, isRelease, migrateStorageKeys } from "./utils";console.debug("dev:", isDev());@@ -36,6 +32,6 @@ migrateStorageKeys();}await Promise.all(initPromises);- const { mountReactRouterApp } = await import("./react/app/mountApp");+ const { mountReactRouterApp } = await import("./app/mountApp");await mountReactRouterApp("#app");})();diff --git a/frontend/src/react/pages/settings/RequestRoleSheet.test.tsx b/frontend/src/modules/access-control/RequestRoleSheet.test.tsxsimilarity index 92%rename from frontend/src/react/pages/settings/RequestRoleSheet.test.tsxrename to frontend/src/modules/access-control/RequestRoleSheet.test.tsxindex 41f6c80fb3..04efec9f81 100644--- a/frontend/src/react/pages/settings/RequestRoleSheet.test.tsx+++ b/frontend/src/modules/access-control/RequestRoleSheet.test.tsx@@ -17,7 +17,7 @@ import type { Permission } from "@/types";// environment state that's not worth wiring up for these tests.// ----------------------------------------------------------------------------vi.mock("@/react/components/EnvironmentSelect", () => ({+vi.mock("@/components/EnvironmentSelect", () => ({EnvironmentSelect: () =>createElement("div", { "data-testid": "env-multi-select" }),}));@@ -27,7 +27,7 @@ vi.mock("@/react/components/EnvironmentSelect", () => ({// as inert DOM and submit button text is the literal i18n key.// ----------------------------------------------------------------------------vi.mock("@/react/components/ui/sheet", () => ({+vi.mock("@/components/ui/sheet", () => ({Sheet: ({ children, open }: { children: ReactNode; open: boolean }) =>open ? createElement("div", { "data-testid": "sheet" }, children) : null,SheetContent: ({ children }: { children: ReactNode }) =>@@ -42,7 +42,7 @@ vi.mock("@/react/components/ui/sheet", () => ({createElement("div", {}, children),}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,disabled,@@ -52,7 +52,7 @@ vi.mock("@/react/components/ui/button", () => ({createElement("button", { disabled, onClick }, children),}));-vi.mock("@/react/components/ui/textarea", () => ({+vi.mock("@/components/ui/textarea", () => ({Textarea: ({className: _c,size: _s,@@ -62,11 +62,11 @@ vi.mock("@/react/components/ui/textarea", () => ({}) => createElement("textarea", props),}));-vi.mock("@/react/components/ui/expiration-picker", () => ({+vi.mock("@/components/ui/expiration-picker", () => ({ExpirationPicker: () => null,}));-vi.mock("@/react/components/ui/alert", () => ({+vi.mock("@/components/ui/alert", () => ({Alert: ({children,title,@@ -78,22 +78,22 @@ vi.mock("@/react/components/ui/alert", () => ({}) => createElement("div", {}, title, description, children),}));-vi.mock("@/react/components/IssueLabelSelect", () => ({+vi.mock("@/components/IssueLabelSelect", () => ({IssueLabelSelect: () => null,}));-vi.mock("@/react/components/DatabaseResourceSelector", () => ({+vi.mock("@/components/DatabaseResourceSelector", () => ({DatabaseResourceSelector: () => null,}));-vi.mock("@/react/components/ExprEditor", () => ({+vi.mock("@/components/ExprEditor", () => ({ExprEditor: () => null,}));// RoleSelect: test-only stub that exposes a plain <select> so tests can pick a// role by setting value. We drive role selection via a hidden input bound to// onChange([value]).-vi.mock("@/react/components/RoleSelect", () => ({+vi.mock("@/components/RoleSelect", () => ({RoleSelect: ({value,onChange,@@ -144,14 +144,14 @@ vi.mock("@/types/proto-es/v1/issue_service_pb", () => ({vi.mock("@/types/proto-es/v1/project_service_pb", () => ({}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {resolve: () => ({ fullPath: "/issues/1" }),},}));-vi.mock("@/react/lib/project-member/utils", () => ({+vi.mock("@/lib/project-member/utils", () => ({// Wrap in vi.fn() so per-test overrides (vi.mocked(x).mockReturnValue(...))// work — plain arrow functions can't be re-mocked at runtime.// Default: PROJECT_OWNER is not a SQL-permission role — both return@@ -160,7 +160,7 @@ vi.mock("@/react/lib/project-member/utils", () => ({getRoleEnvironmentLimitationKind: vi.fn(() => undefined),}));-vi.mock("@/plugins/cel", () => ({+vi.mock("@/modules/cel", () => ({buildCELExpr: vi.fn(),emptySimpleExpr: () => ({}),validateSimpleExpr: () => true,@@ -206,21 +206,21 @@ const mocks = vi.hoisted(() => ({maximumRequestExpirationSeconds: undefined as number | undefined,}));-vi.mock("@/connect", () => ({+vi.mock("@/api", () => ({issueServiceClientConnect: {createIssue: (req: unknown) => mocks.createIssue(req),},}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: (...args: unknown[]) => mocks.pushNotification(...args),}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useCurrentUser: () => mocks.currentUser,}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: (selector: (state: unknown) => unknown) =>selector({roleList: [],@@ -249,7 +249,7 @@ vi.mock("@/react/stores/app", () => ({// Import SUT after mocks are registered.// ----------------------------------------------------------------------------import { nativeChange } from "@/react/test-utils/nativeChange";+import { nativeChange } from "@/test-utils/nativeChange";import { RequestRoleSheet } from "./RequestRoleSheet";const PROJECT_BASE = {@@ -341,7 +341,7 @@ async function typeReason(text: string): Promise<void> {beforeEach(async () => {vi.spyOn(window, "open").mockImplementation(() => null);// Reset env-kind mock between tests so per-test overrides don't leak.- const utilsMock = await import("@/react/lib/project-member/utils");+ const utilsMock = await import("@/lib/project-member/utils");vi.mocked(utilsMock.getRoleEnvironmentLimitationKind).mockReturnValue(undefined);@@ -443,7 +443,7 @@ describe("RequestRoleSheet — enforceIssueTitle (BYT-9310)", () => {it("renders DDL/DML warning under env multiselect when role has env limitation", async () => {// Override default helper mock for this case so the env section appears.- const utilsMock = await import("@/react/lib/project-member/utils");+ const utilsMock = await import("@/lib/project-member/utils");vi.mocked(utilsMock.getRoleEnvironmentLimitationKind).mockImplementation(() => "DDL/DML");diff --git a/frontend/src/react/pages/settings/RequestRoleSheet.tsx b/frontend/src/modules/access-control/RequestRoleSheet.tsxsimilarity index 93%rename from frontend/src/react/pages/settings/RequestRoleSheet.tsxrename to frontend/src/modules/access-control/RequestRoleSheet.tsxindex b8105d5dc2..738527cf4f 100644--- a/frontend/src/react/pages/settings/RequestRoleSheet.tsx+++ b/frontend/src/modules/access-control/RequestRoleSheet.tsx@@ -3,31 +3,21 @@ import { DurationSchema } from "@bufbuild/protobuf/wkt";import dayjs from "dayjs";import { useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { issueServiceClientConnect } from "@/connect";-import type { ConditionGroupExpr, Factor, Operator } from "@/plugins/cel";-import {- buildCELExpr,- emptySimpleExpr,- validateSimpleExpr,- wrapAsGroup,-} from "@/plugins/cel";-import { DatabaseResourceSelector as DatabaseResourceSelectorComponent } from "@/react/components/DatabaseResourceSelector";-import { EnvironmentSelect } from "@/react/components/EnvironmentSelect";-import type { OptionConfig } from "@/react/components/ExprEditor";-import { ExprEditor } from "@/react/components/ExprEditor";-import { IssueLabelSelect } from "@/react/components/IssueLabelSelect";-import { RoleSelect } from "@/react/components/RoleSelect";-import { DDLWarningCallout } from "@/react/components/role-grant/DDLWarningCallout";-import {- themeColorScheme,- themeToCssVars,-} from "@/react/components/sql-editor/theme/derive";-import type { SQLEditorTheme } from "@/react/components/sql-editor/theme/types";-import { Alert } from "@/react/components/ui/alert";-import { Button } from "@/react/components/ui/button";-import { ExpirationPicker } from "@/react/components/ui/expiration-picker";-import { FormError, FormField } from "@/react/components/ui/form";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";+import { issueServiceClientConnect } from "@/api";+import { router } from "@/app/router";+import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/app/router/handles";+import { DatabaseResourceSelector as DatabaseResourceSelectorComponent } from "@/components/DatabaseResourceSelector";+import { EnvironmentSelect } from "@/components/EnvironmentSelect";+import type { OptionConfig } from "@/components/ExprEditor";+import { ExprEditor } from "@/components/ExprEditor";+import { IssueLabelSelect } from "@/components/IssueLabelSelect";+import { RoleSelect } from "@/components/RoleSelect";+import { DDLWarningCallout } from "@/components/role-grant/DDLWarningCallout";+import { Alert } from "@/components/ui/alert";+import { Button } from "@/components/ui/button";+import { ExpirationPicker } from "@/components/ui/expiration-picker";+import { FormError, FormField } from "@/components/ui/form";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";import {Sheet,SheetBody,@@ -35,18 +25,28 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { Textarea } from "@/react/components/ui/textarea";-import { useCurrentUser } from "@/react/hooks/useAppState";+} from "@/components/ui/sheet";+import { Textarea } from "@/components/ui/textarea";+import { useCurrentUser } from "@/hooks/useAppState";import {getRoleEnvironmentLimitationKind,roleHasDatabaseLimitation,-} from "@/react/lib/project-member/utils";-import { displayRoleTitleFromList } from "@/react/lib/role";-import { router } from "@/react/router";-import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/lib/project-member/utils";+import { displayRoleTitleFromList } from "@/lib/role";+import type { ConditionGroupExpr, Factor, Operator } from "@/modules/cel";+import {+ buildCELExpr,+ emptySimpleExpr,+ validateSimpleExpr,+ wrapAsGroup,+} from "@/modules/cel";+import {+ themeColorScheme,+ themeToCssVars,+} from "@/modules/sql-editor/components/theme/derive";+import type { SQLEditorTheme } from "@/modules/sql-editor/components/theme/types";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import type { Permission } from "@/types";import { type DatabaseResource, PresetRoleType } from "@/types";import { ExprSchema as ConditionExprSchema } from "@/types/proto-es/google/type/expr_pb";diff --git a/frontend/src/react/pages/settings/requestRoleButton.test.ts b/frontend/src/modules/access-control/requestRoleButton.test.tssimilarity index 100%rename from frontend/src/react/pages/settings/requestRoleButton.test.tsrename to frontend/src/modules/access-control/requestRoleButton.test.tsdiff --git a/frontend/src/react/pages/settings/requestRoleButton.ts b/frontend/src/modules/access-control/requestRoleButton.tssimilarity index 100%rename from frontend/src/react/pages/settings/requestRoleButton.tsrename to frontend/src/modules/access-control/requestRoleButton.tsdiff --git a/frontend/src/react/pages/settings/types.ts b/frontend/src/modules/access-control/types.tssimilarity index 100%rename from frontend/src/react/pages/settings/types.tsrename to frontend/src/modules/access-control/types.tsdiff --git a/frontend/src/modules/agent/AGENTS.md b/frontend/src/modules/agent/AGENTS.mdnew file mode 100644index 0000000000..66ff73f2f5--- /dev/null+++ b/frontend/src/modules/agent/AGENTS.md@@ -0,0 +1,53 @@+# Page agent module++Follow `../../../AGENTS.md`. This file adds rules for the in-product page agent under `src/modules/agent/`.++## Ownership map++```text+src/modules/agent/+├── components/ # React window, chat, input, tool cards, agent-owned overlays+├── dom/ # DOM snapshots and browser interaction primitives+├── logic/+│ ├── agentLoop.ts # Tool-call loop and retry behavior+│ ├── context.ts # Page and application context extraction+│ ├── prompt.ts # System prompt and maintained service directory+│ ├── skills/ # On-demand workflow guides exposed by get_skill+│ └── tools/ # API, navigation, page-state, and DOM tool implementations+├── store/ # Zustand state for the agent window and conversation+├── index.tsx # Public module exports+└── window.ts # Window-level integration+```++Keep agent-only UI and state inside this module. Shared application primitives still come from `@/components/ui`, but agent overlays must use the wrappers in `components/ui/` so they mount in the `agent` layer.++## Tool behavior++- `search_api` discovers endpoints and request/response shapes from the generated OpenAPI index.+- `call_api` executes Bytebase API requests.+- `navigate` uses the React Router instance from `@/app/router` and can list registered route patterns.+- `get_page_state` returns semantic application context or a DOM snapshot.+- `dom_action` interacts with elements from the latest DOM snapshot.+- `get_skill` loads workflow guidance from `logic/skills/`.++DOM refs such as `e1` are local to one `get_page_state(mode="dom")` snapshot. Refresh the snapshot after navigation or any DOM-changing action; never describe refs as durable identifiers.++## OpenAPI index++Run:++```bash+pnpm --dir frontend run generate:openapi-index+```++The generator reads `backend/api/mcp/gen/openapi.yaml` and writes `logic/tools/gen/openapi-index.ts`. Do not edit the generated file manually.++`logic/prompt.ts` contains a compact, manually maintained `serviceDirectory`. Update it when the generator reports uncovered services or when discovery terminology is insufficient. Keep descriptions short and user-facing; the generated index remains the endpoint source of truth.++## Extending the agent++- Add a workflow guide in `logic/skills/` and register it in `logic/skills/index.ts`.+- Add tool implementation and tests under `logic/tools/`, then register it in `logic/tools/index.ts`.+- Keep API discovery in `searchApi.ts`; do not hardcode broad endpoint inventories into the prompt.+- Use the Zustand store in `store/agent.ts`; do not introduce a second state system.+- Run focused Vitest for the touched agent subtree, then the standard frontend verification sequence.diff --git a/frontend/src/react/plugins/agent/components/AgentChat.test.tsx b/frontend/src/modules/agent/components/AgentChat.test.tsxsimilarity index 98%rename from frontend/src/react/plugins/agent/components/AgentChat.test.tsxrename to frontend/src/modules/agent/components/AgentChat.test.tsxindex 115539976d..20ff953d5d 100644--- a/frontend/src/react/plugins/agent/components/AgentChat.test.tsx+++ b/frontend/src/modules/agent/components/AgentChat.test.tsx@@ -47,8 +47,8 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {push: mocks.routerPush,resolve: (to: unknown) => ({ href: JSON.stringify(to) }),diff --git a/frontend/src/react/plugins/agent/components/AgentChat.tsx b/frontend/src/modules/agent/components/AgentChat.tsxsimilarity index 97%rename from frontend/src/react/plugins/agent/components/AgentChat.tsxrename to frontend/src/modules/agent/components/AgentChat.tsxindex 946f5b4ab1..d02baad4d8 100644--- a/frontend/src/react/plugins/agent/components/AgentChat.tsx+++ b/frontend/src/modules/agent/components/AgentChat.tsx@@ -2,13 +2,13 @@ import { useEffect, useMemo, useRef } from "react";import { useTranslation } from "react-i18next";import ReactMarkdown from "react-markdown";import remarkGfm from "remark-gfm";-import { RouterLink } from "@/react/components/RouterLink";-import { Button, buttonVariants } from "@/react/components/ui/button";+import { SETTING_ROUTE_WORKSPACE_GENERAL } from "@/app/router/handles";+import { RouterLink } from "@/components/RouterLink";+import { Button, buttonVariants } from "@/components/ui/button";import {AI_ASSISTANT_PRODUCT_INTRO,PRODUCT_INTRO_QUERY_KEY,-} from "@/react/lib/productIntro";-import { SETTING_ROUTE_WORKSPACE_GENERAL } from "@/react/router/handles";+} from "@/lib/productIntro";import { hasWorkspacePermissionV2 } from "@/utils";import type { AgentMessage, ToolCall } from "../logic/types";import {diff --git a/frontend/src/react/plugins/agent/components/AgentInput.test.tsx b/frontend/src/modules/agent/components/AgentInput.test.tsxsimilarity index 99%rename from frontend/src/react/plugins/agent/components/AgentInput.test.tsxrename to frontend/src/modules/agent/components/AgentInput.test.tsxindex 822d4038ed..4d0c60c2bf 100644--- a/frontend/src/react/plugins/agent/components/AgentInput.test.tsx+++ b/frontend/src/modules/agent/components/AgentInput.test.tsx@@ -60,8 +60,8 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {currentRoute: {value: {diff --git a/frontend/src/react/plugins/agent/components/AgentInput.tsx b/frontend/src/modules/agent/components/AgentInput.tsxsimilarity index 99%rename from frontend/src/react/plugins/agent/components/AgentInput.tsxrename to frontend/src/modules/agent/components/AgentInput.tsxindex 1bd34162b4..018adfecc2 100644--- a/frontend/src/react/plugins/agent/components/AgentInput.tsx+++ b/frontend/src/modules/agent/components/AgentInput.tsx@@ -10,9 +10,9 @@ import {import { createPortal } from "react-dom";import { useTranslation } from "react-i18next";import { v4 as uuidv4 } from "uuid";-import { Button } from "@/react/components/ui/button";-import { getLayerRoot, LAYER_SURFACE_CLASS } from "@/react/components/ui/layer";-import { router } from "@/react/router";+import { router } from "@/app/router";+import { Button } from "@/components/ui/button";+import { getLayerRoot, LAYER_SURFACE_CLASS } from "@/components/ui/layer";import type { DomRefSuggestion } from "../dom";import { lazyExtractDomRefSuggestions } from "../dom";import { runAgentLoop } from "../logic/agentLoop";diff --git a/frontend/src/react/plugins/agent/components/AgentWindow.test.tsx b/frontend/src/modules/agent/components/AgentWindow.test.tsxsimilarity index 100%rename from frontend/src/react/plugins/agent/components/AgentWindow.test.tsxrename to frontend/src/modules/agent/components/AgentWindow.test.tsxdiff --git a/frontend/src/react/plugins/agent/components/AgentWindow.tsx b/frontend/src/modules/agent/components/AgentWindow.tsxsimilarity index 99%rename from frontend/src/react/plugins/agent/components/AgentWindow.tsxrename to frontend/src/modules/agent/components/AgentWindow.tsxindex 8cbf43d508..2ec1ba5d2a 100644--- a/frontend/src/react/plugins/agent/components/AgentWindow.tsx+++ b/frontend/src/modules/agent/components/AgentWindow.tsx@@ -9,11 +9,11 @@ import {} from "react";import { createPortal } from "react-dom";import { useTranslation } from "react-i18next";-import { HumanizeTs } from "@/react/components/HumanizeTs";-import { Button } from "@/react/components/ui/button";-import { Input } from "@/react/components/ui/input";-import { getLayerRoot } from "@/react/components/ui/layer";-import { cn } from "@/react/lib/utils";+import { HumanizeTs } from "@/components/HumanizeTs";+import { Button } from "@/components/ui/button";+import { Input } from "@/components/ui/input";+import { getLayerRoot } from "@/components/ui/layer";+import { cn } from "@/lib/utils";import { formatAbsoluteDateTime } from "@/utils";import type { AgentChat as AgentChatRecord } from "../logic/types";import {diff --git a/frontend/src/react/plugins/agent/components/ToolCallCard.tsx b/frontend/src/modules/agent/components/ToolCallCard.tsxsimilarity index 100%rename from frontend/src/react/plugins/agent/components/ToolCallCard.tsxrename to frontend/src/modules/agent/components/ToolCallCard.tsxdiff --git a/frontend/src/react/plugins/agent/components/resize-capability.test.ts b/frontend/src/modules/agent/components/resize-capability.test.tssimilarity index 100%rename from frontend/src/react/plugins/agent/components/resize-capability.test.tsrename to frontend/src/modules/agent/components/resize-capability.test.tsdiff --git a/frontend/src/react/plugins/agent/components/resize-capability.ts b/frontend/src/modules/agent/components/resize-capability.tssimilarity index 100%rename from frontend/src/react/plugins/agent/components/resize-capability.tsrename to frontend/src/modules/agent/components/resize-capability.tsdiff --git a/frontend/src/react/plugins/agent/components/ui/AgentDialog.tsx b/frontend/src/modules/agent/components/ui/AgentDialog.tsxsimilarity index 96%rename from frontend/src/react/plugins/agent/components/ui/AgentDialog.tsxrename to frontend/src/modules/agent/components/ui/AgentDialog.tsxindex d0dd116c4b..6fb0274a2e 100644--- a/frontend/src/react/plugins/agent/components/ui/AgentDialog.tsx+++ b/frontend/src/modules/agent/components/ui/AgentDialog.tsx@@ -4,8 +4,8 @@ import {getLayerRoot,LAYER_BACKDROP_CLASS,LAYER_SURFACE_CLASS,-} from "@/react/components/ui/layer";-import { cn } from "@/react/lib/utils";+} from "@/components/ui/layer";+import { cn } from "@/lib/utils";export const AgentDialog = BaseDialog.Root;diff --git a/frontend/src/react/plugins/agent/components/ui/AgentDropdownMenu.tsx b/frontend/src/modules/agent/components/ui/AgentDropdownMenu.tsxsimilarity index 94%rename from frontend/src/react/plugins/agent/components/ui/AgentDropdownMenu.tsxrename to frontend/src/modules/agent/components/ui/AgentDropdownMenu.tsxindex 150adb378e..0b3d175b56 100644--- a/frontend/src/react/plugins/agent/components/ui/AgentDropdownMenu.tsx+++ b/frontend/src/modules/agent/components/ui/AgentDropdownMenu.tsx@@ -1,7 +1,7 @@import { Menu as BaseMenu } from "@base-ui/react/menu";import type { ComponentProps } from "react";-import { getLayerRoot, LAYER_SURFACE_CLASS } from "@/react/components/ui/layer";-import { cn } from "@/react/lib/utils";+import { getLayerRoot, LAYER_SURFACE_CLASS } from "@/components/ui/layer";+import { cn } from "@/lib/utils";export function AgentDropdownMenu({modal = false,diff --git a/frontend/src/react/plugins/agent/components/ui/AgentTooltip.tsx b/frontend/src/modules/agent/components/ui/AgentTooltip.tsxsimilarity index 94%rename from frontend/src/react/plugins/agent/components/ui/AgentTooltip.tsxrename to frontend/src/modules/agent/components/ui/AgentTooltip.tsxindex 321e703a7f..35df9743a0 100644--- a/frontend/src/react/plugins/agent/components/ui/AgentTooltip.tsx+++ b/frontend/src/modules/agent/components/ui/AgentTooltip.tsx@@ -1,6 +1,6 @@import { Tooltip as BaseTooltip } from "@base-ui/react/tooltip";import type { ReactNode } from "react";-import { getLayerRoot, LAYER_SURFACE_CLASS } from "@/react/components/ui/layer";+import { getLayerRoot, LAYER_SURFACE_CLASS } from "@/components/ui/layer";interface TooltipProps {readonly content: ReactNode;diff --git a/frontend/src/react/plugins/agent/components/window-resize.test.ts b/frontend/src/modules/agent/components/window-resize.test.tssimilarity index 100%rename from frontend/src/react/plugins/agent/components/window-resize.test.tsrename to frontend/src/modules/agent/components/window-resize.test.tsdiff --git a/frontend/src/react/plugins/agent/components/window-resize.ts b/frontend/src/modules/agent/components/window-resize.tssimilarity index 100%rename from frontend/src/react/plugins/agent/components/window-resize.tsrename to frontend/src/modules/agent/components/window-resize.tsdiff --git a/frontend/src/react/plugins/agent/dom/actions.ts b/frontend/src/modules/agent/dom/actions.tssimilarity index 99%rename from frontend/src/react/plugins/agent/dom/actions.tsrename to frontend/src/modules/agent/dom/actions.tsindex 28a572682d..5c0b670ec2 100644--- a/frontend/src/react/plugins/agent/dom/actions.ts+++ b/frontend/src/modules/agent/dom/actions.ts@@ -94,7 +94,7 @@ async function findMonacoEditor(try {const { isMonacoLoaded, getMonacoEditor } = await import(- "@/react/components/monaco/core"+ "@/components/monaco/core");if (!isMonacoLoaded()) return null;const monaco = await getMonacoEditor();diff --git a/frontend/src/react/plugins/agent/dom/domTree.test.ts b/frontend/src/modules/agent/dom/domTree.test.tssimilarity index 100%rename from frontend/src/react/plugins/agent/dom/domTree.test.tsrename to frontend/src/modules/agent/dom/domTree.test.tsdiff --git a/frontend/src/react/plugins/agent/dom/domTree.ts b/frontend/src/modules/agent/dom/domTree.tssimilarity index 100%rename from frontend/src/react/plugins/agent/dom/domTree.tsrename to frontend/src/modules/agent/dom/domTree.tsdiff --git a/frontend/src/react/plugins/agent/dom/index.test.ts b/frontend/src/modules/agent/dom/index.test.tssimilarity index 97%rename from frontend/src/react/plugins/agent/dom/index.test.tsrename to frontend/src/modules/agent/dom/index.test.tsindex ef75296f6a..fb2c7f18af 100644--- a/frontend/src/react/plugins/agent/dom/index.test.ts+++ b/frontend/src/modules/agent/dom/index.test.ts@@ -1,5 +1,5 @@import { afterEach, describe, expect, test, vi } from "vitest";-import type { AppRouterInstance } from "@/react/router";+import type { AppRouterInstance } from "@/app/router";import {lazyExecuteDomAction,lazyExtractDomRefSuggestions,@@ -134,7 +134,7 @@ describe("lazyExecuteDomAction", () => {});});- test("uses vue router for same-origin link clicks", async () => {+ test("uses the app router for same-origin link clicks", async () => {window.history.pushState({}, "", "/current");document.body.innerHTML ='<a href="/settings?tab=general#profile">Settings</a>';diff --git a/frontend/src/react/plugins/agent/dom/index.ts b/frontend/src/modules/agent/dom/index.tssimilarity index 95%rename from frontend/src/react/plugins/agent/dom/index.tsrename to frontend/src/modules/agent/dom/index.tsindex 401cd0890b..50f135bb9e 100644--- a/frontend/src/react/plugins/agent/dom/index.ts+++ b/frontend/src/modules/agent/dom/index.ts@@ -1,4 +1,4 @@-import type { AppRouterInstance } from "@/react/router";+import type { AppRouterInstance } from "@/app/router";import type {DomActionParams,DomActionResult,@@ -84,7 +84,7 @@ export async function lazyExecuteDomAction(return formatRefreshError(`Element [${elementRef}] is stale.`);}- // For <a> clicks, use Vue AppRouterInstance to avoid full page reload+ // Route same-origin links through React Router to avoid a full-page reload.if (params.type === "click" && router) {const path = isSameOriginLink(entry.element);if (path) {diff --git a/frontend/src/react/plugins/agent/index.tsx b/frontend/src/modules/agent/index.tsxsimilarity index 100%rename from frontend/src/react/plugins/agent/index.tsxrename to frontend/src/modules/agent/index.tsxdiff --git a/frontend/src/react/plugins/agent/logic/agentLoop.test.ts b/frontend/src/modules/agent/logic/agentLoop.test.tssimilarity index 99%rename from frontend/src/react/plugins/agent/logic/agentLoop.test.tsrename to frontend/src/modules/agent/logic/agentLoop.test.tsindex 1635e46c8f..a154262931 100644--- a/frontend/src/react/plugins/agent/logic/agentLoop.test.ts+++ b/frontend/src/modules/agent/logic/agentLoop.test.ts@@ -1,10 +1,10 @@import { beforeEach, describe, expect, test, vi } from "vitest";-import { aiServiceClientConnect } from "@/connect";+import { aiServiceClientConnect } from "@/api";import { AIChatMessageRole } from "@/types/proto-es/v1/ai_service_pb";import { runAgentLoop } from "./agentLoop";import type { ToolExecutor } from "./types";-vi.mock("@/connect", () => ({+vi.mock("@/api", () => ({aiServiceClientConnect: {chat: vi.fn(),},diff --git a/frontend/src/react/plugins/agent/logic/agentLoop.ts b/frontend/src/modules/agent/logic/agentLoop.tssimilarity index 98%rename from frontend/src/react/plugins/agent/logic/agentLoop.tsrename to frontend/src/modules/agent/logic/agentLoop.tsindex 97ecf9b839..ba5d67b695 100644--- a/frontend/src/react/plugins/agent/logic/agentLoop.ts+++ b/frontend/src/modules/agent/logic/agentLoop.ts@@ -1,7 +1,7 @@import { create } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";-import { aiServiceClientConnect } from "@/connect";-import { silentContextKey } from "@/connect/context-key";+import { aiServiceClientConnect } from "@/api";+import { silentContextKey } from "@/api/context-key";import type {AIChatMessage,AIChatToolDefinition,diff --git a/frontend/src/react/plugins/agent/logic/aiConfiguration.test.ts b/frontend/src/modules/agent/logic/aiConfiguration.test.tssimilarity index 100%rename from frontend/src/react/plugins/agent/logic/aiConfiguration.test.tsrename to frontend/src/modules/agent/logic/aiConfiguration.test.tsdiff --git a/frontend/src/react/plugins/agent/logic/aiConfiguration.ts b/frontend/src/modules/agent/logic/aiConfiguration.tssimilarity index 100%rename from frontend/src/react/plugins/agent/logic/aiConfiguration.tsrename to frontend/src/modules/agent/logic/aiConfiguration.tsdiff --git a/frontend/src/react/plugins/agent/logic/context.ts b/frontend/src/modules/agent/logic/context.tssimilarity index 96%rename from frontend/src/react/plugins/agent/logic/context.tsrename to frontend/src/modules/agent/logic/context.tsindex c3e1842d5b..12615639d2 100644--- a/frontend/src/react/plugins/agent/logic/context.ts+++ b/frontend/src/modules/agent/logic/context.ts@@ -1,5 +1,5 @@-import type { ReactRoute } from "@/react/router";-import { useAppStore } from "@/react/stores/app";+import type { ReactRoute } from "@/app/router";+import { useAppStore } from "@/stores/app";import { Engine, State } from "@/types/proto-es/v1/common_pb";import { Issue_Type, IssueStatus } from "@/types/proto-es/v1/issue_service_pb";diff --git a/frontend/src/react/plugins/agent/logic/outboundHistory.ts b/frontend/src/modules/agent/logic/outboundHistory.tssimilarity index 100%rename from frontend/src/react/plugins/agent/logic/outboundHistory.tsrename to frontend/src/modules/agent/logic/outboundHistory.tsdiff --git a/frontend/src/react/plugins/agent/logic/prompt.test.ts b/frontend/src/modules/agent/logic/prompt.test.tssimilarity index 100%rename from frontend/src/react/plugins/agent/logic/prompt.test.tsrename to frontend/src/modules/agent/logic/prompt.test.tsdiff --git a/frontend/src/react/plugins/agent/logic/prompt.ts b/frontend/src/modules/agent/logic/prompt.tssimilarity index 100%rename from frontend/src/react/plugins/agent/logic/prompt.tsrename to frontend/src/modules/agent/logic/prompt.tsdiff --git a/frontend/src/react/plugins/agent/logic/skills/databaseChange.ts b/frontend/src/modules/agent/logic/skills/databaseChange.tssimilarity index 100%rename from frontend/src/react/plugins/agent/logic/skills/databaseChange.tsrename to frontend/src/modules/agent/logic/skills/databaseChange.tsdiff --git a/frontend/src/react/plugins/agent/logic/skills/grantPermission.ts b/frontend/src/modules/agent/logic/skills/grantPermission.tssimilarity index 100%rename from frontend/src/react/plugins/agent/logic/skills/grantPermission.tsrename to frontend/src/modules/agent/logic/skills/grantPermission.tsdiff --git a/frontend/src/react/plugins/agent/logic/skills/index.ts b/frontend/src/modules/agent/logic/skills/index.tssimilarity index 100%rename from frontend/src/react/plugins/agent/logic/skills/index.tsrename to frontend/src/modules/agent/logic/skills/index.tsdiff --git a/frontend/src/react/plugins/agent/logic/skills/query.ts b/frontend/src/modules/agent/logic/skills/query.tssimilarity index 100%rename from frontend/src/react/plugins/agent/logic/skills/query.tsrename to frontend/src/modules/agent/logic/skills/query.tsdiff --git a/frontend/src/react/plugins/agent/logic/tools/callApi.test.ts b/frontend/src/modules/agent/logic/tools/callApi.test.tssimilarity index 99%rename from frontend/src/react/plugins/agent/logic/tools/callApi.test.tsrename to frontend/src/modules/agent/logic/tools/callApi.test.tsindex bfd4d74805..3db9ce8f29 100644--- a/frontend/src/react/plugins/agent/logic/tools/callApi.test.ts+++ b/frontend/src/modules/agent/logic/tools/callApi.test.ts@@ -9,7 +9,7 @@ const mocks = vi.hoisted(() => ({refreshTokens: vi.fn(),}));-vi.mock("@/connect/refreshToken", () => ({+vi.mock("@/api/refreshToken", () => ({refreshTokens: mocks.refreshTokens,}));diff --git a/frontend/src/react/plugins/agent/logic/tools/callApi.ts b/frontend/src/modules/agent/logic/tools/callApi.tssimilarity index 98%rename from frontend/src/react/plugins/agent/logic/tools/callApi.tsrename to frontend/src/modules/agent/logic/tools/callApi.tsindex b8cf65486d..de46abef0f 100644--- a/frontend/src/react/plugins/agent/logic/tools/callApi.ts+++ b/frontend/src/modules/agent/logic/tools/callApi.ts@@ -1,4 +1,4 @@-import { refreshTokens } from "@/connect/refreshToken";+import { refreshTokens } from "@/api/refreshToken";import type { PropertyInfo, SchemaInfo } from "./gen/openapi-index";import { getEndpointPath, getRequestSchema, getSchema } from "./searchApi";diff --git a/frontend/src/react/plugins/agent/logic/tools/domAction.test.ts b/frontend/src/modules/agent/logic/tools/domAction.test.tssimilarity index 92%rename from frontend/src/react/plugins/agent/logic/tools/domAction.test.tsrename to frontend/src/modules/agent/logic/tools/domAction.test.tsindex 169939733b..80d2daf4e1 100644--- a/frontend/src/react/plugins/agent/logic/tools/domAction.test.ts+++ b/frontend/src/modules/agent/logic/tools/domAction.test.ts@@ -1,5 +1,5 @@import { describe, expect, test, vi } from "vitest";-import type { AppRouterInstance } from "@/react/router";+import type { AppRouterInstance } from "@/app/router";vi.mock("../../dom", () => ({lazyExecuteDomAction: vi.fn(async () => ({ success: true, message: "done" })),diff --git a/frontend/src/react/plugins/agent/logic/tools/domAction.ts b/frontend/src/modules/agent/logic/tools/domAction.tssimilarity index 87%rename from frontend/src/react/plugins/agent/logic/tools/domAction.tsrename to frontend/src/modules/agent/logic/tools/domAction.tsindex db5a6802ac..4f0e440971 100644--- a/frontend/src/react/plugins/agent/logic/tools/domAction.ts+++ b/frontend/src/modules/agent/logic/tools/domAction.ts@@ -1,4 +1,4 @@-import type { AppRouterInstance } from "@/react/router";+import type { AppRouterInstance } from "@/app/router";import { lazyExecuteDomAction } from "../../dom";export interface DomActionArgs {diff --git a/frontend/src/react/plugins/agent/logic/tools/gen/.gitignore b/frontend/src/modules/agent/logic/tools/gen/.gitignoresimilarity index 100%rename from frontend/src/react/plugins/agent/logic/tools/gen/.gitignorerename to frontend/src/modules/agent/logic/tools/gen/.gitignorediff --git a/frontend/src/react/plugins/agent/logic/tools/index.test.ts b/frontend/src/modules/agent/logic/tools/index.test.tssimilarity index 99%rename from frontend/src/react/plugins/agent/logic/tools/index.test.tsrename to frontend/src/modules/agent/logic/tools/index.test.tsindex 66ba8809f0..1137797bc6 100644--- a/frontend/src/react/plugins/agent/logic/tools/index.test.ts+++ b/frontend/src/modules/agent/logic/tools/index.test.ts@@ -1,5 +1,5 @@import { describe, expect, test, vi } from "vitest";-import type { AppRouterInstance } from "@/react/router";+import type { AppRouterInstance } from "@/app/router";vi.mock("../skills", () => ({getSkill: vi.fn(async () => "skill"),diff --git a/frontend/src/react/plugins/agent/logic/tools/index.ts b/frontend/src/modules/agent/logic/tools/index.tssimilarity index 99%rename from frontend/src/react/plugins/agent/logic/tools/index.tsrename to frontend/src/modules/agent/logic/tools/index.tsindex 4e9454e478..8841c24acd 100644--- a/frontend/src/react/plugins/agent/logic/tools/index.ts+++ b/frontend/src/modules/agent/logic/tools/index.ts@@ -1,4 +1,4 @@-import type { AppRouterInstance } from "@/react/router";+import type { AppRouterInstance } from "@/app/router";import { getSkill, type GetSkillArgs } from "../skills";import type {AgentAskUserKind,diff --git a/frontend/src/react/plugins/agent/logic/tools/navigate.ts b/frontend/src/modules/agent/logic/tools/navigate.tssimilarity index 95%rename from frontend/src/react/plugins/agent/logic/tools/navigate.tsrename to frontend/src/modules/agent/logic/tools/navigate.tsindex ae47b38576..d5b2f38c6a 100644--- a/frontend/src/react/plugins/agent/logic/tools/navigate.ts+++ b/frontend/src/modules/agent/logic/tools/navigate.ts@@ -1,4 +1,4 @@-import type { AppRouterInstance } from "@/react/router";+import type { AppRouterInstance } from "@/app/router";function getRouteMap(router: AppRouterInstance): string[] {const routes = router.getRoutes();diff --git a/frontend/src/react/plugins/agent/logic/tools/pageState.test.ts b/frontend/src/modules/agent/logic/tools/pageState.test.tssimilarity index 97%rename from frontend/src/react/plugins/agent/logic/tools/pageState.test.tsrename to frontend/src/modules/agent/logic/tools/pageState.test.tsindex 72bdbd1f58..9d9b8bb686 100644--- a/frontend/src/react/plugins/agent/logic/tools/pageState.test.ts+++ b/frontend/src/modules/agent/logic/tools/pageState.test.ts@@ -1,5 +1,5 @@import { describe, expect, test, vi } from "vitest";-import type { AppRouterInstance } from "@/react/router";+import type { AppRouterInstance } from "@/app/router";vi.mock("../../dom", () => ({lazyExtractDomTree: vi.fn(async () => ({diff --git a/frontend/src/react/plugins/agent/logic/tools/pageState.ts b/frontend/src/modules/agent/logic/tools/pageState.tssimilarity index 94%rename from frontend/src/react/plugins/agent/logic/tools/pageState.tsrename to frontend/src/modules/agent/logic/tools/pageState.tsindex 7083c58360..d5759864d9 100644--- a/frontend/src/react/plugins/agent/logic/tools/pageState.ts+++ b/frontend/src/modules/agent/logic/tools/pageState.ts@@ -1,4 +1,4 @@-import type { AppRouterInstance } from "@/react/router";+import type { AppRouterInstance } from "@/app/router";import { lazyExtractDomTree } from "../../dom";import { extractRouteContext } from "../context";diff --git a/frontend/src/react/plugins/agent/logic/tools/searchApi.ts b/frontend/src/modules/agent/logic/tools/searchApi.tssimilarity index 100%rename from frontend/src/react/plugins/agent/logic/tools/searchApi.tsrename to frontend/src/modules/agent/logic/tools/searchApi.tsdiff --git a/frontend/src/react/plugins/agent/logic/types.ts b/frontend/src/modules/agent/logic/types.tssimilarity index 100%rename from frontend/src/react/plugins/agent/logic/types.tsrename to frontend/src/modules/agent/logic/types.tsdiff --git a/frontend/src/react/plugins/agent/store/agent.test.ts b/frontend/src/modules/agent/store/agent.test.tssimilarity index 100%rename from frontend/src/react/plugins/agent/store/agent.test.tsrename to frontend/src/modules/agent/store/agent.test.tsdiff --git a/frontend/src/react/plugins/agent/store/agent.ts b/frontend/src/modules/agent/store/agent.tssimilarity index 100%rename from frontend/src/react/plugins/agent/store/agent.tsrename to frontend/src/modules/agent/store/agent.tsdiff --git a/frontend/src/react/plugins/agent/window.ts b/frontend/src/modules/agent/window.tssimilarity index 100%rename from frontend/src/react/plugins/agent/window.tsrename to frontend/src/modules/agent/window.tsdiff --git a/frontend/src/plugins/ai/react/AIChatToSQL.tsx b/frontend/src/modules/ai/components/AIChatToSQL.tsxsimilarity index 100%rename from frontend/src/plugins/ai/react/AIChatToSQL.tsxrename to frontend/src/modules/ai/components/AIChatToSQL.tsxdiff --git a/frontend/src/plugins/ai/react/ActionBar.tsx b/frontend/src/modules/ai/components/ActionBar.tsxsimilarity index 94%rename from frontend/src/plugins/ai/react/ActionBar.tsxrename to frontend/src/modules/ai/components/ActionBar.tsxindex 50762063fb..f9ff0a9bfd 100644--- a/frontend/src/plugins/ai/react/ActionBar.tsx+++ b/frontend/src/modules/ai/components/ActionBar.tsx@@ -1,7 +1,7 @@import { ClockIcon, PlusIcon } from "lucide-react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { Tooltip } from "@/react/components/ui/tooltip";+import { Button } from "@/components/ui/button";+import { Tooltip } from "@/components/ui/tooltip";import { useAIContext } from "./context";/**diff --git a/frontend/src/plugins/ai/react/ChatPanel.tsx b/frontend/src/modules/ai/components/ChatPanel.tsxsimilarity index 98%rename from frontend/src/plugins/ai/react/ChatPanel.tsxrename to frontend/src/modules/ai/components/ChatPanel.tsxindex 65d6c52975..9d43845d5a 100644--- a/frontend/src/plugins/ai/react/ChatPanel.tsx+++ b/frontend/src/modules/ai/components/ChatPanel.tsx@@ -2,11 +2,11 @@ import { create as createProto } from "@bufbuild/protobuf";import { head } from "lodash-es";import { Loader2 } from "lucide-react";import { useCallback, useEffect, useRef, useState } from "react";-import { sqlServiceClientConnect } from "@/connect";+import { sqlServiceClientConnect } from "@/api";import {getCurrentSQLEditorTab,useCurrentSQLEditorTab,-} from "@/react/stores/sqlEditor/tab";+} from "@/modules/sql-editor/store/tab";import {type AICompletionRequest_Message,AICompletionRequest_MessageSchema,diff --git a/frontend/src/plugins/ai/react/ChatView/AIMessageView.tsx b/frontend/src/modules/ai/components/ChatView/AIMessageView.tsxsimilarity index 97%rename from frontend/src/plugins/ai/react/ChatView/AIMessageView.tsxrename to frontend/src/modules/ai/components/ChatView/AIMessageView.tsxindex 95341b9ad5..b71eddfdc5 100644--- a/frontend/src/plugins/ai/react/ChatView/AIMessageView.tsx+++ b/frontend/src/modules/ai/components/ChatView/AIMessageView.tsx@@ -1,5 +1,5 @@import { Loader2, TriangleAlertIcon } from "lucide-react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";import type { Message } from "../../types";import { Markdown } from "./Markdown/Markdown";diff --git a/frontend/src/plugins/ai/react/ChatView/ChatView.tsx b/frontend/src/modules/ai/components/ChatView/ChatView.tsxsimilarity index 100%rename from frontend/src/plugins/ai/react/ChatView/ChatView.tsxrename to frontend/src/modules/ai/components/ChatView/ChatView.tsxdiff --git a/frontend/src/plugins/ai/react/ChatView/EmptyView.tsx b/frontend/src/modules/ai/components/ChatView/EmptyView.tsxsimilarity index 100%rename from frontend/src/plugins/ai/react/ChatView/EmptyView.tsxrename to frontend/src/modules/ai/components/ChatView/EmptyView.tsxdiff --git a/frontend/src/plugins/ai/react/ChatView/Markdown/AstToReact.tsx b/frontend/src/modules/ai/components/ChatView/Markdown/AstToReact.tsxsimilarity index 100%rename from frontend/src/plugins/ai/react/ChatView/Markdown/AstToReact.tsxrename to frontend/src/modules/ai/components/ChatView/Markdown/AstToReact.tsxdiff --git a/frontend/src/plugins/ai/react/ChatView/Markdown/CodeBlock.tsx b/frontend/src/modules/ai/components/ChatView/Markdown/CodeBlock.tsxsimilarity index 95%rename from frontend/src/plugins/ai/react/ChatView/Markdown/CodeBlock.tsxrename to frontend/src/modules/ai/components/ChatView/Markdown/CodeBlock.tsxindex 5890e95cf9..15d443d393 100644--- a/frontend/src/plugins/ai/react/ChatView/Markdown/CodeBlock.tsx+++ b/frontend/src/modules/ai/components/ChatView/Markdown/CodeBlock.tsx@@ -1,11 +1,11 @@import { PlayIcon } from "lucide-react";import { useEffect, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { MonacoEditor } from "@/react/components/monaco/MonacoEditor";-import { CopyButton } from "@/react/components/ui/copy-button";-import { Tooltip } from "@/react/components/ui/tooltip";+import { MonacoEditor } from "@/components/monaco/MonacoEditor";+import { CopyButton } from "@/components/ui/copy-button";+import { Tooltip } from "@/components/ui/tooltip";+import { sqlEditorEvents } from "@/modules/sql-editor/model/events";import { findAncestor } from "@/utils";-import { sqlEditorEvents } from "@/views/sql-editor/events";import { useAIContext } from "../../context";export type CodeBlockProps = {diff --git a/frontend/src/plugins/ai/react/ChatView/Markdown/InsertAtCaretIcon.tsx b/frontend/src/modules/ai/components/ChatView/Markdown/InsertAtCaretIcon.tsxsimilarity index 100%rename from frontend/src/plugins/ai/react/ChatView/Markdown/InsertAtCaretIcon.tsxrename to frontend/src/modules/ai/components/ChatView/Markdown/InsertAtCaretIcon.tsxdiff --git a/frontend/src/plugins/ai/react/ChatView/Markdown/Markdown.tsx b/frontend/src/modules/ai/components/ChatView/Markdown/Markdown.tsxsimilarity index 100%rename from frontend/src/plugins/ai/react/ChatView/Markdown/Markdown.tsxrename to frontend/src/modules/ai/components/ChatView/Markdown/Markdown.tsxdiff --git a/frontend/src/plugins/ai/react/ChatView/Markdown/utils.ts b/frontend/src/modules/ai/components/ChatView/Markdown/utils.tssimilarity index 100%rename from frontend/src/plugins/ai/react/ChatView/Markdown/utils.tsrename to frontend/src/modules/ai/components/ChatView/Markdown/utils.tsdiff --git a/frontend/src/plugins/ai/react/ChatView/UserMessageView.tsx b/frontend/src/modules/ai/components/ChatView/UserMessageView.tsxsimilarity index 100%rename from frontend/src/plugins/ai/react/ChatView/UserMessageView.tsxrename to frontend/src/modules/ai/components/ChatView/UserMessageView.tsxdiff --git a/frontend/src/plugins/ai/react/ChatView/context.tsx b/frontend/src/modules/ai/components/ChatView/context.tsxsimilarity index 100%rename from frontend/src/plugins/ai/react/ChatView/context.tsxrename to frontend/src/modules/ai/components/ChatView/context.tsxdiff --git a/frontend/src/plugins/ai/react/DynamicSuggestions.tsx b/frontend/src/modules/ai/components/DynamicSuggestions.tsxsimilarity index 98%rename from frontend/src/plugins/ai/react/DynamicSuggestions.tsxrename to frontend/src/modules/ai/components/DynamicSuggestions.tsxindex 43c63fd25a..05a2774fe4 100644--- a/frontend/src/plugins/ai/react/DynamicSuggestions.tsx+++ b/frontend/src/modules/ai/components/DynamicSuggestions.tsx@@ -1,8 +1,8 @@import { Loader2, RefreshCwIcon, XIcon } from "lucide-react";import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { useCurrentUser } from "@/react/hooks/useAppState";+import { Button } from "@/components/ui/button";+import { useCurrentUser } from "@/hooks/useAppState";import { storageKeySqlEditorAiSuggestion } from "@/utils";import { useAIContext } from "./context";import { useDynamicSuggestions } from "./useDynamicSuggestions";diff --git a/frontend/src/plugins/ai/react/HistoryPanel/ConversationList.tsx b/frontend/src/modules/ai/components/HistoryPanel/ConversationList.tsxsimilarity index 97%rename from frontend/src/plugins/ai/react/HistoryPanel/ConversationList.tsxrename to frontend/src/modules/ai/components/HistoryPanel/ConversationList.tsxindex 19c2570fe0..c9f78697a1 100644--- a/frontend/src/plugins/ai/react/HistoryPanel/ConversationList.tsx+++ b/frontend/src/modules/ai/components/HistoryPanel/ConversationList.tsx@@ -10,10 +10,10 @@ import {AlertDialogDescription,AlertDialogFooter,AlertDialogTitle,-} from "@/react/components/ui/alert-dialog";-import { Button } from "@/react/components/ui/button";-import { cn } from "@/react/lib/utils";-import { useCurrentSQLEditorTab } from "@/react/stores/sqlEditor/tab";+} from "@/components/ui/alert-dialog";+import { Button } from "@/components/ui/button";+import { cn } from "@/lib/utils";+import { useCurrentSQLEditorTab } from "@/modules/sql-editor/store/tab";import { useConversationStore } from "../../store";import type { Conversation } from "../../types";import { useAIContext } from "../context";diff --git a/frontend/src/plugins/ai/react/HistoryPanel/ConversationRenameDialog.tsx b/frontend/src/modules/ai/components/HistoryPanel/ConversationRenameDialog.tsxsimilarity index 93%rename from frontend/src/plugins/ai/react/HistoryPanel/ConversationRenameDialog.tsxrename to frontend/src/modules/ai/components/HistoryPanel/ConversationRenameDialog.tsxindex 21d0b2d2c8..6928be32e2 100644--- a/frontend/src/plugins/ai/react/HistoryPanel/ConversationRenameDialog.tsx+++ b/frontend/src/modules/ai/components/HistoryPanel/ConversationRenameDialog.tsx@@ -2,13 +2,9 @@ import { head } from "lodash-es";import { Loader2 } from "lucide-react";import { useEffect, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";-import { Input } from "@/react/components/ui/input";+import { Button } from "@/components/ui/button";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";+import { Input } from "@/components/ui/input";import { useConversationStore } from "../../store";import type { Conversation } from "../../types";diff --git a/frontend/src/plugins/ai/react/HistoryPanel/HistoryPanel.tsx b/frontend/src/modules/ai/components/HistoryPanel/HistoryPanel.tsxsimilarity index 97%rename from frontend/src/plugins/ai/react/HistoryPanel/HistoryPanel.tsxrename to frontend/src/modules/ai/components/HistoryPanel/HistoryPanel.tsxindex 6a01ab2379..885ee95a64 100644--- a/frontend/src/plugins/ai/react/HistoryPanel/HistoryPanel.tsx+++ b/frontend/src/modules/ai/components/HistoryPanel/HistoryPanel.tsx@@ -4,7 +4,7 @@ import {SheetContent,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";+} from "@/components/ui/sheet";import { ChatView } from "../ChatView/ChatView";import { useAIContext } from "../context";import { ConversationList } from "./ConversationList";diff --git a/frontend/src/plugins/ai/react/PromptInput.tsx b/frontend/src/modules/ai/components/PromptInput.tsxsimilarity index 97%rename from frontend/src/plugins/ai/react/PromptInput.tsxrename to frontend/src/modules/ai/components/PromptInput.tsxindex 1f994dd2fd..3c7c6a4389 100644--- a/frontend/src/plugins/ai/react/PromptInput.tsx+++ b/frontend/src/modules/ai/components/PromptInput.tsx@@ -1,9 +1,9 @@import { CornerDownLeft } from "lucide-react";import { useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { Tooltip } from "@/react/components/ui/tooltip";-import { cn } from "@/react/lib/utils";+import { Button } from "@/components/ui/button";+import { Tooltip } from "@/components/ui/tooltip";+import { cn } from "@/lib/utils";import { keyboardShortcutStr } from "@/utils";import { useAIContext } from "./context";diff --git a/frontend/src/plugins/ai/react/context.tsx b/frontend/src/modules/ai/components/context.tsxsimilarity index 97%rename from frontend/src/plugins/ai/react/context.tsxrename to frontend/src/modules/ai/components/context.tsxindex e040b6ffa9..7bd93dd75f 100644--- a/frontend/src/plugins/ai/react/context.tsx+++ b/frontend/src/modules/ai/components/context.tsx@@ -10,13 +10,13 @@ import {useRef,useState,} from "react";-import { useAppDatabaseMetadata } from "@/react/hooks/useAppDatabaseMetadata";-import { useConnectionOfCurrentSQLEditorTab } from "@/react/hooks/useSQLEditorBridge";-import { useAppStore } from "@/react/stores/app";+import { useAppDatabaseMetadata } from "@/hooks/useAppDatabaseMetadata";+import { useConnectionOfCurrentSQLEditorTab } from "@/modules/sql-editor/hooks/useSQLEditorState";import {getCurrentSQLEditorTab,useCurrentSQLEditorTab,-} from "@/react/stores/sqlEditor/tab";+} from "@/modules/sql-editor/store/tab";+import { useAppStore } from "@/stores/app";import { Engine } from "@/types/proto-es/v1/common_pb";import type { DatabaseMetadata } from "@/types/proto-es/v1/database_service_pb";import type { AISetting } from "@/types/proto-es/v1/setting_service_pb";diff --git a/frontend/src/plugins/ai/react/index.ts b/frontend/src/modules/ai/components/index.tssimilarity index 87%rename from frontend/src/plugins/ai/react/index.tsrename to frontend/src/modules/ai/components/index.tsindex d8aa4ed383..60ff901c33 100644--- a/frontend/src/plugins/ai/react/index.ts+++ b/frontend/src/modules/ai/components/index.ts@@ -1,6 +1,6 @@// React-only barrel for the AI plugin. The plugin's root `index.ts`// keeps framework-agnostic re-exports (types) so the Vue tsconfig// doesn't have to traverse `.tsx` modules; React consumers import-// from `@/plugins/ai/react` instead.+// from `@/modules/ai/components` instead.export { AIChatToSQL } from "./AIChatToSQL";export { AIContextProvider, useAIContext } from "./context";diff --git a/frontend/src/plugins/ai/react/useDynamicSuggestions.ts b/frontend/src/modules/ai/components/useDynamicSuggestions.tssimilarity index 98%rename from frontend/src/plugins/ai/react/useDynamicSuggestions.tsrename to frontend/src/modules/ai/components/useDynamicSuggestions.tsindex 9bf7ae70bd..504366597e 100644--- a/frontend/src/plugins/ai/react/useDynamicSuggestions.ts+++ b/frontend/src/modules/ai/components/useDynamicSuggestions.ts@@ -2,8 +2,8 @@ import { create as createProto } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";import { head, uniq, values } from "lodash-es";import { useMemo, useSyncExternalStore } from "react";-import { sqlServiceClientConnect } from "@/connect";-import { silentContextKey } from "@/connect/context-key";+import { sqlServiceClientConnect } from "@/api";+import { silentContextKey } from "@/api/context-key";import type { Engine } from "@/types/proto-es/v1/common_pb";import type { DatabaseMetadata } from "@/types/proto-es/v1/database_service_pb";import {diff --git a/frontend/src/plugins/ai/index.ts b/frontend/src/modules/ai/index.tssimilarity index 78%rename from frontend/src/plugins/ai/index.tsrename to frontend/src/modules/ai/index.tsindex 49c88fce73..3b403a5015 100644--- a/frontend/src/plugins/ai/index.ts+++ b/frontend/src/modules/ai/index.ts@@ -1,5 +1,5 @@// Plugin-wide barrel. Only re-exports framework-agnostic surfaces here// so the Vue tsconfig (which still picks up this file) doesn't have to// pull in React `.tsx` modules through imports. React callers reach the-// component entry points via `@/plugins/ai/react` directly.+// component entry points via `@/modules/ai/components` directly.export * from "./types";diff --git a/frontend/src/plugins/ai/logic/events.ts b/frontend/src/modules/ai/logic/events.tssimilarity index 100%rename from frontend/src/plugins/ai/logic/events.tsrename to frontend/src/modules/ai/logic/events.tsdiff --git a/frontend/src/plugins/ai/logic/index.ts b/frontend/src/modules/ai/logic/index.tssimilarity index 100%rename from frontend/src/plugins/ai/logic/index.tsrename to frontend/src/modules/ai/logic/index.tsdiff --git a/frontend/src/plugins/ai/logic/prompt.ts b/frontend/src/modules/ai/logic/prompt.tssimilarity index 100%rename from frontend/src/plugins/ai/logic/prompt.tsrename to frontend/src/modules/ai/logic/prompt.tsdiff --git a/frontend/src/plugins/ai/store/conversation.ts b/frontend/src/modules/ai/store/conversation.tssimilarity index 100%rename from frontend/src/plugins/ai/store/conversation.tsrename to frontend/src/modules/ai/store/conversation.tsdiff --git a/frontend/src/plugins/ai/store/index.ts b/frontend/src/modules/ai/store/index.tssimilarity index 100%rename from frontend/src/plugins/ai/store/index.tsrename to frontend/src/modules/ai/store/index.tsdiff --git a/frontend/src/plugins/ai/types/context.ts b/frontend/src/modules/ai/types/context.tssimilarity index 100%rename from frontend/src/plugins/ai/types/context.tsrename to frontend/src/modules/ai/types/context.tsdiff --git a/frontend/src/plugins/ai/types/conversation.ts b/frontend/src/modules/ai/types/conversation.tssimilarity index 100%rename from frontend/src/plugins/ai/types/conversation.tsrename to frontend/src/modules/ai/types/conversation.tsdiff --git a/frontend/src/plugins/ai/types/index.ts b/frontend/src/modules/ai/types/index.tssimilarity index 100%rename from frontend/src/plugins/ai/types/index.tsrename to frontend/src/modules/ai/types/index.tsdiff --git a/frontend/src/plugins/cel/index.ts b/frontend/src/modules/cel/index.tssimilarity index 100%rename from frontend/src/plugins/cel/index.tsrename to frontend/src/modules/cel/index.tsdiff --git a/frontend/src/plugins/cel/logic/build.test.ts b/frontend/src/modules/cel/logic/build.test.tssimilarity index 97%rename from frontend/src/plugins/cel/logic/build.test.tsrename to frontend/src/modules/cel/logic/build.test.tsindex 2dba161367..f74f63b85d 100644--- a/frontend/src/plugins/cel/logic/build.test.ts+++ b/frontend/src/modules/cel/logic/build.test.ts@@ -1,5 +1,5 @@import { describe, expect, it } from "vitest";-import { ExprType, type SimpleExpr } from "@/plugins/cel";+import { ExprType, type SimpleExpr } from "@/modules/cel";import {CEL_ATTRIBUTE_ISSUE_LABELS,CEL_ATTRIBUTE_STATEMENT_TEXT,diff --git a/frontend/src/plugins/cel/logic/build.ts b/frontend/src/modules/cel/logic/build.tssimilarity index 98%rename from frontend/src/plugins/cel/logic/build.tsrename to frontend/src/modules/cel/logic/build.tsindex 05a8b326bb..f0b3a975d9 100644--- a/frontend/src/plugins/cel/logic/build.ts+++ b/frontend/src/modules/cel/logic/build.ts@@ -1,8 +1,8 @@import { create } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";import { head } from "lodash-es";-import { celServiceClientConnect } from "@/connect";-import { silentContextKey } from "@/connect/context-key";+import { celServiceClientConnect } from "@/api";+import { silentContextKey } from "@/api/context-key";import type { Expr as CELExpr } from "@/types/proto-es/google/api/expr/v1alpha1/syntax_pb";import {ConstantSchema,diff --git a/frontend/src/plugins/cel/logic/index.ts b/frontend/src/modules/cel/logic/index.tssimilarity index 100%rename from frontend/src/plugins/cel/logic/index.tsrename to frontend/src/modules/cel/logic/index.tsdiff --git a/frontend/src/plugins/cel/logic/resolve.test.ts b/frontend/src/modules/cel/logic/resolve.test.tssimilarity index 94%rename from frontend/src/plugins/cel/logic/resolve.test.tsrename to frontend/src/modules/cel/logic/resolve.test.tsindex 8ad9f40277..93ff0f94ec 100644--- a/frontend/src/plugins/cel/logic/resolve.test.ts+++ b/frontend/src/modules/cel/logic/resolve.test.ts@@ -1,5 +1,5 @@import { describe, expect, it } from "vitest";-import { ExprType, type SimpleExpr } from "@/plugins/cel";+import { ExprType, type SimpleExpr } from "@/modules/cel";import { CEL_ATTRIBUTE_ISSUE_LABELS } from "@/utils/cel-attributes";import { buildCELExpr } from "./build";import { resolveCELExpr } from "./resolve";diff --git a/frontend/src/plugins/cel/logic/resolve.ts b/frontend/src/modules/cel/logic/resolve.tssimilarity index 100%rename from frontend/src/plugins/cel/logic/resolve.tsrename to frontend/src/modules/cel/logic/resolve.tsdiff --git a/frontend/src/plugins/cel/logic/stringify.ts b/frontend/src/modules/cel/logic/stringify.tssimilarity index 100%rename from frontend/src/plugins/cel/logic/stringify.tsrename to frontend/src/modules/cel/logic/stringify.tsdiff --git a/frontend/src/plugins/cel/logic/validate.test.ts b/frontend/src/modules/cel/logic/validate.test.tssimilarity index 92%rename from frontend/src/plugins/cel/logic/validate.test.tsrename to frontend/src/modules/cel/logic/validate.test.tsindex 5532d9f5ef..e0300dc700 100644--- a/frontend/src/plugins/cel/logic/validate.test.ts+++ b/frontend/src/modules/cel/logic/validate.test.ts@@ -1,5 +1,5 @@import { describe, expect, it } from "vitest";-import { ExprType, type SimpleExpr } from "@/plugins/cel";+import { ExprType, type SimpleExpr } from "@/modules/cel";import { CEL_ATTRIBUTE_ISSUE_LABELS } from "@/utils/cel-attributes";import { validateSimpleExpr } from "./validate";diff --git a/frontend/src/plugins/cel/logic/validate.ts b/frontend/src/modules/cel/logic/validate.tssimilarity index 100%rename from frontend/src/plugins/cel/logic/validate.tsrename to frontend/src/modules/cel/logic/validate.tsdiff --git a/frontend/src/plugins/cel/types/factor.ts b/frontend/src/modules/cel/types/factor.tssimilarity index 100%rename from frontend/src/plugins/cel/types/factor.tsrename to frontend/src/modules/cel/types/factor.tsdiff --git a/frontend/src/plugins/cel/types/index.ts b/frontend/src/modules/cel/types/index.tssimilarity index 100%rename from frontend/src/plugins/cel/types/index.tsrename to frontend/src/modules/cel/types/index.tsdiff --git a/frontend/src/plugins/cel/types/operator.ts b/frontend/src/modules/cel/types/operator.tssimilarity index 100%rename from frontend/src/plugins/cel/types/operator.tsrename to frontend/src/modules/cel/types/operator.tsdiff --git a/frontend/src/plugins/cel/types/simple.ts b/frontend/src/modules/cel/types/simple.tssimilarity index 100%rename from frontend/src/plugins/cel/types/simple.tsrename to frontend/src/modules/cel/types/simple.tsdiff --git a/frontend/src/plugins/cel/types/values.test.ts b/frontend/src/modules/cel/types/values.test.tssimilarity index 100%rename from frontend/src/plugins/cel/types/values.test.tsrename to frontend/src/modules/cel/types/values.test.tsdiff --git a/frontend/src/plugins/cel/types/values.ts b/frontend/src/modules/cel/types/values.tssimilarity index 100%rename from frontend/src/plugins/cel/types/values.tsrename to frontend/src/modules/cel/types/values.tsdiff --git a/frontend/src/react/components/SchemaDiagram/Canvas/Canvas.tsx b/frontend/src/modules/schema-diagram/Canvas/Canvas.tsxsimilarity index 96%rename from frontend/src/react/components/SchemaDiagram/Canvas/Canvas.tsxrename to frontend/src/modules/schema-diagram/Canvas/Canvas.tsxindex d1d9e170b1..cd045bb298 100644--- a/frontend/src/react/components/SchemaDiagram/Canvas/Canvas.tsx+++ b/frontend/src/modules/schema-diagram/Canvas/Canvas.tsx@@ -1,8 +1,8 @@import { Image, LayoutGrid } from "lucide-react";import { type ReactNode, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { Tooltip } from "@/react/components/ui/tooltip";+import { Button } from "@/components/ui/button";+import { Tooltip } from "@/components/ui/tooltip";import { ZOOM_RANGE } from "../common/const";import { useSchemaDiagramContext } from "../common/context";import { useDragCanvas, useFitView, useSetCenter } from "./composables";diff --git a/frontend/src/react/components/SchemaDiagram/Canvas/ZoomButton.tsx b/frontend/src/modules/schema-diagram/Canvas/ZoomButton.tsxsimilarity index 93%rename from frontend/src/react/components/SchemaDiagram/Canvas/ZoomButton.tsxrename to frontend/src/modules/schema-diagram/Canvas/ZoomButton.tsxindex d9d7fe0748..ffe580f894 100644--- a/frontend/src/react/components/SchemaDiagram/Canvas/ZoomButton.tsx+++ b/frontend/src/modules/schema-diagram/Canvas/ZoomButton.tsx@@ -1,7 +1,7 @@import { Minus, Plus } from "lucide-react";import { useMemo } from "react";-import { Button } from "@/react/components/ui/button";-import { cn } from "@/react/lib/utils";+import { Button } from "@/components/ui/button";+import { cn } from "@/lib/utils";import { useSchemaDiagramContext } from "../common/context";interface ZoomButtonProps {diff --git a/frontend/src/react/components/SchemaDiagram/Canvas/composables/index.ts b/frontend/src/modules/schema-diagram/Canvas/composables/index.tssimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/Canvas/composables/index.tsrename to frontend/src/modules/schema-diagram/Canvas/composables/index.tsdiff --git a/frontend/src/react/components/SchemaDiagram/Canvas/composables/useDragCanvas.tsx b/frontend/src/modules/schema-diagram/Canvas/composables/useDragCanvas.tsxsimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/Canvas/composables/useDragCanvas.tsxrename to frontend/src/modules/schema-diagram/Canvas/composables/useDragCanvas.tsxdiff --git a/frontend/src/react/components/SchemaDiagram/Canvas/composables/useFitView.tsx b/frontend/src/modules/schema-diagram/Canvas/composables/useFitView.tsxsimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/Canvas/composables/useFitView.tsxrename to frontend/src/modules/schema-diagram/Canvas/composables/useFitView.tsxdiff --git a/frontend/src/react/components/SchemaDiagram/Canvas/composables/useScreenshot.tsx b/frontend/src/modules/schema-diagram/Canvas/composables/useScreenshot.tsxsimilarity index 99%rename from frontend/src/react/components/SchemaDiagram/Canvas/composables/useScreenshot.tsxrename to frontend/src/modules/schema-diagram/Canvas/composables/useScreenshot.tsxindex 8782393fb3..8ae9b3f56d 100644--- a/frontend/src/react/components/SchemaDiagram/Canvas/composables/useScreenshot.tsx+++ b/frontend/src/modules/schema-diagram/Canvas/composables/useScreenshot.tsx@@ -1,5 +1,5 @@import { useCallback, useState } from "react";-import { pushNotification } from "@/store";+import { pushNotification } from "@/stores";import { useSchemaDiagramContext } from "../../common/context";import { calcBBox } from "../../common/geometry";diff --git a/frontend/src/react/components/SchemaDiagram/Canvas/composables/useSetCenter.tsx b/frontend/src/modules/schema-diagram/Canvas/composables/useSetCenter.tsxsimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/Canvas/composables/useSetCenter.tsxrename to frontend/src/modules/schema-diagram/Canvas/composables/useSetCenter.tsxdiff --git a/frontend/src/react/components/SchemaDiagram/Canvas/index.ts b/frontend/src/modules/schema-diagram/Canvas/index.tssimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/Canvas/index.tsrename to frontend/src/modules/schema-diagram/Canvas/index.tsdiff --git a/frontend/src/react/components/SchemaDiagram/Canvas/libs/fitView.test.ts b/frontend/src/modules/schema-diagram/Canvas/libs/fitView.test.tssimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/Canvas/libs/fitView.test.tsrename to frontend/src/modules/schema-diagram/Canvas/libs/fitView.test.tsdiff --git a/frontend/src/react/components/SchemaDiagram/Canvas/libs/fitView.ts b/frontend/src/modules/schema-diagram/Canvas/libs/fitView.tssimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/Canvas/libs/fitView.tsrename to frontend/src/modules/schema-diagram/Canvas/libs/fitView.tsdiff --git a/frontend/src/react/components/SchemaDiagram/ER/ForeignKeyLine.test.tsx b/frontend/src/modules/schema-diagram/ER/ForeignKeyLine.test.tsxsimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/ER/ForeignKeyLine.test.tsxrename to frontend/src/modules/schema-diagram/ER/ForeignKeyLine.test.tsxdiff --git a/frontend/src/react/components/SchemaDiagram/ER/ForeignKeyLine.tsx b/frontend/src/modules/schema-diagram/ER/ForeignKeyLine.tsxsimilarity index 99%rename from frontend/src/react/components/SchemaDiagram/ER/ForeignKeyLine.tsxrename to frontend/src/modules/schema-diagram/ER/ForeignKeyLine.tsxindex 57babce027..defa2b23cd 100644--- a/frontend/src/react/components/SchemaDiagram/ER/ForeignKeyLine.tsx+++ b/frontend/src/modules/schema-diagram/ER/ForeignKeyLine.tsx@@ -1,5 +1,5 @@import { useCallback, useEffect, useMemo, useState } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";import type { TableMetadata } from "@/types/proto-es/v1/database_service_pb";import { useGeometry, useSchemaDiagramContext } from "../common/context";import { type SegmentOverlap1D, segmentOverlap1D } from "../common/geometry";diff --git a/frontend/src/react/components/SchemaDiagram/ER/TableNode.tsx b/frontend/src/modules/schema-diagram/ER/TableNode.tsxsimilarity index 99%rename from frontend/src/react/components/SchemaDiagram/ER/TableNode.tsxrename to frontend/src/modules/schema-diagram/ER/TableNode.tsxindex ec75f496cf..0638e76d28 100644--- a/frontend/src/react/components/SchemaDiagram/ER/TableNode.tsx+++ b/frontend/src/modules/schema-diagram/ER/TableNode.tsx@@ -1,6 +1,6 @@import { Diamond, Key, Pencil } from "lucide-react";import { useCallback, useMemo } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";import type {ColumnMetadata,SchemaMetadata,diff --git a/frontend/src/react/components/SchemaDiagram/ER/index.ts b/frontend/src/modules/schema-diagram/ER/index.tssimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/ER/index.tsrename to frontend/src/modules/schema-diagram/ER/index.tsdiff --git a/frontend/src/react/components/SchemaDiagram/ER/libs/SVGLine.tsx b/frontend/src/modules/schema-diagram/ER/libs/SVGLine.tsxsimilarity index 98%rename from frontend/src/react/components/SchemaDiagram/ER/libs/SVGLine.tsxrename to frontend/src/modules/schema-diagram/ER/libs/SVGLine.tsxindex e11a101878..344a18465d 100644--- a/frontend/src/react/components/SchemaDiagram/ER/libs/SVGLine.tsx+++ b/frontend/src/modules/schema-diagram/ER/libs/SVGLine.tsx@@ -1,6 +1,6 @@import { curveMonotoneX, line as d3Line } from "d3-shape";import { type ComponentProps, useMemo, useState } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";import { calcBBox } from "../../common/geometry";import type { Path, Point, Rect } from "../../types";diff --git a/frontend/src/react/components/SchemaDiagram/ER/libs/autoLayout/engines/elk.ts b/frontend/src/modules/schema-diagram/ER/libs/autoLayout/engines/elk.tssimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/ER/libs/autoLayout/engines/elk.tsrename to frontend/src/modules/schema-diagram/ER/libs/autoLayout/engines/elk.tsdiff --git a/frontend/src/react/components/SchemaDiagram/ER/libs/autoLayout/index.ts b/frontend/src/modules/schema-diagram/ER/libs/autoLayout/index.tssimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/ER/libs/autoLayout/index.tsrename to frontend/src/modules/schema-diagram/ER/libs/autoLayout/index.tsdiff --git a/frontend/src/react/components/SchemaDiagram/ER/libs/autoLayout/types.ts b/frontend/src/modules/schema-diagram/ER/libs/autoLayout/types.tssimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/ER/libs/autoLayout/types.tsrename to frontend/src/modules/schema-diagram/ER/libs/autoLayout/types.tsdiff --git a/frontend/src/react/components/SchemaDiagram/ER/libs/autoLayout/useAutoLayout.test.tsx b/frontend/src/modules/schema-diagram/ER/libs/autoLayout/useAutoLayout.test.tsxsimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/ER/libs/autoLayout/useAutoLayout.test.tsxrename to frontend/src/modules/schema-diagram/ER/libs/autoLayout/useAutoLayout.test.tsxdiff --git a/frontend/src/react/components/SchemaDiagram/ER/libs/autoLayout/useAutoLayout.ts b/frontend/src/modules/schema-diagram/ER/libs/autoLayout/useAutoLayout.tssimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/ER/libs/autoLayout/useAutoLayout.tsrename to frontend/src/modules/schema-diagram/ER/libs/autoLayout/useAutoLayout.tsdiff --git a/frontend/src/react/components/SchemaDiagram/ER/libs/isFocusedFKTable.ts b/frontend/src/modules/schema-diagram/ER/libs/isFocusedFKTable.tssimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/ER/libs/isFocusedFKTable.tsrename to frontend/src/modules/schema-diagram/ER/libs/isFocusedFKTable.tsdiff --git a/frontend/src/react/components/SchemaDiagram/Navigator/Navigator.tsx b/frontend/src/modules/schema-diagram/Navigator/Navigator.tsxsimilarity index 97%rename from frontend/src/react/components/SchemaDiagram/Navigator/Navigator.tsxrename to frontend/src/modules/schema-diagram/Navigator/Navigator.tsxindex c518e14065..168eb652c4 100644--- a/frontend/src/react/components/SchemaDiagram/Navigator/Navigator.tsx+++ b/frontend/src/modules/schema-diagram/Navigator/Navigator.tsx@@ -1,7 +1,7 @@import { ChevronLeft } from "lucide-react";import { useEffect, useMemo, useRef, useState } from "react";-import { PanelSearchBox } from "@/react/components/sql-editor/Panels/common/PanelSearchBox";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";+import { PanelSearchBox } from "@/modules/sql-editor/components/Panels/common/PanelSearchBox";import { getInstanceResource, hasSchemaProperty } from "@/utils";import { useSchemaDiagramContext } from "../common/context";import { SchemaSelector } from "./SchemaSelector";diff --git a/frontend/src/react/components/SchemaDiagram/Navigator/SchemaSelector.tsx b/frontend/src/modules/schema-diagram/Navigator/SchemaSelector.tsxsimilarity index 94%rename from frontend/src/react/components/SchemaDiagram/Navigator/SchemaSelector.tsxrename to frontend/src/modules/schema-diagram/Navigator/SchemaSelector.tsxindex f8903069fe..e448d0a003 100644--- a/frontend/src/react/components/SchemaDiagram/Navigator/SchemaSelector.tsx+++ b/frontend/src/modules/schema-diagram/Navigator/SchemaSelector.tsx@@ -1,5 +1,5 @@import { useTranslation } from "react-i18next";-import { Combobox } from "@/react/components/ui/combobox";+import { Combobox } from "@/components/ui/combobox";import type { SchemaMetadata } from "@/types/proto-es/v1/database_service_pb";interface SchemaSelectorProps {diff --git a/frontend/src/react/components/SchemaDiagram/Navigator/Tree.tsx b/frontend/src/modules/schema-diagram/Navigator/Tree.tsxsimilarity index 96%rename from frontend/src/react/components/SchemaDiagram/Navigator/Tree.tsxrename to frontend/src/modules/schema-diagram/Navigator/Tree.tsxindex 08f4596e2a..2fc6b82cc5 100644--- a/frontend/src/react/components/SchemaDiagram/Navigator/Tree.tsx+++ b/frontend/src/modules/schema-diagram/Navigator/Tree.tsx@@ -1,9 +1,6 @@import { useMemo } from "react";-import {- Tree as ArboristTree,- type TreeDataNode,-} from "@/react/components/ui/tree";-import { cn } from "@/react/lib/utils";+import { Tree as ArboristTree, type TreeDataNode } from "@/components/ui/tree";+import { cn } from "@/lib/utils";import { getInstanceResource, hasSchemaProperty } from "@/utils";import { DEFAULT_PADDINGS } from "../common/const";import { useSchemaDiagramContext } from "../common/context";diff --git a/frontend/src/react/components/SchemaDiagram/Navigator/TreeNode/Label.tsx b/frontend/src/modules/schema-diagram/Navigator/TreeNode/Label.tsxsimilarity index 93%rename from frontend/src/react/components/SchemaDiagram/Navigator/TreeNode/Label.tsxrename to frontend/src/modules/schema-diagram/Navigator/TreeNode/Label.tsxindex bb1888290a..e98e2ab710 100644--- a/frontend/src/react/components/SchemaDiagram/Navigator/TreeNode/Label.tsx+++ b/frontend/src/modules/schema-diagram/Navigator/TreeNode/Label.tsx@@ -1,6 +1,6 @@import { useMemo } from "react";import { useTranslation } from "react-i18next";-import { HighlightLabelText } from "@/react/components/HighlightLabelText";+import { HighlightLabelText } from "@/components/HighlightLabelText";import type { NavigatorTreeNode } from "../types";import { isTypedNode } from "../utils";diff --git a/frontend/src/react/components/SchemaDiagram/Navigator/TreeNode/Prefix.tsx b/frontend/src/modules/schema-diagram/Navigator/TreeNode/Prefix.tsxsimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/Navigator/TreeNode/Prefix.tsxrename to frontend/src/modules/schema-diagram/Navigator/TreeNode/Prefix.tsxdiff --git a/frontend/src/react/components/SchemaDiagram/Navigator/TreeNode/Suffix.tsx b/frontend/src/modules/schema-diagram/Navigator/TreeNode/Suffix.tsxsimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/Navigator/TreeNode/Suffix.tsxrename to frontend/src/modules/schema-diagram/Navigator/TreeNode/Suffix.tsxdiff --git a/frontend/src/react/components/SchemaDiagram/Navigator/TreeNode/index.ts b/frontend/src/modules/schema-diagram/Navigator/TreeNode/index.tssimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/Navigator/TreeNode/index.tsrename to frontend/src/modules/schema-diagram/Navigator/TreeNode/index.tsdiff --git a/frontend/src/react/components/SchemaDiagram/Navigator/index.ts b/frontend/src/modules/schema-diagram/Navigator/index.tssimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/Navigator/index.tsrename to frontend/src/modules/schema-diagram/Navigator/index.tsdiff --git a/frontend/src/react/components/SchemaDiagram/Navigator/types.ts b/frontend/src/modules/schema-diagram/Navigator/types.tssimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/Navigator/types.tsrename to frontend/src/modules/schema-diagram/Navigator/types.tsdiff --git a/frontend/src/react/components/SchemaDiagram/Navigator/utils.ts b/frontend/src/modules/schema-diagram/Navigator/utils.tssimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/Navigator/utils.tsrename to frontend/src/modules/schema-diagram/Navigator/utils.tsdiff --git a/frontend/src/react/components/SchemaDiagram/SchemaDiagram.tsx b/frontend/src/modules/schema-diagram/SchemaDiagram.tsxsimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/SchemaDiagram.tsxrename to frontend/src/modules/schema-diagram/SchemaDiagram.tsxdiff --git a/frontend/src/react/components/SchemaDiagramPage.tsx b/frontend/src/modules/schema-diagram/SchemaDiagramPage.tsxsimilarity index 100%rename from frontend/src/react/components/SchemaDiagramPage.tsxrename to frontend/src/modules/schema-diagram/SchemaDiagramPage.tsxdiff --git a/frontend/src/react/components/SchemaDiagram/common/FocusButton.tsx b/frontend/src/modules/schema-diagram/common/FocusButton.tsxsimilarity index 98%rename from frontend/src/react/components/SchemaDiagram/common/FocusButton.tsxrename to frontend/src/modules/schema-diagram/common/FocusButton.tsxindex 56928d6f58..afbe6b5e62 100644--- a/frontend/src/react/components/SchemaDiagram/common/FocusButton.tsx+++ b/frontend/src/modules/schema-diagram/common/FocusButton.tsx@@ -1,6 +1,6 @@import { ScanSearch } from "lucide-react";import { useCallback, useMemo } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";import type { TableMetadata } from "@/types/proto-es/v1/database_service_pb";import { DEFAULT_PADDINGS } from "./const";import { useSchemaDiagramContext } from "./context";diff --git a/frontend/src/react/components/SchemaDiagram/common/const.ts b/frontend/src/modules/schema-diagram/common/const.tssimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/common/const.tsrename to frontend/src/modules/schema-diagram/common/const.tsdiff --git a/frontend/src/react/components/SchemaDiagram/common/context.tsx b/frontend/src/modules/schema-diagram/common/context.tsxsimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/common/context.tsxrename to frontend/src/modules/schema-diagram/common/context.tsxdiff --git a/frontend/src/react/components/SchemaDiagram/common/geometry.test.ts b/frontend/src/modules/schema-diagram/common/geometry.test.tssimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/common/geometry.test.tsrename to frontend/src/modules/schema-diagram/common/geometry.test.tsdiff --git a/frontend/src/react/components/SchemaDiagram/common/geometry.ts b/frontend/src/modules/schema-diagram/common/geometry.tssimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/common/geometry.tsrename to frontend/src/modules/schema-diagram/common/geometry.tsdiff --git a/frontend/src/react/components/SchemaDiagram/common/index.ts b/frontend/src/modules/schema-diagram/common/index.tssimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/common/index.tsrename to frontend/src/modules/schema-diagram/common/index.tsdiff --git a/frontend/src/react/components/SchemaDiagram/common/schema.ts b/frontend/src/modules/schema-diagram/common/schema.tssimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/common/schema.tsrename to frontend/src/modules/schema-diagram/common/schema.tsdiff --git a/frontend/src/react/components/SchemaDiagram/common/useDraggable.tsx b/frontend/src/modules/schema-diagram/common/useDraggable.tsxsimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/common/useDraggable.tsxrename to frontend/src/modules/schema-diagram/common/useDraggable.tsxdiff --git a/frontend/src/react/components/SchemaDiagram/common/utils.ts b/frontend/src/modules/schema-diagram/common/utils.tssimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/common/utils.tsrename to frontend/src/modules/schema-diagram/common/utils.tsdiff --git a/frontend/src/react/components/SchemaDiagram/index.ts b/frontend/src/modules/schema-diagram/index.tssimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/index.tsrename to frontend/src/modules/schema-diagram/index.tsdiff --git a/frontend/src/react/components/SchemaDiagram/types/context.ts b/frontend/src/modules/schema-diagram/types/context.tssimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/types/context.tsrename to frontend/src/modules/schema-diagram/types/context.tsdiff --git a/frontend/src/react/components/SchemaDiagram/types/edit.ts b/frontend/src/modules/schema-diagram/types/edit.tssimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/types/edit.tsrename to frontend/src/modules/schema-diagram/types/edit.tsdiff --git a/frontend/src/react/components/SchemaDiagram/types/geometry.ts b/frontend/src/modules/schema-diagram/types/geometry.tssimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/types/geometry.tsrename to frontend/src/modules/schema-diagram/types/geometry.tsdiff --git a/frontend/src/react/components/SchemaDiagram/types/index.ts b/frontend/src/modules/schema-diagram/types/index.tssimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/types/index.tsrename to frontend/src/modules/schema-diagram/types/index.tsdiff --git a/frontend/src/react/components/SchemaDiagram/types/schema.ts b/frontend/src/modules/schema-diagram/types/schema.tssimilarity index 100%rename from frontend/src/react/components/SchemaDiagram/types/schema.tsrename to frontend/src/modules/schema-diagram/types/schema.tsdiff --git a/frontend/src/react/components/SchemaEditorLite/Aside/AsideTree.tsx b/frontend/src/modules/schema-editor/Aside/AsideTree.tsxsimilarity index 98%rename from frontend/src/react/components/SchemaEditorLite/Aside/AsideTree.tsxrename to frontend/src/modules/schema-editor/Aside/AsideTree.tsxindex b7efaf8a3c..ab0d09aec5 100644--- a/frontend/src/react/components/SchemaEditorLite/Aside/AsideTree.tsx+++ b/frontend/src/modules/schema-editor/Aside/AsideTree.tsx@@ -15,24 +15,24 @@ import { Fragment, useCallback, useMemo, useRef, useState } from "react";import type { NodeRendererProps } from "react-arborist";import { Tree } from "react-arborist";import { useTranslation } from "react-i18next";-import { ColumnIcon } from "@/react/components/schema/icons";-import { Badge } from "@/react/components/ui/badge";+import { ColumnIcon } from "@/components/schema/icons";+import { Badge } from "@/components/ui/badge";import {ContextMenu,ContextMenuContent,ContextMenuItem,ContextMenuTrigger,-} from "@/react/components/ui/context-menu";+} from "@/components/ui/context-menu";import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuSeparator,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";-import { ErrorBoundary } from "@/react/components/ui/error-boundary";-import { SearchInput } from "@/react/components/ui/search-input";-import { cn } from "@/react/lib/utils";+} from "@/components/ui/dropdown-menu";+import { ErrorBoundary } from "@/components/ui/error-boundary";+import { SearchInput } from "@/components/ui/search-input";+import { cn } from "@/lib/utils";import type {FunctionMetadata,ProcedureMetadata,diff --git a/frontend/src/react/components/SchemaEditorLite/Aside/NodeCheckbox.tsx b/frontend/src/modules/schema-editor/Aside/NodeCheckbox.tsxsimilarity index 99%rename from frontend/src/react/components/SchemaEditorLite/Aside/NodeCheckbox.tsxrename to frontend/src/modules/schema-editor/Aside/NodeCheckbox.tsxindex 112119381a..8d893eae33 100644--- a/frontend/src/react/components/SchemaEditorLite/Aside/NodeCheckbox.tsx+++ b/frontend/src/modules/schema-editor/Aside/NodeCheckbox.tsx@@ -1,5 +1,5 @@import { useCallback } from "react";-import { Checkbox } from "@/react/components/ui/checkbox";+import { Checkbox } from "@/components/ui/checkbox";import type { SelectionContext } from "../types";import type {TreeNode,diff --git a/frontend/src/react/components/SchemaEditorLite/Aside/index.ts b/frontend/src/modules/schema-editor/Aside/index.tssimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/Aside/index.tsrename to frontend/src/modules/schema-editor/Aside/index.tsdiff --git a/frontend/src/react/components/SchemaEditorLite/Aside/tree-builder.ts b/frontend/src/modules/schema-editor/Aside/tree-builder.tssimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/Aside/tree-builder.tsrename to frontend/src/modules/schema-editor/Aside/tree-builder.tsdiff --git a/frontend/src/react/components/SchemaEditorLite/Aside/useContextMenu.ts b/frontend/src/modules/schema-editor/Aside/useContextMenu.tssimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/Aside/useContextMenu.tsrename to frontend/src/modules/schema-editor/Aside/useContextMenu.tsdiff --git a/frontend/src/react/components/SchemaEditorLite/EditorPanel.tsx b/frontend/src/modules/schema-editor/EditorPanel.tsxsimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/EditorPanel.tsxrename to frontend/src/modules/schema-editor/EditorPanel.tsxdiff --git a/frontend/src/react/components/SchemaEditorLite/Modals/ActionConfirmDialog.tsx b/frontend/src/modules/schema-editor/Modals/ActionConfirmDialog.tsxsimilarity index 91%rename from frontend/src/react/components/SchemaEditorLite/Modals/ActionConfirmDialog.tsxrename to frontend/src/modules/schema-editor/Modals/ActionConfirmDialog.tsxindex 428d5fcad8..84ace0a1d3 100644--- a/frontend/src/react/components/SchemaEditorLite/Modals/ActionConfirmDialog.tsx+++ b/frontend/src/modules/schema-editor/Modals/ActionConfirmDialog.tsx@@ -5,8 +5,8 @@ import {AlertDialogDescription,AlertDialogFooter,AlertDialogTitle,-} from "@/react/components/ui/alert-dialog";-import { Button } from "@/react/components/ui/button";+} from "@/components/ui/alert-dialog";+import { Button } from "@/components/ui/button";interface Props {open: boolean;diff --git a/frontend/src/react/components/SchemaEditorLite/Modals/EditColumnForeignKeySheet.tsx b/frontend/src/modules/schema-editor/Modals/EditColumnForeignKeySheet.tsxsimilarity index 97%rename from frontend/src/react/components/SchemaEditorLite/Modals/EditColumnForeignKeySheet.tsxrename to frontend/src/modules/schema-editor/Modals/EditColumnForeignKeySheet.tsxindex 0058b6042f..2577ddb8db 100644--- a/frontend/src/react/components/SchemaEditorLite/Modals/EditColumnForeignKeySheet.tsx+++ b/frontend/src/modules/schema-editor/Modals/EditColumnForeignKeySheet.tsx@@ -1,15 +1,15 @@import { useCallback, useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { Combobox } from "@/react/components/ui/combobox";-import { Input } from "@/react/components/ui/input";+import { Button } from "@/components/ui/button";+import { Combobox } from "@/components/ui/combobox";+import { Input } from "@/components/ui/input";import {Sheet,SheetContent,SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";+} from "@/components/ui/sheet";import type {ColumnMetadata,Database,diff --git a/frontend/src/react/components/SchemaEditorLite/Modals/FunctionNameDialog.tsx b/frontend/src/modules/schema-editor/Modals/FunctionNameDialog.tsxsimilarity index 93%rename from frontend/src/react/components/SchemaEditorLite/Modals/FunctionNameDialog.tsxrename to frontend/src/modules/schema-editor/Modals/FunctionNameDialog.tsxindex c06d9e3c1b..003c27ccf2 100644--- a/frontend/src/react/components/SchemaEditorLite/Modals/FunctionNameDialog.tsx+++ b/frontend/src/modules/schema-editor/Modals/FunctionNameDialog.tsx@@ -1,13 +1,9 @@import { create } from "@bufbuild/protobuf";import { useCallback, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";-import { Input } from "@/react/components/ui/input";+import { Button } from "@/components/ui/button";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";+import { Input } from "@/components/ui/input";import type {Database,DatabaseMetadata,diff --git a/frontend/src/react/components/SchemaEditorLite/Modals/ProcedureNameDialog.tsx b/frontend/src/modules/schema-editor/Modals/ProcedureNameDialog.tsxsimilarity index 93%rename from frontend/src/react/components/SchemaEditorLite/Modals/ProcedureNameDialog.tsxrename to frontend/src/modules/schema-editor/Modals/ProcedureNameDialog.tsxindex cd00e6e024..1e354eafab 100644--- a/frontend/src/react/components/SchemaEditorLite/Modals/ProcedureNameDialog.tsx+++ b/frontend/src/modules/schema-editor/Modals/ProcedureNameDialog.tsx@@ -1,13 +1,9 @@import { create } from "@bufbuild/protobuf";import { useCallback, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";-import { Input } from "@/react/components/ui/input";+import { Button } from "@/components/ui/button";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";+import { Input } from "@/components/ui/input";import type {Database,DatabaseMetadata,diff --git a/frontend/src/react/components/SchemaEditorLite/Modals/SchemaNameDialog.tsx b/frontend/src/modules/schema-editor/Modals/SchemaNameDialog.tsxsimilarity index 93%rename from frontend/src/react/components/SchemaEditorLite/Modals/SchemaNameDialog.tsxrename to frontend/src/modules/schema-editor/Modals/SchemaNameDialog.tsxindex 8c724607ea..a55e648ade 100644--- a/frontend/src/react/components/SchemaEditorLite/Modals/SchemaNameDialog.tsx+++ b/frontend/src/modules/schema-editor/Modals/SchemaNameDialog.tsx@@ -1,13 +1,9 @@import { create } from "@bufbuild/protobuf";import { useCallback, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";-import { Input } from "@/react/components/ui/input";+import { Button } from "@/components/ui/button";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";+import { Input } from "@/components/ui/input";import type {Database,DatabaseMetadata,diff --git a/frontend/src/react/components/SchemaEditorLite/Modals/TableNamePopover.tsx b/frontend/src/modules/schema-editor/Modals/TableNamePopover.tsxsimilarity index 96%rename from frontend/src/react/components/SchemaEditorLite/Modals/TableNamePopover.tsxrename to frontend/src/modules/schema-editor/Modals/TableNamePopover.tsxindex 7b4ccc9260..514a95bbcf 100644--- a/frontend/src/react/components/SchemaEditorLite/Modals/TableNamePopover.tsx+++ b/frontend/src/modules/schema-editor/Modals/TableNamePopover.tsx@@ -1,9 +1,9 @@import { create } from "@bufbuild/protobuf";import { useCallback, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { Input } from "@/react/components/ui/input";-import { Popover, PopoverContent } from "@/react/components/ui/popover";+import { Button } from "@/components/ui/button";+import { Input } from "@/components/ui/input";+import { Popover, PopoverContent } from "@/components/ui/popover";import { Engine } from "@/types/proto-es/v1/common_pb";import type {Database,diff --git a/frontend/src/react/components/SchemaEditorLite/Modals/ViewNameDialog.tsx b/frontend/src/modules/schema-editor/Modals/ViewNameDialog.tsxsimilarity index 93%rename from frontend/src/react/components/SchemaEditorLite/Modals/ViewNameDialog.tsxrename to frontend/src/modules/schema-editor/Modals/ViewNameDialog.tsxindex 4d27d55cd1..dd628a4491 100644--- a/frontend/src/react/components/SchemaEditorLite/Modals/ViewNameDialog.tsx+++ b/frontend/src/modules/schema-editor/Modals/ViewNameDialog.tsx@@ -1,13 +1,9 @@import { create } from "@bufbuild/protobuf";import { useCallback, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";-import { Input } from "@/react/components/ui/input";+import { Button } from "@/components/ui/button";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";+import { Input } from "@/components/ui/input";import type {Database,DatabaseMetadata,diff --git a/frontend/src/react/components/SchemaEditorLite/Panels/DatabaseEditor.test.tsx b/frontend/src/modules/schema-editor/Panels/DatabaseEditor.test.tsxsimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/Panels/DatabaseEditor.test.tsxrename to frontend/src/modules/schema-editor/Panels/DatabaseEditor.test.tsxdiff --git a/frontend/src/react/components/SchemaEditorLite/Panels/DatabaseEditor.tsx b/frontend/src/modules/schema-editor/Panels/DatabaseEditor.tsxsimilarity index 97%rename from frontend/src/react/components/SchemaEditorLite/Panels/DatabaseEditor.tsxrename to frontend/src/modules/schema-editor/Panels/DatabaseEditor.tsxindex b1c1bde077..ba4d4f1b63 100644--- a/frontend/src/react/components/SchemaEditorLite/Panels/DatabaseEditor.tsx+++ b/frontend/src/modules/schema-editor/Panels/DatabaseEditor.tsx@@ -1,8 +1,8 @@import { Plus } from "lucide-react";import { useCallback, useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { Combobox } from "@/react/components/ui/combobox";+import { Button } from "@/components/ui/button";+import { Combobox } from "@/components/ui/combobox";import type {Database,DatabaseMetadata,diff --git a/frontend/src/react/components/SchemaEditorLite/Panels/FunctionEditor.tsx b/frontend/src/modules/schema-editor/Panels/FunctionEditor.tsxsimilarity index 96%rename from frontend/src/react/components/SchemaEditorLite/Panels/FunctionEditor.tsxrename to frontend/src/modules/schema-editor/Panels/FunctionEditor.tsxindex 9e0df72c11..e2cd52ce8a 100644--- a/frontend/src/react/components/SchemaEditorLite/Panels/FunctionEditor.tsx+++ b/frontend/src/modules/schema-editor/Panels/FunctionEditor.tsx@@ -1,5 +1,5 @@import { useCallback, useMemo } from "react";-import { MonacoEditor } from "@/react/components/monaco/MonacoEditor";+import { MonacoEditor } from "@/components/monaco/MonacoEditor";import type {Database,DatabaseMetadata,diff --git a/frontend/src/react/components/SchemaEditorLite/Panels/IndexesEditor/IndexesEditor.tsx b/frontend/src/modules/schema-editor/Panels/IndexesEditor/IndexesEditor.tsxsimilarity index 94%rename from frontend/src/react/components/SchemaEditorLite/Panels/IndexesEditor/IndexesEditor.tsxrename to frontend/src/modules/schema-editor/Panels/IndexesEditor/IndexesEditor.tsxindex 8b0b6460c3..818c0ebad6 100644--- a/frontend/src/react/components/SchemaEditorLite/Panels/IndexesEditor/IndexesEditor.tsx+++ b/frontend/src/modules/schema-editor/Panels/IndexesEditor/IndexesEditor.tsx@@ -1,10 +1,10 @@import { Trash2 } from "lucide-react";import { useCallback } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";-import { Combobox } from "@/react/components/ui/combobox";-import { Input } from "@/react/components/ui/input";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";+import { Combobox } from "@/components/ui/combobox";+import { Input } from "@/components/ui/input";import {Table,TableBody,@@ -12,7 +12,7 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";+} from "@/components/ui/table";import type {Database,DatabaseMetadata,diff --git a/frontend/src/react/components/SchemaEditorLite/Panels/IndexesEditor/index.ts b/frontend/src/modules/schema-editor/Panels/IndexesEditor/index.tssimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/Panels/IndexesEditor/index.tsrename to frontend/src/modules/schema-editor/Panels/IndexesEditor/index.tsdiff --git a/frontend/src/react/components/SchemaEditorLite/Panels/PartitionsEditor/PartitionsEditor.tsx b/frontend/src/modules/schema-editor/Panels/PartitionsEditor/PartitionsEditor.tsxsimilarity index 97%rename from frontend/src/react/components/SchemaEditorLite/Panels/PartitionsEditor/PartitionsEditor.tsxrename to frontend/src/modules/schema-editor/Panels/PartitionsEditor/PartitionsEditor.tsxindex bb14cc7a44..adfddf3478 100644--- a/frontend/src/react/components/SchemaEditorLite/Panels/PartitionsEditor/PartitionsEditor.tsx+++ b/frontend/src/modules/schema-editor/Panels/PartitionsEditor/PartitionsEditor.tsx@@ -1,8 +1,8 @@import { RotateCcw, Trash2 } from "lucide-react";import { useCallback } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { Input } from "@/react/components/ui/input";+import { Button } from "@/components/ui/button";+import { Input } from "@/components/ui/input";import {Table,TableBody,@@ -10,8 +10,8 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { cn } from "@/react/lib/utils";+} from "@/components/ui/table";+import { cn } from "@/lib/utils";import type {Database,DatabaseMetadata,diff --git a/frontend/src/react/components/SchemaEditorLite/Panels/PartitionsEditor/index.ts b/frontend/src/modules/schema-editor/Panels/PartitionsEditor/index.tssimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/Panels/PartitionsEditor/index.tsrename to frontend/src/modules/schema-editor/Panels/PartitionsEditor/index.tsdiff --git a/frontend/src/react/components/SchemaEditorLite/Panels/PreviewPane.tsx b/frontend/src/modules/schema-editor/Panels/PreviewPane.tsxsimilarity index 97%rename from frontend/src/react/components/SchemaEditorLite/Panels/PreviewPane.tsxrename to frontend/src/modules/schema-editor/Panels/PreviewPane.tsxindex 69a52ed500..12c62dca56 100644--- a/frontend/src/react/components/SchemaEditorLite/Panels/PreviewPane.tsx+++ b/frontend/src/modules/schema-editor/Panels/PreviewPane.tsx@@ -3,8 +3,8 @@ import { cloneDeep } from "lodash-es";import { ChevronDown, ChevronRight, Loader2 } from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { databaseServiceClientConnect } from "@/connect";-import { ReadonlyMonaco } from "@/react/components/monaco/ReadonlyMonaco";+import { databaseServiceClientConnect } from "@/api";+import { ReadonlyMonaco } from "@/components/monaco/ReadonlyMonaco";import type {Database,DatabaseMetadata,diff --git a/frontend/src/react/components/SchemaEditorLite/Panels/ProcedureEditor.tsx b/frontend/src/modules/schema-editor/Panels/ProcedureEditor.tsxsimilarity index 96%rename from frontend/src/react/components/SchemaEditorLite/Panels/ProcedureEditor.tsxrename to frontend/src/modules/schema-editor/Panels/ProcedureEditor.tsxindex ceae54c2cf..be9c4b7b21 100644--- a/frontend/src/react/components/SchemaEditorLite/Panels/ProcedureEditor.tsx+++ b/frontend/src/modules/schema-editor/Panels/ProcedureEditor.tsx@@ -1,5 +1,5 @@import { useCallback, useMemo } from "react";-import { MonacoEditor } from "@/react/components/monaco/MonacoEditor";+import { MonacoEditor } from "@/components/monaco/MonacoEditor";import type {Database,DatabaseMetadata,diff --git a/frontend/src/react/components/SchemaEditorLite/Panels/TableColumnEditor/DataTypeCell.tsx b/frontend/src/modules/schema-editor/Panels/TableColumnEditor/DataTypeCell.tsxsimilarity index 96%rename from frontend/src/react/components/SchemaEditorLite/Panels/TableColumnEditor/DataTypeCell.tsxrename to frontend/src/modules/schema-editor/Panels/TableColumnEditor/DataTypeCell.tsxindex b2856d3d26..21dfe5c74b 100644--- a/frontend/src/react/components/SchemaEditorLite/Panels/TableColumnEditor/DataTypeCell.tsx+++ b/frontend/src/modules/schema-editor/Panels/TableColumnEditor/DataTypeCell.tsx@@ -12,10 +12,10 @@ import {getPortalDropdownStyle,isPortalDropdownStyleEqual,shouldIgnorePortalDropdownScroll,-} from "@/react/components/ui/combobox-position";-import { Input } from "@/react/components/ui/input";-import { getLayerRoot, LAYER_SURFACE_CLASS } from "@/react/components/ui/layer";-import { cn } from "@/react/lib/utils";+} from "@/components/ui/combobox-position";+import { Input } from "@/components/ui/input";+import { getLayerRoot, LAYER_SURFACE_CLASS } from "@/components/ui/layer";+import { cn } from "@/lib/utils";import type { Engine } from "@/types/proto-es/v1/common_pb";import type { ColumnMetadata } from "@/types/proto-es/v1/database_service_pb";import { getDataTypeSuggestionList } from "@/utils";diff --git a/frontend/src/react/components/SchemaEditorLite/Panels/TableColumnEditor/DefaultValueCell.tsx b/frontend/src/modules/schema-editor/Panels/TableColumnEditor/DefaultValueCell.tsxsimilarity index 94%rename from frontend/src/react/components/SchemaEditorLite/Panels/TableColumnEditor/DefaultValueCell.tsxrename to frontend/src/modules/schema-editor/Panels/TableColumnEditor/DefaultValueCell.tsxindex 0e1cdf8ba8..8ca6d34c5e 100644--- a/frontend/src/react/components/SchemaEditorLite/Panels/TableColumnEditor/DefaultValueCell.tsx+++ b/frontend/src/modules/schema-editor/Panels/TableColumnEditor/DefaultValueCell.tsx@@ -1,6 +1,6 @@import { useCallback } from "react";import { useTranslation } from "react-i18next";-import { Input } from "@/react/components/ui/input";+import { Input } from "@/components/ui/input";import type { ColumnMetadata } from "@/types/proto-es/v1/database_service_pb";import { INLINE_EDIT_INPUT_CLASS } from "../common";diff --git a/frontend/src/react/components/SchemaEditorLite/Panels/TableColumnEditor/TableColumnEditor.tsx b/frontend/src/modules/schema-editor/Panels/TableColumnEditor/TableColumnEditor.tsxsimilarity index 98%rename from frontend/src/react/components/SchemaEditorLite/Panels/TableColumnEditor/TableColumnEditor.tsxrename to frontend/src/modules/schema-editor/Panels/TableColumnEditor/TableColumnEditor.tsxindex 78a830ff3a..f883aacf9a 100644--- a/frontend/src/react/components/SchemaEditorLite/Panels/TableColumnEditor/TableColumnEditor.tsx+++ b/frontend/src/modules/schema-editor/Panels/TableColumnEditor/TableColumnEditor.tsx@@ -1,9 +1,9 @@import { RotateCcw, Trash2 } from "lucide-react";import { useCallback, useLayoutEffect, useMemo, useRef } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";-import { Input } from "@/react/components/ui/input";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";+import { Input } from "@/components/ui/input";import {Table,TableBody,@@ -11,12 +11,12 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";+} from "@/components/ui/table";import {distributeColumnWidths,useColumnWidths,-} from "@/react/hooks/useColumnWidths";-import { cn } from "@/react/lib/utils";+} from "@/hooks/useColumnWidths";+import { cn } from "@/lib/utils";import type { Engine } from "@/types/proto-es/v1/common_pb";import type {ColumnMetadata,diff --git a/frontend/src/react/components/SchemaEditorLite/Panels/TableColumnEditor/index.ts b/frontend/src/modules/schema-editor/Panels/TableColumnEditor/index.tssimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/Panels/TableColumnEditor/index.tsrename to frontend/src/modules/schema-editor/Panels/TableColumnEditor/index.tsdiff --git a/frontend/src/react/components/SchemaEditorLite/Panels/TableColumnEditor/inline-input.test.tsx b/frontend/src/modules/schema-editor/Panels/TableColumnEditor/inline-input.test.tsxsimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/Panels/TableColumnEditor/inline-input.test.tsxrename to frontend/src/modules/schema-editor/Panels/TableColumnEditor/inline-input.test.tsxdiff --git a/frontend/src/react/components/SchemaEditorLite/Panels/TableEditor.tsx b/frontend/src/modules/schema-editor/Panels/TableEditor.tsxsimilarity index 98%rename from frontend/src/react/components/SchemaEditorLite/Panels/TableEditor.tsxrename to frontend/src/modules/schema-editor/Panels/TableEditor.tsxindex f30804c9ce..a1641268a0 100644--- a/frontend/src/react/components/SchemaEditorLite/Panels/TableEditor.tsx+++ b/frontend/src/modules/schema-editor/Panels/TableEditor.tsx@@ -2,8 +2,8 @@ import { create } from "@bufbuild/protobuf";import { Plus } from "lucide-react";import { useCallback, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { SegmentedControl } from "@/react/components/ui/segmented-control";+import { Button } from "@/components/ui/button";+import { SegmentedControl } from "@/components/ui/segmented-control";import type {Database,DatabaseMetadata,diff --git a/frontend/src/react/components/SchemaEditorLite/Panels/TableList/TableList.tsx b/frontend/src/modules/schema-editor/Panels/TableList/TableList.tsxsimilarity index 97%rename from frontend/src/react/components/SchemaEditorLite/Panels/TableList/TableList.tsxrename to frontend/src/modules/schema-editor/Panels/TableList/TableList.tsxindex 045b071ecb..51315f5889 100644--- a/frontend/src/react/components/SchemaEditorLite/Panels/TableList/TableList.tsx+++ b/frontend/src/modules/schema-editor/Panels/TableList/TableList.tsx@@ -1,8 +1,8 @@import { RotateCcw, Trash2 } from "lucide-react";import { useCallback, useLayoutEffect, useMemo, useRef } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { Input } from "@/react/components/ui/input";+import { Button } from "@/components/ui/button";+import { Input } from "@/components/ui/input";import {Table,TableBody,@@ -10,12 +10,12 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";+} from "@/components/ui/table";import {distributeColumnWidths,useColumnWidths,-} from "@/react/hooks/useColumnWidths";-import { cn } from "@/react/lib/utils";+} from "@/hooks/useColumnWidths";+import { cn } from "@/lib/utils";import type {Database,DatabaseMetadata,diff --git a/frontend/src/react/components/SchemaEditorLite/Panels/TableList/index.ts b/frontend/src/modules/schema-editor/Panels/TableList/index.tssimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/Panels/TableList/index.tsrename to frontend/src/modules/schema-editor/Panels/TableList/index.tsdiff --git a/frontend/src/react/components/SchemaEditorLite/Panels/ViewEditor.tsx b/frontend/src/modules/schema-editor/Panels/ViewEditor.tsxsimilarity index 95%rename from frontend/src/react/components/SchemaEditorLite/Panels/ViewEditor.tsxrename to frontend/src/modules/schema-editor/Panels/ViewEditor.tsxindex ffa0b2b9c7..043c6b6787 100644--- a/frontend/src/react/components/SchemaEditorLite/Panels/ViewEditor.tsx+++ b/frontend/src/modules/schema-editor/Panels/ViewEditor.tsx@@ -1,5 +1,5 @@import { useCallback, useMemo } from "react";-import { MonacoEditor } from "@/react/components/monaco/MonacoEditor";+import { MonacoEditor } from "@/components/monaco/MonacoEditor";import type {Database,DatabaseMetadata,diff --git a/frontend/src/react/components/SchemaEditorLite/Panels/common.ts b/frontend/src/modules/schema-editor/Panels/common.tssimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/Panels/common.tsrename to frontend/src/modules/schema-editor/Panels/common.tsdiff --git a/frontend/src/react/components/SchemaEditorLite/SchemaEditorLite.tsx b/frontend/src/modules/schema-editor/SchemaEditorLite.tsxsimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/SchemaEditorLite.tsxrename to frontend/src/modules/schema-editor/SchemaEditorLite.tsxdiff --git a/frontend/src/react/components/SchemaEditorLite/TabsContainer.tsx b/frontend/src/modules/schema-editor/TabsContainer.tsxsimilarity index 97%rename from frontend/src/react/components/SchemaEditorLite/TabsContainer.tsxrename to frontend/src/modules/schema-editor/TabsContainer.tsxindex b4d10936bd..50d3e3e23a 100644--- a/frontend/src/react/components/SchemaEditorLite/TabsContainer.tsx+++ b/frontend/src/modules/schema-editor/TabsContainer.tsx@@ -7,8 +7,8 @@ import {X,} from "lucide-react";import { useEffect, useRef } from "react";-import { EllipsisText } from "@/react/components/ui/ellipsis-text";-import { cn } from "@/react/lib/utils";+import { EllipsisText } from "@/components/ui/ellipsis-text";+import { cn } from "@/lib/utils";import { extractDatabaseResourceName } from "@/utils";import { useSchemaEditorContext } from "./context";import type { EditStatus, TabContext } from "./types";diff --git a/frontend/src/react/components/SchemaEditorLite/context.tsx b/frontend/src/modules/schema-editor/context.tsxsimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/context.tsxrename to frontend/src/modules/schema-editor/context.tsxdiff --git a/frontend/src/react/components/SchemaEditorLite/core/algorithm/diff-merge.ts b/frontend/src/modules/schema-editor/core/algorithm/diff-merge.tssimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/core/algorithm/diff-merge.tsrename to frontend/src/modules/schema-editor/core/algorithm/diff-merge.tsdiff --git a/frontend/src/react/components/SchemaEditorLite/core/algorithm/index.ts b/frontend/src/modules/schema-editor/core/algorithm/index.tssimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/core/algorithm/index.tsrename to frontend/src/modules/schema-editor/core/algorithm/index.tsdiff --git a/frontend/src/react/components/SchemaEditorLite/core/columnDefaultValue.ts b/frontend/src/modules/schema-editor/core/columnDefaultValue.tssimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/core/columnDefaultValue.tsrename to frontend/src/modules/schema-editor/core/columnDefaultValue.tsdiff --git a/frontend/src/react/components/SchemaEditorLite/core/edit.ts b/frontend/src/modules/schema-editor/core/edit.tssimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/core/edit.tsrename to frontend/src/modules/schema-editor/core/edit.tsdiff --git a/frontend/src/react/components/SchemaEditorLite/core/generateDiffDDL.ts b/frontend/src/modules/schema-editor/core/generateDiffDDL.tssimilarity index 94%rename from frontend/src/react/components/SchemaEditorLite/core/generateDiffDDL.tsrename to frontend/src/modules/schema-editor/core/generateDiffDDL.tsindex 7e4b9eeda8..cc32251a8f 100644--- a/frontend/src/react/components/SchemaEditorLite/core/generateDiffDDL.ts+++ b/frontend/src/modules/schema-editor/core/generateDiffDDL.ts@@ -1,8 +1,8 @@import { create } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";import { isEqual } from "lodash-es";-import { sqlServiceClientConnect } from "@/connect";-import { silentContextKey } from "@/connect/context-key";+import { sqlServiceClientConnect } from "@/api";+import { silentContextKey } from "@/api/context-key";import type {Database,DatabaseMetadata,diff --git a/frontend/src/react/components/SchemaEditorLite/core/keyForResource.ts b/frontend/src/modules/schema-editor/core/keyForResource.tssimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/core/keyForResource.tsrename to frontend/src/modules/schema-editor/core/keyForResource.tsdiff --git a/frontend/src/react/components/SchemaEditorLite/core/metadata.ts b/frontend/src/modules/schema-editor/core/metadata.tssimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/core/metadata.tsrename to frontend/src/modules/schema-editor/core/metadata.tsdiff --git a/frontend/src/react/components/SchemaEditorLite/core/refreshEditStatus.test.ts b/frontend/src/modules/schema-editor/core/refreshEditStatus.test.tssimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/core/refreshEditStatus.test.tsrename to frontend/src/modules/schema-editor/core/refreshEditStatus.test.tsdiff --git a/frontend/src/react/components/SchemaEditorLite/core/refreshEditStatus.ts b/frontend/src/modules/schema-editor/core/refreshEditStatus.tssimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/core/refreshEditStatus.tsrename to frontend/src/modules/schema-editor/core/refreshEditStatus.tsdiff --git a/frontend/src/react/components/SchemaEditorLite/core/spec.ts b/frontend/src/modules/schema-editor/core/spec.tssimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/core/spec.tsrename to frontend/src/modules/schema-editor/core/spec.tsdiff --git a/frontend/src/react/components/SchemaEditorLite/core/types.ts b/frontend/src/modules/schema-editor/core/types.tssimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/core/types.tsrename to frontend/src/modules/schema-editor/core/types.tsdiff --git a/frontend/src/react/components/SchemaEditorLite/index.ts b/frontend/src/modules/schema-editor/index.tssimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/index.tsrename to frontend/src/modules/schema-editor/index.tsdiff --git a/frontend/src/react/components/SchemaEditorLite/resize.ts b/frontend/src/modules/schema-editor/resize.tssimilarity index 99%rename from frontend/src/react/components/SchemaEditorLite/resize.tsrename to frontend/src/modules/schema-editor/resize.tsindex 92d93bd2f8..8d3a286919 100644--- a/frontend/src/react/components/SchemaEditorLite/resize.ts+++ b/frontend/src/modules/schema-editor/resize.ts@@ -1,5 +1,5 @@import { useCallback, useRef, useState } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";/*** Shared visual styling for resize handles inside SchemaEditorLite.diff --git a/frontend/src/react/components/SchemaEditorLite/types.ts b/frontend/src/modules/schema-editor/types.tssimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/types.tsrename to frontend/src/modules/schema-editor/types.tsdiff --git a/frontend/src/react/components/SchemaEditorLite/useAlgorithm.ts b/frontend/src/modules/schema-editor/useAlgorithm.tssimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/useAlgorithm.tsrename to frontend/src/modules/schema-editor/useAlgorithm.tsdiff --git a/frontend/src/react/components/SchemaEditorLite/useEditStatus.ts b/frontend/src/modules/schema-editor/useEditStatus.tssimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/useEditStatus.tsrename to frontend/src/modules/schema-editor/useEditStatus.tsdiff --git a/frontend/src/react/components/SchemaEditorLite/useScrollStatus.ts b/frontend/src/modules/schema-editor/useScrollStatus.tssimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/useScrollStatus.tsrename to frontend/src/modules/schema-editor/useScrollStatus.tsdiff --git a/frontend/src/react/components/SchemaEditorLite/useSelection.ts b/frontend/src/modules/schema-editor/useSelection.tssimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/useSelection.tsrename to frontend/src/modules/schema-editor/useSelection.tsdiff --git a/frontend/src/react/components/SchemaEditorLite/useTabs.ts b/frontend/src/modules/schema-editor/useTabs.tssimilarity index 100%rename from frontend/src/react/components/SchemaEditorLite/useTabs.tsrename to frontend/src/modules/schema-editor/useTabs.tsdiff --git a/frontend/src/modules/sql-editor/AGENTS.md b/frontend/src/modules/sql-editor/AGENTS.mdnew file mode 100644index 0000000000..e2e2a8f5fa--- /dev/null+++ b/frontend/src/modules/sql-editor/AGENTS.md@@ -0,0 +1,22 @@+# SQL Editor module++Follow `../../../AGENTS.md`. This directory owns the SQL Editor application subsystem used by the `/sql-editor` routes.++## Ownership map++```text+src/modules/sql-editor/+├── components/ # Route shell, panes, editor, results, schema browser, and UI+├── hooks/ # SQL Editor hooks backed by the app and editor stores+├── store/ # Zustand editor, tab, worksheet, tree, history, and terminal state+├── model/ # Framework-neutral worksheet tree and event models+└── legacy/ # One-time persisted-data migration only+```++- Route definitions live in `src/app/router/routes/sqlEditor.tsx`; this module owns the route implementation.+- Keep SQL Editor state under `store/`. Do not add state under the global `stores/` tree unless it is genuinely used outside SQL Editor.+- Keep SQL Editor UI under `components/`; use `@/components/ui` for shared primitives.+- `legacy/` may read old persisted formats but must not become a home for new runtime behavior.+- The current React and Zustand imports are authoritative. Some parity comments retain historical implementation context; they do not describe active framework boundaries.+- The AI module may consume SQL Editor hooks and state. Avoid the reverse dependency unless the UI is explicitly an AI integration surface.+- Run focused tests under this module, then the standard frontend fix, check, type-check, and full test commands.diff --git a/frontend/src/react/components/sql-editor/AccessGrantItem.test.tsx b/frontend/src/modules/sql-editor/components/AccessGrantItem.test.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/AccessGrantItem.test.tsxrename to frontend/src/modules/sql-editor/components/AccessGrantItem.test.tsxindex 3ee221e86c..a21f1dc0ed 100644--- a/frontend/src/react/components/sql-editor/AccessGrantItem.test.tsx+++ b/frontend/src/modules/sql-editor/components/AccessGrantItem.test.tsx@@ -29,7 +29,7 @@ vi.mock("@/utils/accessGrant", () => ({}));// Stub Badge and Tooltip as simple pass-through-vi.mock("@/react/components/ui/badge", () => ({+vi.mock("@/components/ui/badge", () => ({Badge: ({children,variant,@@ -43,13 +43,13 @@ vi.mock("@/react/components/ui/badge", () => ({),}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: ({ children }: { children: React.ReactNode }) => (<span data-testid="tooltip">{children}</span>),}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,onClick,@@ -76,7 +76,7 @@ vi.mock("@/react/components/ui/button", () => ({),}));-vi.mock("@/react/lib/utils", () => ({+vi.mock("@/lib/utils", () => ({cn: (...args: string[]) => args.filter(Boolean).join(" "),}));diff --git a/frontend/src/react/components/sql-editor/AccessGrantItem.tsx b/frontend/src/modules/sql-editor/components/AccessGrantItem.tsxsimilarity index 96%rename from frontend/src/react/components/sql-editor/AccessGrantItem.tsxrename to frontend/src/modules/sql-editor/components/AccessGrantItem.tsxindex 49540f2310..fe7f077d5d 100644--- a/frontend/src/react/components/sql-editor/AccessGrantItem.tsx+++ b/frontend/src/modules/sql-editor/components/AccessGrantItem.tsx@@ -1,9 +1,9 @@import { useTranslation } from "react-i18next";-import { RouterLink } from "@/react/components/RouterLink";-import { Badge } from "@/react/components/ui/badge";-import { Button } from "@/react/components/ui/button";-import { Tooltip } from "@/react/components/ui/tooltip";-import { cn } from "@/react/lib/utils";+import { RouterLink } from "@/components/RouterLink";+import { Badge } from "@/components/ui/badge";+import { Button } from "@/components/ui/button";+import { Tooltip } from "@/components/ui/tooltip";+import { cn } from "@/lib/utils";import type { AccessGrant } from "@/types/proto-es/v1/access_grant_service_pb";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";import {diff --git a/frontend/src/react/components/sql-editor/AccessGrantRequestDrawer.test.tsx b/frontend/src/modules/sql-editor/components/AccessGrantRequestDrawer.test.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/AccessGrantRequestDrawer.test.tsxrename to frontend/src/modules/sql-editor/components/AccessGrantRequestDrawer.test.tsxindex bcdfdf6b78..a77b910bcd 100644--- a/frontend/src/react/components/sql-editor/AccessGrantRequestDrawer.test.tsx+++ b/frontend/src/modules/sql-editor/components/AccessGrantRequestDrawer.test.tsx@@ -31,14 +31,14 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useCurrentUser: () => ({name: "users/me",email: "[email protected]",}),}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {// `notify` reuses the `pushNotification` vi.fn so the existing test// assertions on `mocks.pushNotification` keep working after the migration// from the Pinia helper to the app-store notification slice.@@ -66,7 +66,7 @@ vi.mock("@/react/stores/app", () => {});// Zustand editor store — active project read.-vi.mock("@/react/stores/sqlEditor/editor", () => ({+vi.mock("@/modules/sql-editor/store/editor", () => ({useSQLEditorEditorState: (selector: (s: { project: string }) => unknown) =>selector({ project: mocks.project }),}));@@ -74,7 +74,7 @@ vi.mock("@/react/stores/sqlEditor/editor", () => ({// Zustand tab store — imperative getter to derive default targets, plus the// reactive hook consumed by useActiveSQLEditorTheme (drives the drawer's Monaco// theme). The tab has no mode, so the active theme resolves to the default.-vi.mock("@/react/stores/sqlEditor/tab", () => ({+vi.mock("@/modules/sql-editor/store/tab", () => ({getSQLEditorTabsState: () => ({currentTabId: "tab1",tabsById: new Map([@@ -93,7 +93,7 @@ vi.mock("@/react/stores/sqlEditor/tab", () => ({}),}));-vi.mock("@/react/stores/sqlEditor", () => ({+vi.mock("@/modules/sql-editor/store", () => ({useSQLEditorStore: (selector: (s: {setAsidePanelTab: (tab: string) => void;@@ -106,14 +106,14 @@ vi.mock("@/react/stores/sqlEditor", () => ({}),}));-vi.mock("@/connect", () => ({+vi.mock("@/api", () => ({accessGrantServiceClientConnect: {createAccessGrant: mocks.createAccessGrant,},}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {resolve: mocks.routerResolve,},@@ -153,7 +153,7 @@ vi.mock("@/types/proto-es/v1/access_grant_service_pb", () => ({CreateAccessGrantRequestSchema: {},}));-vi.mock("@/react/components/ui/sheet", () => ({+vi.mock("@/components/ui/sheet", () => ({Sheet: ({children,open,@@ -193,7 +193,7 @@ vi.mock("@/react/components/ui/sheet", () => ({),}));-vi.mock("@/react/components/ui/alert", () => ({+vi.mock("@/components/ui/alert", () => ({Alert: ({children,title,@@ -211,7 +211,7 @@ vi.mock("@/react/components/ui/alert", () => ({),}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,onClick,@@ -241,12 +241,12 @@ vi.mock("@/react/components/ui/button", () => ({// (they conflict with this file's minimal @bufbuild/protobuf(/wkt) mocks). They// are only referenced inside the picker's option.render, never invoked here// because the Combobox mock below renders plain <option> labels.-vi.mock("@/react/components/EngineIcon", () => ({ EngineIcon: () => null }));-vi.mock("@/react/components/EnvironmentLabel", () => ({+vi.mock("@/components/EngineIcon", () => ({ EngineIcon: () => null }));+vi.mock("@/components/EnvironmentLabel", () => ({EnvironmentLabel: () => null,}));-vi.mock("@/react/components/ui/combobox", () => ({+vi.mock("@/components/ui/combobox", () => ({Combobox: ({value,onChange,@@ -290,7 +290,7 @@ vi.mock("@/react/components/ui/combobox", () => ({},}));-vi.mock("@/react/components/ui/expiration-picker", () => ({+vi.mock("@/components/ui/expiration-picker", () => ({ExpirationPicker: ({value,onChange,@@ -307,7 +307,7 @@ vi.mock("@/react/components/ui/expiration-picker", () => ({),}));-vi.mock("@/react/components/ui/textarea", () => ({+vi.mock("@/components/ui/textarea", () => ({Textarea: ({value,onChange,@@ -326,7 +326,7 @@ vi.mock("@/react/components/ui/textarea", () => ({),}));-vi.mock("@/react/components/monaco/MonacoEditor", () => ({+vi.mock("@/components/monaco/MonacoEditor", () => ({MonacoEditor: ({content,onChange,diff --git a/frontend/src/react/components/sql-editor/AccessGrantRequestDrawer.tsx b/frontend/src/modules/sql-editor/components/AccessGrantRequestDrawer.tsxsimilarity index 92%rename from frontend/src/react/components/sql-editor/AccessGrantRequestDrawer.tsxrename to frontend/src/modules/sql-editor/components/AccessGrantRequestDrawer.tsxindex 9c78db7db6..fe50af4c4e 100644--- a/frontend/src/react/components/sql-editor/AccessGrantRequestDrawer.tsx+++ b/frontend/src/modules/sql-editor/components/AccessGrantRequestDrawer.tsx@@ -10,22 +10,17 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";-import { accessGrantServiceClientConnect } from "@/connect";-import { DatabaseSelect } from "@/react/components/DatabaseSelect";-import { MonacoEditor } from "@/react/components/monaco/MonacoEditor";-import {- monacoThemeName,- themeColorScheme,- themeToCssVars,-} from "@/react/components/sql-editor/theme/derive";-import { SQLEditorThemeScope } from "@/react/components/sql-editor/theme/SQLEditorThemeScope";-import { useActiveSQLEditorTheme } from "@/react/components/sql-editor/theme/useActiveSQLEditorTheme";-import { Alert } from "@/react/components/ui/alert";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";-import { Combobox } from "@/react/components/ui/combobox";-import { ExpirationPicker } from "@/react/components/ui/expiration-picker";-import { FormError, FormField } from "@/react/components/ui/form";+import { accessGrantServiceClientConnect } from "@/api";+import { router } from "@/app/router";+import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/app/router/handles";+import { DatabaseSelect } from "@/components/DatabaseSelect";+import { MonacoEditor } from "@/components/monaco/MonacoEditor";+import { Alert } from "@/components/ui/alert";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";+import { Combobox } from "@/components/ui/combobox";+import { ExpirationPicker } from "@/components/ui/expiration-picker";+import { FormError, FormField } from "@/components/ui/form";import {Sheet,SheetBody,@@ -33,15 +28,20 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { Textarea } from "@/react/components/ui/textarea";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { router } from "@/react/router";-import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { useSQLEditorStore } from "@/react/stores/sqlEditor";-import { useSQLEditorEditorState } from "@/react/stores/sqlEditor/editor";-import { getSQLEditorTabsState } from "@/react/stores/sqlEditor/tab";+} from "@/components/ui/sheet";+import { Textarea } from "@/components/ui/textarea";+import { useCurrentUser } from "@/hooks/useAppState";+import {+ monacoThemeName,+ themeColorScheme,+ themeToCssVars,+} from "@/modules/sql-editor/components/theme/derive";+import { SQLEditorThemeScope } from "@/modules/sql-editor/components/theme/SQLEditorThemeScope";+import { useActiveSQLEditorTheme } from "@/modules/sql-editor/components/theme/useActiveSQLEditorTheme";+import { useSQLEditorStore } from "@/modules/sql-editor/store";+import { useSQLEditorEditorState } from "@/modules/sql-editor/store/editor";+import { getSQLEditorTabsState } from "@/modules/sql-editor/store/tab";+import { useAppStore } from "@/stores/app";import {AccessGrant_Status,AccessGrantSchema,diff --git a/frontend/src/react/components/sql-editor/AccessPane.test.tsx b/frontend/src/modules/sql-editor/components/AccessPane.test.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/AccessPane.test.tsxrename to frontend/src/modules/sql-editor/components/AccessPane.test.tsxindex 7e0dfa8d5c..d2dcba9a5f 100644--- a/frontend/src/react/components/sql-editor/AccessPane.test.tsx+++ b/frontend/src/modules/sql-editor/components/AccessPane.test.tsx@@ -42,11 +42,11 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/react/hooks/useAppProject", () => ({+vi.mock("@/hooks/useAppProject", () => ({useAppProject: () => mocks.projectData,}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: (selector: (state: unknown) => unknown) =>selector({searchMyAccessGrants: mocks.searchMyAccessGrants,@@ -58,12 +58,12 @@ vi.mock("@/react/stores/app", () => ({}));// Zustand editor store — active project read.-vi.mock("@/react/stores/sqlEditor/editor", () => ({+vi.mock("@/modules/sql-editor/store/editor", () => ({useSQLEditorEditorState: (selector: (s: { project: string }) => unknown) =>selector({ project: mocks.project }),}));-vi.mock("@/react/stores/sqlEditor", () => ({+vi.mock("@/modules/sql-editor/store", () => ({useSQLEditorStore: Object.assign((selector: (s: {@@ -88,7 +88,7 @@ vi.mock("@/utils", () => ({getDefaultPagination: mocks.getDefaultPagination,}));-vi.mock("@/views/sql-editor/events", () => ({+vi.mock("@/modules/sql-editor/model/events", () => ({sqlEditorEvents: {emit: mocks.sqlEditorEventsEmit,},@@ -110,11 +110,11 @@ vi.mock("@/types/proto-es/v1/subscription_service_pb", () => ({PlanFeature: { FEATURE_JIT: 5 },}));-vi.mock("@/react/hooks/useSQLEditorBridge", () => ({+vi.mock("@/modules/sql-editor/hooks/useSQLEditorState", () => ({useSQLEditorFeature: () => mocks.hasFeature(),}));-vi.mock("@/react/components/AdvancedSearch", () => ({+vi.mock("@/components/AdvancedSearch", () => ({AdvancedSearch: ({placeholder,scopeOptions,@@ -138,11 +138,11 @@ vi.mock("@/react/components/AdvancedSearch", () => ({},}));-vi.mock("@/react/components/FeatureBadge", () => ({+vi.mock("@/components/FeatureBadge", () => ({FeatureBadge: () => <span data-testid="feature-badge" />,}));-vi.mock("@/react/components/PermissionGuard", () => ({+vi.mock("@/components/PermissionGuard", () => ({PermissionGuard: ({children,}: {@@ -150,7 +150,7 @@ vi.mock("@/react/components/PermissionGuard", () => ({}) => <>{children({ disabled: false })}</>,}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,onClick,diff --git a/frontend/src/react/components/sql-editor/AccessPane.tsx b/frontend/src/modules/sql-editor/components/AccessPane.tsxsimilarity index 94%rename from frontend/src/react/components/sql-editor/AccessPane.tsxrename to frontend/src/modules/sql-editor/components/AccessPane.tsxindex 1836314694..d4f1d64e5b 100644--- a/frontend/src/react/components/sql-editor/AccessPane.tsx+++ b/frontend/src/modules/sql-editor/components/AccessPane.tsx@@ -8,27 +8,24 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";-import type {- ScopeOption,- SearchParams,-} from "@/react/components/AdvancedSearch";-import { AdvancedSearch } from "@/react/components/AdvancedSearch";-import { FeatureBadge } from "@/react/components/FeatureBadge";-import { PermissionGuard } from "@/react/components/PermissionGuard";-import { Button } from "@/react/components/ui/button";-import { useAppProject } from "@/react/hooks/useAppProject";-import { useSQLEditorFeature } from "@/react/hooks/useSQLEditorBridge";-import { useAppStore } from "@/react/stores/app";-import type { AccessGrantFilter as AccessFilter } from "@/react/stores/app/types";-import { useSQLEditorStore } from "@/react/stores/sqlEditor";-import { useSQLEditorEditorState } from "@/react/stores/sqlEditor/editor";+import type { ScopeOption, SearchParams } from "@/components/AdvancedSearch";+import { AdvancedSearch } from "@/components/AdvancedSearch";+import { FeatureBadge } from "@/components/FeatureBadge";+import { PermissionGuard } from "@/components/PermissionGuard";+import { Button } from "@/components/ui/button";+import { useAppProject } from "@/hooks/useAppProject";+import { useSQLEditorFeature } from "@/modules/sql-editor/hooks/useSQLEditorState";+import { sqlEditorEvents } from "@/modules/sql-editor/model/events";+import { useSQLEditorStore } from "@/modules/sql-editor/store";+import { useSQLEditorEditorState } from "@/modules/sql-editor/store/editor";+import { useAppStore } from "@/stores/app";+import type { AccessGrantFilter as AccessFilter } from "@/stores/app/types";import type { AccessGrant } from "@/types/proto-es/v1/access_grant_service_pb";import { AccessGrant_Status } from "@/types/proto-es/v1/access_grant_service_pb";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import type { AccessGrantDisplayStatus } from "@/utils";import { getDefaultPagination } from "@/utils";-import { sqlEditorEvents } from "@/views/sql-editor/events";import { AccessGrantItem } from "./AccessGrantItem";import { AccessGrantRequestDrawer } from "./AccessGrantRequestDrawer";diff --git a/frontend/src/react/components/sql-editor/AdminModeButton.test.tsx b/frontend/src/modules/sql-editor/components/AdminModeButton.test.tsxsimilarity index 94%rename from frontend/src/react/components/sql-editor/AdminModeButton.test.tsxrename to frontend/src/modules/sql-editor/components/AdminModeButton.test.tsxindex 0833df5d3e..fe709e29f3 100644--- a/frontend/src/react/components/sql-editor/AdminModeButton.test.tsx+++ b/frontend/src/modules/sql-editor/components/AdminModeButton.test.tsx@@ -24,16 +24,16 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/store", () => ({}));+vi.mock("@/stores", () => ({}));// Zustand editor store — selector hook returns the active project.-vi.mock("@/react/stores/sqlEditor/editor", () => ({+vi.mock("@/modules/sql-editor/store/editor", () => ({useSQLEditorEditorState: (selector: (s: { project: string }) => unknown) =>selector({ project: mocks.state.project }),}));// Zustand tab store — selector hook, derived hooks, and imperative getter.-vi.mock("@/react/stores/sqlEditor/tab", () => ({+vi.mock("@/modules/sql-editor/store/tab", () => ({useSQLEditorTabState: (selector: (s: {currentTabId: string;@@ -51,11 +51,11 @@ vi.mock("@/react/stores/sqlEditor/tab", () => ({}));// Pinia bridge hook that resolves the admin permission for the project.-vi.mock("@/react/hooks/useSQLEditorBridge", () => ({+vi.mock("@/modules/sql-editor/hooks/useSQLEditorState", () => ({useSQLEditorAllowAdmin: mocks.useSQLEditorAllowAdmin,}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: ({ children }: { children: React.ReactNode }) => <>{children}</>,}));diff --git a/frontend/src/react/components/sql-editor/AdminModeButton.tsx b/frontend/src/modules/sql-editor/components/AdminModeButton.tsxsimilarity index 82%rename from frontend/src/react/components/sql-editor/AdminModeButton.tsxrename to frontend/src/modules/sql-editor/components/AdminModeButton.tsxindex 6c82e62582..a0cb7db0e5 100644--- a/frontend/src/react/components/sql-editor/AdminModeButton.tsx+++ b/frontend/src/modules/sql-editor/components/AdminModeButton.tsx@@ -1,15 +1,15 @@import { Wrench } from "lucide-react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { Tooltip } from "@/react/components/ui/tooltip";-import { useSQLEditorAllowAdmin } from "@/react/hooks/useSQLEditorBridge";-import { cn } from "@/react/lib/utils";-import { useSQLEditorEditorState } from "@/react/stores/sqlEditor/editor";+import { Button } from "@/components/ui/button";+import { Tooltip } from "@/components/ui/tooltip";+import { cn } from "@/lib/utils";+import { useSQLEditorAllowAdmin } from "@/modules/sql-editor/hooks/useSQLEditorState";+import { useSQLEditorEditorState } from "@/modules/sql-editor/store/editor";import {getSQLEditorTabsState,useIsDisconnected,useSQLEditorTabState,-} from "@/react/stores/sqlEditor/tab";+} from "@/modules/sql-editor/store/tab";type AdminModeButtonProps = {readonly size?: "sm" | "default";diff --git a/frontend/src/react/components/sql-editor/AsidePanel.tsx b/frontend/src/modules/sql-editor/components/AsidePanel.tsxsimilarity index 91%rename from frontend/src/react/components/sql-editor/AsidePanel.tsxrename to frontend/src/modules/sql-editor/components/AsidePanel.tsxindex 47a60a4705..63816b3a21 100644--- a/frontend/src/react/components/sql-editor/AsidePanel.tsx+++ b/frontend/src/modules/sql-editor/components/AsidePanel.tsx@@ -1,15 +1,15 @@import { useCallback, useEffect } from "react";import { useTranslation } from "react-i18next";-import { ProjectSelect } from "@/react/components/ProjectSelect";-import { RouterLink } from "@/react/components/RouterLink";-import { PROJECT_V1_ROUTE_DASHBOARD } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { useSQLEditorStore } from "@/react/stores/sqlEditor";+import { PROJECT_V1_ROUTE_DASHBOARD } from "@/app/router/handles";+import { ProjectSelect } from "@/components/ProjectSelect";+import { RouterLink } from "@/components/RouterLink";+import { useSQLEditorStore } from "@/modules/sql-editor/store";import {getSQLEditorEditorState,useSQLEditorEditorState,-} from "@/react/stores/sqlEditor/editor";-import { useIsDisconnected } from "@/react/stores/sqlEditor/tab";+} from "@/modules/sql-editor/store/editor";+import { useIsDisconnected } from "@/modules/sql-editor/store/tab";+import { useAppStore } from "@/stores/app";import { defaultProject, isValidProjectName } from "@/types";import { AccessPane } from "./AccessPane";import { ActionBar } from "./AsidePanel/ActionBar";diff --git a/frontend/src/react/components/sql-editor/AsidePanel/ActionBar.tsx b/frontend/src/modules/sql-editor/components/AsidePanel/ActionBar.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/AsidePanel/ActionBar.tsxrename to frontend/src/modules/sql-editor/components/AsidePanel/ActionBar.tsxdiff --git a/frontend/src/react/components/sql-editor/AsidePanel/ActionBarTabItem.tsx b/frontend/src/modules/sql-editor/components/AsidePanel/ActionBarTabItem.tsxsimilarity index 88%rename from frontend/src/react/components/sql-editor/AsidePanel/ActionBarTabItem.tsxrename to frontend/src/modules/sql-editor/components/AsidePanel/ActionBarTabItem.tsxindex e0608c7093..6dfcf1be76 100644--- a/frontend/src/react/components/sql-editor/AsidePanel/ActionBarTabItem.tsx+++ b/frontend/src/modules/sql-editor/components/AsidePanel/ActionBarTabItem.tsx@@ -1,8 +1,8 @@-import { Button } from "@/react/components/ui/button";-import { Tooltip } from "@/react/components/ui/tooltip";-import { useConnectionOfCurrentSQLEditorTab } from "@/react/hooks/useSQLEditorBridge";-import { cn } from "@/react/lib/utils";-import { useSQLEditorTabState } from "@/react/stores/sqlEditor/tab";+import { Button } from "@/components/ui/button";+import { Tooltip } from "@/components/ui/tooltip";+import { cn } from "@/lib/utils";+import { useConnectionOfCurrentSQLEditorTab } from "@/modules/sql-editor/hooks/useSQLEditorState";+import { useSQLEditorTabState } from "@/modules/sql-editor/store/tab";import { extractDatabaseResourceName } from "@/utils";import type { AvailableAction } from "../SchemaPane/actions";import { useSchemaPaneActions } from "../SchemaPane/actions";diff --git a/frontend/src/react/components/sql-editor/BatchQuerySelect.tsx b/frontend/src/modules/sql-editor/components/BatchQuerySelect.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/BatchQuerySelect.tsxrename to frontend/src/modules/sql-editor/components/BatchQuerySelect.tsxdiff --git a/frontend/src/react/components/sql-editor/ChooserGroup.test.tsx b/frontend/src/modules/sql-editor/components/ChooserGroup.test.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/ChooserGroup.test.tsxrename to frontend/src/modules/sql-editor/components/ChooserGroup.test.tsxdiff --git a/frontend/src/react/components/sql-editor/ChooserGroup.tsx b/frontend/src/modules/sql-editor/components/ChooserGroup.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/ChooserGroup.tsxrename to frontend/src/modules/sql-editor/components/ChooserGroup.tsxdiff --git a/frontend/src/react/components/sql-editor/CompactSQLEditor.tsx b/frontend/src/modules/sql-editor/components/CompactSQLEditor.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/CompactSQLEditor.tsxrename to frontend/src/modules/sql-editor/components/CompactSQLEditor.tsxdiff --git a/frontend/src/react/components/sql-editor/ConnectChooser.test.tsx b/frontend/src/modules/sql-editor/components/ConnectChooser.test.tsxsimilarity index 96%rename from frontend/src/react/components/sql-editor/ConnectChooser.test.tsxrename to frontend/src/modules/sql-editor/components/ConnectChooser.test.tsxindex 658fa57f94..d8c7f00e76 100644--- a/frontend/src/react/components/sql-editor/ConnectChooser.test.tsx+++ b/frontend/src/modules/sql-editor/components/ConnectChooser.test.tsx@@ -16,18 +16,18 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/react/components/ui/layer", () => ({+vi.mock("@/components/ui/layer", () => ({getLayerRoot: mocks.getLayerRoot,LAYER_SURFACE_CLASS: "layer-surface",}));-vi.mock("@/react/components/ui/combobox-position", () => ({+vi.mock("@/components/ui/combobox-position", () => ({getPortalDropdownStyle: vi.fn(() => ({ top: 100, left: 0, width: 200 })),isPortalDropdownStyleEqual: vi.fn(() => true),shouldIgnorePortalDropdownScroll: vi.fn(() => false),}));-vi.mock("@/react/components/ui/search-input", () => ({+vi.mock("@/components/ui/search-input", () => ({SearchInput: ({value,onChange,diff --git a/frontend/src/react/components/sql-editor/ConnectChooser.tsx b/frontend/src/modules/sql-editor/components/ConnectChooser.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/ConnectChooser.tsxrename to frontend/src/modules/sql-editor/components/ConnectChooser.tsxindex 3348b91f1e..dfc980709a 100644--- a/frontend/src/react/components/sql-editor/ConnectChooser.tsx+++ b/frontend/src/modules/sql-editor/components/ConnectChooser.tsx@@ -9,15 +9,15 @@ import {} from "react";import { createPortal } from "react-dom";import { useTranslation } from "react-i18next";-import type { ComboboxOption } from "@/react/components/ui/combobox";+import type { ComboboxOption } from "@/components/ui/combobox";import {getPortalDropdownStyle,isPortalDropdownStyleEqual,shouldIgnorePortalDropdownScroll,-} from "@/react/components/ui/combobox-position";-import { getLayerRoot, LAYER_SURFACE_CLASS } from "@/react/components/ui/layer";-import { SearchInput } from "@/react/components/ui/search-input";-import { cn } from "@/react/lib/utils";+} from "@/components/ui/combobox-position";+import { getLayerRoot, LAYER_SURFACE_CLASS } from "@/components/ui/layer";+import { SearchInput } from "@/components/ui/search-input";+import { cn } from "@/lib/utils";import { ConnectionChooserButton } from "./ConnectionChooserButton";export type { ComboboxOption };diff --git a/frontend/src/react/components/sql-editor/ConnectionChooserButton.tsx b/frontend/src/modules/sql-editor/components/ConnectionChooserButton.tsxsimilarity index 93%rename from frontend/src/react/components/sql-editor/ConnectionChooserButton.tsxrename to frontend/src/modules/sql-editor/components/ConnectionChooserButton.tsxindex c8cb25c676..0a71ddb86d 100644--- a/frontend/src/react/components/sql-editor/ConnectionChooserButton.tsx+++ b/frontend/src/modules/sql-editor/components/ConnectionChooserButton.tsx@@ -1,6 +1,6 @@import type { ComponentProps } from "react";-import { Button } from "@/react/components/ui/button";-import { cn } from "@/react/lib/utils";+import { Button } from "@/components/ui/button";+import { cn } from "@/lib/utils";/*** Trigger button shared by the SQL Editor connection controlsdiff --git a/frontend/src/react/components/sql-editor/ConnectionHolder.test.tsx b/frontend/src/modules/sql-editor/components/ConnectionHolder.test.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/ConnectionHolder.test.tsxrename to frontend/src/modules/sql-editor/components/ConnectionHolder.test.tsxindex 1e4272115e..1a089ab474 100644--- a/frontend/src/react/components/sql-editor/ConnectionHolder.test.tsx+++ b/frontend/src/modules/sql-editor/components/ConnectionHolder.test.tsx@@ -17,7 +17,7 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/react/stores/sqlEditor", () => ({+vi.mock("@/modules/sql-editor/store", () => ({useSQLEditorStore: mocks.useSQLEditorStore,}));diff --git a/frontend/src/react/components/sql-editor/ConnectionHolder.tsx b/frontend/src/modules/sql-editor/components/ConnectionHolder.tsxsimilarity index 89%rename from frontend/src/react/components/sql-editor/ConnectionHolder.tsxrename to frontend/src/modules/sql-editor/components/ConnectionHolder.tsxindex 07694027d1..6983a55686 100644--- a/frontend/src/react/components/sql-editor/ConnectionHolder.tsx+++ b/frontend/src/modules/sql-editor/components/ConnectionHolder.tsx@@ -1,7 +1,7 @@import { LinkIcon } from "lucide-react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { useSQLEditorStore } from "@/react/stores/sqlEditor";+import { Button } from "@/components/ui/button";+import { useSQLEditorStore } from "@/modules/sql-editor/store";/*** Replaces frontend/src/views/sql-editor/EditorCommon/ConnectionHolder.vue.diff --git a/frontend/src/react/components/sql-editor/ConnectionPane/ConnectionContextMenu.test.tsx b/frontend/src/modules/sql-editor/components/ConnectionPane/ConnectionContextMenu.test.tsxsimilarity index 98%rename from frontend/src/react/components/sql-editor/ConnectionPane/ConnectionContextMenu.test.tsxrename to frontend/src/modules/sql-editor/components/ConnectionPane/ConnectionContextMenu.test.tsxindex 1e1a225ea5..b98ad7a7cd 100644--- a/frontend/src/react/components/sql-editor/ConnectionPane/ConnectionContextMenu.test.tsx+++ b/frontend/src/modules/sql-editor/components/ConnectionPane/ConnectionContextMenu.test.tsx@@ -16,7 +16,7 @@ vi.mock("./actions", () => ({useConnectionMenu: mocks.useConnectionMenu,}));-vi.mock("@/react/components/ui/dropdown-menu", () => ({+vi.mock("@/components/ui/dropdown-menu", () => ({DropdownMenu: ({ children }: { children: React.ReactNode }) => (<div data-testid="dropdown-menu">{children}</div>),diff --git a/frontend/src/react/components/sql-editor/ConnectionPane/ConnectionContextMenu.tsx b/frontend/src/modules/sql-editor/components/ConnectionPane/ConnectionContextMenu.tsxsimilarity index 98%rename from frontend/src/react/components/sql-editor/ConnectionPane/ConnectionContextMenu.tsxrename to frontend/src/modules/sql-editor/components/ConnectionPane/ConnectionContextMenu.tsxindex 63d11b2090..9ac2724dff 100644--- a/frontend/src/react/components/sql-editor/ConnectionPane/ConnectionContextMenu.tsx+++ b/frontend/src/modules/sql-editor/components/ConnectionPane/ConnectionContextMenu.tsx@@ -5,7 +5,7 @@ import {DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";+} from "@/components/ui/dropdown-menu";import type { SQLEditorTreeNode } from "@/types";import { useConnectionMenu } from "./actions";diff --git a/frontend/src/react/components/sql-editor/ConnectionPane/ConnectionPane.test.tsx b/frontend/src/modules/sql-editor/components/ConnectionPane/ConnectionPane.test.tsxsimilarity index 92%rename from frontend/src/react/components/sql-editor/ConnectionPane/ConnectionPane.test.tsxrename to frontend/src/modules/sql-editor/components/ConnectionPane/ConnectionPane.test.tsxindex 65c06dd5fb..fffc23f552 100644--- a/frontend/src/react/components/sql-editor/ConnectionPane/ConnectionPane.test.tsx+++ b/frontend/src/modules/sql-editor/components/ConnectionPane/ConnectionPane.test.tsx@@ -108,40 +108,40 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/hooks/useSQLEditorBridge", () => ({+vi.mock("@/modules/sql-editor/hooks/useSQLEditorState", () => ({// FEATURE_BATCH_QUERY === 1, FEATURE_DATABASE_GROUPS === 2 (see the// subscription_service_pb mock below).useSQLEditorFeature: (feature: number) =>feature === 1 ? mocks.features.batchQuery : mocks.features.databaseGroups,}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useCurrentUser: () => mocks.currentUser,}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: mocks.pushNotification,}));-vi.mock("@/react/hooks/useAppProject", () => ({+vi.mock("@/hooks/useAppProject", () => ({useAppProject: () => mocks.project,}));-vi.mock("@/react/hooks/useAppDatabase", () => ({+vi.mock("@/hooks/useAppDatabase", () => ({useAppDatabase: (name: string) => ({name,instanceResource: { engine: 0, title: "", name: "" },}),}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: Object.assign((selector: (state: unknown) => unknown) => selector(mocks.appStore),{ getState: () => mocks.appStore, subscribe: () => () => {} }),}));-vi.mock("@/react/stores/sqlEditor/tab", () => ({+vi.mock("@/modules/sql-editor/store/tab", () => ({useSupportBatchMode: () => mocks.tabStore.supportBatchMode,useIsInBatchMode: () => mocks.tabStore.isInBatchMode,useCurrentSQLEditorTab: () => mocks.tabStore.currentTab,@@ -158,7 +158,7 @@ vi.mock("@/react/stores/sqlEditor/tab", () => ({}),}));-vi.mock("@/react/stores/sqlEditor/editor", () => ({+vi.mock("@/modules/sql-editor/store/editor", () => ({useSQLEditorEditorState: (selector: (s: { project: string; projectContextReady: boolean }) => unknown) =>@@ -168,7 +168,7 @@ vi.mock("@/react/stores/sqlEditor/editor", () => ({}),}));-vi.mock("@/react/stores/sqlEditor", () => ({+vi.mock("@/modules/sql-editor/store", () => ({useSQLEditorStore: (selector: (s: {setShowConnectionPanel: (v: boolean) => void;@@ -189,11 +189,11 @@ vi.mock("@/react/stores/sqlEditor", () => ({}),}));-vi.mock("@/react/lib/resourceName", () => ({+vi.mock("@/lib/resourceName", () => ({instanceNamePrefix: "instances/",}));-vi.mock("@/views/sql-editor/events", () => ({+vi.mock("@/modules/sql-editor/model/events", () => ({sqlEditorEvents: {emit: vi.fn(),on: vi.fn(() => () => {}),@@ -262,16 +262,16 @@ vi.mock("@/components/InstanceForm/constants", () => ({EngineIconPath: { MYSQL: "/mysql.svg" },}));-vi.mock("@/react/components/FeatureBadge", () => ({+vi.mock("@/components/FeatureBadge", () => ({FeatureBadge: () => null,}));-vi.mock("@/react/components/ui/feature-modal", () => ({+vi.mock("@/components/ui/feature-modal", () => ({FeatureModal: ({ open, feature }: { open: boolean; feature: unknown }) =>open && feature ? <div data-testid="feature-modal" /> : null,}));-vi.mock("@/react/components/ui/radio-group", () => ({+vi.mock("@/components/ui/radio-group", () => ({RadioGroup: ({ children }: { children: React.ReactNode }) => (<div data-testid="radio-group">{children}</div>),@@ -280,20 +280,20 @@ vi.mock("@/react/components/ui/radio-group", () => ({),}));-vi.mock("@/react/components/ui/separator", () => ({+vi.mock("@/components/ui/separator", () => ({Separator: () => <hr data-testid="separator" />,}));-vi.mock("@/react/components/AdvancedSearch", () => ({+vi.mock("@/components/AdvancedSearch", () => ({AdvancedSearch: () => <div data-testid="advanced-search" />,emptySearchParams: () => ({ query: "", scopes: [] }),}));-vi.mock("@/react/components/useCommonSearchScopeOptions", () => ({+vi.mock("@/components/useCommonSearchScopeOptions", () => ({useCommonSearchScopeOptions: () => [],}));-vi.mock("@/react/components/ui/tabs", () => ({+vi.mock("@/components/ui/tabs", () => ({Tabs: ({value,onValueChange,@@ -344,11 +344,11 @@ vi.mock("@/react/components/ui/tabs", () => ({}) => <div data-testid={`tab-panel-${value}`}>{children}</div>,}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: ({ children }: { children: React.ReactNode }) => <>{children}</>,}));-vi.mock("@/react/components/ui/tree", () => ({+vi.mock("@/components/ui/tree", () => ({Tree: ({ data }: { data: unknown[] }) => (<div data-testid="tree" data-len={data.length} />),@@ -362,7 +362,7 @@ vi.mock("./ConnectionContextMenu", () => ({ConnectionContextMenu: () => <div data-testid="context-menu" />,}));-vi.mock("@/react/components/DatabaseGroupTable", () => ({+vi.mock("@/components/DatabaseGroupTable", () => ({DatabaseGroupTable: () => <div data-testid="db-group-table" />,}));diff --git a/frontend/src/react/components/sql-editor/ConnectionPane/ConnectionPane.tsx b/frontend/src/modules/sql-editor/components/ConnectionPane/ConnectionPane.tsxsimilarity index 96%rename from frontend/src/react/components/sql-editor/ConnectionPane/ConnectionPane.tsxrename to frontend/src/modules/sql-editor/components/ConnectionPane/ConnectionPane.tsxindex 486486df00..540f46ce11 100644--- a/frontend/src/react/components/sql-editor/ConnectionPane/ConnectionPane.tsx+++ b/frontend/src/modules/sql-editor/components/ConnectionPane/ConnectionPane.tsx@@ -7,40 +7,36 @@ import {AdvancedSearch,emptySearchParams,type SearchParams,-} from "@/react/components/AdvancedSearch";-import { DatabaseGroupTable } from "@/react/components/DatabaseGroupTable";-import { EngineIcon } from "@/react/components/EngineIcon";-import { FeatureBadge } from "@/react/components/FeatureBadge";-import { Checkbox } from "@/react/components/ui/checkbox";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";-import { Separator } from "@/react/components/ui/separator";-import {- Tabs,- TabsList,- TabsPanel,- TabsTrigger,-} from "@/react/components/ui/tabs";-import { Tooltip } from "@/react/components/ui/tooltip";-import { Tree, type TreeDataNode } from "@/react/components/ui/tree";-import { countVisibleRows } from "@/react/components/ui/tree-utils";-import { useCommonSearchScopeOptions } from "@/react/components/useCommonSearchScopeOptions";-import { useAppDatabase } from "@/react/hooks/useAppDatabase";-import { useAppProject } from "@/react/hooks/useAppProject";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { useSQLEditorFeature } from "@/react/hooks/useSQLEditorBridge";-import type { DatabaseFilter } from "@/react/lib/databaseFilter";-import { instanceNamePrefix } from "@/react/lib/resourceName";-import { getConnectionForSQLEditorTab } from "@/react/lib/sqlEditorConnection";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";-import { useSQLEditorStore } from "@/react/stores/sqlEditor";-import { useSQLEditorEditorState } from "@/react/stores/sqlEditor/editor";+} from "@/components/AdvancedSearch";+import { DatabaseGroupTable } from "@/components/DatabaseGroupTable";+import { EngineIcon } from "@/components/EngineIcon";+import { FeatureBadge } from "@/components/FeatureBadge";+import { Checkbox } from "@/components/ui/checkbox";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";+import { Separator } from "@/components/ui/separator";+import { Tabs, TabsList, TabsPanel, TabsTrigger } from "@/components/ui/tabs";+import { Tooltip } from "@/components/ui/tooltip";+import { Tree, type TreeDataNode } from "@/components/ui/tree";+import { countVisibleRows } from "@/components/ui/tree-utils";+import { useCommonSearchScopeOptions } from "@/components/useCommonSearchScopeOptions";+import { useAppDatabase } from "@/hooks/useAppDatabase";+import { useAppProject } from "@/hooks/useAppProject";+import { useCurrentUser } from "@/hooks/useAppState";+import type { DatabaseFilter } from "@/lib/databaseFilter";+import { instanceNamePrefix } from "@/lib/resourceName";+import { getConnectionForSQLEditorTab } from "@/lib/sqlEditorConnection";+import { cn } from "@/lib/utils";+import { useSQLEditorFeature } from "@/modules/sql-editor/hooks/useSQLEditorState";+import { sqlEditorEvents } from "@/modules/sql-editor/model/events";+import { useSQLEditorStore } from "@/modules/sql-editor/store";+import { useSQLEditorEditorState } from "@/modules/sql-editor/store/editor";import {getSQLEditorTabsState,useCurrentSQLEditorTab,useIsInBatchMode,useSupportBatchMode,-} from "@/react/stores/sqlEditor/tab";+} from "@/modules/sql-editor/store/tab";+import { useAppStore } from "@/stores/app";import type {BatchQueryContext,QueryDataSourceType,@@ -65,7 +61,6 @@ import {getValuesFromSearchParams,instanceV1Name,} from "@/utils";-import { sqlEditorEvents } from "@/views/sql-editor/events";import { setConnection } from "./actions";import {ConnectionContextMenu,diff --git a/frontend/src/react/components/sql-editor/ConnectionPane/DatabaseGroupTag.test.tsx b/frontend/src/modules/sql-editor/components/ConnectionPane/DatabaseGroupTag.test.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/ConnectionPane/DatabaseGroupTag.test.tsxrename to frontend/src/modules/sql-editor/components/ConnectionPane/DatabaseGroupTag.test.tsxindex 775cb725c9..cea28c71bc 100644--- a/frontend/src/react/components/sql-editor/ConnectionPane/DatabaseGroupTag.test.tsx+++ b/frontend/src/modules/sql-editor/components/ConnectionPane/DatabaseGroupTag.test.tsx@@ -16,7 +16,7 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const state = {fetchDBGroup: mocks.fetchDBGroup,// Proxy so `dbGroupsByName[name]` resolves through the per-test@@ -38,7 +38,7 @@ vi.mock("@/types/proto-es/v1/database_group_service_pb", () => ({DatabaseGroupView: { FULL: 2 },}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: ({ children }: { children: React.ReactNode }) => <>{children}</>,}));diff --git a/frontend/src/react/components/sql-editor/ConnectionPane/DatabaseGroupTag.tsx b/frontend/src/modules/sql-editor/components/ConnectionPane/DatabaseGroupTag.tsxsimilarity index 93%rename from frontend/src/react/components/sql-editor/ConnectionPane/DatabaseGroupTag.tsxrename to frontend/src/modules/sql-editor/components/ConnectionPane/DatabaseGroupTag.tsxindex aa300a7b22..0eba1b325a 100644--- a/frontend/src/react/components/sql-editor/ConnectionPane/DatabaseGroupTag.tsx+++ b/frontend/src/modules/sql-editor/components/ConnectionPane/DatabaseGroupTag.tsx@@ -1,9 +1,9 @@import { Boxes, X } from "lucide-react";import { useEffect } from "react";import { useTranslation } from "react-i18next";-import { Tooltip } from "@/react/components/ui/tooltip";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";+import { Tooltip } from "@/components/ui/tooltip";+import { cn } from "@/lib/utils";+import { useAppStore } from "@/stores/app";import { DatabaseGroupView } from "@/types/proto-es/v1/database_group_service_pb";type Props = {diff --git a/frontend/src/react/components/sql-editor/ConnectionPane/DatabaseHoverPanel/DatabaseHoverPanel.test.tsx b/frontend/src/modules/sql-editor/components/ConnectionPane/DatabaseHoverPanel/DatabaseHoverPanel.test.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/ConnectionPane/DatabaseHoverPanel/DatabaseHoverPanel.test.tsxrename to frontend/src/modules/sql-editor/components/ConnectionPane/DatabaseHoverPanel/DatabaseHoverPanel.test.tsxindex 47e47546b6..dff6b9af2f 100644--- a/frontend/src/react/components/sql-editor/ConnectionPane/DatabaseHoverPanel/DatabaseHoverPanel.test.tsx+++ b/frontend/src/modules/sql-editor/components/ConnectionPane/DatabaseHoverPanel/DatabaseHoverPanel.test.tsx@@ -27,9 +27,9 @@ vi.mock("./hover-state", () => ({useHoverState: mocks.useHoverState,}));-vi.mock("@/store", () => ({}));+vi.mock("@/stores", () => ({}));-vi.mock("@/react/stores/sqlEditor/editor-vue-state", () => ({+vi.mock("@/modules/sql-editor/store/editor-vue-state", () => ({useSQLEditorVueState: () => ({ project: "" }),}));@@ -45,13 +45,13 @@ vi.mock("@/utils", () => ({projectV1Name: (p: { title: string }) => p.title,}));-vi.mock("@/react/components/EnvironmentLabel", () => ({+vi.mock("@/components/EnvironmentLabel", () => ({EnvironmentLabel: ({ environmentName }: { environmentName: string }) => (<span data-testid="env-label">{environmentName}</span>),}));-vi.mock("@/react/components/ui/layer", () => ({+vi.mock("@/components/ui/layer", () => ({getLayerRoot: () => document.body,LAYER_SURFACE_CLASS: "",}));diff --git a/frontend/src/react/components/sql-editor/ConnectionPane/DatabaseHoverPanel/DatabaseHoverPanel.tsx b/frontend/src/modules/sql-editor/components/ConnectionPane/DatabaseHoverPanel/DatabaseHoverPanel.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/ConnectionPane/DatabaseHoverPanel/DatabaseHoverPanel.tsxrename to frontend/src/modules/sql-editor/components/ConnectionPane/DatabaseHoverPanel/DatabaseHoverPanel.tsxindex 15ca45d9d4..f9795925f2 100644--- a/frontend/src/react/components/sql-editor/ConnectionPane/DatabaseHoverPanel/DatabaseHoverPanel.tsx+++ b/frontend/src/modules/sql-editor/components/ConnectionPane/DatabaseHoverPanel/DatabaseHoverPanel.tsx@@ -1,10 +1,10 @@import { useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";import { createPortal } from "react-dom";import { useTranslation } from "react-i18next";-import { EnvironmentLabel } from "@/react/components/EnvironmentLabel";-import { getLayerRoot, LAYER_SURFACE_CLASS } from "@/react/components/ui/layer";-import { cn } from "@/react/lib/utils";-import { useSQLEditorEditorState } from "@/react/stores/sqlEditor/editor";+import { EnvironmentLabel } from "@/components/EnvironmentLabel";+import { getLayerRoot, LAYER_SURFACE_CLASS } from "@/components/ui/layer";+import { cn } from "@/lib/utils";+import { useSQLEditorEditorState } from "@/modules/sql-editor/store/editor";import type { Position, SQLEditorTreeNode } from "@/types";import {getDatabaseProject,diff --git a/frontend/src/react/components/sql-editor/ConnectionPane/DatabaseHoverPanel/hover-state.ts b/frontend/src/modules/sql-editor/components/ConnectionPane/DatabaseHoverPanel/hover-state.tssimilarity index 100%rename from frontend/src/react/components/sql-editor/ConnectionPane/DatabaseHoverPanel/hover-state.tsrename to frontend/src/modules/sql-editor/components/ConnectionPane/DatabaseHoverPanel/hover-state.tsdiff --git a/frontend/src/react/components/sql-editor/ConnectionPane/TreeNode/DatabaseNode.test.tsx b/frontend/src/modules/sql-editor/components/ConnectionPane/TreeNode/DatabaseNode.test.tsxsimilarity index 94%rename from frontend/src/react/components/sql-editor/ConnectionPane/TreeNode/DatabaseNode.test.tsxrename to frontend/src/modules/sql-editor/components/ConnectionPane/TreeNode/DatabaseNode.test.tsxindex d58f8c5481..2e00d2c5a4 100644--- a/frontend/src/react/components/sql-editor/ConnectionPane/TreeNode/DatabaseNode.test.tsx+++ b/frontend/src/modules/sql-editor/components/ConnectionPane/TreeNode/DatabaseNode.test.tsx@@ -17,13 +17,13 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/store", () => ({}));+vi.mock("@/stores", () => ({}));-vi.mock("@/react/stores/sqlEditor/tab", () => ({+vi.mock("@/modules/sql-editor/store/tab", () => ({useSupportBatchMode: mocks.useSupportBatchMode,}));-vi.mock("@/react/components/instance/constants", () => ({+vi.mock("@/components/instance/constants", () => ({EngineIconPath: { MYSQL: "/icon/mysql.svg" },}));@@ -40,7 +40,7 @@ vi.mock("@/utils", () => ({isDatabaseV1Queryable: () => true,}));-vi.mock("@/react/components/sql-editor/RequestQueryButton", () => ({+vi.mock("@/modules/sql-editor/components/RequestQueryButton", () => ({RequestQueryButton: () => (<div data-testid="request-query-button">request</div>),@@ -54,7 +54,7 @@ vi.mock("@/types/proto-es/v1/common_pb", () => ({PermissionDeniedDetailSchema: { typeName: "PermissionDeniedDetailSchema" },}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: ({ children }: { children: React.ReactNode }) => <>{children}</>,}));diff --git a/frontend/src/react/components/sql-editor/ConnectionPane/TreeNode/DatabaseNode.tsx b/frontend/src/modules/sql-editor/components/ConnectionPane/TreeNode/DatabaseNode.tsxsimilarity index 90%rename from frontend/src/react/components/sql-editor/ConnectionPane/TreeNode/DatabaseNode.tsxrename to frontend/src/modules/sql-editor/components/ConnectionPane/TreeNode/DatabaseNode.tsxindex b6ceffd9cb..72256740f1 100644--- a/frontend/src/react/components/sql-editor/ConnectionPane/TreeNode/DatabaseNode.tsx+++ b/frontend/src/modules/sql-editor/components/ConnectionPane/TreeNode/DatabaseNode.tsx@@ -1,12 +1,12 @@import { create } from "@bufbuild/protobuf";import { ChevronRight } from "lucide-react";-import { EngineIcon } from "@/react/components/EngineIcon";-import { HighlightLabelText } from "@/react/components/HighlightLabelText";-import { RequestQueryButton } from "@/react/components/sql-editor/RequestQueryButton";-import { Checkbox } from "@/react/components/ui/checkbox";-import { Tooltip } from "@/react/components/ui/tooltip";-import { cn } from "@/react/lib/utils";-import { useSupportBatchMode } from "@/react/stores/sqlEditor/tab";+import { EngineIcon } from "@/components/EngineIcon";+import { HighlightLabelText } from "@/components/HighlightLabelText";+import { Checkbox } from "@/components/ui/checkbox";+import { Tooltip } from "@/components/ui/tooltip";+import { cn } from "@/lib/utils";+import { RequestQueryButton } from "@/modules/sql-editor/components/RequestQueryButton";+import { useSupportBatchMode } from "@/modules/sql-editor/store/tab";import type { SQLEditorTreeNode } from "@/types";import { PermissionDeniedDetailSchema } from "@/types/proto-es/v1/common_pb";import {diff --git a/frontend/src/react/components/sql-editor/ConnectionPane/TreeNode/InstanceNode.test.tsx b/frontend/src/modules/sql-editor/components/ConnectionPane/TreeNode/InstanceNode.test.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/ConnectionPane/TreeNode/InstanceNode.test.tsxrename to frontend/src/modules/sql-editor/components/ConnectionPane/TreeNode/InstanceNode.test.tsxindex 476a7798e8..b4fdbf399a 100644--- a/frontend/src/react/components/sql-editor/ConnectionPane/TreeNode/InstanceNode.test.tsx+++ b/frontend/src/modules/sql-editor/components/ConnectionPane/TreeNode/InstanceNode.test.tsx@@ -17,7 +17,7 @@ vi.mock("@/utils", () => ({instanceV1Name: (inst: { title: string }) => inst.title,}));-vi.mock("@/react/components/instance/constants", () => ({+vi.mock("@/components/instance/constants", () => ({EngineIconPath: {MYSQL: "/icon/mysql.svg",UNSUPPORTED: "",diff --git a/frontend/src/react/components/sql-editor/ConnectionPane/TreeNode/InstanceNode.tsx b/frontend/src/modules/sql-editor/components/ConnectionPane/TreeNode/InstanceNode.tsxsimilarity index 89%rename from frontend/src/react/components/sql-editor/ConnectionPane/TreeNode/InstanceNode.tsxrename to frontend/src/modules/sql-editor/components/ConnectionPane/TreeNode/InstanceNode.tsxindex c3eaafef3f..7b2e27e857 100644--- a/frontend/src/react/components/sql-editor/ConnectionPane/TreeNode/InstanceNode.tsx+++ b/frontend/src/modules/sql-editor/components/ConnectionPane/TreeNode/InstanceNode.tsx@@ -1,5 +1,5 @@-import { EngineIcon } from "@/react/components/EngineIcon";-import { HighlightLabelText } from "@/react/components/HighlightLabelText";+import { EngineIcon } from "@/components/EngineIcon";+import { HighlightLabelText } from "@/components/HighlightLabelText";import type { SQLEditorTreeNode } from "@/types";import { instanceV1Name } from "@/utils";diff --git a/frontend/src/react/components/sql-editor/ConnectionPane/TreeNode/Label.test.tsx b/frontend/src/modules/sql-editor/components/ConnectionPane/TreeNode/Label.test.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/ConnectionPane/TreeNode/Label.test.tsxrename to frontend/src/modules/sql-editor/components/ConnectionPane/TreeNode/Label.test.tsxindex ddc9391941..2391ce295a 100644--- a/frontend/src/react/components/sql-editor/ConnectionPane/TreeNode/Label.test.tsx+++ b/frontend/src/modules/sql-editor/components/ConnectionPane/TreeNode/Label.test.tsx@@ -17,7 +17,7 @@ vi.mock("./DatabaseNode", () => ({vi.mock("./LabelNode", () => ({LabelNode: () => <div data-testid="LabelNode" />,}));-vi.mock("@/react/hooks/useSQLEditorBridge", () => ({+vi.mock("@/modules/sql-editor/hooks/useSQLEditorState", () => ({useSQLEditorFeature: () => false,}));vi.mock("@/types/proto-es/v1/subscription_service_pb", () => ({diff --git a/frontend/src/react/components/sql-editor/ConnectionPane/TreeNode/Label.tsx b/frontend/src/modules/sql-editor/components/ConnectionPane/TreeNode/Label.tsxsimilarity index 94%rename from frontend/src/react/components/sql-editor/ConnectionPane/TreeNode/Label.tsxrename to frontend/src/modules/sql-editor/components/ConnectionPane/TreeNode/Label.tsxindex b34efc0968..ce6de8fab5 100644--- a/frontend/src/react/components/sql-editor/ConnectionPane/TreeNode/Label.tsx+++ b/frontend/src/modules/sql-editor/components/ConnectionPane/TreeNode/Label.tsx@@ -1,8 +1,8 @@import { ShieldAlert } from "lucide-react";import { useTranslation } from "react-i18next";-import { HighlightLabelText } from "@/react/components/HighlightLabelText";-import { useSQLEditorFeature } from "@/react/hooks/useSQLEditorBridge";-import { cn } from "@/react/lib/utils";+import { HighlightLabelText } from "@/components/HighlightLabelText";+import { cn } from "@/lib/utils";+import { useSQLEditorFeature } from "@/modules/sql-editor/hooks/useSQLEditorState";import type { SQLEditorTreeNode } from "@/types";import {DEFAULT_ENVIRONMENT_COLOR,diff --git a/frontend/src/react/components/sql-editor/ConnectionPane/TreeNode/LabelNode.test.tsx b/frontend/src/modules/sql-editor/components/ConnectionPane/TreeNode/LabelNode.test.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/ConnectionPane/TreeNode/LabelNode.test.tsxrename to frontend/src/modules/sql-editor/components/ConnectionPane/TreeNode/LabelNode.test.tsxdiff --git a/frontend/src/react/components/sql-editor/ConnectionPane/TreeNode/LabelNode.tsx b/frontend/src/modules/sql-editor/components/ConnectionPane/TreeNode/LabelNode.tsxsimilarity index 91%rename from frontend/src/react/components/sql-editor/ConnectionPane/TreeNode/LabelNode.tsxrename to frontend/src/modules/sql-editor/components/ConnectionPane/TreeNode/LabelNode.tsxindex e42dcc86c0..7ca0062615 100644--- a/frontend/src/react/components/sql-editor/ConnectionPane/TreeNode/LabelNode.tsx+++ b/frontend/src/modules/sql-editor/components/ConnectionPane/TreeNode/LabelNode.tsx@@ -1,5 +1,5 @@import { useTranslation } from "react-i18next";-import { HighlightLabelText } from "@/react/components/HighlightLabelText";+import { HighlightLabelText } from "@/components/HighlightLabelText";import type { SQLEditorTreeNode } from "@/types";type Props = {diff --git a/frontend/src/react/components/sql-editor/ConnectionPane/actions.test.tsx b/frontend/src/modules/sql-editor/components/ConnectionPane/actions.test.tsxsimilarity index 93%rename from frontend/src/react/components/sql-editor/ConnectionPane/actions.test.tsxrename to frontend/src/modules/sql-editor/components/ConnectionPane/actions.test.tsxindex c1b1da072d..034fa8a662 100644--- a/frontend/src/react/components/sql-editor/ConnectionPane/actions.test.tsx+++ b/frontend/src/modules/sql-editor/components/ConnectionPane/actions.test.tsx@@ -19,13 +19,13 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/store", () => ({}));+vi.mock("@/stores", () => ({}));-vi.mock("@/react/hooks/useSQLEditorBridge", () => ({+vi.mock("@/modules/sql-editor/hooks/useSQLEditorState", () => ({useSQLEditorAllowAdmin: () => mocks.allowAdmin,}));-vi.mock("@/react/stores/sqlEditor/editor", () => ({+vi.mock("@/modules/sql-editor/store/editor", () => ({useSQLEditorEditorState: (selector: (s: { project: string }) => unknown) =>selector({ project: "projects/p" }),// `tab.ts` (pulled in via `getSQLEditorTabsState`) subscribes to the@@ -35,7 +35,7 @@ vi.mock("@/react/stores/sqlEditor/editor", () => ({subscribeSQLEditorEditorState: () => () => {},}));-vi.mock("@/react/stores/sqlEditor", () => ({+vi.mock("@/modules/sql-editor/store", () => ({useSQLEditorStore: Object.assign((selector: (s: { setShowConnectionPanel: (v: boolean) => void }) => unknown@@ -53,12 +53,12 @@ vi.mock("@/react/stores/sqlEditor", () => ({),}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: { resolve: vi.fn(() => ({ href: "/x" })) },}));-vi.mock("@/views/sql-editor/events", () => ({+vi.mock("@/modules/sql-editor/model/events", () => ({sqlEditorEvents: { emit: mocks.sqlEditorEventsEmit },}));@@ -84,7 +84,7 @@ vi.mock("@/types", async () => {// The SQL-editor tab/worksheet stores now transitively load the Zustand// app store (eagerly created). Stub it so the real `createAppStore()`// (which reads `@/types` exports this test doesn't mock) never runs.-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const useAppStore = Object.assign((selector?: (state: unknown) => unknown) => (selector ? selector({}) : {}),{ getState: () => ({}), subscribe: () => () => {} }diff --git a/frontend/src/react/components/sql-editor/ConnectionPane/actions.tsx b/frontend/src/modules/sql-editor/components/ConnectionPane/actions.tsxsimilarity index 92%rename from frontend/src/react/components/sql-editor/ConnectionPane/actions.tsxrename to frontend/src/modules/sql-editor/components/ConnectionPane/actions.tsxindex 6e707c00a9..c263d20297 100644--- a/frontend/src/react/components/sql-editor/ConnectionPane/actions.tsx+++ b/frontend/src/modules/sql-editor/components/ConnectionPane/actions.tsx@@ -6,12 +6,13 @@ import {} from "lucide-react";import { useCallback, useMemo } from "react";import { useTranslation } from "react-i18next";-import { useSQLEditorAllowAdmin } from "@/react/hooks/useSQLEditorBridge";-import { router } from "@/react/router";-import { PROJECT_V1_ROUTE_DATABASE_DETAIL } from "@/react/router/handles";-import { useSQLEditorStore } from "@/react/stores/sqlEditor";-import { useSQLEditorEditorState } from "@/react/stores/sqlEditor/editor";-import { getSQLEditorTabsState } from "@/react/stores/sqlEditor/tab";+import { router } from "@/app/router";+import { PROJECT_V1_ROUTE_DATABASE_DETAIL } from "@/app/router/handles";+import { useSQLEditorAllowAdmin } from "@/modules/sql-editor/hooks/useSQLEditorState";+import { sqlEditorEvents } from "@/modules/sql-editor/model/events";+import { useSQLEditorStore } from "@/modules/sql-editor/store";+import { useSQLEditorEditorState } from "@/modules/sql-editor/store/editor";+import { getSQLEditorTabsState } from "@/modules/sql-editor/store/tab";import type {BatchQueryContext,SQLEditorConnection,@@ -31,7 +32,6 @@ import {instanceV1HasAlterSchema,instanceV1HasReadonlyMode,} from "@/utils";-import { sqlEditorEvents } from "@/views/sql-editor/events";type ActionKey =| "connect"diff --git a/frontend/src/react/components/sql-editor/ConnectionPane/tree.ts b/frontend/src/modules/sql-editor/components/ConnectionPane/tree.tssimilarity index 96%rename from frontend/src/react/components/sql-editor/ConnectionPane/tree.tsrename to frontend/src/modules/sql-editor/components/ConnectionPane/tree.tsindex 922522b141..c251951001 100644--- a/frontend/src/react/components/sql-editor/ConnectionPane/tree.ts+++ b/frontend/src/modules/sql-editor/components/ConnectionPane/tree.ts@@ -1,11 +1,11 @@import { useCallback, useEffect, useMemo, useRef, useState } from "react";-import type { DatabaseFilter } from "@/react/lib/databaseFilter";-import { useAppStore } from "@/react/stores/app";-import { useSQLEditorEditorState } from "@/react/stores/sqlEditor/editor";+import type { DatabaseFilter } from "@/lib/databaseFilter";+import { useSQLEditorEditorState } from "@/modules/sql-editor/store/editor";import {buildTreeImpl,mapTreeNodeByType,-} from "@/react/stores/sqlEditor/tree-utils";+} from "@/modules/sql-editor/store/tree-utils";+import { useAppStore } from "@/stores/app";import type {SQLEditorTreeNode,StatefulSQLEditorTreeFactor as StatefulFactor,diff --git a/frontend/src/react/components/sql-editor/ConnectionPanel.test.tsx b/frontend/src/modules/sql-editor/components/ConnectionPanel.test.tsxsimilarity index 94%rename from frontend/src/react/components/sql-editor/ConnectionPanel.test.tsxrename to frontend/src/modules/sql-editor/components/ConnectionPanel.test.tsxindex b0da2c6bb3..a9c333ac7b 100644--- a/frontend/src/react/components/sql-editor/ConnectionPanel.test.tsx+++ b/frontend/src/modules/sql-editor/components/ConnectionPanel.test.tsx@@ -23,12 +23,12 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: { push: mocks.routerPush },}));-vi.mock("@/react/stores/sqlEditor", () => ({+vi.mock("@/modules/sql-editor/store", () => ({useSQLEditorStore: (selector: (s: {showConnectionPanel: boolean;@@ -45,7 +45,7 @@ vi.mock("@/utils", () => ({hasWorkspacePermissionV2: mocks.hasWorkspacePermissionV2,}));-vi.mock("@/react/components/ui/sheet", () => ({+vi.mock("@/components/ui/sheet", () => ({Sheet: ({open,children,@@ -79,11 +79,11 @@ vi.mock("@/react/components/ui/sheet", () => ({),}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: ({ children }: { children: React.ReactNode }) => <>{children}</>,}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,onClick,@@ -110,7 +110,7 @@ vi.mock("./ConnectionPane/ConnectionPane", () => ({),}));-vi.mock("@/react/components/ui/feature-modal", () => ({+vi.mock("@/components/ui/feature-modal", () => ({FeatureModal: ({ open }: { open: boolean }) =>open ? <div data-testid="feature-modal" /> : null,}));diff --git a/frontend/src/react/components/sql-editor/ConnectionPanel.tsx b/frontend/src/modules/sql-editor/components/ConnectionPanel.tsxsimilarity index 90%rename from frontend/src/react/components/sql-editor/ConnectionPanel.tsxrename to frontend/src/modules/sql-editor/components/ConnectionPanel.tsxindex 95e9bff830..e9ff267cf6 100644--- a/frontend/src/react/components/sql-editor/ConnectionPanel.tsx+++ b/frontend/src/modules/sql-editor/components/ConnectionPanel.tsx@@ -1,20 +1,20 @@import { Settings } from "lucide-react";import { useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { FeatureModal } from "@/react/components/ui/feature-modal";+import { router } from "@/app/router";+import { INSTANCE_ROUTE_DASHBOARD } from "@/app/router/handles";+import { Button } from "@/components/ui/button";+import { FeatureModal } from "@/components/ui/feature-modal";import {Sheet,SheetBody,SheetContent,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { Tooltip } from "@/react/components/ui/tooltip";-import { cn } from "@/react/lib/utils";-import { router } from "@/react/router";-import { INSTANCE_ROUTE_DASHBOARD } from "@/react/router/handles";-import { useSQLEditorStore } from "@/react/stores/sqlEditor";+} from "@/components/ui/sheet";+import { Tooltip } from "@/components/ui/tooltip";+import { cn } from "@/lib/utils";+import { useSQLEditorStore } from "@/modules/sql-editor/store";import type { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { hasWorkspacePermissionV2 } from "@/utils";import { ConnectionPane } from "./ConnectionPane/ConnectionPane";diff --git a/frontend/src/react/components/sql-editor/ContainerChooser.test.tsx b/frontend/src/modules/sql-editor/components/ContainerChooser.test.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/ContainerChooser.test.tsxrename to frontend/src/modules/sql-editor/components/ContainerChooser.test.tsxindex 4a556f4a23..1be0dae131 100644--- a/frontend/src/react/components/sql-editor/ContainerChooser.test.tsx+++ b/frontend/src/modules/sql-editor/components/ContainerChooser.test.tsx@@ -28,15 +28,15 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/react/hooks/useAppDatabaseMetadata", () => ({+vi.mock("@/hooks/useAppDatabaseMetadata", () => ({useAppDatabaseMetadata: () => mocks.metadata,}));-vi.mock("@/react/hooks/useSQLEditorBridge", () => ({+vi.mock("@/modules/sql-editor/hooks/useSQLEditorState", () => ({useConnectionOfCurrentSQLEditorTab: mocks.useConnectionOfCurrentSQLEditorTab,}));-vi.mock("@/react/stores/sqlEditor/tab", () => ({+vi.mock("@/modules/sql-editor/store/tab", () => ({useSQLEditorTabState: (selector: (s: {currentTabId: string;@@ -52,8 +52,8 @@ vi.mock("@/react/stores/sqlEditor/tab", () => ({getSQLEditorTabsState: mocks.getSQLEditorTabsState,}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: mocks.router,}));diff --git a/frontend/src/react/components/sql-editor/ContainerChooser.tsx b/frontend/src/modules/sql-editor/components/ContainerChooser.tsxsimilarity index 90%rename from frontend/src/react/components/sql-editor/ContainerChooser.tsxrename to frontend/src/modules/sql-editor/components/ContainerChooser.tsxindex e071f64ab5..9f0db1bf3e 100644--- a/frontend/src/react/components/sql-editor/ContainerChooser.tsx+++ b/frontend/src/modules/sql-editor/components/ContainerChooser.tsx@@ -1,12 +1,12 @@import { useEffect, useMemo } from "react";import { useTranslation } from "react-i18next";-import { useAppDatabaseMetadata } from "@/react/hooks/useAppDatabaseMetadata";-import { useReactiveRoute } from "@/react/hooks/useReactiveRoute";-import { useConnectionOfCurrentSQLEditorTab } from "@/react/hooks/useSQLEditorBridge";+import { useAppDatabaseMetadata } from "@/hooks/useAppDatabaseMetadata";+import { useReactiveRoute } from "@/hooks/useReactiveRoute";+import { useConnectionOfCurrentSQLEditorTab } from "@/modules/sql-editor/hooks/useSQLEditorState";import {getSQLEditorTabsState,useSQLEditorTabState,-} from "@/react/stores/sqlEditor/tab";+} from "@/modules/sql-editor/store/tab";import { Engine } from "@/types/proto-es/v1/common_pb";import { ConnectChooser } from "./ConnectChooser";diff --git a/frontend/src/react/components/sql-editor/DatabaseChooser.test.tsx b/frontend/src/modules/sql-editor/components/DatabaseChooser.test.tsxsimilarity index 94%rename from frontend/src/react/components/sql-editor/DatabaseChooser.test.tsxrename to frontend/src/modules/sql-editor/components/DatabaseChooser.test.tsxindex 08662c17f8..a9c0429061 100644--- a/frontend/src/react/components/sql-editor/DatabaseChooser.test.tsx+++ b/frontend/src/modules/sql-editor/components/DatabaseChooser.test.tsx@@ -28,24 +28,24 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/store", () => ({}));+vi.mock("@/stores", () => ({}));-vi.mock("@/react/hooks/useSQLEditorBridge", () => ({+vi.mock("@/modules/sql-editor/hooks/useSQLEditorState", () => ({useConnectionOfCurrentSQLEditorTab: mocks.useConnectionOfCurrentSQLEditorTab,}));-vi.mock("@/react/stores/sqlEditor/tab", () => ({+vi.mock("@/modules/sql-editor/store/tab", () => ({useCurrentSQLEditorTab: mocks.useCurrentSQLEditorTab,useIsInBatchMode: mocks.useIsInBatchMode,}));-vi.mock("@/react/stores/sqlEditor/editor", () => ({+vi.mock("@/modules/sql-editor/store/editor", () => ({useSQLEditorEditorState: (selector: (s: { projectContextReady: boolean }) => unknown) => selector({ projectContextReady: mocks.projectContextReady }),}));-vi.mock("@/react/stores/sqlEditor", () => ({+vi.mock("@/modules/sql-editor/store", () => ({useSQLEditorStore: (selector: (s: { setShowConnectionPanel: (v: boolean) => void }) => unknown) =>@@ -69,13 +69,13 @@ vi.mock("@/components/InstanceForm/constants", () => ({EngineIconPath: mocks.EngineIconPath,}));-vi.mock("@/react/components/EnvironmentLabel", () => ({+vi.mock("@/components/EnvironmentLabel", () => ({EnvironmentLabel: ({ environmentName }: { environmentName: string }) => (<span data-testid="env-label">{environmentName}</span>),}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: ({ children }: { children: React.ReactNode }) => <>{children}</>,}));diff --git a/frontend/src/react/components/sql-editor/DatabaseChooser.tsx b/frontend/src/modules/sql-editor/components/DatabaseChooser.tsxsimilarity index 82%rename from frontend/src/react/components/sql-editor/DatabaseChooser.tsxrename to frontend/src/modules/sql-editor/components/DatabaseChooser.tsxindex 9f30d44343..143b4f07fa 100644--- a/frontend/src/react/components/sql-editor/DatabaseChooser.tsx+++ b/frontend/src/modules/sql-editor/components/DatabaseChooser.tsx@@ -1,16 +1,16 @@import { ChevronRight, Database, SquareStack } from "lucide-react";import { useTranslation } from "react-i18next";-import { EngineIcon } from "@/react/components/EngineIcon";-import { EnvironmentLabel } from "@/react/components/EnvironmentLabel";-import { ConnectionChooserButton } from "@/react/components/sql-editor/ConnectionChooserButton";-import { Tooltip } from "@/react/components/ui/tooltip";-import { useConnectionOfCurrentSQLEditorTab } from "@/react/hooks/useSQLEditorBridge";-import { useSQLEditorStore } from "@/react/stores/sqlEditor";-import { useSQLEditorEditorState } from "@/react/stores/sqlEditor/editor";+import { EngineIcon } from "@/components/EngineIcon";+import { EnvironmentLabel } from "@/components/EnvironmentLabel";+import { Tooltip } from "@/components/ui/tooltip";+import { ConnectionChooserButton } from "@/modules/sql-editor/components/ConnectionChooserButton";+import { useConnectionOfCurrentSQLEditorTab } from "@/modules/sql-editor/hooks/useSQLEditorState";+import { useSQLEditorStore } from "@/modules/sql-editor/store";+import { useSQLEditorEditorState } from "@/modules/sql-editor/store/editor";import {useCurrentSQLEditorTab,useIsInBatchMode,-} from "@/react/stores/sqlEditor/tab";+} from "@/modules/sql-editor/store/tab";import { isValidDatabaseName, isValidInstanceName } from "@/types";import {extractDatabaseResourceName,diff --git a/frontend/src/react/components/sql-editor/DatabaseQueryContextPage.tsx b/frontend/src/modules/sql-editor/components/DatabaseQueryContextPage.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/DatabaseQueryContextPage.tsxrename to frontend/src/modules/sql-editor/components/DatabaseQueryContextPage.tsxdiff --git a/frontend/src/react/components/sql-editor/DiagramPanel.tsx b/frontend/src/modules/sql-editor/components/DiagramPanel.tsxsimilarity index 76%rename from frontend/src/react/components/sql-editor/DiagramPanel.tsxrename to frontend/src/modules/sql-editor/components/DiagramPanel.tsxindex 1db03177cf..bd3b71420f 100644--- a/frontend/src/react/components/sql-editor/DiagramPanel.tsx+++ b/frontend/src/modules/sql-editor/components/DiagramPanel.tsx@@ -1,6 +1,6 @@-import { SchemaDiagram } from "@/react/components/SchemaDiagram";-import { useAppDatabaseMetadata } from "@/react/hooks/useAppDatabaseMetadata";-import { useConnectionOfCurrentSQLEditorTab } from "@/react/hooks/useSQLEditorBridge";+import { useAppDatabaseMetadata } from "@/hooks/useAppDatabaseMetadata";+import { SchemaDiagram } from "@/modules/schema-diagram";+import { useConnectionOfCurrentSQLEditorTab } from "@/modules/sql-editor/hooks/useSQLEditorState";/*** React port of `frontend/src/views/sql-editor/EditorPanel/Panels/DiagramPanel/DiagramPanel.vue`.diff --git a/frontend/src/react/components/sql-editor/EditorAction.test.tsx b/frontend/src/modules/sql-editor/components/EditorAction.test.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/EditorAction.test.tsxrename to frontend/src/modules/sql-editor/components/EditorAction.test.tsxindex 379893fa4d..d39e2e903d 100644--- a/frontend/src/react/components/sql-editor/EditorAction.test.tsx+++ b/frontend/src/modules/sql-editor/components/EditorAction.test.tsx@@ -34,11 +34,11 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({useUIStateStore: mocks.useUIStateStore,}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: {getState: () => ({getWorksheetByName: mocks.getWorksheetByName,@@ -50,15 +50,15 @@ vi.mock("@/react/stores/app", () => ({},}));-vi.mock("@/react/hooks/useWorksheetAndTab", () => ({+vi.mock("@/hooks/useWorksheetAndTab", () => ({useWorksheetAndTab: mocks.useWorksheetAndTab,}));-vi.mock("@/react/hooks/useSQLEditorBridge", () => ({+vi.mock("@/modules/sql-editor/hooks/useSQLEditorState", () => ({useConnectionOfCurrentSQLEditorTab: mocks.useConnectionOfCurrentSQLEditorTab,}));-vi.mock("@/react/stores/sqlEditor/tab", () => ({+vi.mock("@/modules/sql-editor/store/tab", () => ({useSQLEditorTabState: (selector: (s: unknown) => unknown) =>selector(mocks.tabState),useCurrentSQLEditorTab: () => mocks.currentTab,@@ -66,7 +66,7 @@ vi.mock("@/react/stores/sqlEditor/tab", () => ({getSQLEditorTabsState: () => ({ updateCurrentTab: mocks.updateCurrentTab }),}));-vi.mock("@/react/stores/sqlEditor/editor", () => ({+vi.mock("@/modules/sql-editor/store/editor", () => ({useSQLEditorEditorState: (selector: (s: unknown) => unknown) =>selector({ resultRowsLimit: mocks.resultRowsLimit }),}));@@ -77,11 +77,11 @@ vi.mock("@/utils", () => ({isDev: () => true,}));-vi.mock("@/views/sql-editor/events", () => ({+vi.mock("@/modules/sql-editor/model/events", () => ({sqlEditorEvents: { emit: mocks.emit },}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,onClick,@@ -107,11 +107,11 @@ vi.mock("@/react/components/ui/button", () => ({),}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: ({ children }: { children: React.ReactNode }) => <>{children}</>,}));-vi.mock("@/react/components/ui/popover", () => ({+vi.mock("@/components/ui/popover", () => ({Popover: ({ children }: { children: React.ReactNode }) => (<div data-testid="popover">{children}</div>),diff --git a/frontend/src/react/components/sql-editor/EditorAction.tsx b/frontend/src/modules/sql-editor/components/EditorAction.tsxsimilarity index 93%rename from frontend/src/react/components/sql-editor/EditorAction.tsxrename to frontend/src/modules/sql-editor/components/EditorAction.tsxindex 0fa5f47a8a..190408e539 100644--- a/frontend/src/react/components/sql-editor/EditorAction.tsx+++ b/frontend/src/modules/sql-editor/components/EditorAction.tsx@@ -1,28 +1,28 @@import { ChevronLeft, Play, Save, Share2 } from "lucide-react";import { useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";+import { Button } from "@/components/ui/button";import {Popover,PopoverContent,PopoverTrigger,-} from "@/react/components/ui/popover";-import { Tooltip } from "@/react/components/ui/tooltip";-import { useConnectionOfCurrentSQLEditorTab } from "@/react/hooks/useSQLEditorBridge";-import { useWorksheetAndTab } from "@/react/hooks/useWorksheetAndTab";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";-import { useSQLEditorEditorState } from "@/react/stores/sqlEditor/editor";+} from "@/components/ui/popover";+import { Tooltip } from "@/components/ui/tooltip";+import { useWorksheetAndTab } from "@/hooks/useWorksheetAndTab";+import { cn } from "@/lib/utils";+import { useConnectionOfCurrentSQLEditorTab } from "@/modules/sql-editor/hooks/useSQLEditorState";+import { sqlEditorEvents } from "@/modules/sql-editor/model/events";+import { useSQLEditorEditorState } from "@/modules/sql-editor/store/editor";import {getSQLEditorTabsState,useCurrentSQLEditorTab,useIsDisconnected,useSQLEditorTabState,-} from "@/react/stores/sqlEditor/tab";+} from "@/modules/sql-editor/store/tab";+import { useAppStore } from "@/stores/app";import type { SQLEditorQueryParams } from "@/types";import { Engine } from "@/types/proto-es/v1/common_pb";import { isWorksheetWritableV1, keyboardShortcutStr } from "@/utils";-import { sqlEditorEvents } from "@/views/sql-editor/events";import { AdminModeButton } from "./AdminModeButton";import { ChooserGroup } from "./ChooserGroup";import { OpenAIButton } from "./OpenAIButton";diff --git a/frontend/src/react/components/sql-editor/EditorMain.tsx b/frontend/src/modules/sql-editor/components/EditorMain.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/EditorMain.tsxrename to frontend/src/modules/sql-editor/components/EditorMain.tsxdiff --git a/frontend/src/react/components/sql-editor/ExecuteHint.tsx b/frontend/src/modules/sql-editor/components/ExecuteHint.tsxsimilarity index 87%rename from frontend/src/react/components/sql-editor/ExecuteHint.tsxrename to frontend/src/modules/sql-editor/components/ExecuteHint.tsxindex 6657492c8c..7bc875fbe3 100644--- a/frontend/src/react/components/sql-editor/ExecuteHint.tsx+++ b/frontend/src/modules/sql-editor/components/ExecuteHint.tsx@@ -1,14 +1,14 @@import { Trans, useTranslation } from "react-i18next";import { v4 as uuidv4 } from "uuid";-import { Alert } from "@/react/components/ui/alert";-import { Button } from "@/react/components/ui/button";-import { useSQLEditorAllowAdmin } from "@/react/hooks/useSQLEditorBridge";-import { applyPlanTitleToQuery } from "@/react/lib/plan/title";-import { router } from "@/react/router";-import { PROJECT_V1_ROUTE_PLAN_DETAIL_SPEC_DETAIL } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { useSQLEditorEditorState } from "@/react/stores/sqlEditor/editor";-import { getSQLEditorTabsState } from "@/react/stores/sqlEditor/tab";+import { router } from "@/app/router";+import { PROJECT_V1_ROUTE_PLAN_DETAIL_SPEC_DETAIL } from "@/app/router/handles";+import { Alert } from "@/components/ui/alert";+import { Button } from "@/components/ui/button";+import { applyPlanTitleToQuery } from "@/lib/plan/title";+import { useSQLEditorAllowAdmin } from "@/modules/sql-editor/hooks/useSQLEditorState";+import { useSQLEditorEditorState } from "@/modules/sql-editor/store/editor";+import { getSQLEditorTabsState } from "@/modules/sql-editor/store/tab";+import { useAppStore } from "@/stores/app";import { unknownProject } from "@/types";import type { Database } from "@/types/proto-es/v1/database_service_pb";import {diff --git a/frontend/src/react/components/sql-editor/ExecutingHintModal.test.tsx b/frontend/src/modules/sql-editor/components/ExecutingHintModal.test.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/ExecutingHintModal.test.tsxrename to frontend/src/modules/sql-editor/components/ExecutingHintModal.test.tsxindex b59d7b9de9..a35eab8b92 100644--- a/frontend/src/react/components/sql-editor/ExecutingHintModal.test.tsx+++ b/frontend/src/modules/sql-editor/components/ExecutingHintModal.test.tsx@@ -20,9 +20,9 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/store", () => ({}));+vi.mock("@/stores", () => ({}));-vi.mock("@/react/stores/sqlEditor/editor", () => ({+vi.mock("@/modules/sql-editor/store/editor", () => ({// Selector hook — run the selector against the stubbed state.useSQLEditorEditorState: (selector: (s: unknown) => unknown) =>selector(mocks.editorState),@@ -31,7 +31,7 @@ vi.mock("@/react/stores/sqlEditor/editor", () => ({}),}));-vi.mock("@/react/components/ui/dialog", () => ({+vi.mock("@/components/ui/dialog", () => ({Dialog: ({children,open,diff --git a/frontend/src/react/components/sql-editor/ExecutingHintModal.tsx b/frontend/src/modules/sql-editor/components/ExecutingHintModal.tsxsimilarity index 88%rename from frontend/src/react/components/sql-editor/ExecutingHintModal.tsxrename to frontend/src/modules/sql-editor/components/ExecutingHintModal.tsxindex 495b9ac478..093addb961 100644--- a/frontend/src/react/components/sql-editor/ExecutingHintModal.tsx+++ b/frontend/src/modules/sql-editor/components/ExecutingHintModal.tsx@@ -1,13 +1,9 @@import { useTranslation } from "react-i18next";-import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";import {getSQLEditorEditorState,useSQLEditorEditorState,-} from "@/react/stores/sqlEditor/editor";+} from "@/modules/sql-editor/store/editor";import { ExecuteHint } from "./ExecuteHint";/**diff --git a/frontend/src/react/components/sql-editor/ExternalTablesPanel.tsx b/frontend/src/modules/sql-editor/components/ExternalTablesPanel.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/ExternalTablesPanel.tsxrename to frontend/src/modules/sql-editor/components/ExternalTablesPanel.tsxdiff --git a/frontend/src/react/components/sql-editor/FilterMenuItem.tsx b/frontend/src/modules/sql-editor/components/FilterMenuItem.tsxsimilarity index 88%rename from frontend/src/react/components/sql-editor/FilterMenuItem.tsxrename to frontend/src/modules/sql-editor/components/FilterMenuItem.tsxindex a2bfe5b46a..11d3026d53 100644--- a/frontend/src/react/components/sql-editor/FilterMenuItem.tsx+++ b/frontend/src/modules/sql-editor/components/FilterMenuItem.tsx@@ -1,4 +1,4 @@-import { Switch } from "@/react/components/ui/switch";+import { Switch } from "@/components/ui/switch";type Props = {readonly label: string;diff --git a/frontend/src/react/components/sql-editor/FolderForm.test.tsx b/frontend/src/modules/sql-editor/components/FolderForm.test.tsxsimilarity index 96%rename from frontend/src/react/components/sql-editor/FolderForm.test.tsxrename to frontend/src/modules/sql-editor/components/FolderForm.test.tsxindex b146792d7b..e5982ee162 100644--- a/frontend/src/react/components/sql-editor/FolderForm.test.tsx+++ b/frontend/src/modules/sql-editor/components/FolderForm.test.tsx@@ -2,7 +2,7 @@ import type { ReactElement } from "react";import { act } from "react";import { createRoot } from "react-dom/client";import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";-import type { WorksheetFolderNode } from "@/views/sql-editor/Sheet";+import type { WorksheetFolderNode } from "@/modules/sql-editor/model/Sheet";(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }@@ -28,11 +28,11 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/views/sql-editor/Sheet", () => ({+vi.mock("@/modules/sql-editor/model/Sheet", () => ({useSheetContextByView: mocks.useSheetContextByView,}));-vi.mock("@/react/hooks/useClickOutside", () => ({+vi.mock("@/hooks/useClickOutside", () => ({useClickOutside: mocks.useClickOutside,}));@@ -43,7 +43,7 @@ type TreeDataNodeLike = {};// Mock Tree to render a simple test double-vi.mock("@/react/components/ui/tree", () => ({+vi.mock("@/components/ui/tree", () => ({Tree: ({data,renderNode,@@ -79,7 +79,7 @@ vi.mock("@/react/components/ui/tree", () => ({// the same way Base UI's real Portal only renders when `open=true`.let mockPopoverOpen = false;-vi.mock("@/react/components/ui/popover", () => ({+vi.mock("@/components/ui/popover", () => ({Popover: ({children,open,@@ -115,7 +115,7 @@ vi.mock("@/react/components/ui/popover", () => ({) : null,}));-vi.mock("@/react/components/ui/input", () => ({+vi.mock("@/components/ui/input", () => ({Input: ({value,placeholder,diff --git a/frontend/src/react/components/sql-editor/FolderForm.tsx b/frontend/src/modules/sql-editor/components/FolderForm.tsxsimilarity index 94%rename from frontend/src/react/components/sql-editor/FolderForm.tsxrename to frontend/src/modules/sql-editor/components/FolderForm.tsxindex ca2be43d44..e8d2c289c7 100644--- a/frontend/src/react/components/sql-editor/FolderForm.tsx+++ b/frontend/src/modules/sql-editor/components/FolderForm.tsx@@ -1,16 +1,16 @@import { ChevronDown, ChevronRight } from "lucide-react";import { useEffect, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { Input } from "@/react/components/ui/input";-import { LAYER_ROOT_ID } from "@/react/components/ui/layer";-import { Popover, PopoverContent } from "@/react/components/ui/popover";-import type { TreeDataNode } from "@/react/components/ui/tree";-import { Tree } from "@/react/components/ui/tree";-import { cn } from "@/react/lib/utils";+import { Input } from "@/components/ui/input";+import { LAYER_ROOT_ID } from "@/components/ui/layer";+import { Popover, PopoverContent } from "@/components/ui/popover";+import type { TreeDataNode } from "@/components/ui/tree";+import { Tree } from "@/components/ui/tree";+import { cn } from "@/lib/utils";import {useSheetContextByView,type WorksheetFolderNode,-} from "@/views/sql-editor/Sheet";+} from "@/modules/sql-editor/model/Sheet";import { TreeNodePrefix } from "./TreeNodePrefix";type Props = {diff --git a/frontend/src/react/components/sql-editor/FunctionsPanel.tsx b/frontend/src/modules/sql-editor/components/FunctionsPanel.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/FunctionsPanel.tsxrename to frontend/src/modules/sql-editor/components/FunctionsPanel.tsxdiff --git a/frontend/src/react/components/sql-editor/GutterBar.test.tsx b/frontend/src/modules/sql-editor/components/GutterBar.test.tsxsimilarity index 92%rename from frontend/src/react/components/sql-editor/GutterBar.test.tsxrename to frontend/src/modules/sql-editor/components/GutterBar.test.tsxindex cfd8042c88..d1da60a101 100644--- a/frontend/src/react/components/sql-editor/GutterBar.test.tsx+++ b/frontend/src/modules/sql-editor/components/GutterBar.test.tsx@@ -27,16 +27,16 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/react/hooks/useAppProject", () => ({+vi.mock("@/hooks/useAppProject", () => ({useAppProject: () => mocks.projectData,}));-vi.mock("@/react/stores/sqlEditor/editor", () => ({+vi.mock("@/modules/sql-editor/store/editor", () => ({useSQLEditorEditorState: (selector: (s: { project: string }) => unknown) =>selector({ project: mocks.project }),}));-vi.mock("@/react/stores/sqlEditor", () => ({+vi.mock("@/modules/sql-editor/store", () => ({useSQLEditorStore: (selector: (s: {asidePanelTab: string;@@ -49,8 +49,8 @@ vi.mock("@/react/stores/sqlEditor", () => ({}),}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {resolve: mocks.routerResolve,currentRoute: { value: { params: {} } },@@ -62,7 +62,7 @@ vi.mock("@/assets/logo-icon.svg", () => ({default: "/assets/logo-icon.svg",}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: ({ children }: { children: React.ReactNode }) => <>{children}</>,}));diff --git a/frontend/src/react/components/sql-editor/GutterBar.tsx b/frontend/src/modules/sql-editor/components/GutterBar.tsxsimilarity index 80%rename from frontend/src/react/components/sql-editor/GutterBar.tsxrename to frontend/src/modules/sql-editor/components/GutterBar.tsxindex 650d63ffaf..b0ea6cd0c2 100644--- a/frontend/src/react/components/sql-editor/GutterBar.tsx+++ b/frontend/src/modules/sql-editor/components/GutterBar.tsx@@ -1,15 +1,15 @@-import logoIcon from "@/assets/logo-icon.svg";-import { RouterLink } from "@/react/components/RouterLink";-import { Separator } from "@/react/components/ui/separator";-import { useAppProject } from "@/react/hooks/useAppProject";-import { useReactiveRoute } from "@/react/hooks/useReactiveRoute";import {PROJECT_V1_ROUTE_DETAIL,WORKSPACE_ROUTE_LANDING,-} from "@/react/router/handles";-import type { AsidePanelTab } from "@/react/stores/sqlEditor";-import { useSQLEditorStore } from "@/react/stores/sqlEditor";-import { useSQLEditorEditorState } from "@/react/stores/sqlEditor/editor";+} from "@/app/router/handles";+import logoIcon from "@/assets/logo-icon.svg";+import { RouterLink } from "@/components/RouterLink";+import { Separator } from "@/components/ui/separator";+import { useAppProject } from "@/hooks/useAppProject";+import { useReactiveRoute } from "@/hooks/useReactiveRoute";+import type { AsidePanelTab } from "@/modules/sql-editor/store";+import { useSQLEditorStore } from "@/modules/sql-editor/store";+import { useSQLEditorEditorState } from "@/modules/sql-editor/store/editor";import { TabItem } from "./TabItem";/**diff --git a/frontend/src/react/components/sql-editor/HistoryPane.test.tsx b/frontend/src/modules/sql-editor/components/HistoryPane.test.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/HistoryPane.test.tsxrename to frontend/src/modules/sql-editor/components/HistoryPane.test.tsxindex f498c8221e..d90fd34cac 100644--- a/frontend/src/react/components/sql-editor/HistoryPane.test.tsx+++ b/frontend/src/modules/sql-editor/components/HistoryPane.test.tsx@@ -38,7 +38,7 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {// `useAppStore` is used both as a selector hook (for// `serverInfo.externalUrl`) and via `.getState().notify(...)`. Route// `notify` through the same vi.fn the tests asserted against under the@@ -53,7 +53,7 @@ vi.mock("@/react/stores/app", () => {return { useAppStore };});-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({router: {resolve: ({params,@@ -65,12 +65,12 @@ vi.mock("@/react/router", () => ({},}));-vi.mock("@/react/router/handles", () => ({+vi.mock("@/app/router/handles", () => ({SQL_EDITOR_QUERY_HISTORY_MODULE: "sql-editor.query-history",}));// Zustand tab store — selector hook + imperative getter.-vi.mock("@/react/stores/sqlEditor/tab", () => ({+vi.mock("@/modules/sql-editor/store/tab", () => ({useSQLEditorTabState: (selector: (s: {currentTabId: string;@@ -91,12 +91,12 @@ vi.mock("@/react/stores/sqlEditor/tab", () => ({}));// Zustand editor store — active project read.-vi.mock("@/react/stores/sqlEditor/editor", () => ({+vi.mock("@/modules/sql-editor/store/editor", () => ({useSQLEditorEditorState: (selector: (s: { project: string }) => unknown) =>selector({ project: mocks.project }),}));-vi.mock("@/react/stores/sqlEditor", () => ({+vi.mock("@/modules/sql-editor/store", () => ({selectQueryHistoryEntry: () => () => mocks.historyEntry,useSQLEditorStore: (selector: (s: {@@ -116,7 +116,7 @@ vi.mock("@/react/stores/sqlEditor", () => ({}),}));-vi.mock("@/views/sql-editor/events", () => ({+vi.mock("@/modules/sql-editor/model/events", () => ({sqlEditorEvents: {emit: mocks.sqlEditorEventsEmit,on: vi.fn().mockReturnValue(() => {}),@@ -161,7 +161,7 @@ vi.mock("@/utils", () => ({// The real HighlightLabelText pulls in `@/utils/util` (DOMPurify + i18n init);// stub it to render the text so textContent assertions still hold.-vi.mock("@/react/components/HighlightLabelText", () => ({+vi.mock("@/components/HighlightLabelText", () => ({HighlightLabelText: ({text,className,diff --git a/frontend/src/react/components/sql-editor/HistoryPane.tsx b/frontend/src/modules/sql-editor/components/HistoryPane.tsxsimilarity index 94%rename from frontend/src/react/components/sql-editor/HistoryPane.tsxrename to frontend/src/modules/sql-editor/components/HistoryPane.tsxindex 7f43807273..5a24537c35 100644--- a/frontend/src/react/components/sql-editor/HistoryPane.tsx+++ b/frontend/src/modules/sql-editor/components/HistoryPane.tsx@@ -9,27 +9,27 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";-import { HighlightLabelText } from "@/react/components/HighlightLabelText";-import { Button } from "@/react/components/ui/button";-import { writeTextToClipboard } from "@/react/lib/clipboard";-import { cn } from "@/react/lib/utils";-import { router } from "@/react/router";-import { SQL_EDITOR_QUERY_HISTORY_MODULE } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import type { QueryHistoryFilter } from "@/react/stores/sqlEditor";+import { HighlightLabelText } from "@/components/HighlightLabelText";+import { Button } from "@/components/ui/button";+import { writeTextToClipboard } from "@/lib/clipboard";+import { cn } from "@/lib/utils";+import { router } from "@/app/router";+import { SQL_EDITOR_QUERY_HISTORY_MODULE } from "@/app/router/handles";+import { useAppStore } from "@/stores/app";+import type { QueryHistoryFilter } from "@/modules/sql-editor/store";import {selectQueryHistoryEntry,useSQLEditorStore,-} from "@/react/stores/sqlEditor";-import { useSQLEditorEditorState } from "@/react/stores/sqlEditor/editor";+} from "@/modules/sql-editor/store";+import { useSQLEditorEditorState } from "@/modules/sql-editor/store/editor";import {getSQLEditorTabsState,useSQLEditorTabState,-} from "@/react/stores/sqlEditor/tab";+} from "@/modules/sql-editor/store/tab";import { DEBOUNCE_SEARCH_DELAY, getDateForPbTimestampProtoEs } from "@/types";import type { QueryHistory } from "@/types/proto-es/v1/sql_service_pb";import { extractProjectResourceName, extractQueryHistoryUID } from "@/utils";-import { sqlEditorEvents } from "@/views/sql-editor/events";+import { sqlEditorEvents } from "@/modules/sql-editor/model/events";import { HistorySearchInput } from "./HistorySearchInput";/**diff --git a/frontend/src/react/components/sql-editor/HistorySearchInput.test.tsx b/frontend/src/modules/sql-editor/components/HistorySearchInput.test.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/HistorySearchInput.test.tsxrename to frontend/src/modules/sql-editor/components/HistorySearchInput.test.tsxdiff --git a/frontend/src/react/components/sql-editor/HistorySearchInput.tsx b/frontend/src/modules/sql-editor/components/HistorySearchInput.tsxsimilarity index 98%rename from frontend/src/react/components/sql-editor/HistorySearchInput.tsxrename to frontend/src/modules/sql-editor/components/HistorySearchInput.tsxindex fea859f56c..26dcac940f 100644--- a/frontend/src/react/components/sql-editor/HistorySearchInput.tsx+++ b/frontend/src/modules/sql-editor/components/HistorySearchInput.tsx@@ -1,7 +1,7 @@import { Search, X } from "lucide-react";import { useLayoutEffect, useRef } from "react";import { useTranslation } from "react-i18next";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";// Tallest the box grows before it starts scrolling internally (px).const MAX_HEIGHT = 120;diff --git a/frontend/src/react/components/sql-editor/InfoPanel.tsx b/frontend/src/modules/sql-editor/components/InfoPanel.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/InfoPanel.tsxrename to frontend/src/modules/sql-editor/components/InfoPanel.tsxdiff --git a/frontend/src/react/components/sql-editor/MaskingReasonPopover.test.tsx b/frontend/src/modules/sql-editor/components/MaskingReasonPopover.test.tsxsimilarity index 96%rename from frontend/src/react/components/sql-editor/MaskingReasonPopover.test.tsxrename to frontend/src/modules/sql-editor/components/MaskingReasonPopover.test.tsxindex 2f64106c08..379cc76dfb 100644--- a/frontend/src/react/components/sql-editor/MaskingReasonPopover.test.tsx+++ b/frontend/src/modules/sql-editor/components/MaskingReasonPopover.test.tsx@@ -21,7 +21,7 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const state = { hasFeature: mocks.hasFeature };return {useAppStore: Object.assign(@@ -31,11 +31,11 @@ vi.mock("@/react/stores/app", () => {};});-vi.mock("@/react/hooks/useAppProject", () => ({+vi.mock("@/hooks/useAppProject", () => ({useAppProject: () => mocks.projectData,}));-vi.mock("@/react/stores/sqlEditor/editor-vue-state", () => ({+vi.mock("@/modules/sql-editor/store/editor-vue-state", () => ({useSQLEditorVueState: mocks.useSQLEditorVueState,}));@@ -43,7 +43,7 @@ vi.mock("@/types/proto-es/v1/subscription_service_pb", () => ({PlanFeature: { FEATURE_JIT: 5 },}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,onClick,@@ -59,7 +59,7 @@ vi.mock("@/react/components/ui/button", () => ({),}));-vi.mock("@/react/components/ui/popover", () => ({+vi.mock("@/components/ui/popover", () => ({Popover: ({ children }: { children: React.ReactNode }) => (<div data-testid="popover-root">{children}</div>),diff --git a/frontend/src/react/components/sql-editor/MaskingReasonPopover.tsx b/frontend/src/modules/sql-editor/components/MaskingReasonPopover.tsxsimilarity index 94%rename from frontend/src/react/components/sql-editor/MaskingReasonPopover.tsxrename to frontend/src/modules/sql-editor/components/MaskingReasonPopover.tsxindex 6f18925c3a..ca352285f0 100644--- a/frontend/src/react/components/sql-editor/MaskingReasonPopover.tsx+++ b/frontend/src/modules/sql-editor/components/MaskingReasonPopover.tsx@@ -2,15 +2,15 @@ import { EyeOff } from "lucide-react";import type { SyntheticEvent } from "react";import { useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";+import { Button } from "@/components/ui/button";import {Popover,PopoverContent,PopoverTrigger,-} from "@/react/components/ui/popover";-import { useAppProject } from "@/react/hooks/useAppProject";-import { useAppStore } from "@/react/stores/app";-import { useSQLEditorEditorState } from "@/react/stores/sqlEditor/editor";+} from "@/components/ui/popover";+import { useAppProject } from "@/hooks/useAppProject";+import { useSQLEditorEditorState } from "@/modules/sql-editor/store/editor";+import { useAppStore } from "@/stores/app";import type { MaskingReason } from "@/types/proto-es/v1/sql_service_pb";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { AccessGrantRequestDrawer } from "./AccessGrantRequestDrawer";diff --git a/frontend/src/react/components/sql-editor/OpenAIButton.test.tsx b/frontend/src/modules/sql-editor/components/OpenAIButton.test.tsxsimilarity index 94%rename from frontend/src/react/components/sql-editor/OpenAIButton.test.tsxrename to frontend/src/modules/sql-editor/components/OpenAIButton.test.tsxindex 190f13a11a..2b36d57bfe 100644--- a/frontend/src/react/components/sql-editor/OpenAIButton.test.tsx+++ b/frontend/src/modules/sql-editor/components/OpenAIButton.test.tsx@@ -39,11 +39,11 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({useSettingV1Store: mocks.useSettingV1Store,}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const state = {getOrFetchSettingByName: mocks.getOrFetchSettingByName,getSettingByName: () => mocks.aiSetting,@@ -57,12 +57,12 @@ vi.mock("@/react/stores/app", () => {});// `useConnectionOfCurrentSQLEditorTab` now lives on the Pinia bridge hook.-vi.mock("@/react/hooks/useSQLEditorBridge", () => ({+vi.mock("@/modules/sql-editor/hooks/useSQLEditorState", () => ({useConnectionOfCurrentSQLEditorTab: mocks.useConnectionOfCurrentSQLEditorTab,}));// Zustand tab store — derived hook + selector hook for connection/mode.-vi.mock("@/react/stores/sqlEditor/tab", () => ({+vi.mock("@/modules/sql-editor/store/tab", () => ({useIsDisconnected: () => mocks.tabState.isDisconnected,useSQLEditorTabState: (selector: (s: {@@ -76,7 +76,7 @@ vi.mock("@/react/stores/sqlEditor/tab", () => ({}),}));-vi.mock("@/react/stores/sqlEditor", () => ({+vi.mock("@/modules/sql-editor/store", () => ({useSQLEditorStore: (selector: (s: {showAIPanel: boolean;@@ -94,17 +94,17 @@ vi.mock("@/utils", () => ({nextAnimationFrame: mocks.nextAnimationFrame,}));-vi.mock("@/plugins/ai/logic", () => ({+vi.mock("@/modules/ai/logic", () => ({aiContextEvents: { emit: mocks.emit },}));-vi.mock("@/plugins/ai/logic/prompt", () => ({+vi.mock("@/modules/ai/logic/prompt", () => ({explainCode: mocks.explainCode,findProblems: mocks.findProblems,}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {push: mocks.routerPush,resolve: (to: unknown) => ({ href: String(to), fullPath: String(to) }),@@ -112,7 +112,7 @@ vi.mock("@/react/router", async (importOriginal) => ({}));// Minimal primitive stubs.-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({buttonVariants: ({ className }: { className?: string } = {}) => className,Button: ({children,@@ -139,7 +139,7 @@ vi.mock("@/react/components/ui/button", () => ({),}));-vi.mock("@/react/components/ui/popover", () => ({+vi.mock("@/components/ui/popover", () => ({Popover: ({ children }: { children: React.ReactNode }) => (<div data-testid="popover">{children}</div>),@@ -151,7 +151,7 @@ vi.mock("@/react/components/ui/popover", () => ({),}));-vi.mock("@/react/components/ui/dropdown-menu", () => ({+vi.mock("@/components/ui/dropdown-menu", () => ({DropdownMenu: ({children,open,diff --git a/frontend/src/react/components/sql-editor/OpenAIButton.tsx b/frontend/src/modules/sql-editor/components/OpenAIButton.tsxsimilarity index 92%rename from frontend/src/react/components/sql-editor/OpenAIButton.tsxrename to frontend/src/modules/sql-editor/components/OpenAIButton.tsxindex 7f15e04fd5..87c714f805 100644--- a/frontend/src/react/components/sql-editor/OpenAIButton.tsx+++ b/frontend/src/modules/sql-editor/components/OpenAIButton.tsx@@ -1,34 +1,34 @@import { useCallback, useEffect, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { aiContextEvents } from "@/plugins/ai/logic";-import * as promptUtils from "@/plugins/ai/logic/prompt";-import type { ChatAction } from "@/plugins/ai/types";-import { RouterLink } from "@/react/components/RouterLink";-import { Button, buttonVariants } from "@/react/components/ui/button";+import { SETTING_ROUTE_WORKSPACE_GENERAL } from "@/app/router/handles";+import { RouterLink } from "@/components/RouterLink";+import { Button, buttonVariants } from "@/components/ui/button";import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";+} from "@/components/ui/dropdown-menu";import {Popover,PopoverContent,PopoverTrigger,-} from "@/react/components/ui/popover";-import { useConnectionOfCurrentSQLEditorTab } from "@/react/hooks/useSQLEditorBridge";+} from "@/components/ui/popover";import {AI_ASSISTANT_PRODUCT_INTRO,PRODUCT_INTRO_QUERY_KEY,-} from "@/react/lib/productIntro";-import { cn } from "@/react/lib/utils";-import { SETTING_ROUTE_WORKSPACE_GENERAL } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { useSQLEditorStore } from "@/react/stores/sqlEditor";+} from "@/lib/productIntro";+import { cn } from "@/lib/utils";+import { aiContextEvents } from "@/modules/ai/logic";+import * as promptUtils from "@/modules/ai/logic/prompt";+import type { ChatAction } from "@/modules/ai/types";+import { useConnectionOfCurrentSQLEditorTab } from "@/modules/sql-editor/hooks/useSQLEditorState";+import { useSQLEditorStore } from "@/modules/sql-editor/store";import {useIsDisconnected,useSQLEditorTabState,-} from "@/react/stores/sqlEditor/tab";+} from "@/modules/sql-editor/store/tab";+import { useAppStore } from "@/stores/app";import { Setting_SettingName } from "@/types/proto-es/v1/setting_service_pb";import { hasWorkspacePermissionV2, nextAnimationFrame } from "@/utils";diff --git a/frontend/src/react/components/sql-editor/PackagesPanel.tsx b/frontend/src/modules/sql-editor/components/PackagesPanel.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/PackagesPanel.tsxrename to frontend/src/modules/sql-editor/components/PackagesPanel.tsxdiff --git a/frontend/src/react/components/sql-editor/Panels/ExternalTablesPanel/ExternalTablesPanel.tsx b/frontend/src/modules/sql-editor/components/Panels/ExternalTablesPanel/ExternalTablesPanel.tsxsimilarity index 92%rename from frontend/src/react/components/sql-editor/Panels/ExternalTablesPanel/ExternalTablesPanel.tsxrename to frontend/src/modules/sql-editor/components/Panels/ExternalTablesPanel/ExternalTablesPanel.tsxindex ce618aaddb..ca840cdcb4 100644--- a/frontend/src/react/components/sql-editor/Panels/ExternalTablesPanel/ExternalTablesPanel.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/ExternalTablesPanel/ExternalTablesPanel.tsx@@ -1,8 +1,8 @@import { ChevronLeft, Table as TableIcon } from "lucide-react";import { useState } from "react";-import { Button } from "@/react/components/ui/button";-import { useAppDatabaseMetadata } from "@/react/hooks/useAppDatabaseMetadata";-import { useConnectionOfCurrentSQLEditorTab } from "@/react/hooks/useSQLEditorBridge";+import { Button } from "@/components/ui/button";+import { useAppDatabaseMetadata } from "@/hooks/useAppDatabaseMetadata";+import { useConnectionOfCurrentSQLEditorTab } from "@/modules/sql-editor/hooks/useSQLEditorState";import { PanelSearchBox } from "../common/PanelSearchBox";import { ColumnsTable } from "../common/tables/ColumnsTable";import { useViewStateNav } from "../common/useViewStateNav";diff --git a/frontend/src/react/components/sql-editor/Panels/ExternalTablesPanel/ExternalTablesTable.tsx b/frontend/src/modules/sql-editor/components/Panels/ExternalTablesPanel/ExternalTablesTable.tsxsimilarity index 96%rename from frontend/src/react/components/sql-editor/Panels/ExternalTablesPanel/ExternalTablesTable.tsxrename to frontend/src/modules/sql-editor/components/Panels/ExternalTablesPanel/ExternalTablesTable.tsxindex 393944b9ed..1b6fb88e5b 100644--- a/frontend/src/react/components/sql-editor/Panels/ExternalTablesPanel/ExternalTablesTable.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/ExternalTablesPanel/ExternalTablesTable.tsx@@ -1,6 +1,6 @@import { useEffect, useMemo, useRef } from "react";import { useTranslation } from "react-i18next";-import { HighlightLabelText } from "@/react/components/HighlightLabelText";+import { HighlightLabelText } from "@/components/HighlightLabelText";import {Table,TableBody,@@ -8,7 +8,7 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";+} from "@/components/ui/table";import type {DatabaseMetadata,ExternalTableMetadata,diff --git a/frontend/src/react/components/sql-editor/Panels/FunctionsPanel/FunctionsPanel.tsx b/frontend/src/modules/sql-editor/components/Panels/FunctionsPanel/FunctionsPanel.tsxsimilarity index 87%rename from frontend/src/react/components/sql-editor/Panels/FunctionsPanel/FunctionsPanel.tsxrename to frontend/src/modules/sql-editor/components/Panels/FunctionsPanel/FunctionsPanel.tsxindex eb423f3e8f..90038154af 100644--- a/frontend/src/react/components/sql-editor/Panels/FunctionsPanel/FunctionsPanel.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/FunctionsPanel/FunctionsPanel.tsx@@ -1,12 +1,9 @@import { ChevronLeft, FunctionSquare } from "lucide-react";import { useState } from "react";-import { Button } from "@/react/components/ui/button";-import { useAppDatabaseMetadata } from "@/react/hooks/useAppDatabaseMetadata";-import { useConnectionOfCurrentSQLEditorTab } from "@/react/hooks/useSQLEditorBridge";-import {- extractKeyWithPosition,- keyWithPosition,-} from "@/react/lib/keyWithPosition";+import { Button } from "@/components/ui/button";+import { useAppDatabaseMetadata } from "@/hooks/useAppDatabaseMetadata";+import { extractKeyWithPosition, keyWithPosition } from "@/lib/keyWithPosition";+import { useConnectionOfCurrentSQLEditorTab } from "@/modules/sql-editor/hooks/useSQLEditorState";import { CodeViewer } from "../common/CodeViewer";import { PanelSearchBox } from "../common/PanelSearchBox";import { useViewStateNav } from "../common/useViewStateNav";diff --git a/frontend/src/react/components/sql-editor/Panels/FunctionsPanel/FunctionsTable.tsx b/frontend/src/modules/sql-editor/components/Panels/FunctionsPanel/FunctionsTable.tsxsimilarity index 93%rename from frontend/src/react/components/sql-editor/Panels/FunctionsPanel/FunctionsTable.tsxrename to frontend/src/modules/sql-editor/components/Panels/FunctionsPanel/FunctionsTable.tsxindex e6a6591976..ed5b0efdda 100644--- a/frontend/src/react/components/sql-editor/Panels/FunctionsPanel/FunctionsTable.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/FunctionsPanel/FunctionsTable.tsx@@ -1,6 +1,6 @@import { useEffect, useMemo, useRef } from "react";import { useTranslation } from "react-i18next";-import { HighlightLabelText } from "@/react/components/HighlightLabelText";+import { HighlightLabelText } from "@/components/HighlightLabelText";import {Table,TableBody,@@ -8,8 +8,8 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { keyWithPosition } from "@/react/lib/keyWithPosition";+} from "@/components/ui/table";+import { keyWithPosition } from "@/lib/keyWithPosition";import type {DatabaseMetadata,FunctionMetadata,diff --git a/frontend/src/react/components/sql-editor/Panels/InfoPanel/InfoPanel.tsx b/frontend/src/modules/sql-editor/components/Panels/InfoPanel/InfoPanel.tsxsimilarity index 96%rename from frontend/src/react/components/sql-editor/Panels/InfoPanel/InfoPanel.tsxrename to frontend/src/modules/sql-editor/components/Panels/InfoPanel/InfoPanel.tsxindex aa9c0f9abc..c8b60bb18f 100644--- a/frontend/src/react/components/sql-editor/Panels/InfoPanel/InfoPanel.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/InfoPanel/InfoPanel.tsx@@ -1,9 +1,9 @@import { useState } from "react";import { useTranslation } from "react-i18next";-import { useAppDatabaseMetadata } from "@/react/hooks/useAppDatabaseMetadata";-import { useConnectionOfCurrentSQLEditorTab } from "@/react/hooks/useSQLEditorBridge";-import { keyWithPosition } from "@/react/lib/keyWithPosition";-import { DatabaseOverviewInfo } from "@/react/pages/project/database-detail/overview/DatabaseOverviewInfo";+import { DatabaseOverviewInfo } from "@/components/database/DatabaseOverviewInfo";+import { useAppDatabaseMetadata } from "@/hooks/useAppDatabaseMetadata";+import { keyWithPosition } from "@/lib/keyWithPosition";+import { useConnectionOfCurrentSQLEditorTab } from "@/modules/sql-editor/hooks/useSQLEditorState";import {getInstanceResource,instanceV1SupportsExternalTable,diff --git a/frontend/src/react/components/sql-editor/Panels/PackagesPanel/PackagesPanel.tsx b/frontend/src/modules/sql-editor/components/Panels/PackagesPanel/PackagesPanel.tsxsimilarity index 87%rename from frontend/src/react/components/sql-editor/Panels/PackagesPanel/PackagesPanel.tsxrename to frontend/src/modules/sql-editor/components/Panels/PackagesPanel/PackagesPanel.tsxindex 803fc3f45b..2294684b80 100644--- a/frontend/src/react/components/sql-editor/Panels/PackagesPanel/PackagesPanel.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/PackagesPanel/PackagesPanel.tsx@@ -1,12 +1,9 @@import { ChevronLeft, Package } from "lucide-react";import { useState } from "react";-import { Button } from "@/react/components/ui/button";-import { useAppDatabaseMetadata } from "@/react/hooks/useAppDatabaseMetadata";-import { useConnectionOfCurrentSQLEditorTab } from "@/react/hooks/useSQLEditorBridge";-import {- extractKeyWithPosition,- keyWithPosition,-} from "@/react/lib/keyWithPosition";+import { Button } from "@/components/ui/button";+import { useAppDatabaseMetadata } from "@/hooks/useAppDatabaseMetadata";+import { extractKeyWithPosition, keyWithPosition } from "@/lib/keyWithPosition";+import { useConnectionOfCurrentSQLEditorTab } from "@/modules/sql-editor/hooks/useSQLEditorState";import { CodeViewer } from "../common/CodeViewer";import { PanelSearchBox } from "../common/PanelSearchBox";import { useViewStateNav } from "../common/useViewStateNav";diff --git a/frontend/src/react/components/sql-editor/Panels/PackagesPanel/PackagesTable.tsx b/frontend/src/modules/sql-editor/components/Panels/PackagesPanel/PackagesTable.tsxsimilarity index 93%rename from frontend/src/react/components/sql-editor/Panels/PackagesPanel/PackagesTable.tsxrename to frontend/src/modules/sql-editor/components/Panels/PackagesPanel/PackagesTable.tsxindex 68aca619f1..69c9dfbecc 100644--- a/frontend/src/react/components/sql-editor/Panels/PackagesPanel/PackagesTable.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/PackagesPanel/PackagesTable.tsx@@ -1,6 +1,6 @@import { useEffect, useMemo, useRef } from "react";import { useTranslation } from "react-i18next";-import { HighlightLabelText } from "@/react/components/HighlightLabelText";+import { HighlightLabelText } from "@/components/HighlightLabelText";import {Table,TableBody,@@ -8,8 +8,8 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { keyWithPosition } from "@/react/lib/keyWithPosition";+} from "@/components/ui/table";+import { keyWithPosition } from "@/lib/keyWithPosition";import type {DatabaseMetadata,PackageMetadata,diff --git a/frontend/src/react/components/sql-editor/Panels/Panels.tsx b/frontend/src/modules/sql-editor/components/Panels/Panels.tsxsimilarity index 84%rename from frontend/src/react/components/sql-editor/Panels/Panels.tsxrename to frontend/src/modules/sql-editor/components/Panels/Panels.tsxindex c1361588f5..668b1927ad 100644--- a/frontend/src/react/components/sql-editor/Panels/Panels.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/Panels.tsx@@ -7,37 +7,37 @@ import {Separator as PanelResizeHandle,} from "react-resizable-panels";import { useShallow } from "zustand/react/shallow";-import { aiContextEvents } from "@/plugins/ai/logic";-import { AIChatToSQL, AIContextProvider } from "@/plugins/ai/react";-import { resizeHandleClass } from "@/react/components/SchemaEditorLite/resize";-import { DatabaseChooser } from "@/react/components/sql-editor/DatabaseChooser";-import { DiagramPanel } from "@/react/components/sql-editor/DiagramPanel";-import { ExternalTablesPanel } from "@/react/components/sql-editor/ExternalTablesPanel";-import { FunctionsPanel } from "@/react/components/sql-editor/FunctionsPanel";-import { InfoPanel } from "@/react/components/sql-editor/InfoPanel";-import { PackagesPanel } from "@/react/components/sql-editor/PackagesPanel";-import { ProceduresPanel } from "@/react/components/sql-editor/ProceduresPanel";-import { SchemaSelectToolbar } from "@/react/components/sql-editor/SchemaSelectToolbar";-import { SequencesPanel } from "@/react/components/sql-editor/SequencesPanel";-import { StandardPanel } from "@/react/components/sql-editor/StandardPanel/StandardPanel";-import { TablesPanel } from "@/react/components/sql-editor/TablesPanel";-import { TerminalPanel } from "@/react/components/sql-editor/TerminalPanel/TerminalPanel";-import { TriggersPanel } from "@/react/components/sql-editor/TriggersPanel";-import { ViewsPanel } from "@/react/components/sql-editor/ViewsPanel";-import { Alert } from "@/react/components/ui/alert";-import { useAppDatabaseMetadata } from "@/react/hooks/useAppDatabaseMetadata";-import { useExecuteSQL } from "@/react/hooks/useExecuteSQL";-import { useConnectionOfCurrentSQLEditorTab } from "@/react/hooks/useSQLEditorBridge";-import { useAppStore } from "@/react/stores/app";+import { Alert } from "@/components/ui/alert";+import { useAppDatabaseMetadata } from "@/hooks/useAppDatabaseMetadata";+import { useExecuteSQL } from "@/hooks/useExecuteSQL";+import { AIChatToSQL, AIContextProvider } from "@/modules/ai/components";+import { aiContextEvents } from "@/modules/ai/logic";+import { resizeHandleClass } from "@/modules/schema-editor/resize";+import { DatabaseChooser } from "@/modules/sql-editor/components/DatabaseChooser";+import { DiagramPanel } from "@/modules/sql-editor/components/DiagramPanel";+import { ExternalTablesPanel } from "@/modules/sql-editor/components/ExternalTablesPanel";+import { FunctionsPanel } from "@/modules/sql-editor/components/FunctionsPanel";+import { InfoPanel } from "@/modules/sql-editor/components/InfoPanel";+import { PackagesPanel } from "@/modules/sql-editor/components/PackagesPanel";+import { ProceduresPanel } from "@/modules/sql-editor/components/ProceduresPanel";+import { SchemaSelectToolbar } from "@/modules/sql-editor/components/SchemaSelectToolbar";+import { SequencesPanel } from "@/modules/sql-editor/components/SequencesPanel";+import { StandardPanel } from "@/modules/sql-editor/components/StandardPanel/StandardPanel";+import { TablesPanel } from "@/modules/sql-editor/components/TablesPanel";+import { TerminalPanel } from "@/modules/sql-editor/components/TerminalPanel/TerminalPanel";+import { TriggersPanel } from "@/modules/sql-editor/components/TriggersPanel";+import { ViewsPanel } from "@/modules/sql-editor/components/ViewsPanel";+import { useConnectionOfCurrentSQLEditorTab } from "@/modules/sql-editor/hooks/useSQLEditorState";import {selectEditorPanelSize,useSQLEditorStore,-} from "@/react/stores/sqlEditor";+} from "@/modules/sql-editor/store";import {getSQLEditorTabsState,useCurrentSQLEditorTab,useSQLEditorTabState,-} from "@/react/stores/sqlEditor/tab";+} from "@/modules/sql-editor/store/tab";+import { useAppStore } from "@/stores/app";import { isValidDatabaseName } from "@/types";import {extractDatabaseResourceName,diff --git a/frontend/src/react/components/sql-editor/Panels/ProceduresPanel/ProceduresPanel.tsx b/frontend/src/modules/sql-editor/components/Panels/ProceduresPanel/ProceduresPanel.tsxsimilarity index 87%rename from frontend/src/react/components/sql-editor/Panels/ProceduresPanel/ProceduresPanel.tsxrename to frontend/src/modules/sql-editor/components/Panels/ProceduresPanel/ProceduresPanel.tsxindex 2876808d5f..82562b42f8 100644--- a/frontend/src/react/components/sql-editor/Panels/ProceduresPanel/ProceduresPanel.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/ProceduresPanel/ProceduresPanel.tsx@@ -1,12 +1,9 @@import { ChevronLeft, FileCode } from "lucide-react";import { useState } from "react";-import { Button } from "@/react/components/ui/button";-import { useAppDatabaseMetadata } from "@/react/hooks/useAppDatabaseMetadata";-import { useConnectionOfCurrentSQLEditorTab } from "@/react/hooks/useSQLEditorBridge";-import {- extractKeyWithPosition,- keyWithPosition,-} from "@/react/lib/keyWithPosition";+import { Button } from "@/components/ui/button";+import { useAppDatabaseMetadata } from "@/hooks/useAppDatabaseMetadata";+import { extractKeyWithPosition, keyWithPosition } from "@/lib/keyWithPosition";+import { useConnectionOfCurrentSQLEditorTab } from "@/modules/sql-editor/hooks/useSQLEditorState";import { CodeViewer } from "../common/CodeViewer";import { PanelSearchBox } from "../common/PanelSearchBox";import { useViewStateNav } from "../common/useViewStateNav";diff --git a/frontend/src/react/components/sql-editor/Panels/ProceduresPanel/ProceduresTable.tsx b/frontend/src/modules/sql-editor/components/Panels/ProceduresPanel/ProceduresTable.tsxsimilarity index 93%rename from frontend/src/react/components/sql-editor/Panels/ProceduresPanel/ProceduresTable.tsxrename to frontend/src/modules/sql-editor/components/Panels/ProceduresPanel/ProceduresTable.tsxindex 886bb198b9..8faaceca68 100644--- a/frontend/src/react/components/sql-editor/Panels/ProceduresPanel/ProceduresTable.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/ProceduresPanel/ProceduresTable.tsx@@ -1,6 +1,6 @@import { useEffect, useMemo, useRef } from "react";import { useTranslation } from "react-i18next";-import { HighlightLabelText } from "@/react/components/HighlightLabelText";+import { HighlightLabelText } from "@/components/HighlightLabelText";import {Table,TableBody,@@ -8,8 +8,8 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { keyWithPosition } from "@/react/lib/keyWithPosition";+} from "@/components/ui/table";+import { keyWithPosition } from "@/lib/keyWithPosition";import type {DatabaseMetadata,ProcedureMetadata,diff --git a/frontend/src/react/components/sql-editor/Panels/SequencesPanel/SequencesPanel.tsx b/frontend/src/modules/sql-editor/components/Panels/SequencesPanel/SequencesPanel.tsxsimilarity index 87%rename from frontend/src/react/components/sql-editor/Panels/SequencesPanel/SequencesPanel.tsxrename to frontend/src/modules/sql-editor/components/Panels/SequencesPanel/SequencesPanel.tsxindex f92f0335e6..ba52248da4 100644--- a/frontend/src/react/components/sql-editor/Panels/SequencesPanel/SequencesPanel.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/SequencesPanel/SequencesPanel.tsx@@ -1,7 +1,7 @@import { useState } from "react";-import { useAppDatabaseMetadata } from "@/react/hooks/useAppDatabaseMetadata";-import { useConnectionOfCurrentSQLEditorTab } from "@/react/hooks/useSQLEditorBridge";-import { keyWithPosition } from "@/react/lib/keyWithPosition";+import { useAppDatabaseMetadata } from "@/hooks/useAppDatabaseMetadata";+import { keyWithPosition } from "@/lib/keyWithPosition";+import { useConnectionOfCurrentSQLEditorTab } from "@/modules/sql-editor/hooks/useSQLEditorState";import { PanelSearchBox } from "../common/PanelSearchBox";import { useViewStateNav } from "../common/useViewStateNav";import { SequencesTable } from "./SequencesTable";diff --git a/frontend/src/react/components/sql-editor/Panels/SequencesPanel/SequencesTable.tsx b/frontend/src/modules/sql-editor/components/Panels/SequencesPanel/SequencesTable.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/Panels/SequencesPanel/SequencesTable.tsxrename to frontend/src/modules/sql-editor/components/Panels/SequencesPanel/SequencesTable.tsxindex f6da1226c6..6937b523f3 100644--- a/frontend/src/react/components/sql-editor/Panels/SequencesPanel/SequencesTable.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/SequencesPanel/SequencesTable.tsx@@ -1,6 +1,6 @@import { useEffect, useMemo, useRef } from "react";import { useTranslation } from "react-i18next";-import { Checkbox } from "@/react/components/ui/checkbox";+import { Checkbox } from "@/components/ui/checkbox";import {Table,TableBody,@@ -8,8 +8,8 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { keyWithPosition } from "@/react/lib/keyWithPosition";+} from "@/components/ui/table";+import { keyWithPosition } from "@/lib/keyWithPosition";import type {DatabaseMetadata,SchemaMetadata,diff --git a/frontend/src/react/components/sql-editor/Panels/TablesPanel/TableDetail.tsx b/frontend/src/modules/sql-editor/components/Panels/TablesPanel/TableDetail.tsxsimilarity index 96%rename from frontend/src/react/components/sql-editor/Panels/TablesPanel/TableDetail.tsxrename to frontend/src/modules/sql-editor/components/Panels/TablesPanel/TableDetail.tsxindex 5b5d3c00eb..6eca2fd71f 100644--- a/frontend/src/react/components/sql-editor/Panels/TablesPanel/TableDetail.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/TablesPanel/TableDetail.tsx@@ -9,17 +9,9 @@ import {} from "lucide-react";import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import {- Tabs,- TabsList,- TabsPanel,- TabsTrigger,-} from "@/react/components/ui/tabs";-import {- extractKeyWithPosition,- keyWithPosition,-} from "@/react/lib/keyWithPosition";+import { Button } from "@/components/ui/button";+import { Tabs, TabsList, TabsPanel, TabsTrigger } from "@/components/ui/tabs";+import { extractKeyWithPosition, keyWithPosition } from "@/lib/keyWithPosition";import type {Database,DatabaseMetadata,diff --git a/frontend/src/react/components/sql-editor/Panels/TablesPanel/TablesPanel.tsx b/frontend/src/modules/sql-editor/components/Panels/TablesPanel/TablesPanel.tsxsimilarity index 90%rename from frontend/src/react/components/sql-editor/Panels/TablesPanel/TablesPanel.tsxrename to frontend/src/modules/sql-editor/components/Panels/TablesPanel/TablesPanel.tsxindex 8eeee654a2..5019fe7687 100644--- a/frontend/src/react/components/sql-editor/Panels/TablesPanel/TablesPanel.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/TablesPanel/TablesPanel.tsx@@ -1,6 +1,6 @@import { useState } from "react";-import { useAppDatabaseMetadata } from "@/react/hooks/useAppDatabaseMetadata";-import { useConnectionOfCurrentSQLEditorTab } from "@/react/hooks/useSQLEditorBridge";+import { useAppDatabaseMetadata } from "@/hooks/useAppDatabaseMetadata";+import { useConnectionOfCurrentSQLEditorTab } from "@/modules/sql-editor/hooks/useSQLEditorState";import { PanelSearchBox } from "../common/PanelSearchBox";import { useViewStateNav } from "../common/useViewStateNav";import { TableDetail } from "./TableDetail";diff --git a/frontend/src/react/components/sql-editor/Panels/TablesPanel/TablesTable.tsx b/frontend/src/modules/sql-editor/components/Panels/TablesPanel/TablesTable.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/Panels/TablesPanel/TablesTable.tsxrename to frontend/src/modules/sql-editor/components/Panels/TablesPanel/TablesTable.tsxindex 4e09814923..289c090311 100644--- a/frontend/src/react/components/sql-editor/Panels/TablesPanel/TablesTable.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/TablesPanel/TablesTable.tsx@@ -1,6 +1,6 @@import { useEffect, useMemo, useRef } from "react";import { useTranslation } from "react-i18next";-import { HighlightLabelText } from "@/react/components/HighlightLabelText";+import { HighlightLabelText } from "@/components/HighlightLabelText";import {Table,TableBody,@@ -8,7 +8,7 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";+} from "@/components/ui/table";import type {Database,DatabaseMetadata,diff --git a/frontend/src/react/components/sql-editor/Panels/TriggersPanel/TriggersPanel.tsx b/frontend/src/modules/sql-editor/components/Panels/TriggersPanel/TriggersPanel.tsxsimilarity index 88%rename from frontend/src/react/components/sql-editor/Panels/TriggersPanel/TriggersPanel.tsxrename to frontend/src/modules/sql-editor/components/Panels/TriggersPanel/TriggersPanel.tsxindex 5fdeb2c182..6593cd4198 100644--- a/frontend/src/react/components/sql-editor/Panels/TriggersPanel/TriggersPanel.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/TriggersPanel/TriggersPanel.tsx@@ -1,12 +1,9 @@import { ChevronLeft, Zap } from "lucide-react";import { useState } from "react";-import { Button } from "@/react/components/ui/button";-import { useAppDatabaseMetadata } from "@/react/hooks/useAppDatabaseMetadata";-import { useConnectionOfCurrentSQLEditorTab } from "@/react/hooks/useSQLEditorBridge";-import {- extractKeyWithPosition,- keyWithPosition,-} from "@/react/lib/keyWithPosition";+import { Button } from "@/components/ui/button";+import { useAppDatabaseMetadata } from "@/hooks/useAppDatabaseMetadata";+import { extractKeyWithPosition, keyWithPosition } from "@/lib/keyWithPosition";+import { useConnectionOfCurrentSQLEditorTab } from "@/modules/sql-editor/hooks/useSQLEditorState";import { CodeViewer } from "../common/CodeViewer";import { PanelSearchBox } from "../common/PanelSearchBox";import { useViewStateNav } from "../common/useViewStateNav";diff --git a/frontend/src/react/components/sql-editor/Panels/TriggersPanel/TriggersTable.tsx b/frontend/src/modules/sql-editor/components/Panels/TriggersPanel/TriggersTable.tsxsimilarity index 93%rename from frontend/src/react/components/sql-editor/Panels/TriggersPanel/TriggersTable.tsxrename to frontend/src/modules/sql-editor/components/Panels/TriggersPanel/TriggersTable.tsxindex b86eb4061a..648553f4fa 100644--- a/frontend/src/react/components/sql-editor/Panels/TriggersPanel/TriggersTable.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/TriggersPanel/TriggersTable.tsx@@ -1,6 +1,6 @@import { useEffect, useMemo, useRef } from "react";import { useTranslation } from "react-i18next";-import { HighlightLabelText } from "@/react/components/HighlightLabelText";+import { HighlightLabelText } from "@/components/HighlightLabelText";import {Table,TableBody,@@ -8,8 +8,8 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { keyWithPosition } from "@/react/lib/keyWithPosition";+} from "@/components/ui/table";+import { keyWithPosition } from "@/lib/keyWithPosition";import type {TableMetadata,TriggerMetadata,diff --git a/frontend/src/react/components/sql-editor/Panels/ViewsPanel/ViewDetail.tsx b/frontend/src/modules/sql-editor/components/Panels/ViewsPanel/ViewDetail.tsxsimilarity index 96%rename from frontend/src/react/components/sql-editor/Panels/ViewsPanel/ViewDetail.tsxrename to frontend/src/modules/sql-editor/components/Panels/ViewsPanel/ViewDetail.tsxindex d9bc8e6bb2..b12557f2e0 100644--- a/frontend/src/react/components/sql-editor/Panels/ViewsPanel/ViewDetail.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/ViewsPanel/ViewDetail.tsx@@ -1,14 +1,9 @@import { ChevronLeft, Code, Columns, Eye, FileSymlink } from "lucide-react";import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";-import {- Tabs,- TabsList,- TabsPanel,- TabsTrigger,-} from "@/react/components/ui/tabs";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";+import { Tabs, TabsList, TabsPanel, TabsTrigger } from "@/components/ui/tabs";import type {Database,DatabaseMetadata,diff --git a/frontend/src/react/components/sql-editor/Panels/ViewsPanel/ViewsPanel.tsx b/frontend/src/modules/sql-editor/components/Panels/ViewsPanel/ViewsPanel.tsxsimilarity index 89%rename from frontend/src/react/components/sql-editor/Panels/ViewsPanel/ViewsPanel.tsxrename to frontend/src/modules/sql-editor/components/Panels/ViewsPanel/ViewsPanel.tsxindex d5cc7b8005..15498e24cf 100644--- a/frontend/src/react/components/sql-editor/Panels/ViewsPanel/ViewsPanel.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/ViewsPanel/ViewsPanel.tsx@@ -1,6 +1,6 @@import { useState } from "react";-import { useAppDatabaseMetadata } from "@/react/hooks/useAppDatabaseMetadata";-import { useConnectionOfCurrentSQLEditorTab } from "@/react/hooks/useSQLEditorBridge";+import { useAppDatabaseMetadata } from "@/hooks/useAppDatabaseMetadata";+import { useConnectionOfCurrentSQLEditorTab } from "@/modules/sql-editor/hooks/useSQLEditorState";import { PanelSearchBox } from "../common/PanelSearchBox";import { useViewStateNav } from "../common/useViewStateNav";import { ViewDetail } from "./ViewDetail";diff --git a/frontend/src/react/components/sql-editor/Panels/ViewsPanel/ViewsTable.tsx b/frontend/src/modules/sql-editor/components/Panels/ViewsPanel/ViewsTable.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/Panels/ViewsPanel/ViewsTable.tsxrename to frontend/src/modules/sql-editor/components/Panels/ViewsPanel/ViewsTable.tsxindex eeaa251501..4030d979f6 100644--- a/frontend/src/react/components/sql-editor/Panels/ViewsPanel/ViewsTable.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/ViewsPanel/ViewsTable.tsx@@ -1,6 +1,6 @@import { useEffect, useMemo, useRef } from "react";import { useTranslation } from "react-i18next";-import { HighlightLabelText } from "@/react/components/HighlightLabelText";+import { HighlightLabelText } from "@/components/HighlightLabelText";import {Table,TableBody,@@ -8,7 +8,7 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";+} from "@/components/ui/table";import type {DatabaseMetadata,SchemaMetadata,diff --git a/frontend/src/react/components/sql-editor/Panels/common/CodeViewer.tsx b/frontend/src/modules/sql-editor/components/Panels/common/CodeViewer.tsxsimilarity index 90%rename from frontend/src/react/components/sql-editor/Panels/common/CodeViewer.tsxrename to frontend/src/modules/sql-editor/components/Panels/common/CodeViewer.tsxindex fb89a2b0c2..4f55e718e3 100644--- a/frontend/src/react/components/sql-editor/Panels/common/CodeViewer.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/common/CodeViewer.tsx@@ -8,16 +8,16 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";-import { aiContextEvents } from "@/plugins/ai/logic";-import * as promptUtils from "@/plugins/ai/logic/prompt";-import type { ChatAction } from "@/plugins/ai/types";-import { ReadonlyMonaco } from "@/react/components/monaco/ReadonlyMonaco";-import { formatSQL } from "@/react/components/monaco/sqlFormatter";-import type { MonacoModule } from "@/react/components/monaco/types";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";-import { cn } from "@/react/lib/utils";-import { useSQLEditorStore } from "@/react/stores/sqlEditor";+import { ReadonlyMonaco } from "@/components/monaco/ReadonlyMonaco";+import { formatSQL } from "@/components/monaco/sqlFormatter";+import type { MonacoModule } from "@/components/monaco/types";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";+import { cn } from "@/lib/utils";+import { aiContextEvents } from "@/modules/ai/logic";+import * as promptUtils from "@/modules/ai/logic/prompt";+import type { ChatAction } from "@/modules/ai/types";+import { useSQLEditorStore } from "@/modules/sql-editor/store";import { dialectOfEngineV1 } from "@/types";import type { Database } from "@/types/proto-es/v1/database_service_pb";import {diff --git a/frontend/src/react/components/sql-editor/Panels/common/DefinitionViewer.tsx b/frontend/src/modules/sql-editor/components/Panels/common/DefinitionViewer.tsxsimilarity index 88%rename from frontend/src/react/components/sql-editor/Panels/common/DefinitionViewer.tsxrename to frontend/src/modules/sql-editor/components/Panels/common/DefinitionViewer.tsxindex 87f609184f..f5c9b7a9a5 100644--- a/frontend/src/react/components/sql-editor/Panels/common/DefinitionViewer.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/common/DefinitionViewer.tsx@@ -1,12 +1,12 @@import type * as monaco from "monaco-editor";import { useCallback, useEffect, useMemo, useState } from "react";-import { aiContextEvents } from "@/plugins/ai/logic";-import * as promptUtils from "@/plugins/ai/logic/prompt";-import type { ChatAction } from "@/plugins/ai/types";-import { ReadonlyMonaco } from "@/react/components/monaco/ReadonlyMonaco";-import { formatSQL } from "@/react/components/monaco/sqlFormatter";-import type { MonacoModule } from "@/react/components/monaco/types";-import { useSQLEditorStore } from "@/react/stores/sqlEditor";+import { ReadonlyMonaco } from "@/components/monaco/ReadonlyMonaco";+import { formatSQL } from "@/components/monaco/sqlFormatter";+import type { MonacoModule } from "@/components/monaco/types";+import { aiContextEvents } from "@/modules/ai/logic";+import * as promptUtils from "@/modules/ai/logic/prompt";+import type { ChatAction } from "@/modules/ai/types";+import { useSQLEditorStore } from "@/modules/sql-editor/store";import { dialectOfEngineV1 } from "@/types";import type { Database } from "@/types/proto-es/v1/database_service_pb";import { getInstanceResource, nextAnimationFrame } from "@/utils";diff --git a/frontend/src/react/components/sql-editor/Panels/common/EllipsisCell.test.tsx b/frontend/src/modules/sql-editor/components/Panels/common/EllipsisCell.test.tsxsimilarity index 98%rename from frontend/src/react/components/sql-editor/Panels/common/EllipsisCell.test.tsxrename to frontend/src/modules/sql-editor/components/Panels/common/EllipsisCell.test.tsxindex 9b810235ca..df2de1a87e 100644--- a/frontend/src/react/components/sql-editor/Panels/common/EllipsisCell.test.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/common/EllipsisCell.test.tsx@@ -5,7 +5,7 @@ import { afterEach, describe, expect, test } from "vitest";import {LAYER_ROOT_ID,LAYER_SURFACE_CLASS,-} from "@/react/components/ui/layer";+} from "@/components/ui/layer";import { EllipsisCell } from "./EllipsisCell";(diff --git a/frontend/src/react/components/sql-editor/Panels/common/EllipsisCell.tsx b/frontend/src/modules/sql-editor/components/Panels/common/EllipsisCell.tsxsimilarity index 92%rename from frontend/src/react/components/sql-editor/Panels/common/EllipsisCell.tsxrename to frontend/src/modules/sql-editor/components/Panels/common/EllipsisCell.tsxindex dfe1729d4e..db49cb9779 100644--- a/frontend/src/react/components/sql-editor/Panels/common/EllipsisCell.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/common/EllipsisCell.tsx@@ -1,8 +1,8 @@import { useCallback, useEffect, useRef, useState } from "react";import { createPortal } from "react-dom";-import { HighlightLabelText } from "@/react/components/HighlightLabelText";-import { getLayerRoot, LAYER_SURFACE_CLASS } from "@/react/components/ui/layer";-import { cn } from "@/react/lib/utils";+import { HighlightLabelText } from "@/components/HighlightLabelText";+import { getLayerRoot, LAYER_SURFACE_CLASS } from "@/components/ui/layer";+import { cn } from "@/lib/utils";interface EllipsisCellProps {readonly content: string;diff --git a/frontend/src/react/components/sql-editor/Panels/common/PanelSearchBox.tsx b/frontend/src/modules/sql-editor/components/Panels/common/PanelSearchBox.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/Panels/common/PanelSearchBox.tsxrename to frontend/src/modules/sql-editor/components/Panels/common/PanelSearchBox.tsxindex 71779fcdd0..45e4fe0235 100644--- a/frontend/src/react/components/sql-editor/Panels/common/PanelSearchBox.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/common/PanelSearchBox.tsx@@ -1,8 +1,8 @@import { Search, X } from "lucide-react";import type { ChangeEvent } from "react";import { useTranslation } from "react-i18next";-import { Input } from "@/react/components/ui/input";-import { cn } from "@/react/lib/utils";+import { Input } from "@/components/ui/input";+import { cn } from "@/lib/utils";interface PanelSearchBoxProps {value: string;diff --git a/frontend/src/react/components/sql-editor/Panels/common/SchemaSelectToolbar.tsx b/frontend/src/modules/sql-editor/components/Panels/common/SchemaSelectToolbar.tsxsimilarity index 89%rename from frontend/src/react/components/sql-editor/Panels/common/SchemaSelectToolbar.tsxrename to frontend/src/modules/sql-editor/components/Panels/common/SchemaSelectToolbar.tsxindex b0c1b73a19..bfcceb526b 100644--- a/frontend/src/react/components/sql-editor/Panels/common/SchemaSelectToolbar.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/common/SchemaSelectToolbar.tsx@@ -5,9 +5,9 @@ import {SelectItem,SelectTrigger,SelectValue,-} from "@/react/components/ui/select";-import { useAppDatabaseMetadata } from "@/react/hooks/useAppDatabaseMetadata";-import { useConnectionOfCurrentSQLEditorTab } from "@/react/hooks/useSQLEditorBridge";+} from "@/components/ui/select";+import { useAppDatabaseMetadata } from "@/hooks/useAppDatabaseMetadata";+import { useConnectionOfCurrentSQLEditorTab } from "@/modules/sql-editor/hooks/useSQLEditorState";import { hasSchemaProperty } from "@/utils";import { useViewStateNav } from "./useViewStateNav";diff --git a/frontend/src/react/components/sql-editor/Panels/common/tables/ColumnsTable.tsx b/frontend/src/modules/sql-editor/components/Panels/common/tables/ColumnsTable.tsxsimilarity index 96%rename from frontend/src/react/components/sql-editor/Panels/common/tables/ColumnsTable.tsxrename to frontend/src/modules/sql-editor/components/Panels/common/tables/ColumnsTable.tsxindex d27249614e..433e9ea07f 100644--- a/frontend/src/react/components/sql-editor/Panels/common/tables/ColumnsTable.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/common/tables/ColumnsTable.tsx@@ -1,8 +1,7 @@import { useEffect, useMemo, useRef } from "react";import { useTranslation } from "react-i18next";-import { HighlightLabelText } from "@/react/components/HighlightLabelText";-import { engineSupportsMultiSchema } from "@/react/components/SchemaEditorLite/core/spec";-import { Checkbox } from "@/react/components/ui/checkbox";+import { HighlightLabelText } from "@/components/HighlightLabelText";+import { Checkbox } from "@/components/ui/checkbox";import {Table,TableBody,@@ -10,7 +9,8 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";+} from "@/components/ui/table";+import { engineSupportsMultiSchema } from "@/modules/schema-editor/core/spec";import { Engine } from "@/types/proto-es/v1/common_pb";import type {ColumnMetadata,diff --git a/frontend/src/react/components/sql-editor/Panels/common/tables/DependencyColumnsTable.tsx b/frontend/src/modules/sql-editor/components/Panels/common/tables/DependencyColumnsTable.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/Panels/common/tables/DependencyColumnsTable.tsxrename to frontend/src/modules/sql-editor/components/Panels/common/tables/DependencyColumnsTable.tsxindex e62904f378..8646f14ea2 100644--- a/frontend/src/react/components/sql-editor/Panels/common/tables/DependencyColumnsTable.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/common/tables/DependencyColumnsTable.tsx@@ -1,6 +1,6 @@import { useMemo } from "react";import { useTranslation } from "react-i18next";-import { HighlightLabelText } from "@/react/components/HighlightLabelText";+import { HighlightLabelText } from "@/components/HighlightLabelText";import {Table,TableBody,@@ -8,7 +8,7 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";+} from "@/components/ui/table";import type {Database,ViewMetadata,diff --git a/frontend/src/react/components/sql-editor/Panels/common/tables/ForeignKeysTable.tsx b/frontend/src/modules/sql-editor/components/Panels/common/tables/ForeignKeysTable.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/Panels/common/tables/ForeignKeysTable.tsxrename to frontend/src/modules/sql-editor/components/Panels/common/tables/ForeignKeysTable.tsxindex a8ee9b3231..f70c94315c 100644--- a/frontend/src/react/components/sql-editor/Panels/common/tables/ForeignKeysTable.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/common/tables/ForeignKeysTable.tsx@@ -1,6 +1,6 @@import { useEffect, useMemo, useRef } from "react";import { useTranslation } from "react-i18next";-import { HighlightLabelText } from "@/react/components/HighlightLabelText";+import { HighlightLabelText } from "@/components/HighlightLabelText";import {Table,TableBody,@@ -8,7 +8,7 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";+} from "@/components/ui/table";import { Engine } from "@/types/proto-es/v1/common_pb";import type {Database,diff --git a/frontend/src/react/components/sql-editor/Panels/common/tables/IndexesTable.tsx b/frontend/src/modules/sql-editor/components/Panels/common/tables/IndexesTable.tsxsimilarity index 94%rename from frontend/src/react/components/sql-editor/Panels/common/tables/IndexesTable.tsxrename to frontend/src/modules/sql-editor/components/Panels/common/tables/IndexesTable.tsxindex 4ca52c0086..094cae6570 100644--- a/frontend/src/react/components/sql-editor/Panels/common/tables/IndexesTable.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/common/tables/IndexesTable.tsx@@ -1,7 +1,7 @@import { useEffect, useMemo, useRef } from "react";import { useTranslation } from "react-i18next";-import { HighlightLabelText } from "@/react/components/HighlightLabelText";-import { Checkbox } from "@/react/components/ui/checkbox";+import { HighlightLabelText } from "@/components/HighlightLabelText";+import { Checkbox } from "@/components/ui/checkbox";import {Table,TableBody,@@ -9,7 +9,7 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";+} from "@/components/ui/table";import type { TableMetadata } from "@/types/proto-es/v1/database_service_pb";import { EllipsisCell } from "../EllipsisCell";import { useViewStateNav } from "../useViewStateNav";diff --git a/frontend/src/react/components/sql-editor/Panels/common/tables/PartitionsTable.tsx b/frontend/src/modules/sql-editor/components/Panels/common/tables/PartitionsTable.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/Panels/common/tables/PartitionsTable.tsxrename to frontend/src/modules/sql-editor/components/Panels/common/tables/PartitionsTable.tsxindex 436054f316..703fd05418 100644--- a/frontend/src/react/components/sql-editor/Panels/common/tables/PartitionsTable.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/common/tables/PartitionsTable.tsx@@ -1,7 +1,7 @@import { ChevronDown } from "lucide-react";import { useEffect, useMemo, useRef } from "react";import { useTranslation } from "react-i18next";-import { HighlightLabelText } from "@/react/components/HighlightLabelText";+import { HighlightLabelText } from "@/components/HighlightLabelText";import {Table,TableBody,@@ -9,7 +9,7 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";+} from "@/components/ui/table";import type {TableMetadata,TablePartitionMetadata,diff --git a/frontend/src/react/components/sql-editor/Panels/common/useAIActions.ts b/frontend/src/modules/sql-editor/components/Panels/common/useAIActions.tssimilarity index 96%rename from frontend/src/react/components/sql-editor/Panels/common/useAIActions.tsrename to frontend/src/modules/sql-editor/components/Panels/common/useAIActions.tsindex d5c0413e81..237d529db3 100644--- a/frontend/src/react/components/sql-editor/Panels/common/useAIActions.ts+++ b/frontend/src/modules/sql-editor/components/Panels/common/useAIActions.ts@@ -1,8 +1,8 @@import type * as monaco from "monaco-editor";import { useEffect } from "react";-import type { ChatAction } from "@/plugins/ai/types";-import type { MonacoModule } from "@/react/components/monaco/types";-import { useAppStore } from "@/react/stores/app";+import type { MonacoModule } from "@/components/monaco/types";+import type { ChatAction } from "@/modules/ai/types";+import { useAppStore } from "@/stores/app";import { Setting_SettingName } from "@/types/proto-es/v1/setting_service_pb";interface UseAIActionsOptions {diff --git a/frontend/src/react/components/sql-editor/Panels/common/useTableContainerHeight.ts b/frontend/src/modules/sql-editor/components/Panels/common/useTableContainerHeight.tssimilarity index 100%rename from frontend/src/react/components/sql-editor/Panels/common/useTableContainerHeight.tsrename to frontend/src/modules/sql-editor/components/Panels/common/useTableContainerHeight.tsdiff --git a/frontend/src/react/components/sql-editor/Panels/common/useViewStateNav.test.tsx b/frontend/src/modules/sql-editor/components/Panels/common/useViewStateNav.test.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/Panels/common/useViewStateNav.test.tsxrename to frontend/src/modules/sql-editor/components/Panels/common/useViewStateNav.test.tsxindex 39f0fcbc6a..1824f49f52 100644--- a/frontend/src/react/components/sql-editor/Panels/common/useViewStateNav.test.tsx+++ b/frontend/src/modules/sql-editor/components/Panels/common/useViewStateNav.test.tsx@@ -45,9 +45,9 @@ const tabsState = () => ({updateTab: mocks.updateTab,});-vi.mock("@/store", () => ({}));+vi.mock("@/stores", () => ({}));-vi.mock("@/react/stores/sqlEditor/tab", () => ({+vi.mock("@/modules/sql-editor/store/tab", () => ({// Selector hook — run against the stubbed tabs state.useSQLEditorTabState: (selector: (s: unknown) => unknown) =>selector(tabsState()),diff --git a/frontend/src/react/components/sql-editor/Panels/common/useViewStateNav.ts b/frontend/src/modules/sql-editor/components/Panels/common/useViewStateNav.tssimilarity index 97%rename from frontend/src/react/components/sql-editor/Panels/common/useViewStateNav.tsrename to frontend/src/modules/sql-editor/components/Panels/common/useViewStateNav.tsindex b48763078e..e75b4af9e4 100644--- a/frontend/src/react/components/sql-editor/Panels/common/useViewStateNav.ts+++ b/frontend/src/modules/sql-editor/components/Panels/common/useViewStateNav.ts@@ -2,7 +2,7 @@ import { useCallback } from "react";import {getSQLEditorTabsState,useSQLEditorTabState,-} from "@/react/stores/sqlEditor/tab";+} from "@/modules/sql-editor/store/tab";import { defaultViewState } from "@/types";import type { EditorPanelViewState } from "@/types/sqlEditor/tabViewState";diff --git a/frontend/src/react/components/sql-editor/PanelsPage.tsx b/frontend/src/modules/sql-editor/components/PanelsPage.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/PanelsPage.tsxrename to frontend/src/modules/sql-editor/components/PanelsPage.tsxdiff --git a/frontend/src/react/components/sql-editor/ProceduresPanel.tsx b/frontend/src/modules/sql-editor/components/ProceduresPanel.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/ProceduresPanel.tsxrename to frontend/src/modules/sql-editor/components/ProceduresPanel.tsxdiff --git a/frontend/src/react/components/sql-editor/QueryContextSettingPopover.test.tsx b/frontend/src/modules/sql-editor/components/QueryContextSettingPopover.test.tsxsimilarity index 96%rename from frontend/src/react/components/sql-editor/QueryContextSettingPopover.test.tsxrename to frontend/src/modules/sql-editor/components/QueryContextSettingPopover.test.tsxindex 194f2654f6..8ab8ce096a 100644--- a/frontend/src/react/components/sql-editor/QueryContextSettingPopover.test.tsx+++ b/frontend/src/modules/sql-editor/components/QueryContextSettingPopover.test.tsx@@ -33,20 +33,20 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/store", () => ({}));+vi.mock("@/stores", () => ({}));-vi.mock("@/react/hooks/useSQLEditorBridge", () => ({+vi.mock("@/modules/sql-editor/hooks/useSQLEditorState", () => ({useConnectionOfCurrentSQLEditorTab: () => mocks.connectionResult,useSQLEditorQueryDataPolicy: () => mocks.queryDataPolicy,}));-vi.mock("@/react/stores/sqlEditor/tab", () => ({+vi.mock("@/modules/sql-editor/store/tab", () => ({useSQLEditorTabState: (selector: (s: unknown) => unknown) =>selector(mocks.tabState),getSQLEditorTabsState: () => ({ updateCurrentTab: mocks.updateCurrentTab }),}));-vi.mock("@/react/stores/sqlEditor/editor", () => ({+vi.mock("@/modules/sql-editor/store/editor", () => ({useSQLEditorEditorState: (selector: (s: unknown) => unknown) =>selector(mocks.editorState),getSQLEditorEditorState: () => ({@@ -65,7 +65,7 @@ vi.mock("lodash-es", () => ({}));// Inline Popover and Tooltip so the popover content renders synchronously-vi.mock("@/react/components/ui/popover", () => ({+vi.mock("@/components/ui/popover", () => ({Popover: ({ children }: { children: React.ReactNode }) => (<div data-testid="popover">{children}</div>),@@ -86,11 +86,11 @@ vi.mock("@/react/components/ui/popover", () => ({),}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: ({ children }: { children: React.ReactNode }) => <>{children}</>,}));-vi.mock("@/react/components/MaxRowCountSelect", () => ({+vi.mock("@/components/MaxRowCountSelect", () => ({MaxRowCountSelect: ({value,onChange,diff --git a/frontend/src/react/components/sql-editor/QueryContextSettingPopover.tsx b/frontend/src/modules/sql-editor/components/QueryContextSettingPopover.tsxsimilarity index 94%rename from frontend/src/react/components/sql-editor/QueryContextSettingPopover.tsxrename to frontend/src/modules/sql-editor/components/QueryContextSettingPopover.tsxindex 95c26cb5bd..d9de2ea7da 100644--- a/frontend/src/react/components/sql-editor/QueryContextSettingPopover.tsx+++ b/frontend/src/modules/sql-editor/components/QueryContextSettingPopover.tsx@@ -2,28 +2,28 @@ import { orderBy } from "lodash-es";import { ChevronDown } from "lucide-react";import { useMemo } from "react";import { useTranslation } from "react-i18next";-import { MaxRowCountSelect } from "@/react/components/MaxRowCountSelect";-import { Button } from "@/react/components/ui/button";+import { MaxRowCountSelect } from "@/components/MaxRowCountSelect";+import { Button } from "@/components/ui/button";import {Popover,PopoverContent,PopoverTrigger,-} from "@/react/components/ui/popover";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";-import { Tooltip } from "@/react/components/ui/tooltip";+} from "@/components/ui/popover";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";+import { Tooltip } from "@/components/ui/tooltip";+import { cn } from "@/lib/utils";import {useConnectionOfCurrentSQLEditorTab,useSQLEditorQueryDataPolicy,-} from "@/react/hooks/useSQLEditorBridge";-import { cn } from "@/react/lib/utils";+} from "@/modules/sql-editor/hooks/useSQLEditorState";import {getSQLEditorEditorState,useSQLEditorEditorState,-} from "@/react/stores/sqlEditor/editor";+} from "@/modules/sql-editor/store/editor";import {getSQLEditorTabsState,useSQLEditorTabState,-} from "@/react/stores/sqlEditor/tab";+} from "@/modules/sql-editor/store/tab";import { Engine } from "@/types/proto-es/v1/common_pb";import type { DataSource } from "@/types/proto-es/v1/instance_service_pb";import {diff --git a/frontend/src/react/components/sql-editor/ReadonlyModeNotSupported.test.tsx b/frontend/src/modules/sql-editor/components/ReadonlyModeNotSupported.test.tsxsimilarity index 96%rename from frontend/src/react/components/sql-editor/ReadonlyModeNotSupported.test.tsxrename to frontend/src/modules/sql-editor/components/ReadonlyModeNotSupported.test.tsxindex d51b17b313..e68a1818d4 100644--- a/frontend/src/react/components/sql-editor/ReadonlyModeNotSupported.test.tsx+++ b/frontend/src/modules/sql-editor/components/ReadonlyModeNotSupported.test.tsx@@ -32,11 +32,11 @@ vi.mock("react-i18next", () => ({// `useConnectionOfCurrentSQLEditorTab` now lives on the Pinia bridge hook// (the deleted tab-vue-state shim re-exported it). It returns PLAIN values// `{ connection, database, instance, environment }` — no Vue refs.-vi.mock("@/react/hooks/useSQLEditorBridge", () => ({+vi.mock("@/modules/sql-editor/hooks/useSQLEditorState", () => ({useConnectionOfCurrentSQLEditorTab: mocks.useConnectionOfCurrentSQLEditorTab,}));-vi.mock("@/react/components/instance/constants", () => ({+vi.mock("@/components/instance/constants", () => ({EngineIconPath: {[Engine.POSTGRES]: "/icons/postgres.svg",} as Record<string, string>,diff --git a/frontend/src/react/components/sql-editor/ReadonlyModeNotSupported.tsx b/frontend/src/modules/sql-editor/components/ReadonlyModeNotSupported.tsxsimilarity index 90%rename from frontend/src/react/components/sql-editor/ReadonlyModeNotSupported.tsxrename to frontend/src/modules/sql-editor/components/ReadonlyModeNotSupported.tsxindex 7f8fa7fcdb..a73b2ebee9 100644--- a/frontend/src/react/components/sql-editor/ReadonlyModeNotSupported.tsx+++ b/frontend/src/modules/sql-editor/components/ReadonlyModeNotSupported.tsx@@ -1,7 +1,7 @@import { ShieldAlert } from "lucide-react";import { Trans, useTranslation } from "react-i18next";-import { EngineIcon } from "@/react/components/EngineIcon";-import { useConnectionOfCurrentSQLEditorTab } from "@/react/hooks/useSQLEditorBridge";+import { EngineIcon } from "@/components/EngineIcon";+import { useConnectionOfCurrentSQLEditorTab } from "@/modules/sql-editor/hooks/useSQLEditorState";import { AdminModeButton } from "./AdminModeButton";/**diff --git a/frontend/src/react/components/sql-editor/RequestDrawerHost.tsx b/frontend/src/modules/sql-editor/components/RequestDrawerHost.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/RequestDrawerHost.tsxrename to frontend/src/modules/sql-editor/components/RequestDrawerHost.tsxindex 27174ade28..f0491e6e42 100644--- a/frontend/src/react/components/sql-editor/RequestDrawerHost.tsx+++ b/frontend/src/modules/sql-editor/components/RequestDrawerHost.tsx@@ -5,7 +5,7 @@ import {useMemo,useState,} from "react";-import { RequestRoleSheet } from "@/react/pages/settings/RequestRoleSheet";+import { RequestRoleSheet } from "@/modules/access-control/RequestRoleSheet";import type { DatabaseResource, Permission } from "@/types";import type { Project } from "@/types/proto-es/v1/project_service_pb";import { AccessGrantRequestDrawer } from "./AccessGrantRequestDrawer";diff --git a/frontend/src/react/components/sql-editor/RequestExportButton.tsx b/frontend/src/modules/sql-editor/components/RequestExportButton.tsxsimilarity index 87%rename from frontend/src/react/components/sql-editor/RequestExportButton.tsxrename to frontend/src/modules/sql-editor/components/RequestExportButton.tsxindex b114a8f954..e621c28991 100644--- a/frontend/src/react/components/sql-editor/RequestExportButton.tsx+++ b/frontend/src/modules/sql-editor/components/RequestExportButton.tsx@@ -1,13 +1,13 @@import { Download } from "lucide-react";import { useEffect, useState } from "react";import { useTranslation } from "react-i18next";-import { FeatureBadge } from "@/react/components/FeatureBadge";-import { PermissionGuard } from "@/react/components/PermissionGuard";-import { Button } from "@/react/components/ui/button";-import { useAppProject } from "@/react/hooks/useAppProject";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";-import { useSQLEditorEditorState } from "@/react/stores/sqlEditor/editor";+import { FeatureBadge } from "@/components/FeatureBadge";+import { PermissionGuard } from "@/components/PermissionGuard";+import { Button } from "@/components/ui/button";+import { useAppProject } from "@/hooks/useAppProject";+import { cn } from "@/lib/utils";+import { useSQLEditorEditorState } from "@/modules/sql-editor/store/editor";+import { useAppStore } from "@/stores/app";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { AccessGrantRequestDrawer } from "./AccessGrantRequestDrawer";import { useRequestDrawerHost } from "./RequestDrawerHost";diff --git a/frontend/src/react/components/sql-editor/RequestQueryButton.test.tsx b/frontend/src/modules/sql-editor/components/RequestQueryButton.test.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/RequestQueryButton.test.tsxrename to frontend/src/modules/sql-editor/components/RequestQueryButton.test.tsxindex abcddb27b9..9bceedbb73 100644--- a/frontend/src/react/components/sql-editor/RequestQueryButton.test.tsx+++ b/frontend/src/modules/sql-editor/components/RequestQueryButton.test.tsx@@ -48,16 +48,16 @@ vi.mock("./theme/useActiveSQLEditorTheme", () => ({}),}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({useSubscriptionV1Store: mocks.useSubscriptionV1Store,hasFeature: mocks.hasFeature,}));-vi.mock("@/react/hooks/useAppProject", () => ({+vi.mock("@/hooks/useAppProject", () => ({useAppProject: () => mocks.projectData,}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {// Build the state object lazily on every read so per-test reassignments// like `mocks.roleList = [...]` are reflected. Capturing at module init// would freeze the empty default and break the role-selection cases.@@ -76,7 +76,7 @@ vi.mock("@/react/stores/app", () => {};});-vi.mock("@/react/stores/sqlEditor/editor-vue-state", () => ({+vi.mock("@/modules/sql-editor/store/editor-vue-state", () => ({useSQLEditorVueState: mocks.useSQLEditorVueState,}));@@ -100,11 +100,11 @@ vi.mock("@/types/proto-es/v1/subscription_service_pb", () => ({},}));-vi.mock("@/react/components/FeatureBadge", () => ({+vi.mock("@/components/FeatureBadge", () => ({FeatureBadge: () => <span data-testid="feature-badge" />,}));-vi.mock("@/react/components/PermissionGuard", () => ({+vi.mock("@/components/PermissionGuard", () => ({PermissionGuard: ({children,}: {@@ -112,7 +112,7 @@ vi.mock("@/react/components/PermissionGuard", () => ({}) => <>{children({ disabled: false })}</>,}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,onClick,@@ -130,7 +130,7 @@ vi.mock("@/react/components/ui/button", () => ({),}));-vi.mock("@/react/pages/settings/RequestRoleSheet", () => ({+vi.mock("@/modules/access-control/RequestRoleSheet", () => ({RequestRoleSheet: ({open,onClose,diff --git a/frontend/src/react/components/sql-editor/RequestQueryButton.tsx b/frontend/src/modules/sql-editor/components/RequestQueryButton.tsxsimilarity index 93%rename from frontend/src/react/components/sql-editor/RequestQueryButton.tsxrename to frontend/src/modules/sql-editor/components/RequestQueryButton.tsxindex f0e3469602..3735b4d433 100644--- a/frontend/src/react/components/sql-editor/RequestQueryButton.tsx+++ b/frontend/src/modules/sql-editor/components/RequestQueryButton.tsx@@ -1,14 +1,14 @@import { ShieldUser } from "lucide-react";import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { FeatureBadge } from "@/react/components/FeatureBadge";-import { PermissionGuard } from "@/react/components/PermissionGuard";-import { Button } from "@/react/components/ui/button";-import { useAppProject } from "@/react/hooks/useAppProject";-import { cn } from "@/react/lib/utils";-import { RequestRoleSheet } from "@/react/pages/settings/RequestRoleSheet";-import { useAppStore } from "@/react/stores/app";-import { useSQLEditorEditorState } from "@/react/stores/sqlEditor/editor";+import { FeatureBadge } from "@/components/FeatureBadge";+import { PermissionGuard } from "@/components/PermissionGuard";+import { Button } from "@/components/ui/button";+import { useAppProject } from "@/hooks/useAppProject";+import { cn } from "@/lib/utils";+import { RequestRoleSheet } from "@/modules/access-control/RequestRoleSheet";+import { useSQLEditorEditorState } from "@/modules/sql-editor/store/editor";+import { useAppStore } from "@/stores/app";import type { DatabaseResource, Permission } from "@/types";import { PRESET_ROLES, PresetRoleType } from "@/types";import type { PermissionDeniedDetail } from "@/types/proto-es/v1/common_pb";diff --git a/frontend/src/react/components/sql-editor/ResultPanel/BatchQuerySelect.tsx b/frontend/src/modules/sql-editor/components/ResultPanel/BatchQuerySelect.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/ResultPanel/BatchQuerySelect.tsxrename to frontend/src/modules/sql-editor/components/ResultPanel/BatchQuerySelect.tsxindex 710c24ea2a..218b3ed22c 100644--- a/frontend/src/react/components/sql-editor/ResultPanel/BatchQuerySelect.tsx+++ b/frontend/src/modules/sql-editor/components/ResultPanel/BatchQuerySelect.tsx@@ -8,22 +8,22 @@ import {DataExportButton,type DataExportRequest,type DownloadContent,-} from "@/react/components/DataExportButton";-import { DatabaseTableView } from "@/react/components/database";-import { EngineIconPath } from "@/react/components/instance/constants";-import { RequestExportButton } from "@/react/components/sql-editor/RequestExportButton";-import { useExportGrantBypass } from "@/react/components/sql-editor/useExportGrantBypass";-import { Button } from "@/react/components/ui/button";-import { Tooltip } from "@/react/components/ui/tooltip";-import { useSQLEditorQueryDataPolicy } from "@/react/hooks/useSQLEditorBridge";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";-import { useSQLEditorEditorState } from "@/react/stores/sqlEditor/editor";+} from "@/components/DataExportButton";+import { DatabaseTableView } from "@/components/database";+import { EngineIconPath } from "@/components/instance/constants";+import { Button } from "@/components/ui/button";+import { Tooltip } from "@/components/ui/tooltip";+import { cn } from "@/lib/utils";+import { RequestExportButton } from "@/modules/sql-editor/components/RequestExportButton";+import { useExportGrantBypass } from "@/modules/sql-editor/components/useExportGrantBypass";+import { useSQLEditorQueryDataPolicy } from "@/modules/sql-editor/hooks/useSQLEditorState";+import { useSQLEditorEditorState } from "@/modules/sql-editor/store/editor";import {getSQLEditorTabsState,useCurrentSQLEditorTab,useSQLEditorTabState,-} from "@/react/stores/sqlEditor/tab";+} from "@/modules/sql-editor/store/tab";+import { useAppStore } from "@/stores/app";import { ExportFormat } from "@/types/proto-es/v1/common_pb";import type { Database } from "@/types/proto-es/v1/database_service_pb";import { ExportRequestSchema } from "@/types/proto-es/v1/sql_service_pb";diff --git a/frontend/src/react/components/sql-editor/ResultPanel/ContextMenu.tsx b/frontend/src/modules/sql-editor/components/ResultPanel/ContextMenu.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/ResultPanel/ContextMenu.tsxrename to frontend/src/modules/sql-editor/components/ResultPanel/ContextMenu.tsxindex 1cee9ec077..4c5fb0a21d 100644--- a/frontend/src/react/components/sql-editor/ResultPanel/ContextMenu.tsx+++ b/frontend/src/modules/sql-editor/components/ResultPanel/ContextMenu.tsx@@ -5,7 +5,7 @@ import {ContextMenuContent,ContextMenuItem,ContextMenuTrigger,-} from "@/react/components/ui/context-menu";+} from "@/components/ui/context-menu";import { type CloseTabAction, resultTabEvents } from "./resultTabContext";interface TabContextMenuProps {diff --git a/frontend/src/react/components/sql-editor/ResultPanel/DatabaseQueryContext.tsx b/frontend/src/modules/sql-editor/components/ResultPanel/DatabaseQueryContext.tsxsimilarity index 94%rename from frontend/src/react/components/sql-editor/ResultPanel/DatabaseQueryContext.tsxrename to frontend/src/modules/sql-editor/components/ResultPanel/DatabaseQueryContext.tsxindex a58f30ad41..547a411764 100644--- a/frontend/src/react/components/sql-editor/ResultPanel/DatabaseQueryContext.tsx+++ b/frontend/src/modules/sql-editor/components/ResultPanel/DatabaseQueryContext.tsx@@ -1,10 +1,10 @@import { Loader2 } from "lucide-react";import { useEffect, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { ResultView } from "@/react/components/sql-editor/ResultView";-import { Button } from "@/react/components/ui/button";-import { useExecuteSQL } from "@/react/hooks/useExecuteSQL";-import { getSQLEditorTabsState } from "@/react/stores/sqlEditor/tab";+import { Button } from "@/components/ui/button";+import { useExecuteSQL } from "@/hooks/useExecuteSQL";+import { ResultView } from "@/modules/sql-editor/components/ResultView";+import { getSQLEditorTabsState } from "@/modules/sql-editor/store/tab";import type {SQLEditorDatabaseQueryContext,SQLEditorQueryParams,diff --git a/frontend/src/react/components/sql-editor/ResultPanel/ResultPanel.tsx b/frontend/src/modules/sql-editor/components/ResultPanel/ResultPanel.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/ResultPanel/ResultPanel.tsxrename to frontend/src/modules/sql-editor/components/ResultPanel/ResultPanel.tsxindex 4e89505658..bf693c996a 100644--- a/frontend/src/react/components/sql-editor/ResultPanel/ResultPanel.tsx+++ b/frontend/src/modules/sql-editor/components/ResultPanel/ResultPanel.tsx@@ -1,27 +1,22 @@import { CircleAlert, Loader2, X } from "lucide-react";import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { Alert } from "@/react/components/ui/alert";+import { Alert } from "@/components/ui/alert";import {ContextMenu,ContextMenuContent,ContextMenuItem,ContextMenuTrigger,-} from "@/react/components/ui/context-menu";-import {- Tabs,- TabsList,- TabsPanel,- TabsTrigger,-} from "@/react/components/ui/tabs";-import { Tooltip } from "@/react/components/ui/tooltip";-import { cn } from "@/react/lib/utils";+} from "@/components/ui/context-menu";+import { Tabs, TabsList, TabsPanel, TabsTrigger } from "@/components/ui/tabs";+import { Tooltip } from "@/components/ui/tooltip";+import { cn } from "@/lib/utils";import {getSQLEditorTabsState,useCurrentSQLEditorTab,useIsInBatchMode,useSQLEditorTabState,-} from "@/react/stores/sqlEditor/tab";+} from "@/modules/sql-editor/store/tab";import type { SQLEditorDatabaseQueryContext } from "@/types";import { getDataSourceTypeI18n } from "@/types";import type { Database } from "@/types/proto-es/v1/database_service_pb";diff --git a/frontend/src/react/components/sql-editor/ResultPanel/resultTabContext.ts b/frontend/src/modules/sql-editor/components/ResultPanel/resultTabContext.tssimilarity index 100%rename from frontend/src/react/components/sql-editor/ResultPanel/resultTabContext.tsrename to frontend/src/modules/sql-editor/components/ResultPanel/resultTabContext.tsdiff --git a/frontend/src/react/components/sql-editor/ResultPanelPage.tsx b/frontend/src/modules/sql-editor/components/ResultPanelPage.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/ResultPanelPage.tsxrename to frontend/src/modules/sql-editor/components/ResultPanelPage.tsxdiff --git a/frontend/src/react/components/sql-editor/ResultView/BinaryFormatButton.tsx b/frontend/src/modules/sql-editor/components/ResultView/BinaryFormatButton.tsxsimilarity index 89%rename from frontend/src/react/components/sql-editor/ResultView/BinaryFormatButton.tsxrename to frontend/src/modules/sql-editor/components/ResultView/BinaryFormatButton.tsxindex 3d50a5e0df..c773fb9a56 100644--- a/frontend/src/react/components/sql-editor/ResultView/BinaryFormatButton.tsx+++ b/frontend/src/modules/sql-editor/components/ResultView/BinaryFormatButton.tsx@@ -1,13 +1,13 @@import { CodeIcon } from "lucide-react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";+import { Button } from "@/components/ui/button";import {Popover,PopoverContent,PopoverTrigger,-} from "@/react/components/ui/popover";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";-import { cn } from "@/react/lib/utils";+} from "@/components/ui/popover";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";+import { cn } from "@/lib/utils";import type { BinaryFormat } from "./binary-format";interface BinaryFormatButtonProps {diff --git a/frontend/src/react/components/sql-editor/ResultView/ColumnSortedIcon.tsx b/frontend/src/modules/sql-editor/components/ResultView/ColumnSortedIcon.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/ResultView/ColumnSortedIcon.tsxrename to frontend/src/modules/sql-editor/components/ResultView/ColumnSortedIcon.tsxindex eaee3df4d6..014fab6e7d 100644--- a/frontend/src/react/components/sql-editor/ResultView/ColumnSortedIcon.tsx+++ b/frontend/src/modules/sql-editor/components/ResultView/ColumnSortedIcon.tsx@@ -1,5 +1,5 @@import { ArrowDownWideNarrow, ArrowUpWideNarrow } from "lucide-react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";import type { SortDirection } from "./types";interface ColumnSortedIconProps {diff --git a/frontend/src/react/components/sql-editor/ResultView/DetailPanel.test.tsx b/frontend/src/modules/sql-editor/components/ResultView/DetailPanel.test.tsxsimilarity index 99%rename from frontend/src/react/components/sql-editor/ResultView/DetailPanel.test.tsxrename to frontend/src/modules/sql-editor/components/ResultView/DetailPanel.test.tsxindex 73453629cf..f65f511b6d 100644--- a/frontend/src/react/components/sql-editor/ResultView/DetailPanel.test.tsx+++ b/frontend/src/modules/sql-editor/components/ResultView/DetailPanel.test.tsx@@ -29,7 +29,7 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const state = () => ({notify: vi.fn(),});@@ -41,7 +41,7 @@ vi.mock("@/react/stores/app", () => {};});-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: ({ children }: { children: React.ReactNode }) => <>{children}</>,}));diff --git a/frontend/src/react/components/sql-editor/ResultView/DetailPanel.tsx b/frontend/src/modules/sql-editor/components/ResultView/DetailPanel.tsxsimilarity index 98%rename from frontend/src/react/components/sql-editor/ResultView/DetailPanel.tsxrename to frontend/src/modules/sql-editor/components/ResultView/DetailPanel.tsxindex 4756da1dcf..d5dcca68c8 100644--- a/frontend/src/react/components/sql-editor/ResultView/DetailPanel.tsx+++ b/frontend/src/modules/sql-editor/components/ResultView/DetailPanel.tsx@@ -14,17 +14,17 @@ import {} from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { Input } from "@/react/components/ui/input";+import { Button } from "@/components/ui/button";+import { Input } from "@/components/ui/input";import {Sheet,SheetContent,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { Tooltip } from "@/react/components/ui/tooltip";-import { writeTextToClipboard } from "@/react/lib/clipboard";-import { cn } from "@/react/lib/utils";+} from "@/components/ui/sheet";+import { Tooltip } from "@/components/ui/tooltip";+import { writeTextToClipboard } from "@/lib/clipboard";+import { cn } from "@/lib/utils";import {STORAGE_KEY_SQL_EDITOR_DETAIL_FORMAT,STORAGE_KEY_SQL_EDITOR_DETAIL_LINE_WRAP,diff --git a/frontend/src/react/components/sql-editor/ResultView/EmptyView.tsx b/frontend/src/modules/sql-editor/components/ResultView/EmptyView.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/ResultView/EmptyView.tsxrename to frontend/src/modules/sql-editor/components/ResultView/EmptyView.tsxdiff --git a/frontend/src/react/components/sql-editor/ResultView/ErrorView.tsx b/frontend/src/modules/sql-editor/components/ResultView/ErrorView.tsxsimilarity index 89%rename from frontend/src/react/components/sql-editor/ResultView/ErrorView.tsxrename to frontend/src/modules/sql-editor/components/ResultView/ErrorView.tsxindex fc37f68ff4..5d0789ccac 100644--- a/frontend/src/react/components/sql-editor/ResultView/ErrorView.tsx+++ b/frontend/src/modules/sql-editor/components/ResultView/ErrorView.tsx@@ -1,13 +1,13 @@import { type IRange, Selection } from "monaco-editor";import { type ReactNode, useMemo } from "react";import { useTranslation } from "react-i18next";-import { positionWithOffset } from "@/react/components/monaco/utils";-import { activeSQLEditorRef } from "@/react/components/sql-editor/StandardPanel/state";-import { Alert } from "@/react/components/ui/alert";-import { Button } from "@/react/components/ui/button";-import { cn } from "@/react/lib/utils";+import { positionWithOffset } from "@/components/monaco/utils";+import { Alert } from "@/components/ui/alert";+import { Button } from "@/components/ui/button";+import { cn } from "@/lib/utils";+import { activeSQLEditorRef } from "@/modules/sql-editor/components/StandardPanel/state";+import { sqlEditorEvents } from "@/modules/sql-editor/model/events";import type { SQLEditorQueryParams, SQLResultSetV1 } from "@/types";-import { sqlEditorEvents } from "@/views/sql-editor/events";import { PostgresError } from "./PostgresError";interface ErrorViewProps {diff --git a/frontend/src/react/components/sql-editor/ResultView/PostgresError.tsx b/frontend/src/modules/sql-editor/components/ResultView/PostgresError.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/ResultView/PostgresError.tsxrename to frontend/src/modules/sql-editor/components/ResultView/PostgresError.tsxdiff --git a/frontend/src/react/components/sql-editor/ResultView/PrettyJSON.tsx b/frontend/src/modules/sql-editor/components/ResultView/PrettyJSON.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/ResultView/PrettyJSON.tsxrename to frontend/src/modules/sql-editor/components/ResultView/PrettyJSON.tsxdiff --git a/frontend/src/react/components/sql-editor/ResultView/ResultCopyContextMenu.tsx b/frontend/src/modules/sql-editor/components/ResultView/ResultCopyContextMenu.tsxsimilarity index 98%rename from frontend/src/react/components/sql-editor/ResultView/ResultCopyContextMenu.tsxrename to frontend/src/modules/sql-editor/components/ResultView/ResultCopyContextMenu.tsxindex 6b51a25765..e2148a7d0e 100644--- a/frontend/src/react/components/sql-editor/ResultView/ResultCopyContextMenu.tsx+++ b/frontend/src/modules/sql-editor/components/ResultView/ResultCopyContextMenu.tsx@@ -6,7 +6,7 @@ import {ContextMenuContent,ContextMenuItem,ContextMenuTrigger,-} from "@/react/components/ui/context-menu";+} from "@/components/ui/context-menu";import { useSelectionContext } from "./context";import { formatAsCSV, formatAsSQL, formatAsText } from "./copy-formats";diff --git a/frontend/src/react/components/sql-editor/ResultView/ResultStatusBar.test.tsx b/frontend/src/modules/sql-editor/components/ResultView/ResultStatusBar.test.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/ResultView/ResultStatusBar.test.tsxrename to frontend/src/modules/sql-editor/components/ResultView/ResultStatusBar.test.tsxindex d14c2c7822..207c9b7770 100644--- a/frontend/src/react/components/sql-editor/ResultView/ResultStatusBar.test.tsx+++ b/frontend/src/modules/sql-editor/components/ResultView/ResultStatusBar.test.tsx@@ -13,15 +13,15 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/components/EngineIcon", () => ({+vi.mock("@/components/EngineIcon", () => ({EngineIcon: () => <span data-testid="engine-icon" />,}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: ({ children }: { children: React.ReactNode }) => <>{children}</>,}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: {getState: () => ({notify: vi.fn(),diff --git a/frontend/src/react/components/sql-editor/ResultView/ResultStatusBar.tsx b/frontend/src/modules/sql-editor/components/ResultView/ResultStatusBar.tsxsimilarity index 94%rename from frontend/src/react/components/sql-editor/ResultView/ResultStatusBar.tsxrename to frontend/src/modules/sql-editor/components/ResultView/ResultStatusBar.tsxindex d38a85db86..b1231d0f60 100644--- a/frontend/src/react/components/sql-editor/ResultView/ResultStatusBar.tsx+++ b/frontend/src/modules/sql-editor/components/ResultView/ResultStatusBar.tsx@@ -1,11 +1,11 @@import { ChevronRightIcon } from "lucide-react";import { type Ref, useLayoutEffect, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { EngineIcon } from "@/react/components/EngineIcon";-import { Button } from "@/react/components/ui/button";-import { CopyButton } from "@/react/components/ui/copy-button";-import { EllipsisText } from "@/react/components/ui/ellipsis-text";-import { cn } from "@/react/lib/utils";+import { EngineIcon } from "@/components/EngineIcon";+import { Button } from "@/components/ui/button";+import { CopyButton } from "@/components/ui/copy-button";+import { EllipsisText } from "@/components/ui/ellipsis-text";+import { cn } from "@/lib/utils";import type { Database } from "@/types/proto-es/v1/database_service_pb";import {extractDatabaseResourceName,diff --git a/frontend/src/react/components/sql-editor/ResultView/ResultView.tsx b/frontend/src/modules/sql-editor/components/ResultView/ResultView.tsxsimilarity index 94%rename from frontend/src/react/components/sql-editor/ResultView/ResultView.tsxrename to frontend/src/modules/sql-editor/components/ResultView/ResultView.tsxindex d5181d29d9..6a8e9c3e22 100644--- a/frontend/src/react/components/sql-editor/ResultView/ResultView.tsx+++ b/frontend/src/modules/sql-editor/components/ResultView/ResultView.tsx@@ -7,24 +7,19 @@ import { useTranslation } from "react-i18next";import {DataExportButton,type DataExportRequest,-} from "@/react/components/DataExportButton";-import { RequestExportButton } from "@/react/components/sql-editor/RequestExportButton";-import { RequestQueryButton } from "@/react/components/sql-editor/RequestQueryButton";-import { useExportGrantBypass } from "@/react/components/sql-editor/useExportGrantBypass";-import { Button } from "@/react/components/ui/button";-import {- Tabs,- TabsList,- TabsPanel,- TabsTrigger,-} from "@/react/components/ui/tabs";-import { Tooltip } from "@/react/components/ui/tooltip";-import { isDisallowChangeDatabaseError } from "@/react/hooks/useExecuteSQL";-import { useSQLEditorQueryDataPolicy } from "@/react/hooks/useSQLEditorBridge";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";-import { useSQLEditorEditorState } from "@/react/stores/sqlEditor/editor";-import { getSQLEditorTabsState } from "@/react/stores/sqlEditor/tab";+} from "@/components/DataExportButton";+import { Button } from "@/components/ui/button";+import { Tabs, TabsList, TabsPanel, TabsTrigger } from "@/components/ui/tabs";+import { Tooltip } from "@/components/ui/tooltip";+import { isDisallowChangeDatabaseError } from "@/hooks/useExecuteSQL";+import { cn } from "@/lib/utils";+import { RequestExportButton } from "@/modules/sql-editor/components/RequestExportButton";+import { RequestQueryButton } from "@/modules/sql-editor/components/RequestQueryButton";+import { useExportGrantBypass } from "@/modules/sql-editor/components/useExportGrantBypass";+import { useSQLEditorQueryDataPolicy } from "@/modules/sql-editor/hooks/useSQLEditorState";+import { useSQLEditorEditorState } from "@/modules/sql-editor/store/editor";+import { getSQLEditorTabsState } from "@/modules/sql-editor/store/tab";+import { useAppStore } from "@/stores/app";import type { SQLEditorQueryParams, SQLResultSetV1 } from "@/types";import { isValidDatabaseName } from "@/types";import {diff --git a/frontend/src/react/components/sql-editor/ResultView/SelectionCopyTooltips.tsx b/frontend/src/modules/sql-editor/components/ResultView/SelectionCopyTooltips.tsxsimilarity index 98%rename from frontend/src/react/components/sql-editor/ResultView/SelectionCopyTooltips.tsxrename to frontend/src/modules/sql-editor/components/ResultView/SelectionCopyTooltips.tsxindex 02b1092cf7..7ed7834a45 100644--- a/frontend/src/react/components/sql-editor/ResultView/SelectionCopyTooltips.tsx+++ b/frontend/src/modules/sql-editor/components/ResultView/SelectionCopyTooltips.tsx@@ -1,12 +1,12 @@import { ChevronDownIcon, CopyIcon, InfoIcon } from "lucide-react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";+import { Button } from "@/components/ui/button";import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";+} from "@/components/ui/dropdown-menu";import { useSelectionContext } from "./context";import { formatAsCSV, formatAsSQL, formatAsText } from "./copy-formats";diff --git a/frontend/src/react/components/sql-editor/ResultView/SensitiveDataIcon.tsx b/frontend/src/modules/sql-editor/components/ResultView/SensitiveDataIcon.tsxsimilarity index 76%rename from frontend/src/react/components/sql-editor/ResultView/SensitiveDataIcon.tsxrename to frontend/src/modules/sql-editor/components/ResultView/SensitiveDataIcon.tsxindex 827a705ed4..21e1cdaede 100644--- a/frontend/src/react/components/sql-editor/ResultView/SensitiveDataIcon.tsx+++ b/frontend/src/modules/sql-editor/components/ResultView/SensitiveDataIcon.tsx@@ -1,9 +1,9 @@import { EyeOffIcon } from "lucide-react";import { useTranslation } from "react-i18next";-import { Tooltip } from "@/react/components/ui/tooltip";-import { cn } from "@/react/lib/utils";-import { router } from "@/react/router";-import { WORKSPACE_ROUTE_GLOBAL_MASKING } from "@/react/router/handles";+import { router } from "@/app/router";+import { WORKSPACE_ROUTE_GLOBAL_MASKING } from "@/app/router/handles";+import { Tooltip } from "@/components/ui/tooltip";+import { cn } from "@/lib/utils";import { hasWorkspacePermissionV2 } from "@/utils/iam/permission";export function SensitiveDataIcon() {diff --git a/frontend/src/react/components/sql-editor/ResultView/SingleResultView.tsx b/frontend/src/modules/sql-editor/components/ResultView/SingleResultView.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/ResultView/SingleResultView.tsxrename to frontend/src/modules/sql-editor/components/ResultView/SingleResultView.tsxindex ba47905995..429e903a7e 100644--- a/frontend/src/react/components/sql-editor/ResultView/SingleResultView.tsx+++ b/frontend/src/modules/sql-editor/components/ResultView/SingleResultView.tsx@@ -22,27 +22,27 @@ import {AdvancedSearch,type ScopeOption,type SearchParams,-} from "@/react/components/AdvancedSearch";+} from "@/components/AdvancedSearch";import {DataExportButton,type DataExportRequest,-} from "@/react/components/DataExportButton";-import { Alert } from "@/react/components/ui/alert";-import { Button } from "@/react/components/ui/button";+} from "@/components/DataExportButton";+import { Alert } from "@/components/ui/alert";+import { Button } from "@/components/ui/button";import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";-import { Switch } from "@/react/components/ui/switch";-import { Tooltip } from "@/react/components/ui/tooltip";-import { useExecuteSQL } from "@/react/hooks/useExecuteSQL";-import { useSQLEditorQueryDataPolicy } from "@/react/hooks/useSQLEditorBridge";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";-import { useSQLEditorEditorState } from "@/react/stores/sqlEditor/editor";-import { useSQLEditorTabState } from "@/react/stores/sqlEditor/tab";+} from "@/components/ui/dropdown-menu";+import { Switch } from "@/components/ui/switch";+import { Tooltip } from "@/components/ui/tooltip";+import { useExecuteSQL } from "@/hooks/useExecuteSQL";+import { cn } from "@/lib/utils";+import { useSQLEditorQueryDataPolicy } from "@/modules/sql-editor/hooks/useSQLEditorState";+import { useSQLEditorEditorState } from "@/modules/sql-editor/store/editor";+import { useSQLEditorTabState } from "@/modules/sql-editor/store/tab";+import { useAppStore } from "@/stores/app";import type {SQLEditorDatabaseQueryContext,SQLEditorQueryParams,diff --git a/frontend/src/react/components/sql-editor/ResultView/TableCell.test.tsx b/frontend/src/modules/sql-editor/components/ResultView/TableCell.test.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/ResultView/TableCell.test.tsxrename to frontend/src/modules/sql-editor/components/ResultView/TableCell.test.tsxdiff --git a/frontend/src/react/components/sql-editor/ResultView/TableCell.tsx b/frontend/src/modules/sql-editor/components/ResultView/TableCell.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/ResultView/TableCell.tsxrename to frontend/src/modules/sql-editor/components/ResultView/TableCell.tsxindex d3ef775f41..c9e7a3f080 100644--- a/frontend/src/react/components/sql-editor/ResultView/TableCell.tsx+++ b/frontend/src/modules/sql-editor/components/ResultView/TableCell.tsx@@ -1,8 +1,8 @@import { ExpandIcon } from "lucide-react";import { useEffect, useMemo, useRef, useState } from "react";-import { HighlightLabelText } from "@/react/components/HighlightLabelText";-import { Button } from "@/react/components/ui/button";-import { cn } from "@/react/lib/utils";+import { HighlightLabelText } from "@/components/HighlightLabelText";+import { Button } from "@/components/ui/button";+import { cn } from "@/lib/utils";import { Engine } from "@/types/proto-es/v1/common_pb";import type { Database } from "@/types/proto-es/v1/database_service_pb";import type { RowValue } from "@/types/proto-es/v1/sql_service_pb";diff --git a/frontend/src/react/components/sql-editor/ResultView/VirtualDataBlock.test.tsx b/frontend/src/modules/sql-editor/components/ResultView/VirtualDataBlock.test.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/ResultView/VirtualDataBlock.test.tsxrename to frontend/src/modules/sql-editor/components/ResultView/VirtualDataBlock.test.tsxindex 3b35a3ce2b..82540e5eb1 100644--- a/frontend/src/react/components/sql-editor/ResultView/VirtualDataBlock.test.tsx+++ b/frontend/src/modules/sql-editor/components/ResultView/VirtualDataBlock.test.tsx@@ -56,15 +56,15 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: ({ children }: { children: ReactNode }) => <>{children}</>,}));-vi.mock("@/react/components/sql-editor/MaskingReasonPopover", () => ({+vi.mock("@/modules/sql-editor/components/MaskingReasonPopover", () => ({MaskingReasonPopover: () => null,}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const state = () => ({notify: vi.fn(),});diff --git a/frontend/src/react/components/sql-editor/ResultView/VirtualDataBlock.tsx b/frontend/src/modules/sql-editor/components/ResultView/VirtualDataBlock.tsxsimilarity index 96%rename from frontend/src/react/components/sql-editor/ResultView/VirtualDataBlock.tsxrename to frontend/src/modules/sql-editor/components/ResultView/VirtualDataBlock.tsxindex b564ff2a19..9a718e0df2 100644--- a/frontend/src/react/components/sql-editor/ResultView/VirtualDataBlock.tsx+++ b/frontend/src/modules/sql-editor/components/ResultView/VirtualDataBlock.tsx@@ -8,11 +8,11 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";-import { MaskingReasonPopover } from "@/react/components/sql-editor/MaskingReasonPopover";-import { Button } from "@/react/components/ui/button";-import { Tooltip } from "@/react/components/ui/tooltip";-import { writeTextToClipboard } from "@/react/lib/clipboard";-import { cn } from "@/react/lib/utils";+import { Button } from "@/components/ui/button";+import { Tooltip } from "@/components/ui/tooltip";+import { writeTextToClipboard } from "@/lib/clipboard";+import { cn } from "@/lib/utils";+import { MaskingReasonPopover } from "@/modules/sql-editor/components/MaskingReasonPopover";import type { Database } from "@/types/proto-es/v1/database_service_pb";import type { MaskingReason } from "@/types/proto-es/v1/sql_service_pb";import type { SearchParams } from "@/utils/v1/advanced-search/common";diff --git a/frontend/src/react/components/sql-editor/ResultView/VirtualDataTable.tsx b/frontend/src/modules/sql-editor/components/ResultView/VirtualDataTable.tsxsimilarity index 99%rename from frontend/src/react/components/sql-editor/ResultView/VirtualDataTable.tsxrename to frontend/src/modules/sql-editor/components/ResultView/VirtualDataTable.tsxindex 5c2542d8c1..178cbccdc1 100644--- a/frontend/src/react/components/sql-editor/ResultView/VirtualDataTable.tsx+++ b/frontend/src/modules/sql-editor/components/ResultView/VirtualDataTable.tsx@@ -9,8 +9,8 @@ import {useRef,useState,} from "react";-import { MaskingReasonPopover } from "@/react/components/sql-editor/MaskingReasonPopover";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";+import { MaskingReasonPopover } from "@/modules/sql-editor/components/MaskingReasonPopover";import type { Database } from "@/types/proto-es/v1/database_service_pb";import type { MaskingReason } from "@/types/proto-es/v1/sql_service_pb";import type { SearchParams } from "@/utils/v1/advanced-search/common";diff --git a/frontend/src/react/components/sql-editor/ResultView/binary-format.ts b/frontend/src/modules/sql-editor/components/ResultView/binary-format.tssimilarity index 100%rename from frontend/src/react/components/sql-editor/ResultView/binary-format.tsrename to frontend/src/modules/sql-editor/components/ResultView/binary-format.tsdiff --git a/frontend/src/react/components/sql-editor/ResultView/cell-value.ts b/frontend/src/modules/sql-editor/components/ResultView/cell-value.tssimilarity index 100%rename from frontend/src/react/components/sql-editor/ResultView/cell-value.tsrename to frontend/src/modules/sql-editor/components/ResultView/cell-value.tsdiff --git a/frontend/src/react/components/sql-editor/ResultView/context.tsx b/frontend/src/modules/sql-editor/components/ResultView/context.tsxsimilarity index 98%rename from frontend/src/react/components/sql-editor/ResultView/context.tsxrename to frontend/src/modules/sql-editor/components/ResultView/context.tsxindex 337bc5bd62..f27a595e8e 100644--- a/frontend/src/react/components/sql-editor/ResultView/context.tsx+++ b/frontend/src/modules/sql-editor/components/ResultView/context.tsx@@ -8,8 +8,8 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";-import { writeTextToClipboard as copyTextToClipboard } from "@/react/lib/clipboard";-import { useAppStore } from "@/react/stores/app";+import { writeTextToClipboard as copyTextToClipboard } from "@/lib/clipboard";+import { useAppStore } from "@/stores/app";import { Engine } from "@/types/proto-es/v1/common_pb";import type { RowValue } from "@/types/proto-es/v1/sql_service_pb";import { isDescendantOf } from "@/utils/dom";diff --git a/frontend/src/react/components/sql-editor/ResultView/copy-formats.test.ts b/frontend/src/modules/sql-editor/components/ResultView/copy-formats.test.tssimilarity index 100%rename from frontend/src/react/components/sql-editor/ResultView/copy-formats.test.tsrename to frontend/src/modules/sql-editor/components/ResultView/copy-formats.test.tsdiff --git a/frontend/src/react/components/sql-editor/ResultView/copy-formats.ts b/frontend/src/modules/sql-editor/components/ResultView/copy-formats.tssimilarity index 100%rename from frontend/src/react/components/sql-editor/ResultView/copy-formats.tsrename to frontend/src/modules/sql-editor/components/ResultView/copy-formats.tsdiff --git a/frontend/src/react/components/sql-editor/ResultView/detail-panel-search.test.tsx b/frontend/src/modules/sql-editor/components/ResultView/detail-panel-search.test.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/ResultView/detail-panel-search.test.tsxrename to frontend/src/modules/sql-editor/components/ResultView/detail-panel-search.test.tsxdiff --git a/frontend/src/react/components/sql-editor/ResultView/detail-panel-search.tsx b/frontend/src/modules/sql-editor/components/ResultView/detail-panel-search.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/ResultView/detail-panel-search.tsxrename to frontend/src/modules/sql-editor/components/ResultView/detail-panel-search.tsxdiff --git a/frontend/src/react/components/sql-editor/ResultView/index.ts b/frontend/src/modules/sql-editor/components/ResultView/index.tssimilarity index 100%rename from frontend/src/react/components/sql-editor/ResultView/index.tsrename to frontend/src/modules/sql-editor/components/ResultView/index.tsdiff --git a/frontend/src/react/components/sql-editor/ResultView/pretty-print-json.css b/frontend/src/modules/sql-editor/components/ResultView/pretty-print-json.csssimilarity index 100%rename from frontend/src/react/components/sql-editor/ResultView/pretty-print-json.cssrename to frontend/src/modules/sql-editor/components/ResultView/pretty-print-json.cssdiff --git a/frontend/src/react/components/sql-editor/ResultView/selection-math.test.ts b/frontend/src/modules/sql-editor/components/ResultView/selection-math.test.tssimilarity index 100%rename from frontend/src/react/components/sql-editor/ResultView/selection-math.test.tsrename to frontend/src/modules/sql-editor/components/ResultView/selection-math.test.tsdiff --git a/frontend/src/react/components/sql-editor/ResultView/selection-math.ts b/frontend/src/modules/sql-editor/components/ResultView/selection-math.tssimilarity index 100%rename from frontend/src/react/components/sql-editor/ResultView/selection-math.tsrename to frontend/src/modules/sql-editor/components/ResultView/selection-math.tsdiff --git a/frontend/src/react/components/sql-editor/ResultView/types.ts b/frontend/src/modules/sql-editor/components/ResultView/types.tssimilarity index 100%rename from frontend/src/react/components/sql-editor/ResultView/types.tsrename to frontend/src/modules/sql-editor/components/ResultView/types.tsdiff --git a/frontend/src/react/components/sql-editor/ResultView/useTableResize.ts b/frontend/src/modules/sql-editor/components/ResultView/useTableResize.tssimilarity index 100%rename from frontend/src/react/components/sql-editor/ResultView/useTableResize.tsrename to frontend/src/modules/sql-editor/components/ResultView/useTableResize.tsdiff --git a/frontend/src/react/components/sql-editor/ResultViewPage.tsx b/frontend/src/modules/sql-editor/components/ResultViewPage.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/ResultViewPage.tsxrename to frontend/src/modules/sql-editor/components/ResultViewPage.tsxdiff --git a/frontend/src/react/components/sql-editor/SQLEditor.tsx b/frontend/src/modules/sql-editor/components/SQLEditor.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/SQLEditor.tsxrename to frontend/src/modules/sql-editor/components/SQLEditor.tsxdiff --git a/frontend/src/react/components/sql-editor/SQLEditorHomePage.tsx b/frontend/src/modules/sql-editor/components/SQLEditorHomePage.tsxsimilarity index 88%rename from frontend/src/react/components/sql-editor/SQLEditorHomePage.tsxrename to frontend/src/modules/sql-editor/components/SQLEditorHomePage.tsxindex 99a5d917dc..1245fd359c 100644--- a/frontend/src/react/components/sql-editor/SQLEditorHomePage.tsx+++ b/frontend/src/modules/sql-editor/components/SQLEditorHomePage.tsx@@ -7,41 +7,41 @@ import {Group as PanelGroup,Separator as PanelResizeHandle,} from "react-resizable-panels";-import { IAMRemindDialog } from "@/react/components/IAMRemindDialog";-import { Quickstart } from "@/react/components/Quickstart";-import { resizeHandleClass } from "@/react/components/SchemaEditorLite/resize";-import { AsidePanel } from "@/react/components/sql-editor/AsidePanel";-import { ConnectionPanel } from "@/react/components/sql-editor/ConnectionPanel";-import { Panels } from "@/react/components/sql-editor/Panels/Panels";-import { TabList } from "@/react/components/sql-editor/TabList";-import {- SQLEditorThemeScope,- useSQLEditorTheme,-} from "@/react/components/sql-editor/theme/SQLEditorThemeScope";+import { useNavigate } from "@/app/router";+import { PROJECT_V1_ROUTE_PLAN_DETAIL_SPEC_DETAIL } from "@/app/router/handles";+import { IAMRemindDialog } from "@/components/IAMRemindDialog";+import { Quickstart } from "@/components/Quickstart";import {getLayerRoot,LAYER_BACKDROP_CLASS,LAYER_SURFACE_CLASS,-} from "@/react/components/ui/layer";-import { useAppProject } from "@/react/hooks/useAppProject";-import { applyPlanTitleToQuery } from "@/react/lib/plan/title";-import { cn } from "@/react/lib/utils";-import { useNavigate } from "@/react/router";-import { PROJECT_V1_ROUTE_PLAN_DETAIL_SPEC_DETAIL } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { useSQLEditorStore } from "@/react/stores/sqlEditor";-import { useSQLEditorEditorState } from "@/react/stores/sqlEditor/editor";+} from "@/components/ui/layer";+import { useAppProject } from "@/hooks/useAppProject";+import { applyPlanTitleToQuery } from "@/lib/plan/title";+import { cn } from "@/lib/utils";+import { resizeHandleClass } from "@/modules/schema-editor/resize";+import { AsidePanel } from "@/modules/sql-editor/components/AsidePanel";+import { ConnectionPanel } from "@/modules/sql-editor/components/ConnectionPanel";+import { Panels } from "@/modules/sql-editor/components/Panels/Panels";+import { TabList } from "@/modules/sql-editor/components/TabList";+import {+ SQLEditorThemeScope,+ useSQLEditorTheme,+} from "@/modules/sql-editor/components/theme/SQLEditorThemeScope";+import { sqlEditorEvents } from "@/modules/sql-editor/model/events";+import { useSQLEditorStore } from "@/modules/sql-editor/store";+import { useSQLEditorEditorState } from "@/modules/sql-editor/store/editor";import {getSQLEditorTabsState,useCurrentSQLEditorTab,useIsDisconnected,-} from "@/react/stores/sqlEditor/tab";+} from "@/modules/sql-editor/store/tab";+import { useAppStore } from "@/stores/app";import { unknownProject } from "@/types";import {extractDatabaseResourceName,extractProjectResourceName,} from "@/utils";-import { sqlEditorEvents } from "@/views/sql-editor/events";/*** React port of `frontend/src/views/sql-editor/SQLEditorHomePage.vue`.diff --git a/frontend/src/react/components/sql-editor/SQLEditorLayout.tsx b/frontend/src/modules/sql-editor/components/SQLEditorLayout.tsxsimilarity index 93%rename from frontend/src/react/components/sql-editor/SQLEditorLayout.tsxrename to frontend/src/modules/sql-editor/components/SQLEditorLayout.tsxindex b7ac2ec2cb..1df0392d4f 100644--- a/frontend/src/react/components/sql-editor/SQLEditorLayout.tsx+++ b/frontend/src/modules/sql-editor/components/SQLEditorLayout.tsx@@ -1,8 +1,8 @@import { type ReactNode, useEffect, useState } from "react";-import { BannersWrapper } from "@/react/components/BannersWrapper";-import { useEnsureWorkspaceCommonData } from "@/react/hooks/useEnsureWorkspaceCommonData";-import { router } from "@/react/router";-import { provideSheetContext } from "@/views/sql-editor/Sheet";+import { router } from "@/app/router";+import { BannersWrapper } from "@/components/BannersWrapper";+import { useEnsureWorkspaceCommonData } from "@/hooks/useEnsureWorkspaceCommonData";+import { provideSheetContext } from "@/modules/sql-editor/model/Sheet";import { RequestDrawerHost } from "./RequestDrawerHost";import { SQLEditorRouteShell } from "./SQLEditorRouteShell";import { SQLEditorThemeScope } from "./theme/SQLEditorThemeScope";diff --git a/frontend/src/react/components/sql-editor/SQLEditorRouteShell.test.tsx b/frontend/src/modules/sql-editor/components/SQLEditorRouteShell.test.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/SQLEditorRouteShell.test.tsxrename to frontend/src/modules/sql-editor/components/SQLEditorRouteShell.test.tsxindex 1dd313e7f1..b4dee4cebe 100644--- a/frontend/src/react/components/sql-editor/SQLEditorRouteShell.test.tsx+++ b/frontend/src/modules/sql-editor/components/SQLEditorRouteShell.test.tsx@@ -1,7 +1,7 @@import { act } from "react";import { createRoot } from "react-dom/client";import { beforeEach, describe, expect, test, vi } from "vitest";-import type { ReactRoute } from "@/react/router";+import type { ReactRoute } from "@/app/router";import type { SQLEditorTab } from "@/types";import { SQLEditorRouteShell } from "./SQLEditorRouteShell";@@ -97,7 +97,7 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/components/ComponentPermissionGuard", () => ({+vi.mock("@/components/ComponentPermissionGuard", () => ({PermissionDeniedFallback: () => <div data-testid="denied" />,useComponentPermissionState: () => ({missedBasicPermissions: [],@@ -107,18 +107,18 @@ vi.mock("@/react/components/ComponentPermissionGuard", () => ({usePermissionDataReady: () => true,}));-vi.mock("@/react/hooks/useAppProject", () => ({+vi.mock("@/hooks/useAppProject", () => ({useAppProject: () => ({name: "projects/proj1",}),}));-vi.mock("@/react/hooks/useSQLEditorBridge", () => ({+vi.mock("@/modules/sql-editor/hooks/useSQLEditorState", () => ({useClampResultRowsLimitToPolicy: vi.fn(),}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {currentRoute: {get value() {@@ -133,7 +133,7 @@ vi.mock("@/react/router", async (importOriginal) => ({}),}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: {getState: () => ({getOrFetchDatabaseByName: mocks.getOrFetchDatabaseByName,@@ -145,7 +145,7 @@ vi.mock("@/react/stores/app", () => ({},}));-vi.mock("@/react/stores/sqlEditor", () => ({+vi.mock("@/modules/sql-editor/store", () => ({useSQLEditorStore: Object.assign((selector: (state: unknown) => unknown) =>selector({@@ -162,19 +162,19 @@ vi.mock("@/react/stores/sqlEditor", () => ({),}));-vi.mock("@/react/stores/sqlEditor/editor", () => ({+vi.mock("@/modules/sql-editor/store/editor", () => ({getSQLEditorEditorState: () => mocks.editorState,useSQLEditorEditorState: (selector: (state: unknown) => unknown) =>selector(mocks.editorState),}));-vi.mock("@/react/stores/sqlEditor/tab", () => ({+vi.mock("@/modules/sql-editor/store/tab", () => ({getSQLEditorTabsState: () => mocks.tabsState,useSQLEditorTabState: (selector: (state: unknown) => unknown) =>selector(mocks.tabsState),}));-vi.mock("@/store/modules/sqlEditor/legacy/migration", () => ({+vi.mock("@/modules/sql-editor/legacy/migration", () => ({migrateLegacyCache: vi.fn(async () => undefined),}));diff --git a/frontend/src/react/components/sql-editor/SQLEditorRouteShell.tsx b/frontend/src/modules/sql-editor/components/SQLEditorRouteShell.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/SQLEditorRouteShell.tsxrename to frontend/src/modules/sql-editor/components/SQLEditorRouteShell.tsxindex eee4bd0ad6..0d873a0067 100644--- a/frontend/src/react/components/sql-editor/SQLEditorRouteShell.tsx+++ b/frontend/src/modules/sql-editor/components/SQLEditorRouteShell.tsx@@ -2,15 +2,7 @@ import dayjs from "dayjs";import { debounce, head, omit } from "lodash-es";import { useEffect, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import {- PermissionDeniedFallback,- useComponentPermissionState,- usePermissionDataReady,-} from "@/react/components/ComponentPermissionGuard";-import { useAppProject } from "@/react/hooks/useAppProject";-import { useClampResultRowsLimitToPolicy } from "@/react/hooks/useSQLEditorBridge";-import { extractWorksheetConnection } from "@/react/lib/sqlEditorConnection";-import { router, useCurrentRoute, useNavigate } from "@/react/router";+import { router, useCurrentRoute, useNavigate } from "@/app/router";import {SQL_EDITOR_DATABASE_MODULE,SQL_EDITOR_HOME_MODULE,@@ -18,19 +10,28 @@ import {SQL_EDITOR_PROJECT_MODULE,SQL_EDITOR_QUERY_HISTORY_MODULE,SQL_EDITOR_WORKSHEET_MODULE,-} from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import type { AsidePanelTab } from "@/react/stores/sqlEditor";-import { useSQLEditorStore } from "@/react/stores/sqlEditor";+} from "@/app/router/handles";+import {+ PermissionDeniedFallback,+ useComponentPermissionState,+ usePermissionDataReady,+} from "@/components/ComponentPermissionGuard";+import { useAppProject } from "@/hooks/useAppProject";+import { extractWorksheetConnection } from "@/lib/sqlEditorConnection";+import { useClampResultRowsLimitToPolicy } from "@/modules/sql-editor/hooks/useSQLEditorState";+import { migrateLegacyCache } from "@/modules/sql-editor/legacy/migration";+import { sqlEditorEvents } from "@/modules/sql-editor/model/events";+import type { AsidePanelTab } from "@/modules/sql-editor/store";+import { useSQLEditorStore } from "@/modules/sql-editor/store";import {getSQLEditorEditorState,useSQLEditorEditorState,-} from "@/react/stores/sqlEditor/editor";+} from "@/modules/sql-editor/store/editor";import {getSQLEditorTabsState,useSQLEditorTabState,-} from "@/react/stores/sqlEditor/tab";-import { migrateLegacyCache } from "@/store/modules/sqlEditor/legacy/migration";+} from "@/modules/sql-editor/store/tab";+import { useAppStore } from "@/stores/app";import {DEFAULT_SQL_EDITOR_TAB_MODE,getDateForPbTimestampProtoEs,@@ -49,7 +50,6 @@ import {isWorksheetReadableV1,STORAGE_KEY_SQL_EDITOR_SIDEBAR_TAB,} from "@/utils";-import { sqlEditorEvents } from "@/views/sql-editor/events";import { SQLEditorHomePage } from "./SQLEditorHomePage";// Route-name set for the unsaved-changes leave guard. Vue Router'sdiff --git a/frontend/src/react/components/sql-editor/SaveSheetModal.test.tsx b/frontend/src/modules/sql-editor/components/SaveSheetModal.test.tsxsimilarity index 96%rename from frontend/src/react/components/sql-editor/SaveSheetModal.test.tsxrename to frontend/src/modules/sql-editor/components/SaveSheetModal.test.tsxindex 8cb8494d1f..e4a45bddaf 100644--- a/frontend/src/react/components/sql-editor/SaveSheetModal.test.tsx+++ b/frontend/src/modules/sql-editor/components/SaveSheetModal.test.tsx@@ -31,7 +31,7 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/react/hooks/useSQLEditorEvent", () => ({+vi.mock("@/hooks/useSQLEditorEvent", () => ({useSQLEditorEvent: vi.fn((event: string, handler: (payload: unknown) => void) => {eventHandlers[event] = handler;@@ -39,17 +39,17 @@ vi.mock("@/react/hooks/useSQLEditorEvent", () => ({),}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: { getState: () => mocks.appStore },}));-vi.mock("@/react/stores/sqlEditor", () => ({+vi.mock("@/modules/sql-editor/store", () => ({useSQLEditorStore: (selector: (s: typeof mocks.editorWorksheetStore) => unknown) => selector(mocks.editorWorksheetStore),}));-vi.mock("@/views/sql-editor/Sheet", () => ({+vi.mock("@/modules/sql-editor/model/Sheet", () => ({useSheetContextByView: vi.fn(() => mocks.sheetContext),}));@@ -66,7 +66,7 @@ vi.mock("@/utils", () => ({}));// Mock Dialog so it renders into DOM without the Base UI portal-vi.mock("@/react/components/ui/dialog", () => ({+vi.mock("@/components/ui/dialog", () => ({Dialog: ({children,open,@@ -101,7 +101,7 @@ vi.mock("@/react/components/ui/dialog", () => ({}));// Mock Button — pass through disabled + onClick-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,onClick,@@ -120,7 +120,7 @@ vi.mock("@/react/components/ui/button", () => ({}));// Mock Input — standard <input>-vi.mock("@/react/components/ui/input", () => ({+vi.mock("@/components/ui/input", () => ({Input: ({value,onChange,diff --git a/frontend/src/react/components/sql-editor/SaveSheetModal.tsx b/frontend/src/modules/sql-editor/components/SaveSheetModal.tsxsimilarity index 90%rename from frontend/src/react/components/sql-editor/SaveSheetModal.tsxrename to frontend/src/modules/sql-editor/components/SaveSheetModal.tsxindex 789eeca7ab..d05af61c4d 100644--- a/frontend/src/react/components/sql-editor/SaveSheetModal.tsx+++ b/frontend/src/modules/sql-editor/components/SaveSheetModal.tsx@@ -1,19 +1,15 @@import { useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";-import { Input } from "@/react/components/ui/input";-import { useSQLEditorEvent } from "@/react/hooks/useSQLEditorEvent";-import { useAppStore } from "@/react/stores/app";-import { useSQLEditorStore } from "@/react/stores/sqlEditor";+import { Button } from "@/components/ui/button";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";+import { Input } from "@/components/ui/input";+import { useSQLEditorEvent } from "@/hooks/useSQLEditorEvent";+import { useSheetContextByView } from "@/modules/sql-editor/model/Sheet";+import { useSQLEditorStore } from "@/modules/sql-editor/store";+import { useAppStore } from "@/stores/app";import type { SQLEditorTab } from "@/types";import { UNKNOWN_ID } from "@/types";import { extractWorksheetID } from "@/utils";-import { useSheetContextByView } from "@/views/sql-editor/Sheet";import { FolderForm } from "./FolderForm";export function SaveSheetModal() {diff --git a/frontend/src/react/components/sql-editor/SchemaChooser.test.tsx b/frontend/src/modules/sql-editor/components/SchemaChooser.test.tsxsimilarity index 94%rename from frontend/src/react/components/sql-editor/SchemaChooser.test.tsxrename to frontend/src/modules/sql-editor/components/SchemaChooser.test.tsxindex e7c925def9..79dd0d1fbb 100644--- a/frontend/src/react/components/sql-editor/SchemaChooser.test.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaChooser.test.tsx@@ -27,15 +27,15 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/react/hooks/useAppDatabaseMetadata", () => ({+vi.mock("@/hooks/useAppDatabaseMetadata", () => ({useAppDatabaseMetadata: () => mocks.metadata,}));-vi.mock("@/react/hooks/useSQLEditorBridge", () => ({+vi.mock("@/modules/sql-editor/hooks/useSQLEditorState", () => ({useConnectionOfCurrentSQLEditorTab: mocks.useConnectionOfCurrentSQLEditorTab,}));-vi.mock("@/react/stores/sqlEditor/tab", () => ({+vi.mock("@/modules/sql-editor/store/tab", () => ({useSQLEditorTabState: (selector: (s: {currentTabId: string;@@ -55,8 +55,8 @@ vi.mock("@/utils", () => ({instanceAllowsSchemaScopedQuery: mocks.instanceAllowsSchemaScopedQuery,}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: mocks.router,}));diff --git a/frontend/src/react/components/sql-editor/SchemaChooser.tsx b/frontend/src/modules/sql-editor/components/SchemaChooser.tsxsimilarity index 91%rename from frontend/src/react/components/sql-editor/SchemaChooser.tsxrename to frontend/src/modules/sql-editor/components/SchemaChooser.tsxindex cf0b455cb0..d8c4d014fa 100644--- a/frontend/src/react/components/sql-editor/SchemaChooser.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaChooser.tsx@@ -1,12 +1,12 @@import { useEffect, useMemo } from "react";import { useTranslation } from "react-i18next";-import { useAppDatabaseMetadata } from "@/react/hooks/useAppDatabaseMetadata";-import { useReactiveRoute } from "@/react/hooks/useReactiveRoute";-import { useConnectionOfCurrentSQLEditorTab } from "@/react/hooks/useSQLEditorBridge";+import { useAppDatabaseMetadata } from "@/hooks/useAppDatabaseMetadata";+import { useReactiveRoute } from "@/hooks/useReactiveRoute";+import { useConnectionOfCurrentSQLEditorTab } from "@/modules/sql-editor/hooks/useSQLEditorState";import {getSQLEditorTabsState,useSQLEditorTabState,-} from "@/react/stores/sqlEditor/tab";+} from "@/modules/sql-editor/store/tab";import { instanceAllowsSchemaScopedQuery } from "@/utils";import { ConnectChooser } from "./ConnectChooser";diff --git a/frontend/src/react/components/sql-editor/SchemaPane/FlatTableList.test.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/FlatTableList.test.tsxsimilarity index 99%rename from frontend/src/react/components/sql-editor/SchemaPane/FlatTableList.test.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/FlatTableList.test.tsxindex 9976aae0c0..1bf17f835f 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/FlatTableList.test.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaPane/FlatTableList.test.tsx@@ -33,7 +33,7 @@ vi.mock("./hover-state", () => ({}),}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,onClick,diff --git a/frontend/src/react/components/sql-editor/SchemaPane/FlatTableList.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/FlatTableList.tsxsimilarity index 99%rename from frontend/src/react/components/sql-editor/SchemaPane/FlatTableList.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/FlatTableList.tsxindex 23eda4e781..4531d4fa65 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/FlatTableList.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaPane/FlatTableList.tsx@@ -1,8 +1,8 @@import { ChevronDown, ChevronRight, Table as TableIcon } from "lucide-react";import { useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { cn } from "@/react/lib/utils";+import { Button } from "@/components/ui/button";+import { cn } from "@/lib/utils";import type {DatabaseMetadata,TableMetadata,diff --git a/frontend/src/react/components/sql-editor/SchemaPane/HoverPanel/ColumnInfo.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/HoverPanel/ColumnInfo.tsxsimilarity index 91%rename from frontend/src/react/components/sql-editor/SchemaPane/HoverPanel/ColumnInfo.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/HoverPanel/ColumnInfo.tsxindex 8b7a588b84..3753617a33 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/HoverPanel/ColumnInfo.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaPane/HoverPanel/ColumnInfo.tsx@@ -1,9 +1,9 @@import { create } from "@bufbuild/protobuf";import { Check, X } from "lucide-react";import { useTranslation } from "react-i18next";-import { getColumnDefaultValuePlaceholder } from "@/react/components/SchemaEditorLite/core/columnDefaultValue";-import { useAppDatabase } from "@/react/hooks/useAppDatabase";-import { useAppStore } from "@/react/stores/app";+import { useAppDatabase } from "@/hooks/useAppDatabase";+import { getColumnDefaultValuePlaceholder } from "@/modules/schema-editor/core/columnDefaultValue";+import { useAppStore } from "@/stores/app";import { Engine } from "@/types/proto-es/v1/common_pb";import { ColumnMetadataSchema } from "@/types/proto-es/v1/database_service_pb";import { getInstanceResource } from "@/utils";diff --git a/frontend/src/react/components/sql-editor/SchemaPane/HoverPanel/CommonText.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/HoverPanel/CommonText.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/SchemaPane/HoverPanel/CommonText.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/HoverPanel/CommonText.tsxdiff --git a/frontend/src/react/components/sql-editor/SchemaPane/HoverPanel/ExternalTableInfo.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/HoverPanel/ExternalTableInfo.tsxsimilarity index 94%rename from frontend/src/react/components/sql-editor/SchemaPane/HoverPanel/ExternalTableInfo.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/HoverPanel/ExternalTableInfo.tsxindex cf9c1af844..aa3f82d037 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/HoverPanel/ExternalTableInfo.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaPane/HoverPanel/ExternalTableInfo.tsx@@ -1,5 +1,5 @@import { useTranslation } from "react-i18next";-import { useAppStore } from "@/react/stores/app";+import { useAppStore } from "@/stores/app";import { InfoItem } from "./InfoItem";type Props = {diff --git a/frontend/src/react/components/sql-editor/SchemaPane/HoverPanel/HoverPanel.test.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/HoverPanel/HoverPanel.test.tsxsimilarity index 99%rename from frontend/src/react/components/sql-editor/SchemaPane/HoverPanel/HoverPanel.test.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/HoverPanel/HoverPanel.test.tsxindex 70ba4900fe..cd416ed69c 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/HoverPanel/HoverPanel.test.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaPane/HoverPanel/HoverPanel.test.tsx@@ -56,7 +56,7 @@ vi.mock("./ViewInfo", () => ({ViewInfo: () => <div data-testid="ViewInfo" />,}));-vi.mock("@/react/components/ui/layer", () => ({+vi.mock("@/components/ui/layer", () => ({LAYER_SURFACE_CLASS: "test-layer",getLayerRoot: () => document.body,}));diff --git a/frontend/src/react/components/sql-editor/SchemaPane/HoverPanel/HoverPanel.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/HoverPanel/HoverPanel.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/SchemaPane/HoverPanel/HoverPanel.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/HoverPanel/HoverPanel.tsxindex 71df2f3cc4..79a82409c7 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/HoverPanel/HoverPanel.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaPane/HoverPanel/HoverPanel.tsx@@ -1,7 +1,7 @@import { useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";import { createPortal } from "react-dom";-import { getLayerRoot, LAYER_SURFACE_CLASS } from "@/react/components/ui/layer";-import { cn } from "@/react/lib/utils";+import { getLayerRoot, LAYER_SURFACE_CLASS } from "@/components/ui/layer";+import { cn } from "@/lib/utils";import type { Position } from "@/types";import { minmax } from "@/utils";import { useHoverState } from "../hover-state";diff --git a/frontend/src/react/components/sql-editor/SchemaPane/HoverPanel/InfoItem.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/HoverPanel/InfoItem.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/SchemaPane/HoverPanel/InfoItem.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/HoverPanel/InfoItem.tsxdiff --git a/frontend/src/react/components/sql-editor/SchemaPane/HoverPanel/TableInfo.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/HoverPanel/TableInfo.tsxsimilarity index 93%rename from frontend/src/react/components/sql-editor/SchemaPane/HoverPanel/TableInfo.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/HoverPanel/TableInfo.tsxindex b0e0e756f4..1c5c68dc58 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/HoverPanel/TableInfo.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaPane/HoverPanel/TableInfo.tsx@@ -1,7 +1,7 @@import { useTranslation } from "react-i18next";-import { EngineIcon } from "@/react/components/EngineIcon";-import { useAppDatabase } from "@/react/hooks/useAppDatabase";-import { useAppStore } from "@/react/stores/app";+import { EngineIcon } from "@/components/EngineIcon";+import { useAppDatabase } from "@/hooks/useAppDatabase";+import { useAppStore } from "@/stores/app";import { Engine } from "@/types/proto-es/v1/common_pb";import { bytesToString, getInstanceResource } from "@/utils";import { engineNameV1 } from "@/utils/v1/instance";diff --git a/frontend/src/react/components/sql-editor/SchemaPane/HoverPanel/TablePartitionInfo.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/HoverPanel/TablePartitionInfo.tsxsimilarity index 96%rename from frontend/src/react/components/sql-editor/SchemaPane/HoverPanel/TablePartitionInfo.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/HoverPanel/TablePartitionInfo.tsxindex 0304b5d128..e95e0ddfe4 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/HoverPanel/TablePartitionInfo.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaPane/HoverPanel/TablePartitionInfo.tsx@@ -1,6 +1,6 @@import { create } from "@bufbuild/protobuf";import { useTranslation } from "react-i18next";-import { useAppStore } from "@/react/stores/app";+import { useAppStore } from "@/stores/app";import {TablePartitionMetadata_Type,TablePartitionMetadataSchema,diff --git a/frontend/src/react/components/sql-editor/SchemaPane/HoverPanel/ViewInfo.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/HoverPanel/ViewInfo.tsxsimilarity index 89%rename from frontend/src/react/components/sql-editor/SchemaPane/HoverPanel/ViewInfo.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/HoverPanel/ViewInfo.tsxindex aab37069ac..72f75e2ebc 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/HoverPanel/ViewInfo.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaPane/HoverPanel/ViewInfo.tsx@@ -1,4 +1,4 @@-import { useAppStore } from "@/react/stores/app";+import { useAppStore } from "@/stores/app";import { CommonText } from "./CommonText";type Props = {diff --git a/frontend/src/react/components/sql-editor/SchemaPane/SchemaContextMenu.test.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/SchemaContextMenu.test.tsxsimilarity index 98%rename from frontend/src/react/components/sql-editor/SchemaPane/SchemaContextMenu.test.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/SchemaContextMenu.test.tsxindex fa46e56a23..402408bd0f 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/SchemaContextMenu.test.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaPane/SchemaContextMenu.test.tsx@@ -15,7 +15,7 @@ vi.mock("./actions", () => ({useSchemaPaneContextMenu: mocks.useSchemaPaneContextMenu,}));-vi.mock("@/react/components/ui/dropdown-menu", () => ({+vi.mock("@/components/ui/dropdown-menu", () => ({DropdownMenu: ({ children }: { children: React.ReactNode }) => (<div data-testid="dropdown-menu">{children}</div>),diff --git a/frontend/src/react/components/sql-editor/SchemaPane/SchemaContextMenu.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/SchemaContextMenu.tsxsimilarity index 98%rename from frontend/src/react/components/sql-editor/SchemaPane/SchemaContextMenu.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/SchemaContextMenu.tsxindex f5d60239b4..fc1994631e 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/SchemaContextMenu.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaPane/SchemaContextMenu.tsx@@ -8,7 +8,7 @@ import {DropdownMenuSubmenu,DropdownMenuSubmenuContent,DropdownMenuSubmenuTrigger,-} from "@/react/components/ui/dropdown-menu";+} from "@/components/ui/dropdown-menu";import {type SchemaMenuDeps,type SchemaMenuItem,diff --git a/frontend/src/react/components/sql-editor/SchemaPane/SchemaPane.test.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/SchemaPane.test.tsxsimilarity index 87%rename from frontend/src/react/components/sql-editor/SchemaPane/SchemaPane.test.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/SchemaPane.test.tsxindex 87218a9d84..df25dad04e 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/SchemaPane.test.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaPane/SchemaPane.test.tsx@@ -35,19 +35,19 @@ vi.mock("react-i18next", () => ({initReactI18next: { type: "3rdParty", init: () => {} },}));-vi.mock("@/react/i18n", () => ({+vi.mock("@/lib/i18n", () => ({default: { t: (k: string) => k },}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: vi.fn(),}));-vi.mock("@/react/hooks/useAppDatabase", () => ({+vi.mock("@/hooks/useAppDatabase", () => ({useAppDatabase: (name: string) => ({ name }),}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const state = {getDatabaseByName: (name: string) => ({ name }),getOrFetchDatabaseByName: vi.fn(async (name: string) => ({ name })),@@ -68,7 +68,7 @@ vi.mock("@/react/stores/app", () => {};});-vi.mock("@/react/hooks/useSQLEditorBridge", () => ({+vi.mock("@/modules/sql-editor/hooks/useSQLEditorState", () => ({// Returns plain values now — `database` is the unwrapped object.useConnectionOfCurrentSQLEditorTab: () => ({database: mocks.databaseRefValue,@@ -91,7 +91,7 @@ const tabsState = () => ({updateTab: vi.fn(),});-vi.mock("@/react/stores/sqlEditor/tab", () => ({+vi.mock("@/modules/sql-editor/store/tab", () => ({useSQLEditorTabState: (selector: (s: unknown) => unknown) =>selector(tabsState()),getSQLEditorTabsState: () => tabsState(),@@ -159,41 +159,38 @@ vi.mock("@/utils/v1/instance", () => ({instanceV1SupportsPackage: () => false,instanceV1SupportsSequence: () => false,}));-vi.mock("@/react/components/instance/constants", () => ({+vi.mock("@/components/instance/constants", () => ({EngineIconPath: { MYSQL: "/mysql.svg" } as Record<string, string>,}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: { resolve: () => ({ href: "/" }) },}));-vi.mock("@/router/sqlEditor", () => ({- SQL_EDITOR_DATABASE_MODULE: "sql-editor.database",-}));-vi.mock("@/react/lib/keyWithPosition", () => ({+vi.mock("@/lib/keyWithPosition", () => ({keyWithPosition: (k: string, p: number) => `${k}###${p}`,}));-vi.mock("@/views/sql-editor/events", () => ({+vi.mock("@/modules/sql-editor/model/events", () => ({sqlEditorEvents: { emit: vi.fn(), on: vi.fn(() => () => {}) },}));-vi.mock("@/react/hooks/useExecuteSQL", () => ({+vi.mock("@/hooks/useExecuteSQL", () => ({useExecuteSQL: () => ({ execute: vi.fn() }),}));-vi.mock("@/react/components/monaco/sqlFormatter", () => ({+vi.mock("@/components/monaco/sqlFormatter", () => ({formatSQL: async (sql: string) => ({ data: sql, error: null }),}));-vi.mock("@/react/components/HumanizeTs", () => ({+vi.mock("@/components/HumanizeTs", () => ({HumanizeTs: () => <span />,}));-vi.mock("@/react/components/ui/input", () => ({+vi.mock("@/components/ui/input", () => ({Input: (props: React.InputHTMLAttributes<HTMLInputElement>) => (<input data-testid="search-input" {...props} />),}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,onClick,@@ -209,11 +206,11 @@ vi.mock("@/react/components/ui/button", () => ({),}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: ({ children }: { children: React.ReactNode }) => <>{children}</>,}));-vi.mock("@/react/components/ui/dropdown-menu", () => ({+vi.mock("@/components/ui/dropdown-menu", () => ({DropdownMenu: () => null,DropdownMenuContent: () => null,DropdownMenuItem: () => null,@@ -222,7 +219,7 @@ vi.mock("@/react/components/ui/dropdown-menu", () => ({DropdownMenuSubmenuTrigger: () => null,}));-vi.mock("@/react/components/ui/dialog", () => ({+vi.mock("@/components/ui/dialog", () => ({Dialog: ({ children }: { children: React.ReactNode }) => <>{children}</>,DialogContent: ({ children }: { children: React.ReactNode }) => (<div>{children}</div>@@ -232,7 +229,7 @@ vi.mock("@/react/components/ui/dialog", () => ({),}));-vi.mock("@/react/components/TableSchemaViewer", () => ({+vi.mock("@/components/TableSchemaViewer", () => ({TableSchemaViewer: () => <div data-testid="table-schema-viewer" />,}));@@ -240,16 +237,16 @@ vi.mock("@base-ui/react/menu", () => ({Menu: { Trigger: () => null },}));-vi.mock("@/react/components/ui/layer", () => ({+vi.mock("@/components/ui/layer", () => ({LAYER_SURFACE_CLASS: "",getLayerRoot: () => document.body,}));-vi.mock("@/react/components/ui/tree", () => ({+vi.mock("@/components/ui/tree", () => ({Tree: () => <div data-testid="tree" />,}));-vi.mock("@/react/components/ui/tree-utils", () => ({+vi.mock("@/components/ui/tree-utils", () => ({countVisibleRows: () => 0,}));diff --git a/frontend/src/react/components/sql-editor/SchemaPane/SchemaPane.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/SchemaPane.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/SchemaPane/SchemaPane.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/SchemaPane.tsxindex af83832ae0..e3baefa6d5 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/SchemaPane.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaPane/SchemaPane.tsx@@ -9,23 +9,19 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";-import { EngineIcon } from "@/react/components/EngineIcon";-import { TableSchemaViewer } from "@/react/components/TableSchemaViewer";-import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";-import { Input } from "@/react/components/ui/input";-import { Tree, type TreeDataNode } from "@/react/components/ui/tree";-import { countVisibleRows } from "@/react/components/ui/tree-utils";-import { useConnectionOfCurrentSQLEditorTab } from "@/react/hooks/useSQLEditorBridge";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";+import { EngineIcon } from "@/components/EngineIcon";+import { TableSchemaViewer } from "@/components/TableSchemaViewer";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";+import { Input } from "@/components/ui/input";+import { Tree, type TreeDataNode } from "@/components/ui/tree";+import { countVisibleRows } from "@/components/ui/tree-utils";+import { cn } from "@/lib/utils";+import { useConnectionOfCurrentSQLEditorTab } from "@/modules/sql-editor/hooks/useSQLEditorState";import {getSQLEditorTabsState,useSQLEditorTabState,-} from "@/react/stores/sqlEditor/tab";+} from "@/modules/sql-editor/store/tab";+import { useAppStore } from "@/stores/app";import { isValidDatabaseName } from "@/types";import type {GetSchemaStringRequest_ObjectType,diff --git a/frontend/src/react/components/sql-editor/SchemaPane/SyncSchemaButton.test.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/SyncSchemaButton.test.tsxsimilarity index 94%rename from frontend/src/react/components/sql-editor/SchemaPane/SyncSchemaButton.test.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/SyncSchemaButton.test.tsxindex 3c1ed13caf..b19d3414e6 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/SyncSchemaButton.test.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaPane/SyncSchemaButton.test.tsx@@ -24,11 +24,11 @@ vi.mock("react-i18next", () => ({Trans: ({ i18nKey }: { i18nKey: string }) => <span>{i18nKey}</span>,}));-vi.mock("@/react/components/HumanizeTs", () => ({+vi.mock("@/components/HumanizeTs", () => ({HumanizeTs: () => <span data-testid="humanize" />,}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: ({children,content,@@ -43,7 +43,7 @@ vi.mock("@/react/components/ui/tooltip", () => ({),}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,onClick,@@ -64,7 +64,7 @@ vi.mock("@/react/components/ui/button", () => ({),}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: {getState: () => ({syncDatabase: mocks.syncDatabase,@@ -73,7 +73,7 @@ vi.mock("@/react/stores/app", () => ({},}));-vi.mock("@/react/hooks/useSQLEditorBridge", () => ({+vi.mock("@/modules/sql-editor/hooks/useSQLEditorState", () => ({// Returns plain values now — `database` is the unwrapped object.useConnectionOfCurrentSQLEditorTab: () => ({database: mocks.databaseRefValue,diff --git a/frontend/src/react/components/sql-editor/SchemaPane/SyncSchemaButton.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/SyncSchemaButton.tsxsimilarity index 88%rename from frontend/src/react/components/sql-editor/SchemaPane/SyncSchemaButton.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/SyncSchemaButton.tsxindex 895d951632..d1222f6bd1 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/SyncSchemaButton.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaPane/SyncSchemaButton.tsx@@ -1,12 +1,12 @@import { RefreshCcw } from "lucide-react";import { useState } from "react";import { Trans, useTranslation } from "react-i18next";-import { HumanizeTs } from "@/react/components/HumanizeTs";-import { Button } from "@/react/components/ui/button";-import { Tooltip } from "@/react/components/ui/tooltip";-import { useConnectionOfCurrentSQLEditorTab } from "@/react/hooks/useSQLEditorBridge";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";+import { HumanizeTs } from "@/components/HumanizeTs";+import { Button } from "@/components/ui/button";+import { Tooltip } from "@/components/ui/tooltip";+import { cn } from "@/lib/utils";+import { useConnectionOfCurrentSQLEditorTab } from "@/modules/sql-editor/hooks/useSQLEditorState";+import { useAppStore } from "@/stores/app";import { getDateForPbTimestampProtoEs, isValidDatabaseName } from "@/types";/**diff --git a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/CheckNode.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/CheckNode.tsxsimilarity index 96%rename from frontend/src/react/components/sql-editor/SchemaPane/TreeNode/CheckNode.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/CheckNode.tsxindex 27987b9f84..06a08817d2 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/CheckNode.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/CheckNode.tsx@@ -1,4 +1,4 @@-import { useAppStore } from "@/react/stores/app";+import { useAppStore } from "@/stores/app";import type { TreeNode } from "../schemaTree";import { CommonNode } from "./CommonNode";import { CheckConstraintIcon } from "./icons";diff --git a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/ColumnNode.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/ColumnNode.tsxsimilarity index 98%rename from frontend/src/react/components/sql-editor/SchemaPane/TreeNode/ColumnNode.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/ColumnNode.tsxindex 39eda61206..6beb257de2 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/ColumnNode.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/ColumnNode.tsx@@ -1,5 +1,5 @@import { useMemo } from "react";-import { useAppStore } from "@/react/stores/app";+import { useAppStore } from "@/stores/app";import type { ColumnMetadata } from "@/types/proto-es/v1/database_service_pb";import type { TreeNode } from "../schemaTree";import { CommonNode } from "./CommonNode";diff --git a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/CommonNode.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/CommonNode.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/SchemaPane/TreeNode/CommonNode.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/CommonNode.tsxindex 360a9826d4..0dcd470b0b 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/CommonNode.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/CommonNode.tsx@@ -1,6 +1,6 @@import type { ReactNode } from "react";-import { HighlightLabelText } from "@/react/components/HighlightLabelText";-import { cn } from "@/react/lib/utils";+import { HighlightLabelText } from "@/components/HighlightLabelText";+import { cn } from "@/lib/utils";type Props = {readonly text: string;diff --git a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/DatabaseNode.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/DatabaseNode.tsxsimilarity index 87%rename from frontend/src/react/components/sql-editor/SchemaPane/TreeNode/DatabaseNode.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/DatabaseNode.tsxindex a7d051fe4a..3242394a18 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/DatabaseNode.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/DatabaseNode.tsx@@ -1,5 +1,5 @@-import { EngineIcon } from "@/react/components/EngineIcon";-import { useAppDatabase } from "@/react/hooks/useAppDatabase";+import { EngineIcon } from "@/components/EngineIcon";+import { useAppDatabase } from "@/hooks/useAppDatabase";import { extractDatabaseResourceName, getInstanceResource } from "@/utils";import type { TreeNode } from "../schemaTree";import { CommonNode } from "./CommonNode";diff --git a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/DependencyColumnNode.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/DependencyColumnNode.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/SchemaPane/TreeNode/DependencyColumnNode.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/DependencyColumnNode.tsxdiff --git a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/DummyNode.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/DummyNode.tsxsimilarity index 94%rename from frontend/src/react/components/sql-editor/SchemaPane/TreeNode/DummyNode.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/DummyNode.tsxindex 9f1b67c98c..3a985cfb82 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/DummyNode.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/DummyNode.tsx@@ -1,5 +1,5 @@import { useTranslation } from "react-i18next";-import { Tooltip } from "@/react/components/ui/tooltip";+import { Tooltip } from "@/components/ui/tooltip";import type { TreeNode } from "../schemaTree";type Props = {diff --git a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/ExternalTableNode.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/ExternalTableNode.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/SchemaPane/TreeNode/ExternalTableNode.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/ExternalTableNode.tsxdiff --git a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/ForeignKeyNode.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/ForeignKeyNode.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/SchemaPane/TreeNode/ForeignKeyNode.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/ForeignKeyNode.tsxdiff --git a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/FunctionNode.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/FunctionNode.tsxsimilarity index 94%rename from frontend/src/react/components/sql-editor/SchemaPane/TreeNode/FunctionNode.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/FunctionNode.tsxindex 41a8d8adf7..e12289e019 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/FunctionNode.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/FunctionNode.tsx@@ -1,4 +1,4 @@-import { useAppStore } from "@/react/stores/app";+import { useAppStore } from "@/stores/app";import type { TreeNode } from "../schemaTree";import { CommonNode } from "./CommonNode";import { FunctionIcon } from "./icons";diff --git a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/IndexNode.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/IndexNode.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/SchemaPane/TreeNode/IndexNode.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/IndexNode.tsxindex 8392ab68d2..0b7d48cedc 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/IndexNode.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/IndexNode.tsx@@ -1,4 +1,4 @@-import { useAppStore } from "@/react/stores/app";+import { useAppStore } from "@/stores/app";import type { TreeNode } from "../schemaTree";import { CommonNode } from "./CommonNode";import { IndexIcon, PrimaryKeyIcon } from "./icons";diff --git a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/Label.test.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/Label.test.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/SchemaPane/TreeNode/Label.test.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/Label.test.tsxdiff --git a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/Label.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/Label.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/SchemaPane/TreeNode/Label.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/Label.tsxdiff --git a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/PackageNode.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/PackageNode.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/SchemaPane/TreeNode/PackageNode.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/PackageNode.tsxdiff --git a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/PartitionTableNode.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/PartitionTableNode.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/SchemaPane/TreeNode/PartitionTableNode.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/PartitionTableNode.tsxdiff --git a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/ProcedureNode.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/ProcedureNode.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/SchemaPane/TreeNode/ProcedureNode.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/ProcedureNode.tsxindex bcaef117b8..2749424976 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/ProcedureNode.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/ProcedureNode.tsx@@ -1,4 +1,4 @@-import { useAppStore } from "@/react/stores/app";+import { useAppStore } from "@/stores/app";import type { TreeNode } from "../schemaTree";import { CommonNode } from "./CommonNode";import { ProcedureIcon } from "./icons";diff --git a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/SchemaNode.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/SchemaNode.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/SchemaPane/TreeNode/SchemaNode.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/SchemaNode.tsxdiff --git a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/SequenceNode.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/SequenceNode.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/SchemaPane/TreeNode/SequenceNode.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/SequenceNode.tsxdiff --git a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/TableNode.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/TableNode.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/SchemaPane/TreeNode/TableNode.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/TableNode.tsxdiff --git a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/TextNode.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/TextNode.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/SchemaPane/TreeNode/TextNode.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/TextNode.tsxdiff --git a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/TriggerNode.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/TriggerNode.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/SchemaPane/TreeNode/TriggerNode.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/TriggerNode.tsxdiff --git a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/ViewNode.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/ViewNode.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/SchemaPane/TreeNode/ViewNode.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/ViewNode.tsxdiff --git a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/icons.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/icons.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/SchemaPane/TreeNode/icons.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/icons.tsxindex 27f0b3224f..7c338d56a8 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/TreeNode/icons.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaPane/TreeNode/icons.tsx@@ -12,12 +12,12 @@ import {TableRowsSplit,Zap,} from "lucide-react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";/*** React equivalents of `frontend/src/components/Icon/*Icon.vue`. Kept* local to the SchemaPane port for now; will lift to a shared- * `src/react/components/Icon/` directory if Stage 16+ surfaces need them.+ * `src/components/Icon/` directory if Stage 16+ surfaces need them.** Each icon mirrors its Vue counterpart's tint / stroke choices so the* tree visually matches the Vue version 1:1.@@ -136,4 +136,4 @@ export function CheckConstraintIcon({ className }: IconProps) {// ColumnIcon is shared with SchemaEditorLite; both surfaces must render// identical icons so users don't see drift across editors.-export { ColumnIcon } from "@/react/components/schema/icons";+export { ColumnIcon } from "@/components/schema/icons";diff --git a/frontend/src/react/components/sql-editor/SchemaPane/actions.test.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/actions.test.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/SchemaPane/actions.test.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/actions.test.tsxindex 7c93cefb66..9cf5d168b8 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/actions.test.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaPane/actions.test.tsx@@ -46,15 +46,15 @@ vi.mock("react-i18next", () => ({initReactI18next: { type: "3rdParty", init: () => {} },}));-vi.mock("@/react/i18n", () => ({+vi.mock("@/lib/i18n", () => ({default: { t: (k: string) => k },}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: vi.fn(),}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const state = {getDatabaseByName: mocks.getDatabaseByName,getTableMetadata: mocks.getTableMetadata,@@ -67,7 +67,7 @@ vi.mock("@/react/stores/app", () => {};});-vi.mock("@/react/stores/sqlEditor/tab", () => ({+vi.mock("@/modules/sql-editor/store/tab", () => ({// actions.tsx only reaches the store imperatively via getSQLEditorTabsState// when a menu handler runs; building the menu items (what these tests// capture) never touches it. Provide the full surface anyway so any@@ -130,26 +130,26 @@ vi.mock("@/types/proto-es/v1/database_service_pb", () => ({GetSchemaStringRequest_ObjectType: { TABLE: 1, VIEW: 2 },}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {resolve: () => ({ href: "/sql-editor/db" }),},}));-vi.mock("@/react/lib/keyWithPosition", () => ({+vi.mock("@/lib/keyWithPosition", () => ({keyWithPosition: (k: string, p: number) => `${k}###${p}`,}));-vi.mock("@/views/sql-editor/events", () => ({+vi.mock("@/modules/sql-editor/model/events", () => ({sqlEditorEvents: { emit: vi.fn() },}));-vi.mock("@/react/hooks/useExecuteSQL", () => ({+vi.mock("@/hooks/useExecuteSQL", () => ({useExecuteSQL: () => ({ execute: vi.fn() }),}));-vi.mock("@/react/components/monaco/sqlFormatter", () => ({+vi.mock("@/components/monaco/sqlFormatter", () => ({formatSQL: async (sql: string) => ({ data: sql, error: null }),}));diff --git a/frontend/src/react/components/sql-editor/SchemaPane/actions.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/actions.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/SchemaPane/actions.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/actions.tsxindex 3dd46213d7..8db7e01d29 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/actions.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaPane/actions.tsx@@ -15,14 +15,15 @@ import {import type { ReactNode } from "react";import { useCallback, useMemo } from "react";import { useTranslation } from "react-i18next";-import { formatSQL } from "@/react/components/monaco/sqlFormatter";-import { useExecuteSQL } from "@/react/hooks/useExecuteSQL";-import { writeTextToClipboard } from "@/react/lib/clipboard";-import { keyWithPosition } from "@/react/lib/keyWithPosition";-import { router } from "@/react/router";-import { SQL_EDITOR_DATABASE_MODULE } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { getSQLEditorTabsState } from "@/react/stores/sqlEditor/tab";+import { router } from "@/app/router";+import { SQL_EDITOR_DATABASE_MODULE } from "@/app/router/handles";+import { formatSQL } from "@/components/monaco/sqlFormatter";+import { useExecuteSQL } from "@/hooks/useExecuteSQL";+import { writeTextToClipboard } from "@/lib/clipboard";+import { keyWithPosition } from "@/lib/keyWithPosition";+import { sqlEditorEvents } from "@/modules/sql-editor/model/events";+import { getSQLEditorTabsState } from "@/modules/sql-editor/store/tab";+import { useAppStore } from "@/stores/app";import {DEFAULT_SQL_EDITOR_TAB_MODE,dialectOfEngineV1,@@ -54,7 +55,6 @@ import {sortByDictionary,supportGetStringSchema,} from "@/utils";-import { sqlEditorEvents } from "@/views/sql-editor/events";import {type NodeTarget,type NodeType,diff --git a/frontend/src/react/components/sql-editor/SchemaPane/availableActions.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/availableActions.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/SchemaPane/availableActions.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/availableActions.tsxindex 1017374e02..7c84786f0d 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/availableActions.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaPane/availableActions.tsx@@ -1,7 +1,7 @@import { Box, Info } from "lucide-react";import { useMemo } from "react";import { useTranslation } from "react-i18next";-import { useConnectionOfCurrentSQLEditorTab } from "@/react/hooks/useSQLEditorBridge";+import { useConnectionOfCurrentSQLEditorTab } from "@/modules/sql-editor/hooks/useSQLEditorState";import {instanceV1SupportsExternalTable,instanceV1SupportsPackage,diff --git a/frontend/src/react/components/sql-editor/SchemaPane/click.ts b/frontend/src/modules/sql-editor/components/SchemaPane/click.tssimilarity index 100%rename from frontend/src/react/components/sql-editor/SchemaPane/click.tsrename to frontend/src/modules/sql-editor/components/SchemaPane/click.tsdiff --git a/frontend/src/react/components/sql-editor/SchemaPane/hover-state.test.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/hover-state.test.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/SchemaPane/hover-state.test.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/hover-state.test.tsxdiff --git a/frontend/src/react/components/sql-editor/SchemaPane/hover-state.tsx b/frontend/src/modules/sql-editor/components/SchemaPane/hover-state.tsxsimilarity index 98%rename from frontend/src/react/components/sql-editor/SchemaPane/hover-state.tsxrename to frontend/src/modules/sql-editor/components/SchemaPane/hover-state.tsxindex 82c1f8593b..a89fde12f1 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/hover-state.tsx+++ b/frontend/src/modules/sql-editor/components/SchemaPane/hover-state.tsx@@ -10,7 +10,7 @@ import {import {type DelayedValueUpdate,useDelayedValue,-} from "@/react/hooks/useDelayedValue";+} from "@/hooks/useDelayedValue";import type { Position } from "@/types";/**diff --git a/frontend/src/react/components/sql-editor/SchemaPane/schemaTree.test.ts b/frontend/src/modules/sql-editor/components/SchemaPane/schemaTree.test.tssimilarity index 99%rename from frontend/src/react/components/sql-editor/SchemaPane/schemaTree.test.tsrename to frontend/src/modules/sql-editor/components/SchemaPane/schemaTree.test.tsindex 66b0e591d5..4c05251621 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/schemaTree.test.ts+++ b/frontend/src/modules/sql-editor/components/SchemaPane/schemaTree.test.ts@@ -32,7 +32,7 @@ import {type TreeNode,} from "./schemaTree";-vi.mock("@/react/i18n", () => ({+vi.mock("@/lib/i18n", () => ({default: { t: (key: string) => key },}));diff --git a/frontend/src/react/components/sql-editor/SchemaPane/schemaTree.ts b/frontend/src/modules/sql-editor/components/SchemaPane/schemaTree.tssimilarity index 99%rename from frontend/src/react/components/sql-editor/SchemaPane/schemaTree.tsrename to frontend/src/modules/sql-editor/components/SchemaPane/schemaTree.tsindex dd4af4f1cf..0d5b548041 100644--- a/frontend/src/react/components/sql-editor/SchemaPane/schemaTree.ts+++ b/frontend/src/modules/sql-editor/components/SchemaPane/schemaTree.ts@@ -1,6 +1,6 @@import type { ReactNode } from "react";-import i18n from "@/react/i18n";-import { keyWithPosition } from "@/react/lib/keyWithPosition";+import i18n from "@/lib/i18n";+import { keyWithPosition } from "@/lib/keyWithPosition";import type {CheckConstraintMetadata,ColumnMetadata,@@ -25,7 +25,7 @@ import { keyForDependencyColumn } from "@/utils/v1/dbSchema";* byte-for-byte (so persisted `tab.treeState.keys` survives the migration).** Renamed from `tree.ts` → `schemaTree.ts` to disambiguate from- * `src/react/components/sql-editor/ConnectionPane/tree.ts`.+ * `src/components/sql-editor/ConnectionPane/tree.ts`.*/export type NodeType =diff --git a/frontend/src/react/components/sql-editor/SchemaSelectToolbar.tsx b/frontend/src/modules/sql-editor/components/SchemaSelectToolbar.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/SchemaSelectToolbar.tsxrename to frontend/src/modules/sql-editor/components/SchemaSelectToolbar.tsxdiff --git a/frontend/src/react/components/sql-editor/SequencesPanel.tsx b/frontend/src/modules/sql-editor/components/SequencesPanel.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/SequencesPanel.tsxrename to frontend/src/modules/sql-editor/components/SequencesPanel.tsxdiff --git a/frontend/src/react/components/sql-editor/SharePopoverBody.test.tsx b/frontend/src/modules/sql-editor/components/SharePopoverBody.test.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/SharePopoverBody.test.tsxrename to frontend/src/modules/sql-editor/components/SharePopoverBody.test.tsxindex ab2f8b3efd..cc52045d1b 100644--- a/frontend/src/react/components/sql-editor/SharePopoverBody.test.tsx+++ b/frontend/src/modules/sql-editor/components/SharePopoverBody.test.tsx@@ -26,11 +26,11 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useCurrentUser: mocks.useCurrentUser,}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {// `notify` reuses the `pushNotification` vi.fn so the existing test// assertions on `mocks.pushNotification` keep working after the migration// from the Pinia helper to the app-store notification slice.@@ -52,18 +52,14 @@ vi.mock("@/utils", () => ({extractWorksheetID: mocks.extractWorksheetID,}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {resolve: mocks.routerResolve,},}));-vi.mock("@/router/sqlEditor", () => ({- SQL_EDITOR_WORKSHEET_MODULE: "sql-editor.worksheet",-}));--vi.mock("@/react/components/ui/popover", () => ({+vi.mock("@/components/ui/popover", () => ({Popover: ({ children }: { children: React.ReactNode }) => (<div data-testid="popover">{children}</div>),@@ -84,7 +80,7 @@ vi.mock("@/react/components/ui/popover", () => ({),}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: ({ children }: { children: React.ReactNode }) => <>{children}</>,}));diff --git a/frontend/src/react/components/sql-editor/SharePopoverBody.tsx b/frontend/src/modules/sql-editor/components/SharePopoverBody.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/SharePopoverBody.tsxrename to frontend/src/modules/sql-editor/components/SharePopoverBody.tsxindex df0eaedc81..e403bfcb72 100644--- a/frontend/src/react/components/sql-editor/SharePopoverBody.tsx+++ b/frontend/src/modules/sql-editor/components/SharePopoverBody.tsx@@ -8,18 +8,18 @@ import {} from "lucide-react";import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";+import { router } from "@/app/router";+import { SQL_EDITOR_WORKSHEET_MODULE } from "@/app/router/handles";+import { Button } from "@/components/ui/button";import {Popover,PopoverContent,PopoverTrigger,-} from "@/react/components/ui/popover";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { writeTextToClipboard } from "@/react/lib/clipboard";-import { cn } from "@/react/lib/utils";-import { router } from "@/react/router";-import { SQL_EDITOR_WORKSHEET_MODULE } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";+} from "@/components/ui/popover";+import { useCurrentUser } from "@/hooks/useAppState";+import { writeTextToClipboard } from "@/lib/clipboard";+import { cn } from "@/lib/utils";+import { useAppStore } from "@/stores/app";import type { Worksheet } from "@/types/proto-es/v1/worksheet_service_pb";import { Worksheet_Visibility } from "@/types/proto-es/v1/worksheet_service_pb";import { extractProjectResourceName, extractWorksheetID } from "@/utils";diff --git a/frontend/src/react/components/sql-editor/SheetConnectionIcon.test.tsx b/frontend/src/modules/sql-editor/components/SheetConnectionIcon.test.tsxsimilarity index 96%rename from frontend/src/react/components/sql-editor/SheetConnectionIcon.test.tsxrename to frontend/src/modules/sql-editor/components/SheetConnectionIcon.test.tsxindex 4ab5e2066b..31e07e96d8 100644--- a/frontend/src/react/components/sql-editor/SheetConnectionIcon.test.tsx+++ b/frontend/src/modules/sql-editor/components/SheetConnectionIcon.test.tsx@@ -17,12 +17,12 @@ const mocks = vi.hoisted(() => ({>(),}));-vi.mock("@/react/lib/sqlEditorConnection", () => ({+vi.mock("@/lib/sqlEditorConnection", () => ({isConnectedSQLEditorTab: mocks.isConnectedSQLEditorTab,getConnectionForSQLEditorTab: mocks.getConnectionForSQLEditorTab,}));-vi.mock("@/react/components/instance/constants", () => ({+vi.mock("@/components/instance/constants", () => ({EngineIconPath: {[Engine.POSTGRES]: "/icons/postgres.svg",} as Record<string, string>,diff --git a/frontend/src/react/components/sql-editor/SheetConnectionIcon.tsx b/frontend/src/modules/sql-editor/components/SheetConnectionIcon.tsxsimilarity index 86%rename from frontend/src/react/components/sql-editor/SheetConnectionIcon.tsxrename to frontend/src/modules/sql-editor/components/SheetConnectionIcon.tsxindex 34023b6998..35b1b4d6bc 100644--- a/frontend/src/react/components/sql-editor/SheetConnectionIcon.tsx+++ b/frontend/src/modules/sql-editor/components/SheetConnectionIcon.tsx@@ -1,9 +1,9 @@import { Unlink } from "lucide-react";-import { EngineIcon, getEngineIconSrc } from "@/react/components/EngineIcon";+import { EngineIcon, getEngineIconSrc } from "@/components/EngineIcon";import {getConnectionForSQLEditorTab,isConnectedSQLEditorTab,-} from "@/react/lib/sqlEditorConnection";+} from "@/lib/sqlEditorConnection";import type { SQLEditorTab } from "@/types";type Props = {diff --git a/frontend/src/react/components/sql-editor/SheetTree.test.tsx b/frontend/src/modules/sql-editor/components/SheetTree.test.tsxsimilarity index 96%rename from frontend/src/react/components/sql-editor/SheetTree.test.tsxrename to frontend/src/modules/sql-editor/components/SheetTree.test.tsxindex 46815940c7..b5d833b0a1 100644--- a/frontend/src/react/components/sql-editor/SheetTree.test.tsx+++ b/frontend/src/modules/sql-editor/components/SheetTree.test.tsx@@ -2,7 +2,7 @@ import type { ReactElement } from "react";import { act } from "react";import { createRoot } from "react-dom/client";import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";-import type { WorksheetFolderNode } from "@/views/sql-editor/Sheet";+import type { WorksheetFolderNode } from "@/modules/sql-editor/model/Sheet";(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }@@ -45,30 +45,30 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: mocks.pushNotification,}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: { getState: () => mocks.appStore },}));-vi.mock("@/react/stores/sqlEditor/tab", () => ({+vi.mock("@/modules/sql-editor/store/tab", () => ({getSQLEditorTabsState: mocks.getSQLEditorTabsState,}));-vi.mock("@/react/stores/sqlEditor/editor", () => ({+vi.mock("@/modules/sql-editor/store/editor", () => ({useSQLEditorEditorState: (selector: (s: { project: string }) => unknown) =>selector({ project: mocks.project }),}));-vi.mock("@/react/stores/sqlEditor", () => ({+vi.mock("@/modules/sql-editor/store", () => ({useSQLEditorStore: (selector: (s: { createWorksheet: typeof mocks.createWorksheet }) => unknown) => selector({ createWorksheet: mocks.createWorksheet }),}));-vi.mock("@/views/sql-editor/Sheet", () => ({+vi.mock("@/modules/sql-editor/model/Sheet", () => ({useSheetContext: mocks.useSheetContext,useSheetContextByView: mocks.useSheetContextByView,openWorksheetByName: mocks.openWorksheetByName,@@ -126,7 +126,7 @@ type MockRenderArgs = {style: React.CSSProperties;};-vi.mock("@/react/components/ui/tree", () => ({+vi.mock("@/components/ui/tree", () => ({Tree: ({data,renderNode,@@ -146,7 +146,7 @@ vi.mock("@/react/components/ui/tree", () => ({},}));-vi.mock("@/react/components/ui/dropdown-menu", () => ({+vi.mock("@/components/ui/dropdown-menu", () => ({DropdownMenu: ({children,open,@@ -180,7 +180,7 @@ vi.mock("@/react/components/ui/dropdown-menu", () => ({}));// Mock AlertDialog — renders children when open-vi.mock("@/react/components/ui/alert-dialog", () => ({+vi.mock("@/components/ui/alert-dialog", () => ({AlertDialog: ({children,open,@@ -207,7 +207,7 @@ vi.mock("@/react/components/ui/alert-dialog", () => ({}));// Mock Button-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,onClick,@@ -222,7 +222,7 @@ vi.mock("@/react/components/ui/button", () => ({}));// Mock Input-vi.mock("@/react/components/ui/input", () => ({+vi.mock("@/components/ui/input", () => ({Input: ({value,onChange,@@ -249,7 +249,7 @@ vi.mock("@/react/components/ui/input", () => ({}));// Mock HighlightLabelText-vi.mock("@/react/components/HighlightLabelText", () => ({+vi.mock("@/components/HighlightLabelText", () => ({HighlightLabelText: ({text,className,@@ -275,7 +275,7 @@ vi.mock("./SharePopoverBody", () => ({}));// Mock Popover primitives to avoid Base UI Popover portal internals.-vi.mock("@/react/components/ui/popover", () => ({+vi.mock("@/components/ui/popover", () => ({Popover: ({children,open,diff --git a/frontend/src/react/components/sql-editor/SheetTree.tsx b/frontend/src/modules/sql-editor/components/SheetTree.tsxsimilarity index 98%rename from frontend/src/react/components/sql-editor/SheetTree.tsxrename to frontend/src/modules/sql-editor/components/SheetTree.tsxindex b2c7313470..a51389a07f 100644--- a/frontend/src/react/components/sql-editor/SheetTree.tsx+++ b/frontend/src/modules/sql-editor/components/SheetTree.tsx@@ -28,37 +28,33 @@ import {import type { MoveHandler, NodeApi } from "react-arborist";import { flushSync } from "react-dom";import { useTranslation } from "react-i18next";-import { HighlightLabelText } from "@/react/components/HighlightLabelText";+import { HighlightLabelText } from "@/components/HighlightLabelText";import {AlertDialog,AlertDialogContent,AlertDialogDescription,AlertDialogFooter,AlertDialogTitle,-} from "@/react/components/ui/alert-dialog";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";+} from "@/components/ui/alert-dialog";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuSeparator,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";-import { Input } from "@/react/components/ui/input";+} from "@/components/ui/dropdown-menu";+import { Input } from "@/components/ui/input";import {Popover,PopoverContent,PopoverTrigger,-} from "@/react/components/ui/popover";-import type { TreeDataNode } from "@/react/components/ui/tree";-import { Tree } from "@/react/components/ui/tree";-import { countVisibleRows } from "@/react/components/ui/tree-utils";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";-import { useSQLEditorStore as useSQLEditorReactStore } from "@/react/stores/sqlEditor";-import { useSQLEditorEditorState } from "@/react/stores/sqlEditor/editor";-import { getSQLEditorTabsState } from "@/react/stores/sqlEditor/tab";+} from "@/components/ui/popover";+import type { TreeDataNode } from "@/components/ui/tree";+import { Tree } from "@/components/ui/tree";+import { countVisibleRows } from "@/components/ui/tree-utils";+import { cn } from "@/lib/utils";import {openWorksheetByName,revealNodes,@@ -67,7 +63,11 @@ import {useSheetContext,useSheetContextByView,type WorksheetFolderNode,-} from "@/views/sql-editor/Sheet";+} from "@/modules/sql-editor/model/Sheet";+import { useSQLEditorStore as useSQLEditorReactStore } from "@/modules/sql-editor/store";+import { useSQLEditorEditorState } from "@/modules/sql-editor/store/editor";+import { getSQLEditorTabsState } from "@/modules/sql-editor/store/tab";+import { useAppStore } from "@/stores/app";import { filterNode } from "./filterNode";import { SharePopoverBody } from "./SharePopoverBody";import { TreeNodePrefix } from "./TreeNodePrefix";diff --git a/frontend/src/react/components/sql-editor/StandardPanel/EditorMain.tsx b/frontend/src/modules/sql-editor/components/StandardPanel/EditorMain.tsxsimilarity index 91%rename from frontend/src/react/components/sql-editor/StandardPanel/EditorMain.tsxrename to frontend/src/modules/sql-editor/components/StandardPanel/EditorMain.tsxindex 0bbfe0e423..bddbf8390e 100644--- a/frontend/src/react/components/sql-editor/StandardPanel/EditorMain.tsx+++ b/frontend/src/modules/sql-editor/components/StandardPanel/EditorMain.tsx@@ -1,17 +1,17 @@import { useCallback, useEffect } from "react";-import { ReadonlyModeNotSupported } from "@/react/components/sql-editor/ReadonlyModeNotSupported";-import { useExecuteSQL } from "@/react/hooks/useExecuteSQL";-import { useConnectionOfCurrentSQLEditorTab } from "@/react/hooks/useSQLEditorBridge";-import { useAppStore } from "@/react/stores/app";+import { useExecuteSQL } from "@/hooks/useExecuteSQL";+import { ReadonlyModeNotSupported } from "@/modules/sql-editor/components/ReadonlyModeNotSupported";+import { useConnectionOfCurrentSQLEditorTab } from "@/modules/sql-editor/hooks/useSQLEditorState";+import { sqlEditorEvents } from "@/modules/sql-editor/model/events";import {getSQLEditorTabsState,useIsDisconnected,useSQLEditorTabState,-} from "@/react/stores/sqlEditor/tab";+} from "@/modules/sql-editor/store/tab";+import { useAppStore } from "@/stores/app";import type { SQLEditorQueryParams } from "@/types";import { Engine } from "@/types/proto-es/v1/common_pb";import { getInstanceResource, instanceV1HasReadonlyMode } from "@/utils";-import { sqlEditorEvents } from "@/views/sql-editor/events";import { EditorAction } from "../EditorAction";import { ExecutingHintModal } from "../ExecutingHintModal";import { SaveSheetModal } from "../SaveSheetModal";diff --git a/frontend/src/react/components/sql-editor/StandardPanel/FileContentPreviewModal.tsx b/frontend/src/modules/sql-editor/components/StandardPanel/FileContentPreviewModal.tsxsimilarity index 92%rename from frontend/src/react/components/sql-editor/StandardPanel/FileContentPreviewModal.tsxrename to frontend/src/modules/sql-editor/components/StandardPanel/FileContentPreviewModal.tsxindex 16d3b96f57..11165c1d6b 100644--- a/frontend/src/react/components/sql-editor/StandardPanel/FileContentPreviewModal.tsx+++ b/frontend/src/modules/sql-editor/components/StandardPanel/FileContentPreviewModal.tsx@@ -1,21 +1,17 @@import { Loader2 } from "lucide-react";import { useEffect, useState } from "react";import { useTranslation } from "react-i18next";-import { ReadonlyMonaco } from "@/react/components/monaco/ReadonlyMonaco";-import { Button } from "@/react/components/ui/button";-import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";+import { ReadonlyMonaco } from "@/components/monaco/ReadonlyMonaco";+import { Button } from "@/components/ui/button";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";import {Select,SelectContent,SelectItem,SelectTrigger,SelectValue,-} from "@/react/components/ui/select";-import { useAppStore } from "@/react/stores/app";+} from "@/components/ui/select";+import { useAppStore } from "@/stores/app";import { ENCODINGS, type Encoding, readFileAsArrayBuffer } from "@/utils";interface FileContentPreviewModalProps {diff --git a/frontend/src/react/components/sql-editor/StandardPanel/SQLEditor.tsx b/frontend/src/modules/sql-editor/components/StandardPanel/SQLEditor.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/StandardPanel/SQLEditor.tsxrename to frontend/src/modules/sql-editor/components/StandardPanel/SQLEditor.tsxindex 6b7d53313c..8a4aa839cb 100644--- a/frontend/src/react/components/sql-editor/StandardPanel/SQLEditor.tsx+++ b/frontend/src/modules/sql-editor/components/StandardPanel/SQLEditor.tsx@@ -2,27 +2,28 @@ import type { IRange } from "monaco-editor";import * as monaco from "monaco-editor";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { v1 as uuidv1 } from "uuid";-import { aiContextEvents } from "@/plugins/ai/logic";-import * as promptUtils from "@/plugins/ai/logic/prompt";-import type { ChatAction } from "@/plugins/ai/types";-import { MonacoEditor } from "@/react/components/monaco/MonacoEditor";+import { MonacoEditor } from "@/components/monaco/MonacoEditor";import type {IStandaloneCodeEditor,MonacoModule,Selection as MonacoSelection,-} from "@/react/components/monaco/types";+} from "@/components/monaco/types";import {extensionNameOfLanguage,formatEditorContent,-} from "@/react/components/monaco/utils";-import { useConnectionOfCurrentSQLEditorTab } from "@/react/hooks/useSQLEditorBridge";-import { useWorksheetAndTab } from "@/react/hooks/useWorksheetAndTab";-import { useAppStore } from "@/react/stores/app";-import { useSQLEditorStore } from "@/react/stores/sqlEditor";+} from "@/components/monaco/utils";+import { useWorksheetAndTab } from "@/hooks/useWorksheetAndTab";+import { aiContextEvents } from "@/modules/ai/logic";+import * as promptUtils from "@/modules/ai/logic/prompt";+import type { ChatAction } from "@/modules/ai/types";+import { useConnectionOfCurrentSQLEditorTab } from "@/modules/sql-editor/hooks/useSQLEditorState";+import { sqlEditorEvents } from "@/modules/sql-editor/model/events";+import { useSQLEditorStore } from "@/modules/sql-editor/store";import {getSQLEditorTabsState,useSQLEditorTabState,-} from "@/react/stores/sqlEditor/tab";+} from "@/modules/sql-editor/store/tab";+import { useAppStore } from "@/stores/app";import {dialectOfEngineV1,isValidDatabaseName,@@ -31,7 +32,6 @@ import {import { Engine } from "@/types/proto-es/v1/common_pb";import { languageOfEngineV1 } from "@/types/sqlEditor/editor";import { instanceV1AllowsExplain, nextAnimationFrame } from "@/utils";-import { sqlEditorEvents } from "@/views/sql-editor/events";import { useAIActions } from "../Panels/common/useAIActions";import { monacoThemeName } from "../theme/derive";import { useActiveSQLEditorTheme } from "../theme/useActiveSQLEditorTheme";diff --git a/frontend/src/react/components/sql-editor/StandardPanel/SQLUploadButton.tsx b/frontend/src/modules/sql-editor/components/StandardPanel/SQLUploadButton.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/StandardPanel/SQLUploadButton.tsxrename to frontend/src/modules/sql-editor/components/StandardPanel/SQLUploadButton.tsxindex ce12855700..e5fa6e8499 100644--- a/frontend/src/react/components/sql-editor/StandardPanel/SQLUploadButton.tsx+++ b/frontend/src/modules/sql-editor/components/StandardPanel/SQLUploadButton.tsx@@ -1,9 +1,9 @@import type { ChangeEvent, ReactNode } from "react";import { useCallback, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";+import { Button } from "@/components/ui/button";+import { cn } from "@/lib/utils";+import { useAppStore } from "@/stores/app";import { MAX_UPLOAD_FILE_SIZE_MB } from "@/utils";import { FileContentPreviewModal } from "./FileContentPreviewModal";diff --git a/frontend/src/react/components/sql-editor/StandardPanel/StandardPanel.tsx b/frontend/src/modules/sql-editor/components/StandardPanel/StandardPanel.tsxsimilarity index 92%rename from frontend/src/react/components/sql-editor/StandardPanel/StandardPanel.tsxrename to frontend/src/modules/sql-editor/components/StandardPanel/StandardPanel.tsxindex d61eab4443..75c0405755 100644--- a/frontend/src/react/components/sql-editor/StandardPanel/StandardPanel.tsx+++ b/frontend/src/modules/sql-editor/components/StandardPanel/StandardPanel.tsx@@ -6,18 +6,18 @@ import {Separator as PanelResizeHandle,} from "react-resizable-panels";import { useShallow } from "zustand/react/shallow";-import { AIChatToSQL, AIContextProvider } from "@/plugins/ai/react";-import { resizeHandleClass } from "@/react/components/SchemaEditorLite/resize";-import { ResultPanel } from "@/react/components/sql-editor/ResultPanel/ResultPanel";-import { useConnectionOfCurrentSQLEditorTab } from "@/react/hooks/useSQLEditorBridge";+import { AIChatToSQL, AIContextProvider } from "@/modules/ai/components";+import { resizeHandleClass } from "@/modules/schema-editor/resize";+import { ResultPanel } from "@/modules/sql-editor/components/ResultPanel/ResultPanel";+import { useConnectionOfCurrentSQLEditorTab } from "@/modules/sql-editor/hooks/useSQLEditorState";import {selectEditorPanelSize,useSQLEditorStore,-} from "@/react/stores/sqlEditor";+} from "@/modules/sql-editor/store";import {useCurrentSQLEditorTab,useIsDisconnected,-} from "@/react/stores/sqlEditor/tab";+} from "@/modules/sql-editor/store/tab";import { instanceV1HasReadonlyMode } from "@/utils";import { EditorMain } from "./EditorMain";diff --git a/frontend/src/react/components/sql-editor/StandardPanel/UploadFileButton.tsx b/frontend/src/modules/sql-editor/components/StandardPanel/UploadFileButton.tsxsimilarity index 88%rename from frontend/src/react/components/sql-editor/StandardPanel/UploadFileButton.tsxrename to frontend/src/modules/sql-editor/components/StandardPanel/UploadFileButton.tsxindex adf95ec5e3..3bbb758ce4 100644--- a/frontend/src/react/components/sql-editor/StandardPanel/UploadFileButton.tsx+++ b/frontend/src/modules/sql-editor/components/StandardPanel/UploadFileButton.tsx@@ -1,8 +1,8 @@import { Upload } from "lucide-react";import { useCallback } from "react";import { useTranslation } from "react-i18next";-import { Tooltip } from "@/react/components/ui/tooltip";-import { useSQLEditorTabState } from "@/react/stores/sqlEditor/tab";+import { Tooltip } from "@/components/ui/tooltip";+import { useSQLEditorTabState } from "@/modules/sql-editor/store/tab";import { SQLUploadButton } from "./SQLUploadButton";interface UploadFileButtonProps {diff --git a/frontend/src/react/components/sql-editor/StandardPanel/appendSelection.test.ts b/frontend/src/modules/sql-editor/components/StandardPanel/appendSelection.test.tssimilarity index 100%rename from frontend/src/react/components/sql-editor/StandardPanel/appendSelection.test.tsrename to frontend/src/modules/sql-editor/components/StandardPanel/appendSelection.test.tsdiff --git a/frontend/src/react/components/sql-editor/StandardPanel/appendSelection.ts b/frontend/src/modules/sql-editor/components/StandardPanel/appendSelection.tssimilarity index 100%rename from frontend/src/react/components/sql-editor/StandardPanel/appendSelection.tsrename to frontend/src/modules/sql-editor/components/StandardPanel/appendSelection.tsdiff --git a/frontend/src/react/components/sql-editor/StandardPanel/state.ts b/frontend/src/modules/sql-editor/components/StandardPanel/state.tssimilarity index 90%rename from frontend/src/react/components/sql-editor/StandardPanel/state.tsrename to frontend/src/modules/sql-editor/components/StandardPanel/state.tsindex a3d3b4056a..7640a54201 100644--- a/frontend/src/react/components/sql-editor/StandardPanel/state.ts+++ b/frontend/src/modules/sql-editor/components/StandardPanel/state.ts@@ -1,4 +1,4 @@-import { type IStandaloneCodeEditor } from "@/react/components/monaco/types";+import { type IStandaloneCodeEditor } from "@/components/monaco/types";// Plain mutable holders — only ever read/written imperatively from event// handlers (no `watch`, no React subscription), so a `{ value }` objectdiff --git a/frontend/src/react/components/sql-editor/StandardPanelPage.tsx b/frontend/src/modules/sql-editor/components/StandardPanelPage.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/StandardPanelPage.tsxrename to frontend/src/modules/sql-editor/components/StandardPanelPage.tsxdiff --git a/frontend/src/react/components/sql-editor/TabContextMenu.tsx b/frontend/src/modules/sql-editor/components/TabContextMenu.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/TabContextMenu.tsxrename to frontend/src/modules/sql-editor/components/TabContextMenu.tsxindex ed7ed60a6b..3b4e5031cf 100644--- a/frontend/src/react/components/sql-editor/TabContextMenu.tsx+++ b/frontend/src/modules/sql-editor/components/TabContextMenu.tsx@@ -7,12 +7,12 @@ import {DropdownMenuItem,DropdownMenuSeparator,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";-import type { SQLEditorTab } from "@/types/sqlEditor/tab";+} from "@/components/ui/dropdown-menu";import {type CloseTabAction,tabListEvents,-} from "@/views/sql-editor/TabList/events";+} from "@/modules/sql-editor/model/TabList/events";+import type { SQLEditorTab } from "@/types/sqlEditor/tab";type Action = CloseTabAction | "RENAME";diff --git a/frontend/src/react/components/sql-editor/TabItem.test.tsx b/frontend/src/modules/sql-editor/components/TabItem.test.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/TabItem.test.tsxrename to frontend/src/modules/sql-editor/components/TabItem.test.tsxindex 2a505889c8..8773bec5f3 100644--- a/frontend/src/react/components/sql-editor/TabItem.test.tsx+++ b/frontend/src/modules/sql-editor/components/TabItem.test.tsx@@ -17,11 +17,11 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/react/stores/sqlEditor", () => ({+vi.mock("@/modules/sql-editor/store", () => ({useSQLEditorStore: mocks.useSQLEditorStore,}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: ({ children }: { children: React.ReactNode }) => <>{children}</>,}));diff --git a/frontend/src/react/components/sql-editor/TabItem.tsx b/frontend/src/modules/sql-editor/components/TabItem.tsxsimilarity index 86%rename from frontend/src/react/components/sql-editor/TabItem.tsxrename to frontend/src/modules/sql-editor/components/TabItem.tsxindex e6fc59c4ed..b0d7aabff6 100644--- a/frontend/src/react/components/sql-editor/TabItem.tsx+++ b/frontend/src/modules/sql-editor/components/TabItem.tsx@@ -1,10 +1,10 @@import { Database, FileCode, History, ShieldCheck } from "lucide-react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { Tooltip } from "@/react/components/ui/tooltip";-import { cn } from "@/react/lib/utils";-import type { AsidePanelTab } from "@/react/stores/sqlEditor";-import { useSQLEditorStore } from "@/react/stores/sqlEditor";+import { Button } from "@/components/ui/button";+import { Tooltip } from "@/components/ui/tooltip";+import { cn } from "@/lib/utils";+import type { AsidePanelTab } from "@/modules/sql-editor/store";+import { useSQLEditorStore } from "@/modules/sql-editor/store";type TabItemProps = {readonly tab: AsidePanelTab;diff --git a/frontend/src/react/components/sql-editor/TabItem/AdminLabel.tsx b/frontend/src/modules/sql-editor/components/TabItem/AdminLabel.tsxsimilarity index 96%rename from frontend/src/react/components/sql-editor/TabItem/AdminLabel.tsxrename to frontend/src/modules/sql-editor/components/TabItem/AdminLabel.tsxindex 4e5fd2c22e..b668f5ef38 100644--- a/frontend/src/react/components/sql-editor/TabItem/AdminLabel.tsx+++ b/frontend/src/modules/sql-editor/components/TabItem/AdminLabel.tsx@@ -1,5 +1,5 @@import { ChevronRight } from "lucide-react";-import { useAppDatabase } from "@/react/hooks/useAppDatabase";+import { useAppDatabase } from "@/hooks/useAppDatabase";import { UNKNOWN_ID } from "@/types/const";import type { SQLEditorTab } from "@/types/sqlEditor/tab";import { isValidDatabaseName } from "@/types/v1/database";diff --git a/frontend/src/react/components/sql-editor/TabItem/Label.test.tsx b/frontend/src/modules/sql-editor/components/TabItem/Label.test.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/TabItem/Label.test.tsxrename to frontend/src/modules/sql-editor/components/TabItem/Label.test.tsxindex 5d6eea2314..a241f85b9d 100644--- a/frontend/src/react/components/sql-editor/TabItem/Label.test.tsx+++ b/frontend/src/modules/sql-editor/components/TabItem/Label.test.tsx@@ -18,21 +18,21 @@ const mocks = vi.hoisted(() => ({},}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: {getState: () => ({ patchWorksheet: mocks.patchWorksheet }),},}));-vi.mock("@/react/stores/sqlEditor/tab", () => ({+vi.mock("@/modules/sql-editor/store/tab", () => ({getSQLEditorTabsState: mocks.getSQLEditorTabsState,}));-vi.mock("@/views/sql-editor/TabList/events", () => ({+vi.mock("@/modules/sql-editor/model/TabList/events", () => ({tabListEvents: mocks.tabListEvents,}));-vi.mock("@/react/components/ui/ellipsis-text", () => ({+vi.mock("@/components/ui/ellipsis-text", () => ({EllipsisText: ({ text, className }: { text: string; className?: string }) => (<span data-testid="ellipsis-text" className={className}>{text}diff --git a/frontend/src/react/components/sql-editor/TabItem/Label.tsx b/frontend/src/modules/sql-editor/components/TabItem/Label.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/TabItem/Label.tsxrename to frontend/src/modules/sql-editor/components/TabItem/Label.tsxindex f03c7eddb7..a8e27fdfdc 100644--- a/frontend/src/react/components/sql-editor/TabItem/Label.tsx+++ b/frontend/src/modules/sql-editor/components/TabItem/Label.tsx@@ -1,13 +1,13 @@import { create } from "@bufbuild/protobuf";import { useEffect, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { EllipsisText } from "@/react/components/ui/ellipsis-text";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";-import { getSQLEditorTabsState } from "@/react/stores/sqlEditor/tab";+import { EllipsisText } from "@/components/ui/ellipsis-text";+import { cn } from "@/lib/utils";+import { tabListEvents } from "@/modules/sql-editor/model/TabList/events";+import { getSQLEditorTabsState } from "@/modules/sql-editor/store/tab";+import { useAppStore } from "@/stores/app";import { WorksheetSchema } from "@/types/proto-es/v1/worksheet_service_pb";import type { SQLEditorTab } from "@/types/sqlEditor/tab";-import { tabListEvents } from "@/views/sql-editor/TabList/events";type Props = {readonly tab: SQLEditorTab;diff --git a/frontend/src/react/components/sql-editor/TabItem/Prefix.tsx b/frontend/src/modules/sql-editor/components/TabItem/Prefix.tsxsimilarity index 91%rename from frontend/src/react/components/sql-editor/TabItem/Prefix.tsxrename to frontend/src/modules/sql-editor/components/TabItem/Prefix.tsxindex 4ec8a518e7..e99a32b20f 100644--- a/frontend/src/react/components/sql-editor/TabItem/Prefix.tsx+++ b/frontend/src/modules/sql-editor/components/TabItem/Prefix.tsx@@ -1,7 +1,7 @@import { PencilLine, Users, Wrench } from "lucide-react";-import { useAppStore } from "@/react/stores/app";+import { useSheetContext } from "@/modules/sql-editor/model/Sheet";+import { useAppStore } from "@/stores/app";import type { SQLEditorTab } from "@/types/sqlEditor/tab";-import { useSheetContext } from "@/views/sql-editor/Sheet";import { SheetConnectionIcon } from "../SheetConnectionIcon";type Props = {diff --git a/frontend/src/react/components/sql-editor/TabItem/Suffix.test.tsx b/frontend/src/modules/sql-editor/components/TabItem/Suffix.test.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/TabItem/Suffix.test.tsxrename to frontend/src/modules/sql-editor/components/TabItem/Suffix.test.tsxdiff --git a/frontend/src/react/components/sql-editor/TabItem/Suffix.tsx b/frontend/src/modules/sql-editor/components/TabItem/Suffix.tsxsimilarity index 98%rename from frontend/src/react/components/sql-editor/TabItem/Suffix.tsxrename to frontend/src/modules/sql-editor/components/TabItem/Suffix.tsxindex fa781a30e6..8048522e29 100644--- a/frontend/src/react/components/sql-editor/TabItem/Suffix.tsx+++ b/frontend/src/modules/sql-editor/components/TabItem/Suffix.tsx@@ -1,6 +1,6 @@import { Circle, LoaderCircle, X } from "lucide-react";import { useState } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";import type { SQLEditorTab } from "@/types/sqlEditor/tab";type Props = {diff --git a/frontend/src/react/components/sql-editor/TabItem/TabItem.tsx b/frontend/src/modules/sql-editor/components/TabItem/TabItem.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/TabItem/TabItem.tsxrename to frontend/src/modules/sql-editor/components/TabItem/TabItem.tsxindex 82d59277f9..f8a447b07f 100644--- a/frontend/src/react/components/sql-editor/TabItem/TabItem.tsx+++ b/frontend/src/modules/sql-editor/components/TabItem/TabItem.tsx@@ -1,10 +1,10 @@import { useSortable } from "@dnd-kit/sortable";import { CSS } from "@dnd-kit/utilities";import { useState } from "react";-import { useAppDatabase } from "@/react/hooks/useAppDatabase";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";-import { useSQLEditorTabState } from "@/react/stores/sqlEditor/tab";+import { useAppDatabase } from "@/hooks/useAppDatabase";+import { cn } from "@/lib/utils";+import { useSQLEditorTabState } from "@/modules/sql-editor/store/tab";+import { useAppStore } from "@/stores/app";import { isValidDatabaseName } from "@/types";import { UNKNOWN_ID } from "@/types/const";import type { SQLEditorTab } from "@/types/sqlEditor/tab";diff --git a/frontend/src/react/components/sql-editor/TabList.test.tsx b/frontend/src/modules/sql-editor/components/TabList.test.tsxsimilarity index 96%rename from frontend/src/react/components/sql-editor/TabList.test.tsxrename to frontend/src/modules/sql-editor/components/TabList.test.tsxindex 9837f00b10..868f9125ae 100644--- a/frontend/src/react/components/sql-editor/TabList.test.tsx+++ b/frontend/src/modules/sql-editor/components/TabList.test.tsx@@ -37,16 +37,16 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/store", () => ({}));+vi.mock("@/stores", () => ({}));-vi.mock("@/react/stores/sqlEditor/tab", () => ({+vi.mock("@/modules/sql-editor/store/tab", () => ({getSQLEditorTabsState: () => mocks.tabState,useOpenTabList: () => mocks.tabState.openTabList,useSQLEditorTabState: (selector: (s: typeof mocks.tabState) => unknown) =>selector(mocks.tabState),}));-vi.mock("@/react/stores/sqlEditor", () => ({+vi.mock("@/modules/sql-editor/store", () => ({useSQLEditorStore: (selector: (s: { createWorksheet: typeof mocks.createWorksheet }) => unknown) =>@@ -55,7 +55,7 @@ vi.mock("@/react/stores/sqlEditor", () => ({}),}));-vi.mock("@/views/sql-editor/TabList/events", () => ({+vi.mock("@/modules/sql-editor/model/TabList/events", () => ({tabListEvents: { on: mocks.tabListEventsOn, emit: vi.fn() },}));@@ -126,11 +126,11 @@ vi.mock("./TabContextMenu", () => ({TabContextMenu: () => <div data-testid="tab-context-menu" />,}));-vi.mock("@/react/components/HeaderProfileMenuMount", () => ({+vi.mock("@/components/HeaderProfileMenuMount", () => ({HeaderProfileMenuMount: () => <div data-testid="header-profile-menu" />,}));-vi.mock("@/react/components/ui/alert-dialog", () => ({+vi.mock("@/components/ui/alert-dialog", () => ({AlertDialog: ({open,children,@@ -157,7 +157,7 @@ vi.mock("@/react/components/ui/alert-dialog", () => ({),}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,onClick,diff --git a/frontend/src/react/components/sql-editor/TabList.tsx b/frontend/src/modules/sql-editor/components/TabList.tsxsimilarity index 96%rename from frontend/src/react/components/sql-editor/TabList.tsxrename to frontend/src/modules/sql-editor/components/TabList.tsxindex 791f7bf1e0..397724aedf 100644--- a/frontend/src/react/components/sql-editor/TabList.tsx+++ b/frontend/src/modules/sql-editor/components/TabList.tsx@@ -20,24 +20,24 @@ import {} from "react";import { useTranslation } from "react-i18next";import scrollIntoView from "scroll-into-view-if-needed";-import { HeaderProfileMenuMount } from "@/react/components/HeaderProfileMenuMount";+import { HeaderProfileMenuMount } from "@/components/HeaderProfileMenuMount";import {AlertDialog,AlertDialogContent,AlertDialogDescription,AlertDialogFooter,AlertDialogTitle,-} from "@/react/components/ui/alert-dialog";-import { Button } from "@/react/components/ui/button";-import { cn } from "@/react/lib/utils";-import { useSQLEditorStore } from "@/react/stores/sqlEditor";+} from "@/components/ui/alert-dialog";+import { Button } from "@/components/ui/button";+import { cn } from "@/lib/utils";+import { tabListEvents } from "@/modules/sql-editor/model/TabList/events";+import { useSQLEditorStore } from "@/modules/sql-editor/store";import {getSQLEditorTabsState,useOpenTabList,useSQLEditorTabState,-} from "@/react/stores/sqlEditor/tab";+} from "@/modules/sql-editor/store/tab";import type { SQLEditorTab } from "@/types/sqlEditor/tab";-import { tabListEvents } from "@/views/sql-editor/TabList/events";import { TabContextMenu, type TabContextMenuHandle } from "./TabContextMenu";import { TabItem } from "./TabItem/TabItem";diff --git a/frontend/src/react/components/sql-editor/TablesPanel.tsx b/frontend/src/modules/sql-editor/components/TablesPanel.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/TablesPanel.tsxrename to frontend/src/modules/sql-editor/components/TablesPanel.tsxdiff --git a/frontend/src/react/components/sql-editor/TerminalPanel/CompactSQLEditor.tsx b/frontend/src/modules/sql-editor/components/TerminalPanel/CompactSQLEditor.tsxsimilarity index 96%rename from frontend/src/react/components/sql-editor/TerminalPanel/CompactSQLEditor.tsxrename to frontend/src/modules/sql-editor/components/TerminalPanel/CompactSQLEditor.tsxindex 4b5ddfdbf8..1a70958575 100644--- a/frontend/src/react/components/sql-editor/TerminalPanel/CompactSQLEditor.tsx+++ b/frontend/src/modules/sql-editor/components/TerminalPanel/CompactSQLEditor.tsx@@ -2,20 +2,20 @@ import { debounce } from "lodash-es";import type { IDisposable } from "monaco-editor";import * as monaco from "monaco-editor";import { useCallback, useEffect, useMemo, useRef, useState } from "react";-import { MonacoEditor } from "@/react/components/monaco/MonacoEditor";+import { MonacoEditor } from "@/components/monaco/MonacoEditor";import type {IStandaloneCodeEditor,MonacoModule,-} from "@/react/components/monaco/types";-import { formatEditorContent } from "@/react/components/monaco/utils";-import { useConnectionOfCurrentSQLEditorTab } from "@/react/hooks/useSQLEditorBridge";-import { useSQLEditorTabState } from "@/react/stores/sqlEditor/tab";+} from "@/components/monaco/types";+import { formatEditorContent } from "@/components/monaco/utils";+import { useConnectionOfCurrentSQLEditorTab } from "@/modules/sql-editor/hooks/useSQLEditorState";+import { sqlEditorEvents } from "@/modules/sql-editor/model/events";+import { useSQLEditorTabState } from "@/modules/sql-editor/store/tab";import type { SQLEditorQueryParams } from "@/types";import { dialectOfEngineV1 } from "@/types";import { Engine } from "@/types/proto-es/v1/common_pb";import { languageOfEngineV1 } from "@/types/sqlEditor/editor";import { instanceV1AllowsExplain } from "@/utils";-import { sqlEditorEvents } from "@/views/sql-editor/events";import { monacoThemeName } from "../theme/derive";import { useActiveSQLEditorTheme } from "../theme/useActiveSQLEditorTheme";import {diff --git a/frontend/src/react/components/sql-editor/TerminalPanel/TerminalPanel.tsx b/frontend/src/modules/sql-editor/components/TerminalPanel/TerminalPanel.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/TerminalPanel/TerminalPanel.tsxrename to frontend/src/modules/sql-editor/components/TerminalPanel/TerminalPanel.tsxindex d84a1d945e..a0cd7294db 100644--- a/frontend/src/react/components/sql-editor/TerminalPanel/TerminalPanel.tsx+++ b/frontend/src/modules/sql-editor/components/TerminalPanel/TerminalPanel.tsx@@ -1,18 +1,18 @@import { Loader2 } from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import type { IStandaloneCodeEditor } from "@/react/components/monaco/types";-import { ConnectionHolder } from "@/react/components/sql-editor/ConnectionHolder";-import { EditorAction } from "@/react/components/sql-editor/EditorAction";-import { ResultView } from "@/react/components/sql-editor/ResultView";-import { useAppStore } from "@/react/stores/app";-import { useSQLEditorStore } from "@/react/stores/sqlEditor";+import type { IStandaloneCodeEditor } from "@/components/monaco/types";+import { ConnectionHolder } from "@/modules/sql-editor/components/ConnectionHolder";+import { EditorAction } from "@/modules/sql-editor/components/EditorAction";+import { ResultView } from "@/modules/sql-editor/components/ResultView";+import { useSQLEditorStore } from "@/modules/sql-editor/store";import {getSQLEditorTabsState,useIsDisconnected,useSQLEditorTabState,-} from "@/react/stores/sqlEditor/tab";-import { getWebTerminalQuerySession } from "@/react/stores/sqlEditor/webTerminal-service";+} from "@/modules/sql-editor/store/tab";+import { getWebTerminalQuerySession } from "@/modules/sql-editor/store/webTerminal-service";+import { useAppStore } from "@/stores/app";import type { SQLEditorQueryParams, WebTerminalQueryItemV1 } from "@/types";import { SQLEditorThemeScope } from "../theme/SQLEditorThemeScope";import { useActiveSQLEditorTheme } from "../theme/useActiveSQLEditorTheme";diff --git a/frontend/src/react/components/sql-editor/TerminalPanel/useHistory.ts b/frontend/src/modules/sql-editor/components/TerminalPanel/useHistory.tssimilarity index 98%rename from frontend/src/react/components/sql-editor/TerminalPanel/useHistory.tsrename to frontend/src/modules/sql-editor/components/TerminalPanel/useHistory.tsindex c02fd69376..4606e6c1f8 100644--- a/frontend/src/react/components/sql-editor/TerminalPanel/useHistory.ts+++ b/frontend/src/modules/sql-editor/components/TerminalPanel/useHistory.ts@@ -1,9 +1,9 @@import { useEffect, useRef } from "react";-import { useSQLEditorStore } from "@/react/stores/sqlEditor";+import { useSQLEditorStore } from "@/modules/sql-editor/store";import {getSQLEditorTabsState,useSQLEditorTabState,-} from "@/react/stores/sqlEditor/tab";+} from "@/modules/sql-editor/store/tab";import type { WebTerminalQueryItemV1 } from "@/types";import { minmax } from "@/utils";diff --git a/frontend/src/react/components/sql-editor/TerminalPanel/utils.ts b/frontend/src/modules/sql-editor/components/TerminalPanel/utils.tssimilarity index 100%rename from frontend/src/react/components/sql-editor/TerminalPanel/utils.tsrename to frontend/src/modules/sql-editor/components/TerminalPanel/utils.tsdiff --git a/frontend/src/react/components/sql-editor/TerminalPanelPage.tsx b/frontend/src/modules/sql-editor/components/TerminalPanelPage.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/TerminalPanelPage.tsxrename to frontend/src/modules/sql-editor/components/TerminalPanelPage.tsxdiff --git a/frontend/src/react/components/sql-editor/TreeNodePrefix.test.tsx b/frontend/src/modules/sql-editor/components/TreeNodePrefix.test.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/TreeNodePrefix.test.tsxrename to frontend/src/modules/sql-editor/components/TreeNodePrefix.test.tsxindex af6343af26..e3fb99f32d 100644--- a/frontend/src/react/components/sql-editor/TreeNodePrefix.test.tsx+++ b/frontend/src/modules/sql-editor/components/TreeNodePrefix.test.tsx@@ -1,7 +1,7 @@import { act } from "react";import { createRoot } from "react-dom/client";import { afterEach, beforeEach, describe, expect, test } from "vitest";-import type { WorksheetFolderNode } from "@/views/sql-editor/Sheet";+import type { WorksheetFolderNode } from "@/modules/sql-editor/model/Sheet";(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }diff --git a/frontend/src/react/components/sql-editor/TreeNodePrefix.tsx b/frontend/src/modules/sql-editor/components/TreeNodePrefix.tsxsimilarity index 84%rename from frontend/src/react/components/sql-editor/TreeNodePrefix.tsxrename to frontend/src/modules/sql-editor/components/TreeNodePrefix.tsxindex b54422f310..88ca4d91c8 100644--- a/frontend/src/react/components/sql-editor/TreeNodePrefix.tsx+++ b/frontend/src/modules/sql-editor/components/TreeNodePrefix.tsx@@ -6,8 +6,8 @@ import {FolderPen,FolderSync,} from "lucide-react";-import type { WorksheetFolderNode } from "@/views/sql-editor/Sheet";-import type { SheetViewMode } from "@/views/sql-editor/Sheet/types";+import type { WorksheetFolderNode } from "@/modules/sql-editor/model/Sheet";+import type { SheetViewMode } from "@/modules/sql-editor/model/Sheet/types";type Props = {readonly node: WorksheetFolderNode;diff --git a/frontend/src/react/components/sql-editor/TreeNodeSuffix.test.tsx b/frontend/src/modules/sql-editor/components/TreeNodeSuffix.test.tsxsimilarity index 96%rename from frontend/src/react/components/sql-editor/TreeNodeSuffix.test.tsxrename to frontend/src/modules/sql-editor/components/TreeNodeSuffix.test.tsxindex eaa7f5ed57..9ee6bc141c 100644--- a/frontend/src/react/components/sql-editor/TreeNodeSuffix.test.tsx+++ b/frontend/src/modules/sql-editor/components/TreeNodeSuffix.test.tsx@@ -1,7 +1,7 @@import { act } from "react";import { createRoot } from "react-dom/client";import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";-import type { WorksheetFolderNode } from "@/views/sql-editor/Sheet";+import type { WorksheetFolderNode } from "@/modules/sql-editor/model/Sheet";(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }@@ -31,7 +31,7 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const state = {getWorksheetByName: mocks.getWorksheetByName,getUserByIdentifier: mocks.getUserByIdentifier,@@ -45,15 +45,15 @@ vi.mock("@/react/stores/app", () => {};});-vi.mock("@/react/stores/sqlEditor/tab", () => ({+vi.mock("@/modules/sql-editor/store/tab", () => ({getSQLEditorTabsState: mocks.getSQLEditorTabsState,}));-vi.mock("@/views/sql-editor/Sheet", () => ({+vi.mock("@/modules/sql-editor/model/Sheet", () => ({useSheetContext: mocks.useSheetContext,}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: ({children,content,diff --git a/frontend/src/react/components/sql-editor/TreeNodeSuffix.tsx b/frontend/src/modules/sql-editor/components/TreeNodeSuffix.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/TreeNodeSuffix.tsxrename to frontend/src/modules/sql-editor/components/TreeNodeSuffix.tsxindex dbadb82284..aa033b4327 100644--- a/frontend/src/react/components/sql-editor/TreeNodeSuffix.tsx+++ b/frontend/src/modules/sql-editor/components/TreeNodeSuffix.tsx@@ -2,16 +2,16 @@ import { MoreHorizontal, Star, Users, X } from "lucide-react";import { useEffect } from "react";import { useTranslation } from "react-i18next";import { useShallow } from "zustand/react/shallow";-import { Tooltip } from "@/react/components/ui/tooltip";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";-import { getSQLEditorTabsState } from "@/react/stores/sqlEditor/tab";-import { Worksheet_Visibility } from "@/types/proto-es/v1/worksheet_service_pb";+import { Tooltip } from "@/components/ui/tooltip";+import { cn } from "@/lib/utils";import {type SheetViewMode,useSheetContext,type WorksheetFolderNode,-} from "@/views/sql-editor/Sheet";+} from "@/modules/sql-editor/model/Sheet";+import { getSQLEditorTabsState } from "@/modules/sql-editor/store/tab";+import { useAppStore } from "@/stores/app";+import { Worksheet_Visibility } from "@/types/proto-es/v1/worksheet_service_pb";type Props = {readonly node: WorksheetFolderNode;diff --git a/frontend/src/react/components/sql-editor/TriggersPanel.tsx b/frontend/src/modules/sql-editor/components/TriggersPanel.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/TriggersPanel.tsxrename to frontend/src/modules/sql-editor/components/TriggersPanel.tsxdiff --git a/frontend/src/react/components/sql-editor/ViewsPanel.tsx b/frontend/src/modules/sql-editor/components/ViewsPanel.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/ViewsPanel.tsxrename to frontend/src/modules/sql-editor/components/ViewsPanel.tsxdiff --git a/frontend/src/react/components/sql-editor/Welcome.test.tsx b/frontend/src/modules/sql-editor/components/Welcome.test.tsxsimilarity index 92%rename from frontend/src/react/components/sql-editor/Welcome.test.tsxrename to frontend/src/modules/sql-editor/components/Welcome.test.tsxindex 3ed5ea0cd2..314c47300f 100644--- a/frontend/src/react/components/sql-editor/Welcome.test.tsx+++ b/frontend/src/modules/sql-editor/components/Welcome.test.tsx@@ -25,28 +25,28 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/react/components/PermissionGuard", () => ({+vi.mock("@/components/PermissionGuard", () => ({usePermissionCheck: mocks.usePermissionCheck,}));-vi.mock("@/react/components/BytebaseLogo", () => ({+vi.mock("@/components/BytebaseLogo", () => ({BytebaseLogo: () => null,}));-vi.mock("@/react/hooks/useAppProject", () => ({+vi.mock("@/hooks/useAppProject", () => ({useAppProject: () => mocks.projectData,}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: { push: mocks.routerPush },}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({useProjectV1Store: vi.fn(),}));-vi.mock("@/react/stores/sqlEditor/editor-vue-state", () => ({+vi.mock("@/modules/sql-editor/store/editor-vue-state", () => ({useSQLEditorVueState: vi.fn(),}));diff --git a/frontend/src/react/components/sql-editor/Welcome.tsx b/frontend/src/modules/sql-editor/components/Welcome.tsxsimilarity index 82%rename from frontend/src/react/components/sql-editor/Welcome.tsxrename to frontend/src/modules/sql-editor/components/Welcome.tsxindex d0f1ae9467..7f438e718b 100644--- a/frontend/src/react/components/sql-editor/Welcome.tsx+++ b/frontend/src/modules/sql-editor/components/Welcome.tsx@@ -1,11 +1,11 @@import { LayersIcon, LinkIcon } from "lucide-react";import { useTranslation } from "react-i18next";-import { BytebaseLogo } from "@/react/components/BytebaseLogo";-import { usePermissionCheck } from "@/react/components/PermissionGuard";-import { useAppProject } from "@/react/hooks/useAppProject";-import { router } from "@/react/router";-import { INSTANCE_ROUTE_DASHBOARD } from "@/react/router/handles";-import { useSQLEditorEditorState } from "@/react/stores/sqlEditor/editor";+import { router } from "@/app/router";+import { INSTANCE_ROUTE_DASHBOARD } from "@/app/router/handles";+import { BytebaseLogo } from "@/components/BytebaseLogo";+import { usePermissionCheck } from "@/components/PermissionGuard";+import { useAppProject } from "@/hooks/useAppProject";+import { useSQLEditorEditorState } from "@/modules/sql-editor/store/editor";import { WelcomeButton } from "./WelcomeButton";export type WelcomeProps = {diff --git a/frontend/src/react/components/sql-editor/WelcomeButton.test.tsx b/frontend/src/modules/sql-editor/components/WelcomeButton.test.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/WelcomeButton.test.tsxrename to frontend/src/modules/sql-editor/components/WelcomeButton.test.tsxdiff --git a/frontend/src/react/components/sql-editor/WelcomeButton.tsx b/frontend/src/modules/sql-editor/components/WelcomeButton.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/WelcomeButton.tsxrename to frontend/src/modules/sql-editor/components/WelcomeButton.tsxindex 345a5cf911..d72746b458 100644--- a/frontend/src/react/components/sql-editor/WelcomeButton.tsx+++ b/frontend/src/modules/sql-editor/components/WelcomeButton.tsx@@ -1,7 +1,7 @@import { Button as BaseButton } from "@base-ui/react/button";import { cva, type VariantProps } from "class-variance-authority";import type { ComponentProps, ReactNode } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";/*** Big square icon-over-label button used on the SQL Editor Welcome screen.diff --git a/frontend/src/react/components/sql-editor/WorksheetPane.test.tsx b/frontend/src/modules/sql-editor/components/WorksheetPane.test.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/WorksheetPane.test.tsxrename to frontend/src/modules/sql-editor/components/WorksheetPane.test.tsxindex 1730b049c3..f05f380d61 100644--- a/frontend/src/react/components/sql-editor/WorksheetPane.test.tsx+++ b/frontend/src/modules/sql-editor/components/WorksheetPane.test.tsx@@ -2,7 +2,7 @@ import type { ReactElement } from "react";import { act } from "react";import { createRoot } from "react-dom/client";import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";-import type { WorksheetFolderNode } from "@/views/sql-editor/Sheet";+import type { WorksheetFolderNode } from "@/modules/sql-editor/model/Sheet";(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }@@ -27,14 +27,14 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/views/sql-editor/Sheet", () => ({+vi.mock("@/modules/sql-editor/model/Sheet", () => ({useSheetContext: mocks.useSheetContext,useSheetContextByView: mocks.useSheetContextByView,}));// ---- primitive mocks ---------------------------------------------------------vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,onClick,@@ -57,7 +57,7 @@ vi.mock("@/react/components/ui/button", () => ({),}));-vi.mock("@/react/components/ui/search-input", () => ({+vi.mock("@/components/ui/search-input", () => ({SearchInput: ({value,onChange,@@ -76,7 +76,7 @@ vi.mock("@/react/components/ui/search-input", () => ({),}));-vi.mock("@/react/components/ui/dropdown-menu", () => ({+vi.mock("@/components/ui/dropdown-menu", () => ({DropdownMenu: ({children,open,@@ -106,7 +106,7 @@ vi.mock("@/react/components/ui/dropdown-menu", () => ({),}));-vi.mock("@/react/components/ui/dialog", () => ({+vi.mock("@/components/ui/dialog", () => ({Dialog: ({children,open,diff --git a/frontend/src/react/components/sql-editor/WorksheetPane.tsx b/frontend/src/modules/sql-editor/components/WorksheetPane.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/WorksheetPane.tsxrename to frontend/src/modules/sql-editor/components/WorksheetPane.tsxindex 02f2c53ef9..b8f8e0519e 100644--- a/frontend/src/react/components/sql-editor/WorksheetPane.tsx+++ b/frontend/src/modules/sql-editor/components/WorksheetPane.tsx@@ -8,27 +8,23 @@import { FolderInputIcon, FunnelIcon, TrashIcon, XIcon } from "lucide-react";import { useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";+import { Button } from "@/components/ui/button";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";import {DropdownMenu,DropdownMenuContent,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";-import { SearchInput } from "@/react/components/ui/search-input";-import { cn } from "@/react/lib/utils";+} from "@/components/ui/dropdown-menu";+import { SearchInput } from "@/components/ui/search-input";+import { cn } from "@/lib/utils";import type {SheetViewMode,WorksheetFolderNode,-} from "@/views/sql-editor/Sheet";+} from "@/modules/sql-editor/model/Sheet";import {useSheetContext,useSheetContextByView,-} from "@/views/sql-editor/Sheet";+} from "@/modules/sql-editor/model/Sheet";import { FilterMenuItem } from "./FilterMenuItem";import { FolderForm } from "./FolderForm";import { SheetTree, type SheetTreeHandle } from "./SheetTree";diff --git a/frontend/src/react/components/sql-editor/filterNode.ts b/frontend/src/modules/sql-editor/components/filterNode.tssimilarity index 87%rename from frontend/src/react/components/sql-editor/filterNode.tsrename to frontend/src/modules/sql-editor/components/filterNode.tsindex 5b7080d5e4..f3219b4fb8 100644--- a/frontend/src/react/components/sql-editor/filterNode.ts+++ b/frontend/src/modules/sql-editor/components/filterNode.ts@@ -1,4 +1,4 @@-import type { WorksheetFolderNode } from "@/views/sql-editor/Sheet";+import type { WorksheetFolderNode } from "@/modules/sql-editor/model/Sheet";/*** Returns a filter predicate for the worksheet tree.diff --git a/frontend/src/react/components/sql-editor/theme/SQLEditorThemeScope.test.tsx b/frontend/src/modules/sql-editor/components/theme/SQLEditorThemeScope.test.tsxsimilarity index 100%rename from frontend/src/react/components/sql-editor/theme/SQLEditorThemeScope.test.tsxrename to frontend/src/modules/sql-editor/components/theme/SQLEditorThemeScope.test.tsxdiff --git a/frontend/src/react/components/sql-editor/theme/SQLEditorThemeScope.tsx b/frontend/src/modules/sql-editor/components/theme/SQLEditorThemeScope.tsxsimilarity index 97%rename from frontend/src/react/components/sql-editor/theme/SQLEditorThemeScope.tsxrename to frontend/src/modules/sql-editor/components/theme/SQLEditorThemeScope.tsxindex 40d8e759b6..51fcfe0d41 100644--- a/frontend/src/react/components/sql-editor/theme/SQLEditorThemeScope.tsx+++ b/frontend/src/modules/sql-editor/components/theme/SQLEditorThemeScope.tsx@@ -1,5 +1,5 @@import { createContext, type ReactNode, useContext, useMemo } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";import { themeColorScheme, themeToCssVars } from "./derive";import { PRESET_BY_ID } from "./presets";import type { SQLEditorTheme } from "./types";diff --git a/frontend/src/react/components/sql-editor/theme/derive.test.ts b/frontend/src/modules/sql-editor/components/theme/derive.test.tssimilarity index 100%rename from frontend/src/react/components/sql-editor/theme/derive.test.tsrename to frontend/src/modules/sql-editor/components/theme/derive.test.tsdiff --git a/frontend/src/react/components/sql-editor/theme/derive.ts b/frontend/src/modules/sql-editor/components/theme/derive.tssimilarity index 100%rename from frontend/src/react/components/sql-editor/theme/derive.tsrename to frontend/src/modules/sql-editor/components/theme/derive.tsdiff --git a/frontend/src/react/components/sql-editor/theme/presets/dark.ts b/frontend/src/modules/sql-editor/components/theme/presets/dark.tssimilarity index 100%rename from frontend/src/react/components/sql-editor/theme/presets/dark.tsrename to frontend/src/modules/sql-editor/components/theme/presets/dark.tsdiff --git a/frontend/src/react/components/sql-editor/theme/presets/index.ts b/frontend/src/modules/sql-editor/components/theme/presets/index.tssimilarity index 100%rename from frontend/src/react/components/sql-editor/theme/presets/index.tsrename to frontend/src/modules/sql-editor/components/theme/presets/index.tsdiff --git a/frontend/src/react/components/sql-editor/theme/presets/light.ts b/frontend/src/modules/sql-editor/components/theme/presets/light.tssimilarity index 100%rename from frontend/src/react/components/sql-editor/theme/presets/light.tsrename to frontend/src/modules/sql-editor/components/theme/presets/light.tsdiff --git a/frontend/src/react/components/sql-editor/theme/presets/presets.test.ts b/frontend/src/modules/sql-editor/components/theme/presets/presets.test.tssimilarity index 100%rename from frontend/src/react/components/sql-editor/theme/presets/presets.test.tsrename to frontend/src/modules/sql-editor/components/theme/presets/presets.test.tsdiff --git a/frontend/src/react/components/sql-editor/theme/presets/solarized-dark.ts b/frontend/src/modules/sql-editor/components/theme/presets/solarized-dark.tssimilarity index 100%rename from frontend/src/react/components/sql-editor/theme/presets/solarized-dark.tsrename to frontend/src/modules/sql-editor/components/theme/presets/solarized-dark.tsdiff --git a/frontend/src/react/components/sql-editor/theme/types.ts b/frontend/src/modules/sql-editor/components/theme/types.tssimilarity index 100%rename from frontend/src/react/components/sql-editor/theme/types.tsrename to frontend/src/modules/sql-editor/components/theme/types.tsdiff --git a/frontend/src/react/components/sql-editor/theme/useActiveSQLEditorTheme.ts b/frontend/src/modules/sql-editor/components/theme/useActiveSQLEditorTheme.tssimilarity index 91%rename from frontend/src/react/components/sql-editor/theme/useActiveSQLEditorTheme.tsrename to frontend/src/modules/sql-editor/components/theme/useActiveSQLEditorTheme.tsindex a032d31eda..8c3b3704f3 100644--- a/frontend/src/react/components/sql-editor/theme/useActiveSQLEditorTheme.ts+++ b/frontend/src/modules/sql-editor/components/theme/useActiveSQLEditorTheme.ts@@ -1,4 +1,4 @@-import { useSQLEditorTabState } from "@/react/stores/sqlEditor/tab";+import { useSQLEditorTabState } from "@/modules/sql-editor/store/tab";import { resolveAdminTheme } from "./derive";import type { SQLEditorTheme } from "./types";import { useWorkspaceSQLEditorTheme } from "./useWorkspaceSQLEditorTheme";diff --git a/frontend/src/react/components/sql-editor/theme/useMonacoThemeController.test.tsx b/frontend/src/modules/sql-editor/components/theme/useMonacoThemeController.test.tsxsimilarity index 95%rename from frontend/src/react/components/sql-editor/theme/useMonacoThemeController.test.tsxrename to frontend/src/modules/sql-editor/components/theme/useMonacoThemeController.test.tsxindex 43e6029fc9..72fc75eb0f 100644--- a/frontend/src/react/components/sql-editor/theme/useMonacoThemeController.test.tsx+++ b/frontend/src/modules/sql-editor/components/theme/useMonacoThemeController.test.tsx@@ -11,7 +11,7 @@ const mocks = vi.hoisted(() => ({workspaceTheme: undefined as SQLEditorTheme | undefined,}));-vi.mock("@/react/components/monaco/core", () => ({+vi.mock("@/components/monaco/core", () => ({getResolvedTheme: (theme: string) => `resolved:${theme}`,loadMonacoEditor: vi.fn(async () => ({editor: {@@ -20,7 +20,7 @@ vi.mock("@/react/components/monaco/core", () => ({})),}));-vi.mock("@/react/stores/sqlEditor/tab", () => ({+vi.mock("@/modules/sql-editor/store/tab", () => ({useSQLEditorTabState: <T,>(selector: (state: unknown) => T) =>selector({currentTabId: "tab",diff --git a/frontend/src/react/components/sql-editor/theme/useMonacoThemeController.ts b/frontend/src/modules/sql-editor/components/theme/useMonacoThemeController.tssimilarity index 92%rename from frontend/src/react/components/sql-editor/theme/useMonacoThemeController.tsrename to frontend/src/modules/sql-editor/components/theme/useMonacoThemeController.tsindex 414a2fb574..9e16ecaaa2 100644--- a/frontend/src/react/components/sql-editor/theme/useMonacoThemeController.ts+++ b/frontend/src/modules/sql-editor/components/theme/useMonacoThemeController.ts@@ -1,9 +1,6 @@import { useEffect, useRef } from "react";-import {- getResolvedTheme,- loadMonacoEditor,-} from "@/react/components/monaco/core";-import { useSQLEditorTabState } from "@/react/stores/sqlEditor/tab";+import { getResolvedTheme, loadMonacoEditor } from "@/components/monaco/core";+import { useSQLEditorTabState } from "@/modules/sql-editor/store/tab";import { monacoThemeName, resolveAdminTheme } from "./derive";import type { SQLEditorTheme } from "./types";import { useWorkspaceSQLEditorTheme } from "./useWorkspaceSQLEditorTheme";diff --git a/frontend/src/react/components/sql-editor/theme/useSQLEditorOverlayTheme.ts b/frontend/src/modules/sql-editor/components/theme/useSQLEditorOverlayTheme.tssimilarity index 97%rename from frontend/src/react/components/sql-editor/theme/useSQLEditorOverlayTheme.tsrename to frontend/src/modules/sql-editor/components/theme/useSQLEditorOverlayTheme.tsindex fb8d47a90a..ce09f31182 100644--- a/frontend/src/react/components/sql-editor/theme/useSQLEditorOverlayTheme.ts+++ b/frontend/src/modules/sql-editor/components/theme/useSQLEditorOverlayTheme.ts@@ -1,5 +1,5 @@import { useEffect } from "react";-import { getLayerRoot } from "@/react/components/ui/layer";+import { getLayerRoot } from "@/components/ui/layer";import { themeColorScheme, themeToCssVars } from "./derive";import { useActiveSQLEditorTheme } from "./useActiveSQLEditorTheme";diff --git a/frontend/src/react/components/sql-editor/theme/useWorkspaceSQLEditorTheme.test.ts b/frontend/src/modules/sql-editor/components/theme/useWorkspaceSQLEditorTheme.test.tssimilarity index 100%rename from frontend/src/react/components/sql-editor/theme/useWorkspaceSQLEditorTheme.test.tsrename to frontend/src/modules/sql-editor/components/theme/useWorkspaceSQLEditorTheme.test.tsdiff --git a/frontend/src/react/components/sql-editor/theme/useWorkspaceSQLEditorTheme.ts b/frontend/src/modules/sql-editor/components/theme/useWorkspaceSQLEditorTheme.tssimilarity index 97%rename from frontend/src/react/components/sql-editor/theme/useWorkspaceSQLEditorTheme.tsrename to frontend/src/modules/sql-editor/components/theme/useWorkspaceSQLEditorTheme.tsindex a48c97a564..3dc7f57ccf 100644--- a/frontend/src/react/components/sql-editor/theme/useWorkspaceSQLEditorTheme.ts+++ b/frontend/src/modules/sql-editor/components/theme/useWorkspaceSQLEditorTheme.ts@@ -1,5 +1,5 @@import { useMemo } from "react";-import { useAppStore } from "@/react/stores/app";+import { useAppStore } from "@/stores/app";import type { Color } from "@/types/proto-es/google/type/color_pb";import { colorToHex } from "@/utils";import { validateTheme } from "./derive";diff --git a/frontend/src/react/components/sql-editor/useDropdown.ts b/frontend/src/modules/sql-editor/components/useDropdown.tssimilarity index 97%rename from frontend/src/react/components/sql-editor/useDropdown.tsrename to frontend/src/modules/sql-editor/components/useDropdown.tsindex 7668ab090c..f1199fad13 100644--- a/frontend/src/react/components/sql-editor/useDropdown.ts+++ b/frontend/src/modules/sql-editor/components/useDropdown.ts@@ -9,14 +9,14 @@import { useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { useAppStore } from "@/react/stores/app";-import { isWorksheetWritableV1 } from "@/utils";+import { useCurrentUser } from "@/hooks/useAppState";import type {SheetViewMode,WorksheetFilter,WorksheetFolderNode,-} from "@/views/sql-editor/Sheet";+} from "@/modules/sql-editor/model/Sheet";+import { useAppStore } from "@/stores/app";+import { isWorksheetWritableV1 } from "@/utils";// ---------------------------------------------------------------------------// Typesdiff --git a/frontend/src/react/components/sql-editor/useExportGrantBypass.tsx b/frontend/src/modules/sql-editor/components/useExportGrantBypass.tsxsimilarity index 99%rename from frontend/src/react/components/sql-editor/useExportGrantBypass.tsxrename to frontend/src/modules/sql-editor/components/useExportGrantBypass.tsxindex 0a609579dc..8e7c041852 100644--- a/frontend/src/react/components/sql-editor/useExportGrantBypass.tsx+++ b/frontend/src/modules/sql-editor/components/useExportGrantBypass.tsx@@ -1,7 +1,7 @@import { type ReactNode, useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { RouterLink } from "@/react/components/RouterLink";-import { useAppStore } from "@/react/stores/app";+import { RouterLink } from "@/components/RouterLink";+import { useAppStore } from "@/stores/app";import type { AccessGrant } from "@/types/proto-es/v1/access_grant_service_pb";interface UseExportGrantBypassArgs {diff --git a/frontend/src/react/components/sql-editor/useSQLEditorAutoSave.ts b/frontend/src/modules/sql-editor/components/useSQLEditorAutoSave.tssimilarity index 95%rename from frontend/src/react/components/sql-editor/useSQLEditorAutoSave.tsrename to frontend/src/modules/sql-editor/components/useSQLEditorAutoSave.tsindex c571c46655..1f10a3208d 100644--- a/frontend/src/react/components/sql-editor/useSQLEditorAutoSave.ts+++ b/frontend/src/modules/sql-editor/components/useSQLEditorAutoSave.ts@@ -1,10 +1,10 @@import { useEffect, useRef } from "react";-import { useAppStore } from "@/react/stores/app";-import { useSQLEditorStore } from "@/react/stores/sqlEditor";+import { useSQLEditorStore } from "@/modules/sql-editor/store";import {getSQLEditorTabsState,useSQLEditorTabState,-} from "@/react/stores/sqlEditor/tab";+} from "@/modules/sql-editor/store/tab";+import { useAppStore } from "@/stores/app";import { isWorksheetWritableV1 } from "@/utils";const AUTO_SAVE_DEBOUNCE_MS = 2000;diff --git a/frontend/src/react/hooks/useSQLEditorBridge.ts b/frontend/src/modules/sql-editor/hooks/useSQLEditorState.tssimilarity index 87%rename from frontend/src/react/hooks/useSQLEditorBridge.tsrename to frontend/src/modules/sql-editor/hooks/useSQLEditorState.tsindex 4309f65cd0..e130c3476c 100644--- a/frontend/src/react/hooks/useSQLEditorBridge.ts+++ b/frontend/src/modules/sql-editor/hooks/useSQLEditorState.ts@@ -1,11 +1,11 @@import { useEffect, useMemo } from "react";-import { useAppDatabase } from "@/react/hooks/useAppDatabase";-import { useAppStore } from "@/react/stores/app";+import { useAppDatabase } from "@/hooks/useAppDatabase";import {getSQLEditorEditorState,useSQLEditorEditorState,-} from "@/react/stores/sqlEditor/editor";-import { useSQLEditorTabsStore } from "@/react/stores/sqlEditor/tab";+} from "@/modules/sql-editor/store/editor";+import { useSQLEditorTabsStore } from "@/modules/sql-editor/store/tab";+import { useAppStore } from "@/stores/app";import type { SQLEditorConnection } from "@/types";import { isValidDatabaseName, isValidProjectName } from "@/types";import type { Database } from "@/types/proto-es/v1/database_service_pb";@@ -37,9 +37,8 @@ export const useSQLEditorFeature = (feature: PlanFeature): boolean => {return useAppStore((s) => s.hasFeature(feature));};-// Mirrors the Pinia `formatQueryDataPolicy` helper: normalizes-// `maximumResultRows` so `-1`/`0` (= unlimited) becomes `Number.MAX_VALUE`,-// which lets `Math.min` collapse the workspace/project merge cleanly.+// Normalize unlimited result-row values before merging workspace and project+// policy limits.type FormattedQueryDataPolicy = {disableCopyData: boolean;disableExport: boolean;@@ -60,9 +59,8 @@ const formatQueryDataPolicy = (};/**- * React access to the active project's QueryDataPolicy. Mirrors the- * legacy Pinia `useQueryDataPolicy`: fetches the workspace-level and- * project-level DATA_QUERY policies and merges them — the project's+ * React access to the active project's QueryDataPolicy. Fetches the+ * workspace-level and project-level DATA_QUERY policies and merges them — the project's* `maximumResultRows` only wins when it's tighter than the workspace cap.*/export const useSQLEditorQueryDataPolicy = (@@ -82,8 +80,7 @@ export const useSQLEditorQueryDataPolicy = ();// Self-fetch both policies. The SQL editor route doesn't load org- // policies on its own; the Pinia version's `watchEffect` did this- // implicitly via the cached scope.+ // policies on its own, so this hook owns the fetch lifecycle.useEffect(() => {if (!workspaceResourceName) return;void getOrFetchPolicyByParentAndType({@@ -111,9 +108,8 @@ export const useSQLEditorQueryDataPolicy = (/*** Clamps the editor's persisted `resultRowsLimit` down to the active- * project's `maximumResultRows` whenever the policy lowers the cap.- * Mirrors the `watchEffect` the legacy `editor-vue-state` singleton ran;- * call once from an always-mounted SQL editor shell. The clamp settles+ * project's `maximumResultRows` whenever the policy lowers the cap. Call once+ * from an always-mounted SQL editor shell. The clamp settles* in one pass (after the write, the new value equals the max), so there* is no re-render loop.*/@@ -166,8 +162,7 @@ export const useSQLEditorAllowViewAllProjects = (): boolean => {/*** React access to the database/instance/environment triple derived from- * a SQL editor connection. Returns plain values (unwrapped from Vue- * refs) that update when the underlying Pinia data changes.+ * a SQL editor connection. Values update with the underlying Zustand state.*/export interface SQLEditorConnectionDetail {connection: SQLEditorConnection;diff --git a/frontend/src/store/modules/sqlEditor/legacy/extendedTab.ts b/frontend/src/modules/sql-editor/legacy/extendedTab.tssimilarity index 100%rename from frontend/src/store/modules/sqlEditor/legacy/extendedTab.tsrename to frontend/src/modules/sql-editor/legacy/extendedTab.tsdiff --git a/frontend/src/store/modules/sqlEditor/legacy/migration.ts b/frontend/src/modules/sql-editor/legacy/migration.tssimilarity index 96%rename from frontend/src/store/modules/sqlEditor/legacy/migration.tsrename to frontend/src/modules/sql-editor/legacy/migration.tsindex 7b09f3ece7..38876abe27 100644--- a/frontend/src/store/modules/sqlEditor/legacy/migration.ts+++ b/frontend/src/modules/sql-editor/legacy/migration.ts@@ -1,7 +1,9 @@import { create } from "@bufbuild/protobuf";import { isUndefined, omit, omitBy } from "lodash-es";-import { extractWorksheetConnection } from "@/react/lib/sqlEditorConnection";-import { useAppStore } from "@/react/stores/app";+import { extractWorksheetConnection } from "@/lib/sqlEditorConnection";+import { useAppStore } from "@/stores/app";+import { getCurrentUserV1 } from "@/stores/modules/migration-helpers";+import { extractUserEmail } from "@/stores/modules/v1";import type { EditorPanelViewState, SQLEditorTab } from "@/types";import { DEFAULT_SQL_EDITOR_TAB_MODE } from "@/types";import {@@ -9,8 +11,6 @@ import {WorksheetSchema,} from "@/types/proto-es/v1/worksheet_service_pb";import { defaultSQLEditorTab, WebStorageHelper } from "@/utils";-import { getCurrentUserV1 } from "../../migration-helpers";-import { extractUserEmail } from "../../v1";import {deleteExtendedTab,EXTENDED_TAB_FIELDS,diff --git a/frontend/src/views/sql-editor/Sheet/context.ts b/frontend/src/modules/sql-editor/model/Sheet/context.tssimilarity index 99%rename from frontend/src/views/sql-editor/Sheet/context.tsrename to frontend/src/modules/sql-editor/model/Sheet/context.tsindex 209e020249..a60d3b6d55 100644--- a/frontend/src/views/sql-editor/Sheet/context.ts+++ b/frontend/src/modules/sql-editor/model/Sheet/context.ts@@ -5,19 +5,19 @@ import scrollIntoView from "scroll-into-view-if-needed";import { create, type StoreApi, type UseBoundStore } from "zustand";import { immer } from "zustand/middleware/immer";import { useShallow } from "zustand/react/shallow";-import i18n from "@/react/i18n";-import { extractWorksheetConnection } from "@/react/lib/sqlEditorConnection";-import { useAppStore } from "@/react/stores/app";+import i18n from "@/lib/i18n";+import { extractWorksheetConnection } from "@/lib/sqlEditorConnection";import {getSQLEditorEditorState,subscribeSQLEditorEditorState,useSQLEditorEditorStore,-} from "@/react/stores/sqlEditor/editor";+} from "@/modules/sql-editor/store/editor";import {getSQLEditorTabsState,subscribeSQLEditorTabsState,useSQLEditorTabsStore,-} from "@/react/stores/sqlEditor/tab";+} from "@/modules/sql-editor/store/tab";+import { useAppStore } from "@/stores/app";import type { SQLEditorTab, SQLEditorTabMode } from "@/types";import { DEBOUNCE_SEARCH_DELAY } from "@/types";import {diff --git a/frontend/src/views/sql-editor/Sheet/folder.test.ts b/frontend/src/modules/sql-editor/model/Sheet/folder.test.tssimilarity index 100%rename from frontend/src/views/sql-editor/Sheet/folder.test.tsrename to frontend/src/modules/sql-editor/model/Sheet/folder.test.tsdiff --git a/frontend/src/views/sql-editor/Sheet/folder.ts b/frontend/src/modules/sql-editor/model/Sheet/folder.tssimilarity index 100%rename from frontend/src/views/sql-editor/Sheet/folder.tsrename to frontend/src/modules/sql-editor/model/Sheet/folder.tsdiff --git a/frontend/src/views/sql-editor/Sheet/index.ts b/frontend/src/modules/sql-editor/model/Sheet/index.tssimilarity index 100%rename from frontend/src/views/sql-editor/Sheet/index.tsrename to frontend/src/modules/sql-editor/model/Sheet/index.tsdiff --git a/frontend/src/views/sql-editor/Sheet/types.ts b/frontend/src/modules/sql-editor/model/Sheet/types.tssimilarity index 100%rename from frontend/src/views/sql-editor/Sheet/types.tsrename to frontend/src/modules/sql-editor/model/Sheet/types.tsdiff --git a/frontend/src/views/sql-editor/TabList/events.ts b/frontend/src/modules/sql-editor/model/TabList/events.tssimilarity index 100%rename from frontend/src/views/sql-editor/TabList/events.tsrename to frontend/src/modules/sql-editor/model/TabList/events.tsdiff --git a/frontend/src/views/sql-editor/events.test.ts b/frontend/src/modules/sql-editor/model/events.test.tssimilarity index 100%rename from frontend/src/views/sql-editor/events.test.tsrename to frontend/src/modules/sql-editor/model/events.test.tsdiff --git a/frontend/src/views/sql-editor/events.ts b/frontend/src/modules/sql-editor/model/events.tssimilarity index 100%rename from frontend/src/views/sql-editor/events.tsrename to frontend/src/modules/sql-editor/model/events.tsdiff --git a/frontend/src/react/stores/sqlEditor/editor.test.ts b/frontend/src/modules/sql-editor/store/editor.test.tssimilarity index 100%rename from frontend/src/react/stores/sqlEditor/editor.test.tsrename to frontend/src/modules/sql-editor/store/editor.test.tsdiff --git a/frontend/src/react/stores/sqlEditor/editor.ts b/frontend/src/modules/sql-editor/store/editor.tssimilarity index 99%rename from frontend/src/react/stores/sqlEditor/editor.tsrename to frontend/src/modules/sql-editor/store/editor.tsindex 057b1ebee6..72969191c9 100644--- a/frontend/src/react/stores/sqlEditor/editor.ts+++ b/frontend/src/modules/sql-editor/store/editor.ts@@ -1,7 +1,7 @@import { useSyncExternalStore } from "react";import { create, type StoreApi, type UseBoundStore } from "zustand";import { immer } from "zustand/middleware/immer";-import { useAppStore } from "@/react/stores/app";+import { useAppStore } from "@/stores/app";import type { Database } from "@/types/proto-es/v1/database_service_pb";import { QueryOption_RedisRunCommandsOn } from "@/types/proto-es/v1/sql_service_pb";import {diff --git a/frontend/src/react/stores/sqlEditor/index.ts b/frontend/src/modules/sql-editor/store/index.tssimilarity index 100%rename from frontend/src/react/stores/sqlEditor/index.tsrename to frontend/src/modules/sql-editor/store/index.tsdiff --git a/frontend/src/react/stores/sqlEditor/queryHistory.test.ts b/frontend/src/modules/sql-editor/store/queryHistory.test.tssimilarity index 99%rename from frontend/src/react/stores/sqlEditor/queryHistory.test.tsrename to frontend/src/modules/sql-editor/store/queryHistory.test.tsindex 3dabb44456..be9cba1660 100644--- a/frontend/src/react/stores/sqlEditor/queryHistory.test.ts+++ b/frontend/src/modules/sql-editor/store/queryHistory.test.ts@@ -18,7 +18,7 @@ const searchQueryHistoriesMock = vi.fn();// Stub the connect client so the slice's `mergeLatest` /// `fetchQueryHistoryList` calls hit a deterministic in-memory fake.-vi.mock("@/connect", () => ({+vi.mock("@/api", () => ({sqlServiceClientConnect: {searchQueryHistories: (...args: unknown[]) =>searchQueryHistoriesMock(...args),diff --git a/frontend/src/react/stores/sqlEditor/queryHistory.ts b/frontend/src/modules/sql-editor/store/queryHistory.tssimilarity index 98%rename from frontend/src/react/stores/sqlEditor/queryHistory.tsrename to frontend/src/modules/sql-editor/store/queryHistory.tsindex b16fb4ead4..426ec83afd 100644--- a/frontend/src/react/stores/sqlEditor/queryHistory.ts+++ b/frontend/src/modules/sql-editor/store/queryHistory.ts@@ -1,5 +1,5 @@import { create } from "@bufbuild/protobuf";-import { sqlServiceClientConnect } from "@/connect";+import { sqlServiceClientConnect } from "@/api";import type { QueryHistory } from "@/types/proto-es/v1/sql_service_pb";import {GetQueryHistoryRequestSchema,diff --git a/frontend/src/react/stores/sqlEditor/tab.test.ts b/frontend/src/modules/sql-editor/store/tab.test.tssimilarity index 98%rename from frontend/src/react/stores/sqlEditor/tab.test.tsrename to frontend/src/modules/sql-editor/store/tab.test.tsindex fc66369d38..db5f4ea70c 100644--- a/frontend/src/react/stores/sqlEditor/tab.test.ts+++ b/frontend/src/modules/sql-editor/store/tab.test.ts@@ -12,7 +12,7 @@ const mocks = vi.hoisted(() => ({getOrFetchWorksheetByName: vi.fn(),}));-vi.mock("@/react/lib/sqlEditorConnection", () => ({+vi.mock("@/lib/sqlEditorConnection", () => ({extractWorksheetConnection: vi.fn(async () => ({instance: "instances/mysql-instance",database: "instances/mysql-instance/databases/bytebase",@@ -20,7 +20,7 @@ vi.mock("@/react/lib/sqlEditorConnection", () => ({isConnectedSQLEditorTab: vi.fn(() => true),}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: {getState: () => ({currentUser: {@@ -34,7 +34,7 @@ vi.mock("@/react/stores/app", () => ({},}));-vi.mock("@/store/modules/sqlEditor/legacy/migration", () => ({+vi.mock("@/modules/sql-editor/legacy/migration", () => ({migrateDraftsFromCache: vi.fn(async () => undefined),migrateTabViewState: vi.fn(),}));diff --git a/frontend/src/react/stores/sqlEditor/tab.ts b/frontend/src/modules/sql-editor/store/tab.tssimilarity index 98%rename from frontend/src/react/stores/sqlEditor/tab.tsrename to frontend/src/modules/sql-editor/store/tab.tsindex 879d39f427..29cdc26180 100644--- a/frontend/src/react/stores/sqlEditor/tab.ts+++ b/frontend/src/modules/sql-editor/store/tab.ts@@ -6,12 +6,12 @@ import { useShallow } from "zustand/react/shallow";import {extractWorksheetConnection,isConnectedSQLEditorTab,-} from "@/react/lib/sqlEditorConnection";-import { useAppStore } from "@/react/stores/app";+} from "@/lib/sqlEditorConnection";import {migrateDraftsFromCache,migrateTabViewState,-} from "@/store/modules/sqlEditor/legacy/migration";+} from "@/modules/sql-editor/legacy/migration";+import { useAppStore } from "@/stores/app";import type {BatchQueryContext,SQLEditorDatabaseQueryContext,@@ -257,7 +257,7 @@ export const useSQLEditorTabsStore: UseBoundStore<// Dynamic import avoids a static cycle with the web terminal// service module (which transitively re-imports this module).- void import("@/react/stores/sqlEditor/webTerminal-service").then(+ void import("@/modules/sql-editor/store/webTerminal-service").then(({ disposeWebTerminalQuerySession }) => {disposeWebTerminalQuerySession(tabId);}diff --git a/frontend/src/react/stores/sqlEditor/tree-utils.ts b/frontend/src/modules/sql-editor/store/tree-utils.tssimilarity index 99%rename from frontend/src/react/stores/sqlEditor/tree-utils.tsrename to frontend/src/modules/sql-editor/store/tree-utils.tsindex 997648267f..fdbab91ae2 100644--- a/frontend/src/react/stores/sqlEditor/tree-utils.ts+++ b/frontend/src/modules/sql-editor/store/tree-utils.ts@@ -1,5 +1,5 @@import { orderBy } from "lodash-es";-import { useAppStore } from "@/react/stores/app";+import { useAppStore } from "@/stores/app";import type {SQLEditorTreeFactor as Factor,SQLEditorTreeNodeTarget as NodeTarget,diff --git a/frontend/src/react/stores/sqlEditor/tree.ts b/frontend/src/modules/sql-editor/store/tree.tssimilarity index 100%rename from frontend/src/react/stores/sqlEditor/tree.tsrename to frontend/src/modules/sql-editor/store/tree.tsdiff --git a/frontend/src/react/stores/sqlEditor/types.ts b/frontend/src/modules/sql-editor/store/types.tssimilarity index 100%rename from frontend/src/react/stores/sqlEditor/types.tsrename to frontend/src/modules/sql-editor/store/types.tsdiff --git a/frontend/src/react/stores/sqlEditor/uiState.test.ts b/frontend/src/modules/sql-editor/store/uiState.test.tssimilarity index 98%rename from frontend/src/react/stores/sqlEditor/uiState.test.tsrename to frontend/src/modules/sql-editor/store/uiState.test.tsindex ebc76ca7d7..e33a08eec3 100644--- a/frontend/src/react/stores/sqlEditor/uiState.test.ts+++ b/frontend/src/modules/sql-editor/store/uiState.test.ts@@ -30,7 +30,7 @@ const localStorageMock = {// Inline stub for the queryHistory slice so this test stays decoupled// from the real `./queryHistory` module — that module pulls in-// `@/connect` and (transitively) the Pinia store layout, which can+// `@/api` and (transitively) the Pinia store layout, which can// create circular-import issues during test load and isn't relevant// to validating uiState behavior.const stubQueryHistorySlice = (): QueryHistorySlice => ({diff --git a/frontend/src/react/stores/sqlEditor/uiState.ts b/frontend/src/modules/sql-editor/store/uiState.tssimilarity index 100%rename from frontend/src/react/stores/sqlEditor/uiState.tsrename to frontend/src/modules/sql-editor/store/uiState.tsdiff --git a/frontend/src/react/stores/sqlEditor/webTerminal-service.ts b/frontend/src/modules/sql-editor/store/webTerminal-service.tssimilarity index 98%rename from frontend/src/react/stores/sqlEditor/webTerminal-service.tsrename to frontend/src/modules/sql-editor/store/webTerminal-service.tsindex 80ee888498..1df0862d2a 100644--- a/frontend/src/react/stores/sqlEditor/webTerminal-service.ts+++ b/frontend/src/modules/sql-editor/store/webTerminal-service.ts@@ -4,12 +4,13 @@ import Emittery from "emittery";import { cloneDeep } from "lodash-es";import type { Subscription } from "rxjs";import { fromEventPattern, Observable } from "rxjs";-import { refreshTokens } from "@/connect/refreshToken";+import { refreshTokens } from "@/api/refreshToken";import {type CancelableTimer,createCancelableTimer,-} from "@/react/lib/cancelableTimer";-import { useAppStore } from "@/react/stores/app";+} from "@/lib/cancelableTimer";+import { sqlEditorEvents } from "@/modules/sql-editor/model/events";+import { useAppStore } from "@/stores/app";import type {SQLEditorQueryParams,SQLEditorTab,@@ -31,7 +32,6 @@ import {extractGrpcErrorMessage,getErrorCode as extractGrpcStatusCode,} from "@/utils/connect";-import { sqlEditorEvents } from "@/views/sql-editor/events";import { getSQLEditorEditorState } from "./editor";import { useSQLEditorStore as useSQLEditorReactStore } from "./index";diff --git a/frontend/src/react/stores/sqlEditor/webTerminal.ts b/frontend/src/modules/sql-editor/store/webTerminal.tssimilarity index 100%rename from frontend/src/react/stores/sqlEditor/webTerminal.tsrename to frontend/src/modules/sql-editor/store/webTerminal.tsdiff --git a/frontend/src/react/stores/sqlEditor/worksheet.test.ts b/frontend/src/modules/sql-editor/store/worksheet.test.tssimilarity index 95%rename from frontend/src/react/stores/sqlEditor/worksheet.test.tsrename to frontend/src/modules/sql-editor/store/worksheet.test.tsindex 76c1809205..9dd302ba33 100644--- a/frontend/src/react/stores/sqlEditor/worksheet.test.ts+++ b/frontend/src/modules/sql-editor/store/worksheet.test.ts@@ -85,15 +85,15 @@ const piniaMocks = vi.hoisted(() => ({},}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({useProjectV1Store: () => piniaMocks.projectStore,}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: { getState: () => piniaMocks.worksheetStore },}));-vi.mock("@/react/stores/sqlEditor/tab-vue-state", () => ({+vi.mock("@/modules/sql-editor/store/tab-vue-state", () => ({useSQLEditorTabStore: () => piniaMocks.tabStore,}));@@ -101,15 +101,15 @@ vi.mock("./editor-vue-state", () => ({useSQLEditorVueState: () => piniaMocks.editorStore,}));-vi.mock("@/store/modules/v1/projectIamPolicy", () => ({+vi.mock("@/stores/modules/v1/projectIamPolicy", () => ({useProjectIamPolicyStore: () => piniaMocks.projectIamPolicyStore,}));-vi.mock("@/views/sql-editor/events", () => ({+vi.mock("@/modules/sql-editor/model/events", () => ({sqlEditorEvents: { emit: vi.fn() },}));-vi.mock("@/views/sql-editor/Sheet", () => ({+vi.mock("@/modules/sql-editor/model/Sheet", () => ({openWorksheetByName: vi.fn(),}));diff --git a/frontend/src/react/stores/sqlEditor/worksheet.ts b/frontend/src/modules/sql-editor/store/worksheet.tssimilarity index 95%rename from frontend/src/react/stores/sqlEditor/worksheet.tsrename to frontend/src/modules/sql-editor/store/worksheet.tsindex 3a97079de1..989ad95f8e 100644--- a/frontend/src/react/stores/sqlEditor/worksheet.ts+++ b/frontend/src/modules/sql-editor/store/worksheet.ts@@ -1,15 +1,15 @@import { create } from "@bufbuild/protobuf";import { isUndefined } from "lodash-es";-import { extractWorksheetConnection } from "@/react/lib/sqlEditorConnection";-import { useAppStore } from "@/react/stores/app";+import { extractWorksheetConnection } from "@/lib/sqlEditorConnection";+import { sqlEditorEvents } from "@/modules/sql-editor/model/events";+import { openWorksheetByName } from "@/modules/sql-editor/model/Sheet";+import { useAppStore } from "@/stores/app";import { isValidProjectName } from "@/types";import {type Worksheet,Worksheet_Visibility,WorksheetSchema,} from "@/types/proto-es/v1/worksheet_service_pb";-import { sqlEditorEvents } from "@/views/sql-editor/events";-import { openWorksheetByName } from "@/views/sql-editor/Sheet";import { getSQLEditorEditorState } from "./editor";import { getSQLEditorTabsState } from "./tab";import type { SQLEditorSliceCreator, WorksheetSaveSlice } from "./types";diff --git a/frontend/src/plugins/agent/logic/tools/gen/openapi-index.ts b/frontend/src/plugins/agent/logic/tools/gen/openapi-index.tsdeleted file mode 100644index d1f1562842..0000000000--- a/frontend/src/plugins/agent/logic/tools/gen/openapi-index.ts+++ /dev/null@@ -1,16730 +0,0 @@-// Auto-generated from openapi.yaml. DO NOT EDIT manually.-// Run 'pnpm --dir frontend run generate:openapi-index' to regenerate.--export interface EndpointInfo {- operationId: string;- path: string;- service: string;- method: string;- summary: string;- description: string;- requestSchemaRef: string;- responseSchemaRef: string;-}--export interface PropertyInfo {- name: string;- type: string;- description?: string;- required?: boolean;- format?: string;- items?: PropertyInfo;- additionalProperties?: PropertyInfo;-}--export interface SchemaInfo {- type: "object" | "enum";- description: string;- properties?: PropertyInfo[];- values?: Array<string | number>;-}--export const endpoints: EndpointInfo[] = [- {- operationId: "bytebase.v1.AIService.Chat",- path: "/bytebase.v1.AIService/Chat",- service: "AIService",- method: "Chat",- summary: "Chat",- description:- "Chat sends a conversation with tool definitions to the configured AI provider\n and returns the AI response.",- requestSchemaRef: "#/components/schemas/bytebase.v1.AIChatRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.AIChatResponse",- },- {- operationId: "bytebase.v1.AccessGrantService.ActivateAccessGrant",- path: "/bytebase.v1.AccessGrantService/ActivateAccessGrant",- service: "AccessGrantService",- method: "ActivateAccessGrant",- summary: "ActivateAccessGrant",- description: "Activates a pending access grant.",- requestSchemaRef:- "#/components/schemas/bytebase.v1.ActivateAccessGrantRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.AccessGrant",- },- {- operationId: "bytebase.v1.AccessGrantService.CreateAccessGrant",- path: "/bytebase.v1.AccessGrantService/CreateAccessGrant",- service: "AccessGrantService",- method: "CreateAccessGrant",- summary: "CreateAccessGrant",- description: "Creates an access grant.",- requestSchemaRef:- "#/components/schemas/bytebase.v1.CreateAccessGrantRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.AccessGrant",- },- {- operationId: "bytebase.v1.AccessGrantService.GetAccessGrant",- path: "/bytebase.v1.AccessGrantService/GetAccessGrant",- service: "AccessGrantService",- method: "GetAccessGrant",- summary: "GetAccessGrant",- description: "Gets an access grant by name.",- requestSchemaRef: "#/components/schemas/bytebase.v1.GetAccessGrantRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.AccessGrant",- },- {- operationId: "bytebase.v1.AccessGrantService.ListAccessGrants",- path: "/bytebase.v1.AccessGrantService/ListAccessGrants",- service: "AccessGrantService",- method: "ListAccessGrants",- summary: "ListAccessGrants",- description: "Lists access grants in a project.",- requestSchemaRef:- "#/components/schemas/bytebase.v1.ListAccessGrantsRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.ListAccessGrantsResponse",- },- {- operationId: "bytebase.v1.AccessGrantService.RevokeAccessGrant",- path: "/bytebase.v1.AccessGrantService/RevokeAccessGrant",- service: "AccessGrantService",- method: "RevokeAccessGrant",- summary: "RevokeAccessGrant",- description: "Revokes an active access grant.",- requestSchemaRef:- "#/components/schemas/bytebase.v1.RevokeAccessGrantRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.AccessGrant",- },- {- operationId: "bytebase.v1.AccessGrantService.SearchMyAccessGrants",- path: "/bytebase.v1.AccessGrantService/SearchMyAccessGrants",- service: "AccessGrantService",- method: "SearchMyAccessGrants",- summary: "SearchMyAccessGrants",- description: "Searches access grants created by the caller.",- requestSchemaRef:- "#/components/schemas/bytebase.v1.SearchMyAccessGrantsRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.SearchMyAccessGrantsResponse",- },- {- operationId: "bytebase.v1.ActuatorService.DeleteCache",- path: "/bytebase.v1.ActuatorService/DeleteCache",- service: "ActuatorService",- method: "DeleteCache",- summary: "DeleteCache",- description:- "Clears the system cache to force data refresh.\n Permissions required: None",- requestSchemaRef: "#/components/schemas/bytebase.v1.DeleteCacheRequest",- responseSchemaRef: "#/components/schemas/google.protobuf.Empty",- },- {- operationId: "bytebase.v1.ActuatorService.GetActuatorInfo",- path: "/bytebase.v1.ActuatorService/GetActuatorInfo",- service: "ActuatorService",- method: "GetActuatorInfo",- summary: "GetActuatorInfo",- description:- "Gets system information and health status of the Bytebase instance.\n When `name` is provided (or the workspace-scoped binding is used), the\n response includes workspace-scoped fields for that workspace.\n Permissions required: None",- requestSchemaRef: "#/components/schemas/bytebase.v1.GetActuatorInfoRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.ActuatorInfo",- },- {- operationId: "bytebase.v1.ActuatorService.SetupSample",- path: "/bytebase.v1.ActuatorService/SetupSample",- service: "ActuatorService",- method: "SetupSample",- summary: "SetupSample",- description:- "Sets up sample data for demonstration and testing purposes.\n Permissions required: bb.projects.create",- requestSchemaRef: "#/components/schemas/bytebase.v1.SetupSampleRequest",- responseSchemaRef: "#/components/schemas/google.protobuf.Empty",- },- {- operationId: "bytebase.v1.AuditLogService.ExportAuditLogs",- path: "/bytebase.v1.AuditLogService/ExportAuditLogs",- service: "AuditLogService",- method: "ExportAuditLogs",- summary: "ExportAuditLogs",- description:- "Exports audit logs in a specified format for external analysis.\n Permissions required: bb.auditLogs.export",- requestSchemaRef: "#/components/schemas/bytebase.v1.ExportAuditLogsRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.ExportAuditLogsResponse",- },- {- operationId: "bytebase.v1.AuditLogService.SearchAuditLogs",- path: "/bytebase.v1.AuditLogService/SearchAuditLogs",- service: "AuditLogService",- method: "SearchAuditLogs",- summary: "SearchAuditLogs",- description:- "Searches audit logs with optional filtering and pagination.\n Permissions required: bb.auditLogs.search",- requestSchemaRef: "#/components/schemas/bytebase.v1.SearchAuditLogsRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.SearchAuditLogsResponse",- },- {- operationId: "bytebase.v1.AuthService.ExchangeToken",- path: "/bytebase.v1.AuthService/ExchangeToken",- service: "AuthService",- method: "ExchangeToken",- summary: "ExchangeToken",- description:- "Exchanges an external OIDC token for a Bytebase access token.\n Used by CI/CD pipelines with Workload Identity Federation.\n Permissions required: None (validates via OIDC token)",- requestSchemaRef: "#/components/schemas/bytebase.v1.ExchangeTokenRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.ExchangeTokenResponse",- },- {- operationId: "bytebase.v1.AuthService.Login",- path: "/bytebase.v1.AuthService/Login",- service: "AuthService",- method: "Login",- summary: "Login",- description:- "Authenticates a user and returns access tokens.\n Permissions required: None",- requestSchemaRef: "#/components/schemas/bytebase.v1.LoginRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.LoginResponse",- },- {- operationId: "bytebase.v1.AuthService.Logout",- path: "/bytebase.v1.AuthService/Logout",- service: "AuthService",- method: "Logout",- summary: "Logout",- description:- "Logs out the current user session.\n Permissions required: None",- requestSchemaRef: "#/components/schemas/bytebase.v1.LogoutRequest",- responseSchemaRef: "#/components/schemas/google.protobuf.Empty",- },- {- operationId: "bytebase.v1.AuthService.Refresh",- path: "/bytebase.v1.AuthService/Refresh",- service: "AuthService",- method: "Refresh",- summary: "Refresh",- description:- "Refreshes the access token using the refresh token cookie.\n Permissions required: None (validates via refresh token cookie)",- requestSchemaRef: "#/components/schemas/bytebase.v1.RefreshRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.RefreshResponse",- },- {- operationId: "bytebase.v1.AuthService.RequestPasswordReset",- path: "/bytebase.v1.AuthService/RequestPasswordReset",- service: "AuthService",- method: "RequestPasswordReset",- summary: "RequestPasswordReset",- description:- "Requests a password reset email for the given email address.\n Always returns success to avoid leaking whether the email exists.\n Permissions required: None",- requestSchemaRef:- "#/components/schemas/bytebase.v1.RequestPasswordResetRequest",- responseSchemaRef: "#/components/schemas/google.protobuf.Empty",- },- {- operationId: "bytebase.v1.AuthService.ResetPassword",- path: "/bytebase.v1.AuthService/ResetPassword",- service: "AuthService",- method: "ResetPassword",- summary: "ResetPassword",- description:- "Resets the user's password using a password reset token from email.\n Permissions required: None (validates via token)",- requestSchemaRef: "#/components/schemas/bytebase.v1.ResetPasswordRequest",- responseSchemaRef: "#/components/schemas/google.protobuf.Empty",- },- {- operationId: "bytebase.v1.AuthService.SendEmailLoginCode",- path: "/bytebase.v1.AuthService/SendEmailLoginCode",- service: "AuthService",- method: "SendEmailLoginCode",- summary: "SendEmailLoginCode",- description:- "Sends a 6-digit verification code to the email for login/signup.\n Always returns success (no email enumeration). Enforces 60-sec resend cooldown.\n Permissions required: None",- requestSchemaRef:- "#/components/schemas/bytebase.v1.SendEmailLoginCodeRequest",- responseSchemaRef: "#/components/schemas/google.protobuf.Empty",- },- {- operationId: "bytebase.v1.AuthService.Signup",- path: "/bytebase.v1.AuthService/Signup",- service: "AuthService",- method: "Signup",- summary: "Signup",- description:- "Registers a new user account. Creates a principal and assigns a workspace:\n - If the user's email was pre-invited to a workspace, joins that workspace.\n - Otherwise, creates a new workspace with the user as admin.\n Returns access tokens so the user is logged in immediately after signup.",- requestSchemaRef: "#/components/schemas/bytebase.v1.SignupRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.LoginResponse",- },- {- operationId: "bytebase.v1.AuthService.SwitchWorkspace",- path: "/bytebase.v1.AuthService/SwitchWorkspace",- service: "AuthService",- method: "SwitchWorkspace",- summary: "SwitchWorkspace",- description:- "Switches the current user's active workspace and issues new tokens.\n The user must be a member of the target workspace.",- requestSchemaRef: "#/components/schemas/bytebase.v1.SwitchWorkspaceRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.LoginResponse",- },- {- operationId: "bytebase.v1.CelService.BatchDeparse",- path: "/bytebase.v1.CelService/BatchDeparse",- service: "CelService",- method: "BatchDeparse",- summary: "BatchDeparse",- description:- "Converts multiple CEL AST representations back into expression strings.\n Permissions required: None",- requestSchemaRef: "#/components/schemas/bytebase.v1.BatchDeparseRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.BatchDeparseResponse",- },- {- operationId: "bytebase.v1.CelService.BatchParse",- path: "/bytebase.v1.CelService/BatchParse",- service: "CelService",- method: "BatchParse",- summary: "BatchParse",- description:- "Parses multiple CEL expression strings into AST representations.\n Permissions required: None",- requestSchemaRef: "#/components/schemas/bytebase.v1.BatchParseRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.BatchParseResponse",- },- {- operationId: "bytebase.v1.DatabaseCatalogService.GetDatabaseCatalog",- path: "/bytebase.v1.DatabaseCatalogService/GetDatabaseCatalog",- service: "DatabaseCatalogService",- method: "GetDatabaseCatalog",- summary: "GetDatabaseCatalog",- description:- "Gets the catalog metadata for a database.\n Permissions required: bb.databaseCatalogs.get",- requestSchemaRef:- "#/components/schemas/bytebase.v1.GetDatabaseCatalogRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.DatabaseCatalog",- },- {- operationId: "bytebase.v1.DatabaseCatalogService.UpdateDatabaseCatalog",- path: "/bytebase.v1.DatabaseCatalogService/UpdateDatabaseCatalog",- service: "DatabaseCatalogService",- method: "UpdateDatabaseCatalog",- summary: "UpdateDatabaseCatalog",- description:- "Updates catalog metadata such as classifications and labels.\n Permissions required: bb.databaseCatalogs.update",- requestSchemaRef:- "#/components/schemas/bytebase.v1.UpdateDatabaseCatalogRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.DatabaseCatalog",- },- {- operationId: "bytebase.v1.DatabaseGroupService.CreateDatabaseGroup",- path: "/bytebase.v1.DatabaseGroupService/CreateDatabaseGroup",- service: "DatabaseGroupService",- method: "CreateDatabaseGroup",- summary: "CreateDatabaseGroup",- description:- "Creates a new database group.\n Permissions required: bb.databaseGroups.create",- requestSchemaRef:- "#/components/schemas/bytebase.v1.CreateDatabaseGroupRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.DatabaseGroup",- },- {- operationId: "bytebase.v1.DatabaseGroupService.DeleteDatabaseGroup",- path: "/bytebase.v1.DatabaseGroupService/DeleteDatabaseGroup",- service: "DatabaseGroupService",- method: "DeleteDatabaseGroup",- summary: "DeleteDatabaseGroup",- description:- "Deletes a database group.\n Permissions required: bb.databaseGroups.delete",- requestSchemaRef:- "#/components/schemas/bytebase.v1.DeleteDatabaseGroupRequest",- responseSchemaRef: "#/components/schemas/google.protobuf.Empty",- },- {- operationId: "bytebase.v1.DatabaseGroupService.GetDatabaseGroup",- path: "/bytebase.v1.DatabaseGroupService/GetDatabaseGroup",- service: "DatabaseGroupService",- method: "GetDatabaseGroup",- summary: "GetDatabaseGroup",- description:- "Gets a database group by name.\n Permissions required: bb.databaseGroups.get",- requestSchemaRef:- "#/components/schemas/bytebase.v1.GetDatabaseGroupRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.DatabaseGroup",- },- {- operationId: "bytebase.v1.DatabaseGroupService.ListDatabaseGroups",- path: "/bytebase.v1.DatabaseGroupService/ListDatabaseGroups",- service: "DatabaseGroupService",- method: "ListDatabaseGroups",- summary: "ListDatabaseGroups",- description:- "Lists database groups in a project.\n Permissions required: bb.databaseGroups.list",- requestSchemaRef:- "#/components/schemas/bytebase.v1.ListDatabaseGroupsRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.ListDatabaseGroupsResponse",- },- {- operationId: "bytebase.v1.DatabaseGroupService.UpdateDatabaseGroup",- path: "/bytebase.v1.DatabaseGroupService/UpdateDatabaseGroup",- service: "DatabaseGroupService",- method: "UpdateDatabaseGroup",- summary: "UpdateDatabaseGroup",- description:- "Updates a database group.\n Permissions required: bb.databaseGroups.update\n When allow_missing=true, also requires: bb.databaseGroups.create",- requestSchemaRef:- "#/components/schemas/bytebase.v1.UpdateDatabaseGroupRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.DatabaseGroup",- },- {- operationId: "bytebase.v1.DatabaseService.BatchGetDatabases",- path: "/bytebase.v1.DatabaseService/BatchGetDatabases",- service: "DatabaseService",- method: "BatchGetDatabases",- summary: "BatchGetDatabases",- description:- "Retrieves multiple databases by their names.\n Permissions required: bb.databases.get",- requestSchemaRef:- "#/components/schemas/bytebase.v1.BatchGetDatabasesRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.BatchGetDatabasesResponse",- },- {- operationId: "bytebase.v1.DatabaseService.BatchSyncDatabases",- path: "/bytebase.v1.DatabaseService/BatchSyncDatabases",- service: "DatabaseService",- method: "BatchSyncDatabases",- summary: "BatchSyncDatabases",- description:- "Synchronizes multiple databases in a single batch operation.\n Permissions required: bb.databases.sync",- requestSchemaRef:- "#/components/schemas/bytebase.v1.BatchSyncDatabasesRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.BatchSyncDatabasesResponse",- },- {- operationId: "bytebase.v1.DatabaseService.BatchUpdateDatabases",- path: "/bytebase.v1.DatabaseService/BatchUpdateDatabases",- service: "DatabaseService",- method: "BatchUpdateDatabases",- summary: "BatchUpdateDatabases",- description:- "Updates multiple databases in a single batch operation.\n Permissions required: bb.databases.update",- requestSchemaRef:- "#/components/schemas/bytebase.v1.BatchUpdateDatabasesRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.BatchUpdateDatabasesResponse",- },- {- operationId: "bytebase.v1.DatabaseService.DiffSchema",- path: "/bytebase.v1.DatabaseService/DiffSchema",- service: "DatabaseService",- method: "DiffSchema",- summary: "DiffSchema",- description:- "Compares and generates migration statements between two schemas.\n Permissions required: bb.databases.get",- requestSchemaRef: "#/components/schemas/bytebase.v1.DiffSchemaRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.DiffSchemaResponse",- },- {- operationId: "bytebase.v1.DatabaseService.GetChangelog",- path: "/bytebase.v1.DatabaseService/GetChangelog",- service: "DatabaseService",- method: "GetChangelog",- summary: "GetChangelog",- description:- "Retrieves a specific changelog entry.\n Permissions required: bb.changelogs.get",- requestSchemaRef: "#/components/schemas/bytebase.v1.GetChangelogRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Changelog",- },- {- operationId: "bytebase.v1.DatabaseService.GetDatabase",- path: "/bytebase.v1.DatabaseService/GetDatabase",- service: "DatabaseService",- method: "GetDatabase",- summary: "GetDatabase",- description:- "Retrieves a database by name.\n Permissions required: bb.databases.get",- requestSchemaRef: "#/components/schemas/bytebase.v1.GetDatabaseRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Database",- },- {- operationId: "bytebase.v1.DatabaseService.GetDatabaseMetadata",- path: "/bytebase.v1.DatabaseService/GetDatabaseMetadata",- service: "DatabaseService",- method: "GetDatabaseMetadata",- summary: "GetDatabaseMetadata",- description:- "Retrieves database metadata including tables, columns, and indexes.\n Permissions required: bb.databases.getSchema",- requestSchemaRef:- "#/components/schemas/bytebase.v1.GetDatabaseMetadataRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.DatabaseMetadata",- },- {- operationId: "bytebase.v1.DatabaseService.GetDatabaseSDLSchema",- path: "/bytebase.v1.DatabaseService/GetDatabaseSDLSchema",- service: "DatabaseService",- method: "GetDatabaseSDLSchema",- summary: "GetDatabaseSDLSchema",- description:- "Retrieves database schema in SDL (Schema Definition Language) format.\n Permissions required: bb.databases.getSchema",- requestSchemaRef:- "#/components/schemas/bytebase.v1.GetDatabaseSDLSchemaRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.DatabaseSDLSchema",- },- {- operationId: "bytebase.v1.DatabaseService.GetDatabaseSchema",- path: "/bytebase.v1.DatabaseService/GetDatabaseSchema",- service: "DatabaseService",- method: "GetDatabaseSchema",- summary: "GetDatabaseSchema",- description:- "Retrieves database schema as DDL statements.\n Permissions required: bb.databases.getSchema",- requestSchemaRef:- "#/components/schemas/bytebase.v1.GetDatabaseSchemaRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.DatabaseSchema",- },- {- operationId: "bytebase.v1.DatabaseService.GetSchemaString",- path: "/bytebase.v1.DatabaseService/GetSchemaString",- service: "DatabaseService",- method: "GetSchemaString",- summary: "GetSchemaString",- description:- "Generates schema DDL for a database object.\n Permissions required: bb.databases.getSchema",- requestSchemaRef: "#/components/schemas/bytebase.v1.GetSchemaStringRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.GetSchemaStringResponse",- },- {- operationId: "bytebase.v1.DatabaseService.ListChangelogs",- path: "/bytebase.v1.DatabaseService/ListChangelogs",- service: "DatabaseService",- method: "ListChangelogs",- summary: "ListChangelogs",- description:- "Lists migration history for a database.\n Permissions required: bb.changelogs.list",- requestSchemaRef: "#/components/schemas/bytebase.v1.ListChangelogsRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.ListChangelogsResponse",- },- {- operationId: "bytebase.v1.DatabaseService.ListDatabases",- path: "/bytebase.v1.DatabaseService/ListDatabases",- service: "DatabaseService",- method: "ListDatabases",- summary: "ListDatabases",- description:- "Lists databases in a project, instance, or workspace.\n Permissions required: bb.projects.get (for project parent), bb.databases.list (for workspace parent), or bb.instances.get (for instance parent)",- requestSchemaRef: "#/components/schemas/bytebase.v1.ListDatabasesRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.ListDatabasesResponse",- },- {- operationId: "bytebase.v1.DatabaseService.SyncDatabase",- path: "/bytebase.v1.DatabaseService/SyncDatabase",- service: "DatabaseService",- method: "SyncDatabase",- summary: "SyncDatabase",- description:- "Synchronizes database schema from the instance.\n Permissions required: bb.databases.sync",- requestSchemaRef: "#/components/schemas/bytebase.v1.SyncDatabaseRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.SyncDatabaseResponse",- },- {- operationId: "bytebase.v1.DatabaseService.UpdateDatabase",- path: "/bytebase.v1.DatabaseService/UpdateDatabase",- service: "DatabaseService",- method: "UpdateDatabase",- summary: "UpdateDatabase",- description:- "Updates database properties such as labels and project assignment.\n Permissions required: bb.databases.update",- requestSchemaRef: "#/components/schemas/bytebase.v1.UpdateDatabaseRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Database",- },- {- operationId: "bytebase.v1.GroupService.BatchGetGroups",- path: "/bytebase.v1.GroupService/BatchGetGroups",- service: "GroupService",- method: "BatchGetGroups",- summary: "BatchGetGroups",- description:- "Gets multiple groups in a single request.\n Group members or users with bb.groups.get permission can get the group.\n Permissions required: bb.groups.get OR caller is the group member",- requestSchemaRef: "#/components/schemas/bytebase.v1.BatchGetGroupsRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.BatchGetGroupsResponse",- },- {- operationId: "bytebase.v1.GroupService.CreateGroup",- path: "/bytebase.v1.GroupService/CreateGroup",- service: "GroupService",- method: "CreateGroup",- summary: "CreateGroup",- description:- "Creates a new group.\n Permissions required: bb.groups.create",- requestSchemaRef: "#/components/schemas/bytebase.v1.CreateGroupRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Group",- },- {- operationId: "bytebase.v1.GroupService.DeleteGroup",- path: "/bytebase.v1.GroupService/DeleteGroup",- service: "GroupService",- method: "DeleteGroup",- summary: "DeleteGroup",- description:- "Deletes a group. Group owners or users with bb.groups.delete permission can delete.\n Permissions required: bb.groups.delete OR caller is group owner",- requestSchemaRef: "#/components/schemas/bytebase.v1.DeleteGroupRequest",- responseSchemaRef: "#/components/schemas/google.protobuf.Empty",- },- {- operationId: "bytebase.v1.GroupService.GetGroup",- path: "/bytebase.v1.GroupService/GetGroup",- service: "GroupService",- method: "GetGroup",- summary: "GetGroup",- description:- "Gets a group by name.\n Group members or users with bb.groups.get permission can get the group.\n Permissions required: bb.groups.get OR caller is the group member",- requestSchemaRef: "#/components/schemas/bytebase.v1.GetGroupRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Group",- },- {- operationId: "bytebase.v1.GroupService.ListGroups",- path: "/bytebase.v1.GroupService/ListGroups",- service: "GroupService",- method: "ListGroups",- summary: "ListGroups",- description:- "Lists all groups in the workspace.\n Permissions required: bb.groups.list",- requestSchemaRef: "#/components/schemas/bytebase.v1.ListGroupsRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.ListGroupsResponse",- },- {- operationId: "bytebase.v1.GroupService.UpdateGroup",- path: "/bytebase.v1.GroupService/UpdateGroup",- service: "GroupService",- method: "UpdateGroup",- summary: "UpdateGroup",- description:- "Updates a group. Group owners or users with bb.groups.update permission can update.\n Permissions required: bb.groups.update OR caller is group owner\n When allow_missing=true, also requires: bb.groups.create",- requestSchemaRef: "#/components/schemas/bytebase.v1.UpdateGroupRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Group",- },- {- operationId: "bytebase.v1.IdentityProviderService.CreateIdentityProvider",- path: "/bytebase.v1.IdentityProviderService/CreateIdentityProvider",- service: "IdentityProviderService",- method: "CreateIdentityProvider",- summary: "CreateIdentityProvider",- description:- "Creates a new identity provider.\n Permissions required: bb.identityProviders.create",- requestSchemaRef:- "#/components/schemas/bytebase.v1.CreateIdentityProviderRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.IdentityProvider",- },- {- operationId: "bytebase.v1.IdentityProviderService.DeleteIdentityProvider",- path: "/bytebase.v1.IdentityProviderService/DeleteIdentityProvider",- service: "IdentityProviderService",- method: "DeleteIdentityProvider",- summary: "DeleteIdentityProvider",- description:- "Deletes an identity provider.\n Permissions required: bb.identityProviders.delete",- requestSchemaRef:- "#/components/schemas/bytebase.v1.DeleteIdentityProviderRequest",- responseSchemaRef: "#/components/schemas/google.protobuf.Empty",- },- {- operationId: "bytebase.v1.IdentityProviderService.GetIdentityProvider",- path: "/bytebase.v1.IdentityProviderService/GetIdentityProvider",- service: "IdentityProviderService",- method: "GetIdentityProvider",- summary: "GetIdentityProvider",- description:- "Gets an identity provider by name.\n Permissions required: bb.identityProviders.get",- requestSchemaRef:- "#/components/schemas/bytebase.v1.GetIdentityProviderRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.IdentityProvider",- },- {- operationId: "bytebase.v1.IdentityProviderService.ListIdentityProviders",- path: "/bytebase.v1.IdentityProviderService/ListIdentityProviders",- service: "IdentityProviderService",- method: "ListIdentityProviders",- summary: "ListIdentityProviders",- description:- "Lists all configured identity providers (public endpoint for login page).\n Permissions required: None",- requestSchemaRef:- "#/components/schemas/bytebase.v1.ListIdentityProvidersRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.ListIdentityProvidersResponse",- },- {- operationId: "bytebase.v1.IdentityProviderService.TestIdentityProvider",- path: "/bytebase.v1.IdentityProviderService/TestIdentityProvider",- service: "IdentityProviderService",- method: "TestIdentityProvider",- summary: "TestIdentityProvider",- description:- "Tests the connection and configuration of an identity provider.\n Permissions required: bb.identityProviders.update",- requestSchemaRef:- "#/components/schemas/bytebase.v1.TestIdentityProviderRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.TestIdentityProviderResponse",- },- {- operationId: "bytebase.v1.IdentityProviderService.UpdateIdentityProvider",- path: "/bytebase.v1.IdentityProviderService/UpdateIdentityProvider",- service: "IdentityProviderService",- method: "UpdateIdentityProvider",- summary: "UpdateIdentityProvider",- description:- "Updates an identity provider.\n Permissions required: bb.identityProviders.update\n When allow_missing=true, also requires: bb.identityProviders.create",- requestSchemaRef:- "#/components/schemas/bytebase.v1.UpdateIdentityProviderRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.IdentityProvider",- },- {- operationId: "bytebase.v1.InstanceRoleService.ListInstanceRoles",- path: "/bytebase.v1.InstanceRoleService/ListInstanceRoles",- service: "InstanceRoleService",- method: "ListInstanceRoles",- summary: "ListInstanceRoles",- description:- "Lists all database roles in an instance.\n Permissions required: bb.instanceRoles.list",- requestSchemaRef:- "#/components/schemas/bytebase.v1.ListInstanceRolesRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.ListInstanceRolesResponse",- },- {- operationId: "bytebase.v1.InstanceService.AddDataSource",- path: "/bytebase.v1.InstanceService/AddDataSource",- service: "InstanceService",- method: "AddDataSource",- summary: "AddDataSource",- description:- "Adds a read-only data source to an instance.\n Permissions required: bb.instances.update",- requestSchemaRef: "#/components/schemas/bytebase.v1.AddDataSourceRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Instance",- },- {- operationId: "bytebase.v1.InstanceService.BatchSyncInstances",- path: "/bytebase.v1.InstanceService/BatchSyncInstances",- service: "InstanceService",- method: "BatchSyncInstances",- summary: "BatchSyncInstances",- description:- "Syncs multiple instances in a single request.\n Permissions required: bb.instances.sync",- requestSchemaRef:- "#/components/schemas/bytebase.v1.BatchSyncInstancesRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.BatchSyncInstancesResponse",- },- {- operationId: "bytebase.v1.InstanceService.BatchUpdateInstances",- path: "/bytebase.v1.InstanceService/BatchUpdateInstances",- service: "InstanceService",- method: "BatchUpdateInstances",- summary: "BatchUpdateInstances",- description:- "Updates multiple instances in a single request.\n Permissions required: bb.instances.update",- requestSchemaRef:- "#/components/schemas/bytebase.v1.BatchUpdateInstancesRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.BatchUpdateInstancesResponse",- },- {- operationId: "bytebase.v1.InstanceService.CreateInstance",- path: "/bytebase.v1.InstanceService/CreateInstance",- service: "InstanceService",- method: "CreateInstance",- summary: "CreateInstance",- description:- "Creates a new database instance.\n Permissions required: bb.instances.create",- requestSchemaRef: "#/components/schemas/bytebase.v1.CreateInstanceRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Instance",- },- {- operationId: "bytebase.v1.InstanceService.DeleteInstance",- path: "/bytebase.v1.InstanceService/DeleteInstance",- service: "InstanceService",- method: "DeleteInstance",- summary: "DeleteInstance",- description:- "Deletes or soft-deletes a database instance.\n Permissions required: bb.instances.delete",- requestSchemaRef: "#/components/schemas/bytebase.v1.DeleteInstanceRequest",- responseSchemaRef: "#/components/schemas/google.protobuf.Empty",- },- {- operationId: "bytebase.v1.InstanceService.GetInstance",- path: "/bytebase.v1.InstanceService/GetInstance",- service: "InstanceService",- method: "GetInstance",- summary: "GetInstance",- description:- "Gets a database instance by name.\n Permissions required: bb.instances.get",- requestSchemaRef: "#/components/schemas/bytebase.v1.GetInstanceRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Instance",- },- {- operationId: "bytebase.v1.InstanceService.ListInstanceDatabase",- path: "/bytebase.v1.InstanceService/ListInstanceDatabase",- service: "InstanceService",- method: "ListInstanceDatabase",- summary: "ListInstanceDatabase",- description:- "Lists all databases within an instance without creating them.\n Permissions required: bb.instances.get",- requestSchemaRef:- "#/components/schemas/bytebase.v1.ListInstanceDatabaseRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.ListInstanceDatabaseResponse",- },- {- operationId: "bytebase.v1.InstanceService.ListInstances",- path: "/bytebase.v1.InstanceService/ListInstances",- service: "InstanceService",- method: "ListInstances",- summary: "ListInstances",- description:- "Lists all database instances.\n Permissions required: bb.instances.list",- requestSchemaRef: "#/components/schemas/bytebase.v1.ListInstancesRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.ListInstancesResponse",- },- {- operationId: "bytebase.v1.InstanceService.RemoveDataSource",- path: "/bytebase.v1.InstanceService/RemoveDataSource",- service: "InstanceService",- method: "RemoveDataSource",- summary: "RemoveDataSource",- description:- "Removes a read-only data source from an instance.\n Permissions required: bb.instances.update",- requestSchemaRef:- "#/components/schemas/bytebase.v1.RemoveDataSourceRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Instance",- },- {- operationId: "bytebase.v1.InstanceService.SyncInstance",- path: "/bytebase.v1.InstanceService/SyncInstance",- service: "InstanceService",- method: "SyncInstance",- summary: "SyncInstance",- description:- "Syncs database schemas and metadata from an instance.\n Permissions required: bb.instances.sync",- requestSchemaRef: "#/components/schemas/bytebase.v1.SyncInstanceRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.SyncInstanceResponse",- },- {- operationId: "bytebase.v1.InstanceService.UndeleteInstance",- path: "/bytebase.v1.InstanceService/UndeleteInstance",- service: "InstanceService",- method: "UndeleteInstance",- summary: "UndeleteInstance",- description:- "Restores a soft-deleted database instance.\n Permissions required: bb.instances.undelete",- requestSchemaRef:- "#/components/schemas/bytebase.v1.UndeleteInstanceRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Instance",- },- {- operationId: "bytebase.v1.InstanceService.UpdateDataSource",- path: "/bytebase.v1.InstanceService/UpdateDataSource",- service: "InstanceService",- method: "UpdateDataSource",- summary: "UpdateDataSource",- description:- "Updates a data source configuration.\n Permissions required: bb.instances.update",- requestSchemaRef:- "#/components/schemas/bytebase.v1.UpdateDataSourceRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Instance",- },- {- operationId: "bytebase.v1.InstanceService.UpdateInstance",- path: "/bytebase.v1.InstanceService/UpdateInstance",- service: "InstanceService",- method: "UpdateInstance",- summary: "UpdateInstance",- description:- "Updates a database instance.\n Permissions required: bb.instances.update",- requestSchemaRef: "#/components/schemas/bytebase.v1.UpdateInstanceRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Instance",- },- {- operationId: "bytebase.v1.IssueService.ApproveIssue",- path: "/bytebase.v1.IssueService/ApproveIssue",- service: "IssueService",- method: "ApproveIssue",- summary: "ApproveIssue",- description:- "Approves an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step.\n Permissions required: None (determined by approval flow)",- requestSchemaRef: "#/components/schemas/bytebase.v1.ApproveIssueRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Issue",- },- {- operationId: "bytebase.v1.IssueService.BatchUpdateIssuesStatus",- path: "/bytebase.v1.IssueService/BatchUpdateIssuesStatus",- service: "IssueService",- method: "BatchUpdateIssuesStatus",- summary: "BatchUpdateIssuesStatus",- description:- "Updates the status of multiple issues in a single operation.\n Permissions required: bb.issues.update",- requestSchemaRef:- "#/components/schemas/bytebase.v1.BatchUpdateIssuesStatusRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.BatchUpdateIssuesStatusResponse",- },- {- operationId: "bytebase.v1.IssueService.CreateIssue",- path: "/bytebase.v1.IssueService/CreateIssue",- service: "IssueService",- method: "CreateIssue",- summary: "CreateIssue",- description:- "Creates a new issue for database changes or tasks.\n Permissions required: bb.issues.create",- requestSchemaRef: "#/components/schemas/bytebase.v1.CreateIssueRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Issue",- },- {- operationId: "bytebase.v1.IssueService.CreateIssueComment",- path: "/bytebase.v1.IssueService/CreateIssueComment",- service: "IssueService",- method: "CreateIssueComment",- summary: "CreateIssueComment",- description:- "Adds a comment to an issue.\n Permissions required: bb.issueComments.create",- requestSchemaRef:- "#/components/schemas/bytebase.v1.CreateIssueCommentRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.IssueComment",- },- {- operationId: "bytebase.v1.IssueService.GetIssue",- path: "/bytebase.v1.IssueService/GetIssue",- service: "IssueService",- method: "GetIssue",- summary: "GetIssue",- description:- "Retrieves an issue by name.\n Permissions required: bb.issues.get",- requestSchemaRef: "#/components/schemas/bytebase.v1.GetIssueRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Issue",- },- {- operationId: "bytebase.v1.IssueService.ListIssueComments",- path: "/bytebase.v1.IssueService/ListIssueComments",- service: "IssueService",- method: "ListIssueComments",- summary: "ListIssueComments",- description:- "Lists comments on an issue.\n Permissions required: bb.issueComments.list",- requestSchemaRef:- "#/components/schemas/bytebase.v1.ListIssueCommentsRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.ListIssueCommentsResponse",- },- {- operationId: "bytebase.v1.IssueService.ListIssues",- path: "/bytebase.v1.IssueService/ListIssues",- service: "IssueService",- method: "ListIssues",- summary: "ListIssues",- description:- "Lists issues in a project.\n Permissions required: bb.issues.list",- requestSchemaRef: "#/components/schemas/bytebase.v1.ListIssuesRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.ListIssuesResponse",- },- {- operationId: "bytebase.v1.IssueService.RejectIssue",- path: "/bytebase.v1.IssueService/RejectIssue",- service: "IssueService",- method: "RejectIssue",- summary: "RejectIssue",- description:- "Rejects an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step.\n Permissions required: None (determined by approval flow)",- requestSchemaRef: "#/components/schemas/bytebase.v1.RejectIssueRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Issue",- },- {- operationId: "bytebase.v1.IssueService.RequestIssue",- path: "/bytebase.v1.IssueService/RequestIssue",- service: "IssueService",- method: "RequestIssue",- summary: "RequestIssue",- description:- "Requests changes on an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step.\n Permissions required: None (determined by approval flow)",- requestSchemaRef: "#/components/schemas/bytebase.v1.RequestIssueRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Issue",- },- {- operationId: "bytebase.v1.IssueService.RetryIssueApproval",- path: "/bytebase.v1.IssueService/RetryIssueApproval",- service: "IssueService",- method: "RetryIssueApproval",- summary: "RetryIssueApproval",- description:- "Re-runs approval-template finding for an issue stuck in CHECKING.\n Useful when the synchronous post-create finding errored (e.g. against\n a malformed workspace approval rule) and the operator has since\n corrected it — without this, the issue would remain in CHECKING\n indefinitely because there is no other retry path for non-DATABASE_CHANGE\n issue types. Idempotent: returns the existing issue unchanged when\n approval-finding has already completed.\n Permissions required: None (caller must be the issue creator;\n mirrors RequestIssue's authorization model).",- requestSchemaRef:- "#/components/schemas/bytebase.v1.RetryIssueApprovalRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Issue",- },- {- operationId: "bytebase.v1.IssueService.SearchIssues",- path: "/bytebase.v1.IssueService/SearchIssues",- service: "IssueService",- method: "SearchIssues",- summary: "SearchIssues",- description:- "Search for issues that the caller has the bb.issues.get permission on and also satisfy the specified filter & query.\n Permissions required: bb.issues.get",- requestSchemaRef: "#/components/schemas/bytebase.v1.SearchIssuesRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.SearchIssuesResponse",- },- {- operationId: "bytebase.v1.IssueService.UpdateIssue",- path: "/bytebase.v1.IssueService/UpdateIssue",- service: "IssueService",- method: "UpdateIssue",- summary: "UpdateIssue",- description:- "Updates an issue's properties such as title, description, or labels.\n Permissions required: bb.issues.update",- requestSchemaRef: "#/components/schemas/bytebase.v1.UpdateIssueRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Issue",- },- {- operationId: "bytebase.v1.IssueService.UpdateIssueComment",- path: "/bytebase.v1.IssueService/UpdateIssueComment",- service: "IssueService",- method: "UpdateIssueComment",- summary: "UpdateIssueComment",- description:- "Updates an existing issue comment.\n Permissions required: bb.issueComments.update",- requestSchemaRef:- "#/components/schemas/bytebase.v1.UpdateIssueCommentRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.IssueComment",- },- {- operationId: "bytebase.v1.OrgPolicyService.CreatePolicy",- path: "/bytebase.v1.OrgPolicyService/CreatePolicy",- service: "OrgPolicyService",- method: "CreatePolicy",- summary: "CreatePolicy",- description:- "Creates a new organizational policy.\n Permissions required: bb.policies.create",- requestSchemaRef: "#/components/schemas/bytebase.v1.CreatePolicyRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Policy",- },- {- operationId: "bytebase.v1.OrgPolicyService.DeletePolicy",- path: "/bytebase.v1.OrgPolicyService/DeletePolicy",- service: "OrgPolicyService",- method: "DeletePolicy",- summary: "DeletePolicy",- description:- "Deletes an organizational policy.\n Permissions required: bb.policies.delete",- requestSchemaRef: "#/components/schemas/bytebase.v1.DeletePolicyRequest",- responseSchemaRef: "#/components/schemas/google.protobuf.Empty",- },- {- operationId: "bytebase.v1.OrgPolicyService.GetPolicy",- path: "/bytebase.v1.OrgPolicyService/GetPolicy",- service: "OrgPolicyService",- method: "GetPolicy",- summary: "GetPolicy",- description:- "Retrieves a policy by name.\n Permissions required: bb.policies.get",- requestSchemaRef: "#/components/schemas/bytebase.v1.GetPolicyRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Policy",- },- {- operationId: "bytebase.v1.OrgPolicyService.ListPolicies",- path: "/bytebase.v1.OrgPolicyService/ListPolicies",- service: "OrgPolicyService",- method: "ListPolicies",- summary: "ListPolicies",- description:- "Lists policies at a specified resource level.\n Permissions required: bb.policies.list",- requestSchemaRef: "#/components/schemas/bytebase.v1.ListPoliciesRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.ListPoliciesResponse",- },- {- operationId: "bytebase.v1.OrgPolicyService.UpdatePolicy",- path: "/bytebase.v1.OrgPolicyService/UpdatePolicy",- service: "OrgPolicyService",- method: "UpdatePolicy",- summary: "UpdatePolicy",- description:- "Updates an existing organizational policy.\n Permissions required: bb.policies.update",- requestSchemaRef: "#/components/schemas/bytebase.v1.UpdatePolicyRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Policy",- },- {- operationId: "bytebase.v1.PlanService.CancelPlanCheckRun",- path: "/bytebase.v1.PlanService/CancelPlanCheckRun",- service: "PlanService",- method: "CancelPlanCheckRun",- summary: "CancelPlanCheckRun",- description:- "Cancels the plan check run for a deployment plan.\n Permissions required: bb.planCheckRuns.run",- requestSchemaRef:- "#/components/schemas/bytebase.v1.CancelPlanCheckRunRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.CancelPlanCheckRunResponse",- },- {- operationId: "bytebase.v1.PlanService.CreatePlan",- path: "/bytebase.v1.PlanService/CreatePlan",- service: "PlanService",- method: "CreatePlan",- summary: "CreatePlan",- description:- "Creates a new deployment plan.\n Permissions required: bb.plans.create",- requestSchemaRef: "#/components/schemas/bytebase.v1.CreatePlanRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Plan",- },- {- operationId: "bytebase.v1.PlanService.GetPlan",- path: "/bytebase.v1.PlanService/GetPlan",- service: "PlanService",- method: "GetPlan",- summary: "GetPlan",- description:- "Retrieves a deployment plan by name.\n Permissions required: bb.plans.get",- requestSchemaRef: "#/components/schemas/bytebase.v1.GetPlanRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Plan",- },- {- operationId: "bytebase.v1.PlanService.GetPlanCheckRun",- path: "/bytebase.v1.PlanService/GetPlanCheckRun",- service: "PlanService",- method: "GetPlanCheckRun",- summary: "GetPlanCheckRun",- description:- "Gets the plan check run for a deployment plan.\n Permissions required: bb.planCheckRuns.get",- requestSchemaRef: "#/components/schemas/bytebase.v1.GetPlanCheckRunRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.PlanCheckRun",- },- {- operationId: "bytebase.v1.PlanService.ListPlans",- path: "/bytebase.v1.PlanService/ListPlans",- service: "PlanService",- method: "ListPlans",- summary: "ListPlans",- description:- "Lists deployment plans in a project.\n Permissions required: bb.plans.list",- requestSchemaRef: "#/components/schemas/bytebase.v1.ListPlansRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.ListPlansResponse",- },- {- operationId: "bytebase.v1.PlanService.RunPlanChecks",- path: "/bytebase.v1.PlanService/RunPlanChecks",- service: "PlanService",- method: "RunPlanChecks",- summary: "RunPlanChecks",- description:- "Executes validation checks on a deployment plan.\n Permissions required: bb.planCheckRuns.run",- requestSchemaRef: "#/components/schemas/bytebase.v1.RunPlanChecksRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.RunPlanChecksResponse",- },- {- operationId: "bytebase.v1.PlanService.UpdatePlan",- path: "/bytebase.v1.PlanService/UpdatePlan",- service: "PlanService",- method: "UpdatePlan",- summary: "UpdatePlan",- description:- "UpdatePlan updates the plan.\n The plan creator and the user with bb.plans.update permission on the project can update the plan.\n Permissions required: bb.plans.update (or creator)",- requestSchemaRef: "#/components/schemas/bytebase.v1.UpdatePlanRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Plan",- },- {- operationId: "bytebase.v1.ProjectService.AddWebhook",- path: "/bytebase.v1.ProjectService/AddWebhook",- service: "ProjectService",- method: "AddWebhook",- summary: "AddWebhook",- description:- "Adds a webhook to a project for notifications.\n Permissions required: bb.projects.update",- requestSchemaRef: "#/components/schemas/bytebase.v1.AddWebhookRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Project",- },- {- operationId: "bytebase.v1.ProjectService.BatchDeleteProjects",- path: "/bytebase.v1.ProjectService/BatchDeleteProjects",- service: "ProjectService",- method: "BatchDeleteProjects",- summary: "BatchDeleteProjects",- description:- "Deletes multiple projects in a single operation.\n Permissions required: bb.projects.delete",- requestSchemaRef:- "#/components/schemas/bytebase.v1.BatchDeleteProjectsRequest",- responseSchemaRef: "#/components/schemas/google.protobuf.Empty",- },- {- operationId: "bytebase.v1.ProjectService.BatchGetProjects",- path: "/bytebase.v1.ProjectService/BatchGetProjects",- service: "ProjectService",- method: "BatchGetProjects",- summary: "BatchGetProjects",- description:- "BatchGetProjects retrieves multiple projects by their names.\n Permissions required: bb.projects.get",- requestSchemaRef:- "#/components/schemas/bytebase.v1.BatchGetProjectsRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.BatchGetProjectsResponse",- },- {- operationId: "bytebase.v1.ProjectService.CreateProject",- path: "/bytebase.v1.ProjectService/CreateProject",- service: "ProjectService",- method: "CreateProject",- summary: "CreateProject",- description:- "Creates a new project in the workspace.\n Permissions required: bb.projects.create",- requestSchemaRef: "#/components/schemas/bytebase.v1.CreateProjectRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Project",- },- {- operationId: "bytebase.v1.ProjectService.DeleteProject",- path: "/bytebase.v1.ProjectService/DeleteProject",- service: "ProjectService",- method: "DeleteProject",- summary: "DeleteProject",- description:- "Deletes (soft-delete or purge) a project.\n Permissions required: bb.projects.delete",- requestSchemaRef: "#/components/schemas/bytebase.v1.DeleteProjectRequest",- responseSchemaRef: "#/components/schemas/google.protobuf.Empty",- },- {- operationId: "bytebase.v1.ProjectService.GetIamPolicy",- path: "/bytebase.v1.ProjectService/GetIamPolicy",- service: "ProjectService",- method: "GetIamPolicy",- summary: "GetIamPolicy",- description:- "Retrieves the IAM policy for a project.\n Permissions required: bb.projects.getIamPolicy",- requestSchemaRef: "#/components/schemas/bytebase.v1.GetIamPolicyRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.IamPolicy",- },- {- operationId: "bytebase.v1.ProjectService.GetProject",- path: "/bytebase.v1.ProjectService/GetProject",- service: "ProjectService",- method: "GetProject",- summary: "GetProject",- description:- 'GetProject retrieves a project by name.\n Users with "bb.projects.get" permission on the workspace or the project owner can access this method.\n Permissions required: bb.projects.get',- requestSchemaRef: "#/components/schemas/bytebase.v1.GetProjectRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Project",- },- {- operationId: "bytebase.v1.ProjectService.ListProjects",- path: "/bytebase.v1.ProjectService/ListProjects",- service: "ProjectService",- method: "ListProjects",- summary: "ListProjects",- description:- "Lists all projects in the workspace with optional filtering.\n Permissions required: bb.projects.list",- requestSchemaRef: "#/components/schemas/bytebase.v1.ListProjectsRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.ListProjectsResponse",- },- {- operationId: "bytebase.v1.ProjectService.RemoveWebhook",- path: "/bytebase.v1.ProjectService/RemoveWebhook",- service: "ProjectService",- method: "RemoveWebhook",- summary: "RemoveWebhook",- description:- "Removes a webhook from a project.\n Permissions required: bb.projects.update",- requestSchemaRef: "#/components/schemas/bytebase.v1.RemoveWebhookRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Project",- },- {- operationId: "bytebase.v1.ProjectService.SearchProjects",- path: "/bytebase.v1.ProjectService/SearchProjects",- service: "ProjectService",- method: "SearchProjects",- summary: "SearchProjects",- description:- "Searches for projects with advanced filtering capabilities.\n Permissions required: bb.projects.get (or project-level bb.projects.get for specific projects)",- requestSchemaRef: "#/components/schemas/bytebase.v1.SearchProjectsRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.SearchProjectsResponse",- },- {- operationId: "bytebase.v1.ProjectService.SetIamPolicy",- path: "/bytebase.v1.ProjectService/SetIamPolicy",- service: "ProjectService",- method: "SetIamPolicy",- summary: "SetIamPolicy",- description:- "Sets the IAM policy for a project.\n Permissions required: bb.projects.setIamPolicy",- requestSchemaRef: "#/components/schemas/bytebase.v1.SetIamPolicyRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.IamPolicy",- },- {- operationId: "bytebase.v1.ProjectService.TestWebhook",- path: "/bytebase.v1.ProjectService/TestWebhook",- service: "ProjectService",- method: "TestWebhook",- summary: "TestWebhook",- description:- "Tests a webhook by sending a test notification.\n Permissions required: bb.projects.update",- requestSchemaRef: "#/components/schemas/bytebase.v1.TestWebhookRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.TestWebhookResponse",- },- {- operationId: "bytebase.v1.ProjectService.UndeleteProject",- path: "/bytebase.v1.ProjectService/UndeleteProject",- service: "ProjectService",- method: "UndeleteProject",- summary: "UndeleteProject",- description:- "Restores a soft-deleted project.\n Permissions required: bb.projects.undelete",- requestSchemaRef: "#/components/schemas/bytebase.v1.UndeleteProjectRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Project",- },- {- operationId: "bytebase.v1.ProjectService.UpdateProject",- path: "/bytebase.v1.ProjectService/UpdateProject",- service: "ProjectService",- method: "UpdateProject",- summary: "UpdateProject",- description:- "Updates an existing project's properties.\n Permissions required: bb.projects.update",- requestSchemaRef: "#/components/schemas/bytebase.v1.UpdateProjectRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Project",- },- {- operationId: "bytebase.v1.ProjectService.UpdateWebhook",- path: "/bytebase.v1.ProjectService/UpdateWebhook",- service: "ProjectService",- method: "UpdateWebhook",- summary: "UpdateWebhook",- description:- "Updates an existing webhook configuration.\n Permissions required: bb.projects.update",- requestSchemaRef: "#/components/schemas/bytebase.v1.UpdateWebhookRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Project",- },- {- operationId: "bytebase.v1.ReleaseService.CheckRelease",- path: "/bytebase.v1.ReleaseService/CheckRelease",- service: "ReleaseService",- method: "CheckRelease",- summary: "CheckRelease",- description:- "Validates a release by dry-running checks on target databases.\n Permissions required: bb.releases.check",- requestSchemaRef: "#/components/schemas/bytebase.v1.CheckReleaseRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.CheckReleaseResponse",- },- {- operationId: "bytebase.v1.ReleaseService.CreateRelease",- path: "/bytebase.v1.ReleaseService/CreateRelease",- service: "ReleaseService",- method: "CreateRelease",- summary: "CreateRelease",- description:- "Creates a new release with SQL files.\n Permissions required: bb.releases.create",- requestSchemaRef: "#/components/schemas/bytebase.v1.CreateReleaseRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Release",- },- {- operationId: "bytebase.v1.ReleaseService.DeleteRelease",- path: "/bytebase.v1.ReleaseService/DeleteRelease",- service: "ReleaseService",- method: "DeleteRelease",- summary: "DeleteRelease",- description:- "Deletes a release.\n Permissions required: bb.releases.delete",- requestSchemaRef: "#/components/schemas/bytebase.v1.DeleteReleaseRequest",- responseSchemaRef: "#/components/schemas/google.protobuf.Empty",- },- {- operationId: "bytebase.v1.ReleaseService.GetRelease",- path: "/bytebase.v1.ReleaseService/GetRelease",- service: "ReleaseService",- method: "GetRelease",- summary: "GetRelease",- description:- "Retrieves a release by name.\n Permissions required: bb.releases.get",- requestSchemaRef: "#/components/schemas/bytebase.v1.GetReleaseRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Release",- },- {- operationId: "bytebase.v1.ReleaseService.ListReleaseCategories",- path: "/bytebase.v1.ReleaseService/ListReleaseCategories",- service: "ReleaseService",- method: "ListReleaseCategories",- summary: "ListReleaseCategories",- description:- "Lists all unique categories in a project.\n Permissions required: bb.releases.list",- requestSchemaRef:- "#/components/schemas/bytebase.v1.ListReleaseCategoriesRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.ListReleaseCategoriesResponse",- },- {- operationId: "bytebase.v1.ReleaseService.ListReleases",- path: "/bytebase.v1.ReleaseService/ListReleases",- service: "ReleaseService",- method: "ListReleases",- summary: "ListReleases",- description:- "Lists releases in a project.\n Permissions required: bb.releases.list",- requestSchemaRef: "#/components/schemas/bytebase.v1.ListReleasesRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.ListReleasesResponse",- },- {- operationId: "bytebase.v1.ReleaseService.UndeleteRelease",- path: "/bytebase.v1.ReleaseService/UndeleteRelease",- service: "ReleaseService",- method: "UndeleteRelease",- summary: "UndeleteRelease",- description:- "Restores a deleted release.\n Permissions required: bb.releases.undelete",- requestSchemaRef: "#/components/schemas/bytebase.v1.UndeleteReleaseRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Release",- },- {- operationId: "bytebase.v1.ReleaseService.UpdateRelease",- path: "/bytebase.v1.ReleaseService/UpdateRelease",- service: "ReleaseService",- method: "UpdateRelease",- summary: "UpdateRelease",- description:- "Updates an existing release.\n Permissions required: bb.releases.update\n When allow_missing=true, also requires: bb.releases.create",- requestSchemaRef: "#/components/schemas/bytebase.v1.UpdateReleaseRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Release",- },- {- operationId: "bytebase.v1.ReviewConfigService.CreateReviewConfig",- path: "/bytebase.v1.ReviewConfigService/CreateReviewConfig",- service: "ReviewConfigService",- method: "CreateReviewConfig",- summary: "CreateReviewConfig",- description:- "Creates a new SQL review configuration.\n Permissions required: bb.reviewConfigs.create",- requestSchemaRef:- "#/components/schemas/bytebase.v1.CreateReviewConfigRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.ReviewConfig",- },- {- operationId: "bytebase.v1.ReviewConfigService.DeleteReviewConfig",- path: "/bytebase.v1.ReviewConfigService/DeleteReviewConfig",- service: "ReviewConfigService",- method: "DeleteReviewConfig",- summary: "DeleteReviewConfig",- description:- "Deletes a SQL review configuration.\n Permissions required: bb.reviewConfigs.delete",- requestSchemaRef:- "#/components/schemas/bytebase.v1.DeleteReviewConfigRequest",- responseSchemaRef: "#/components/schemas/google.protobuf.Empty",- },- {- operationId: "bytebase.v1.ReviewConfigService.GetReviewConfig",- path: "/bytebase.v1.ReviewConfigService/GetReviewConfig",- service: "ReviewConfigService",- method: "GetReviewConfig",- summary: "GetReviewConfig",- description:- "Retrieves a SQL review configuration by name.\n Permissions required: bb.reviewConfigs.get",- requestSchemaRef: "#/components/schemas/bytebase.v1.GetReviewConfigRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.ReviewConfig",- },- {- operationId: "bytebase.v1.ReviewConfigService.ListReviewConfigs",- path: "/bytebase.v1.ReviewConfigService/ListReviewConfigs",- service: "ReviewConfigService",- method: "ListReviewConfigs",- summary: "ListReviewConfigs",- description:- "Lists all SQL review configurations.\n Permissions required: bb.reviewConfigs.list",- requestSchemaRef:- "#/components/schemas/bytebase.v1.ListReviewConfigsRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.ListReviewConfigsResponse",- },- {- operationId: "bytebase.v1.ReviewConfigService.UpdateReviewConfig",- path: "/bytebase.v1.ReviewConfigService/UpdateReviewConfig",- service: "ReviewConfigService",- method: "UpdateReviewConfig",- summary: "UpdateReviewConfig",- description:- "Updates a SQL review configuration.\n Permissions required: bb.reviewConfigs.update\n When allow_missing=true, also requires: bb.reviewConfigs.create",- requestSchemaRef:- "#/components/schemas/bytebase.v1.UpdateReviewConfigRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.ReviewConfig",- },- {- operationId: "bytebase.v1.RevisionService.BatchCreateRevisions",- path: "/bytebase.v1.RevisionService/BatchCreateRevisions",- service: "RevisionService",- method: "BatchCreateRevisions",- summary: "BatchCreateRevisions",- description:- "Creates multiple schema revisions in a single operation.\n Permissions required: bb.revisions.create",- requestSchemaRef:- "#/components/schemas/bytebase.v1.BatchCreateRevisionsRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.BatchCreateRevisionsResponse",- },- {- operationId: "bytebase.v1.RevisionService.DeleteRevision",- path: "/bytebase.v1.RevisionService/DeleteRevision",- service: "RevisionService",- method: "DeleteRevision",- summary: "DeleteRevision",- description:- "Deletes a schema revision.\n Permissions required: bb.revisions.delete",- requestSchemaRef: "#/components/schemas/bytebase.v1.DeleteRevisionRequest",- responseSchemaRef: "#/components/schemas/google.protobuf.Empty",- },- {- operationId: "bytebase.v1.RevisionService.GetRevision",- path: "/bytebase.v1.RevisionService/GetRevision",- service: "RevisionService",- method: "GetRevision",- summary: "GetRevision",- description:- "Retrieves a schema revision by name.\n Permissions required: bb.revisions.get",- requestSchemaRef: "#/components/schemas/bytebase.v1.GetRevisionRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Revision",- },- {- operationId: "bytebase.v1.RevisionService.ListRevisions",- path: "/bytebase.v1.RevisionService/ListRevisions",- service: "RevisionService",- method: "ListRevisions",- summary: "ListRevisions",- description:- "Lists schema revisions for a database.\n Permissions required: bb.revisions.list",- requestSchemaRef: "#/components/schemas/bytebase.v1.ListRevisionsRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.ListRevisionsResponse",- },- {- operationId: "bytebase.v1.RoleService.CreateRole",- path: "/bytebase.v1.RoleService/CreateRole",- service: "RoleService",- method: "CreateRole",- summary: "CreateRole",- description:- "Creates a new custom role.\n Permissions required: bb.roles.create",- requestSchemaRef: "#/components/schemas/bytebase.v1.CreateRoleRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Role",- },- {- operationId: "bytebase.v1.RoleService.DeleteRole",- path: "/bytebase.v1.RoleService/DeleteRole",- service: "RoleService",- method: "DeleteRole",- summary: "DeleteRole",- description:- "Deletes a custom role.\n Permissions required: bb.roles.delete",- requestSchemaRef: "#/components/schemas/bytebase.v1.DeleteRoleRequest",- responseSchemaRef: "#/components/schemas/google.protobuf.Empty",- },- {- operationId: "bytebase.v1.RoleService.GetRole",- path: "/bytebase.v1.RoleService/GetRole",- service: "RoleService",- method: "GetRole",- summary: "GetRole",- description:- "Retrieves a role by name.\n Permissions required: bb.roles.get",- requestSchemaRef: "#/components/schemas/bytebase.v1.GetRoleRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Role",- },- {- operationId: "bytebase.v1.RoleService.ListRoles",- path: "/bytebase.v1.RoleService/ListRoles",- service: "RoleService",- method: "ListRoles",- summary: "ListRoles",- description:- "Lists roles in the workspace.\n Permissions required: bb.roles.list",- requestSchemaRef: "#/components/schemas/bytebase.v1.ListRolesRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.ListRolesResponse",- },- {- operationId: "bytebase.v1.RoleService.UpdateRole",- path: "/bytebase.v1.RoleService/UpdateRole",- service: "RoleService",- method: "UpdateRole",- summary: "UpdateRole",- description:- "Updates a role's properties.\n Permissions required: bb.roles.update\n When allow_missing=true, also requires: bb.roles.create",- requestSchemaRef: "#/components/schemas/bytebase.v1.UpdateRoleRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Role",- },- {- operationId: "bytebase.v1.RolloutService.BatchCancelTaskRuns",- path: "/bytebase.v1.RolloutService/BatchCancelTaskRuns",- service: "RolloutService",- method: "BatchCancelTaskRuns",- summary: "BatchCancelTaskRuns",- description:- "Cancels multiple task runs.\n PENDING and AVAILABLE task runs are moved to CANCELED synchronously. RUNNING task runs receive\n a best-effort cancellation request and may continue running if the request is missed or the\n executor does not stop. The response does not report which task runs were actually canceled.\n Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment)",- requestSchemaRef:- "#/components/schemas/bytebase.v1.BatchCancelTaskRunsRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.BatchCancelTaskRunsResponse",- },- {- operationId: "bytebase.v1.RolloutService.BatchRunTasks",- path: "/bytebase.v1.RolloutService/BatchRunTasks",- service: "RolloutService",- method: "BatchRunTasks",- summary: "BatchRunTasks",- description:- "Executes multiple tasks in a rollout stage.\n Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment)",- requestSchemaRef: "#/components/schemas/bytebase.v1.BatchRunTasksRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.BatchRunTasksResponse",- },- {- operationId: "bytebase.v1.RolloutService.BatchSkipTasks",- path: "/bytebase.v1.RolloutService/BatchSkipTasks",- service: "RolloutService",- method: "BatchSkipTasks",- summary: "BatchSkipTasks",- description:- "Skips multiple tasks in a rollout stage.\n Permissions required: bb.taskRuns.create (or issue creator for data export issues, or user with rollout policy role for the environment)",- requestSchemaRef: "#/components/schemas/bytebase.v1.BatchSkipTasksRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.BatchSkipTasksResponse",- },- {- operationId: "bytebase.v1.RolloutService.CreateRollout",- path: "/bytebase.v1.RolloutService/CreateRollout",- service: "RolloutService",- method: "CreateRollout",- summary: "CreateRollout",- description:- "Creates a new rollout for a plan.\n Permissions required: bb.rollouts.create (or issue creator for data export issues)",- requestSchemaRef: "#/components/schemas/bytebase.v1.CreateRolloutRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Rollout",- },- {- operationId: "bytebase.v1.RolloutService.GetRollout",- path: "/bytebase.v1.RolloutService/GetRollout",- service: "RolloutService",- method: "GetRollout",- summary: "GetRollout",- description:- "Retrieves a rollout by its plan name.\n Permissions required: bb.rollouts.get",- requestSchemaRef: "#/components/schemas/bytebase.v1.GetRolloutRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Rollout",- },- {- operationId: "bytebase.v1.RolloutService.GetTaskRun",- path: "/bytebase.v1.RolloutService/GetTaskRun",- service: "RolloutService",- method: "GetTaskRun",- summary: "GetTaskRun",- description:- "Retrieves a task run by name.\n Permissions required: bb.taskRuns.list",- requestSchemaRef: "#/components/schemas/bytebase.v1.GetTaskRunRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.TaskRun",- },- {- operationId: "bytebase.v1.RolloutService.GetTaskRunLog",- path: "/bytebase.v1.RolloutService/GetTaskRunLog",- service: "RolloutService",- method: "GetTaskRunLog",- summary: "GetTaskRunLog",- description:- "Retrieves execution logs for a task run.\n Permissions required: bb.taskRuns.list",- requestSchemaRef: "#/components/schemas/bytebase.v1.GetTaskRunLogRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.TaskRunLog",- },- {- operationId: "bytebase.v1.RolloutService.GetTaskRunSession",- path: "/bytebase.v1.RolloutService/GetTaskRunSession",- service: "RolloutService",- method: "GetTaskRunSession",- summary: "GetTaskRunSession",- description:- "Retrieves database session information for a running task.\n Permissions required: bb.taskRuns.list",- requestSchemaRef:- "#/components/schemas/bytebase.v1.GetTaskRunSessionRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.TaskRunSession",- },- {- operationId: "bytebase.v1.RolloutService.ListRollouts",- path: "/bytebase.v1.RolloutService/ListRollouts",- service: "RolloutService",- method: "ListRollouts",- summary: "ListRollouts",- description:- "Lists rollouts in a project.\n Permissions required: bb.rollouts.list",- requestSchemaRef: "#/components/schemas/bytebase.v1.ListRolloutsRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.ListRolloutsResponse",- },- {- operationId: "bytebase.v1.RolloutService.ListTaskRuns",- path: "/bytebase.v1.RolloutService/ListTaskRuns",- service: "RolloutService",- method: "ListTaskRuns",- summary: "ListTaskRuns",- description:- "Lists task run executions for a task.\n Permissions required: bb.taskRuns.list",- requestSchemaRef: "#/components/schemas/bytebase.v1.ListTaskRunsRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.ListTaskRunsResponse",- },- {- operationId: "bytebase.v1.RolloutService.PreviewTaskRunRollback",- path: "/bytebase.v1.RolloutService/PreviewTaskRunRollback",- service: "RolloutService",- method: "PreviewTaskRunRollback",- summary: "PreviewTaskRunRollback",- description:- "Generates rollback SQL for a completed task run.\n Permissions required: bb.taskRuns.list",- requestSchemaRef:- "#/components/schemas/bytebase.v1.PreviewTaskRunRollbackRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.PreviewTaskRunRollbackResponse",- },- {- operationId: "bytebase.v1.SQLService.AICompletion",- path: "/bytebase.v1.SQLService/AICompletion",- service: "SQLService",- method: "AICompletion",- summary: "AICompletion",- description:- "Provides AI-powered SQL completion and generation.\n Permissions required: None (authenticated users only, requires AI to be enabled)",- requestSchemaRef: "#/components/schemas/bytebase.v1.AICompletionRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.AICompletionResponse",- },- {- operationId: "bytebase.v1.SQLService.DiffMetadata",- path: "/bytebase.v1.SQLService/DiffMetadata",- service: "SQLService",- method: "DiffMetadata",- summary: "DiffMetadata",- description:- "Computes schema differences between two database metadata.\n Permissions required: None",- requestSchemaRef: "#/components/schemas/bytebase.v1.DiffMetadataRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.DiffMetadataResponse",- },- {- operationId: "bytebase.v1.SQLService.Export",- path: "/bytebase.v1.SQLService/Export",- service: "SQLService",- method: "Export",- summary: "Export",- description:- "Exports query results to a file format.\n Permissions required: bb.databases.get",- requestSchemaRef: "#/components/schemas/bytebase.v1.ExportRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.ExportResponse",- },- {- operationId: "bytebase.v1.SQLService.GetQueryHistory",- path: "/bytebase.v1.SQLService/GetQueryHistory",- service: "SQLService",- method: "GetQueryHistory",- summary: "GetQueryHistory",- description:- "GetQueryHistory gets a single query history for the caller.\n Permissions required: None (only returns the caller's own query history)",- requestSchemaRef: "#/components/schemas/bytebase.v1.GetQueryHistoryRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.QueryHistory",- },- {- operationId: "bytebase.v1.SQLService.Query",- path: "/bytebase.v1.SQLService/Query",- service: "SQLService",- method: "Query",- summary: "Query",- description:- "Executes a read-only SQL query against a database.\n Permissions required: bb.databases.get",- requestSchemaRef: "#/components/schemas/bytebase.v1.QueryRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.QueryResponse",- },- {- operationId: "bytebase.v1.SQLService.SearchQueryHistories",- path: "/bytebase.v1.SQLService/SearchQueryHistories",- service: "SQLService",- method: "SearchQueryHistories",- summary: "SearchQueryHistories",- description:- "SearchQueryHistories searches query histories for the caller.\n Permissions required: None (only returns caller's own query histories)",- requestSchemaRef:- "#/components/schemas/bytebase.v1.SearchQueryHistoriesRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.SearchQueryHistoriesResponse",- },- {- operationId: "bytebase.v1.ServiceAccountService.CreateServiceAccount",- path: "/bytebase.v1.ServiceAccountService/CreateServiceAccount",- service: "ServiceAccountService",- method: "CreateServiceAccount",- summary: "CreateServiceAccount",- description:- "Creates a new service account.\n For workspace-level: parent is workspaces/{id}, permission bb.serviceAccounts.create on workspace.\n For project-level: parent is projects/{project}, permission bb.serviceAccounts.create on project.",- requestSchemaRef:- "#/components/schemas/bytebase.v1.CreateServiceAccountRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.ServiceAccount",- },- {- operationId: "bytebase.v1.ServiceAccountService.DeleteServiceAccount",- path: "/bytebase.v1.ServiceAccountService/DeleteServiceAccount",- service: "ServiceAccountService",- method: "DeleteServiceAccount",- summary: "DeleteServiceAccount",- description:- "Deletes a service account.\n Permissions required: bb.serviceAccounts.delete",- requestSchemaRef:- "#/components/schemas/bytebase.v1.DeleteServiceAccountRequest",- responseSchemaRef: "#/components/schemas/google.protobuf.Empty",- },- {- operationId: "bytebase.v1.ServiceAccountService.GetServiceAccount",- path: "/bytebase.v1.ServiceAccountService/GetServiceAccount",- service: "ServiceAccountService",- method: "GetServiceAccount",- summary: "GetServiceAccount",- description:- "Gets a service account by name.\n Permissions required: bb.serviceAccounts.get",- requestSchemaRef:- "#/components/schemas/bytebase.v1.GetServiceAccountRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.ServiceAccount",- },- {- operationId: "bytebase.v1.ServiceAccountService.ListServiceAccounts",- path: "/bytebase.v1.ServiceAccountService/ListServiceAccounts",- service: "ServiceAccountService",- method: "ListServiceAccounts",- summary: "ListServiceAccounts",- description:- "Lists service accounts.\n For workspace-level: parent is workspaces/{id}, permission bb.serviceAccounts.list on workspace.\n For project-level: parent is projects/{project}, permission bb.serviceAccounts.list on project.",- requestSchemaRef:- "#/components/schemas/bytebase.v1.ListServiceAccountsRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.ListServiceAccountsResponse",- },- {- operationId: "bytebase.v1.ServiceAccountService.UndeleteServiceAccount",- path: "/bytebase.v1.ServiceAccountService/UndeleteServiceAccount",- service: "ServiceAccountService",- method: "UndeleteServiceAccount",- summary: "UndeleteServiceAccount",- description:- "Restores a deleted service account.\n Permissions required: bb.serviceAccounts.undelete",- requestSchemaRef:- "#/components/schemas/bytebase.v1.UndeleteServiceAccountRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.ServiceAccount",- },- {- operationId: "bytebase.v1.ServiceAccountService.UpdateServiceAccount",- path: "/bytebase.v1.ServiceAccountService/UpdateServiceAccount",- service: "ServiceAccountService",- method: "UpdateServiceAccount",- summary: "UpdateServiceAccount",- description:- "Updates a service account.\n Permissions required: bb.serviceAccounts.update",- requestSchemaRef:- "#/components/schemas/bytebase.v1.UpdateServiceAccountRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.ServiceAccount",- },- {- operationId: "bytebase.v1.SettingService.GetSetting",- path: "/bytebase.v1.SettingService/GetSetting",- service: "SettingService",- method: "GetSetting",- summary: "GetSetting",- description:- "Retrieves a workspace setting by name.\n Permissions required: bb.settings.get",- requestSchemaRef: "#/components/schemas/bytebase.v1.GetSettingRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Setting",- },- {- operationId: "bytebase.v1.SettingService.ListSettings",- path: "/bytebase.v1.SettingService/ListSettings",- service: "SettingService",- method: "ListSettings",- summary: "ListSettings",- description:- "Lists all workspace settings.\n Permissions required: bb.settings.list",- requestSchemaRef: "#/components/schemas/bytebase.v1.ListSettingsRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.ListSettingsResponse",- },- {- operationId: "bytebase.v1.SettingService.TestEmailSetting",- path: "/bytebase.v1.SettingService/TestEmailSetting",- service: "SettingService",- method: "TestEmailSetting",- summary: "TestEmailSetting",- description:- "Sends a test email using the provided config (without persisting).\n Permissions required: bb.settings.set",- requestSchemaRef:- "#/components/schemas/bytebase.v1.TestEmailSettingRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.TestEmailSettingResponse",- },- {- operationId: "bytebase.v1.SettingService.UpdateSetting",- path: "/bytebase.v1.SettingService/UpdateSetting",- service: "SettingService",- method: "UpdateSetting",- summary: "UpdateSetting",- description:- "Updates a workspace setting.\n Permissions required: bb.settings.set",- requestSchemaRef: "#/components/schemas/bytebase.v1.UpdateSettingRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Setting",- },- {- operationId: "bytebase.v1.SheetService.BatchCreateSheets",- path: "/bytebase.v1.SheetService/BatchCreateSheets",- service: "SheetService",- method: "BatchCreateSheets",- summary: "BatchCreateSheets",- description:- "Creates multiple SQL sheets in a single operation.\n Permissions required: bb.sheets.create",- requestSchemaRef:- "#/components/schemas/bytebase.v1.BatchCreateSheetsRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.BatchCreateSheetsResponse",- },- {- operationId: "bytebase.v1.SheetService.CreateSheet",- path: "/bytebase.v1.SheetService/CreateSheet",- service: "SheetService",- method: "CreateSheet",- summary: "CreateSheet",- description:- "Creates a new SQL sheet.\n Permissions required: bb.sheets.create",- requestSchemaRef: "#/components/schemas/bytebase.v1.CreateSheetRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Sheet",- },- {- operationId: "bytebase.v1.SheetService.GetSheet",- path: "/bytebase.v1.SheetService/GetSheet",- service: "SheetService",- method: "GetSheet",- summary: "GetSheet",- description:- "Retrieves a SQL sheet by name.\n Permissions required: bb.sheets.get",- requestSchemaRef: "#/components/schemas/bytebase.v1.GetSheetRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Sheet",- },- {- operationId: "bytebase.v1.SubscriptionService.CancelPurchase",- path: "/bytebase.v1.SubscriptionService/CancelPurchase",- service: "SubscriptionService",- method: "CancelPurchase",- summary: "CancelPurchase",- description: "CancelPurchase cancels an active subscription (SaaS only).",- requestSchemaRef: "#/components/schemas/bytebase.v1.CancelPurchaseRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.PurchaseResponse",- },- {- operationId: "bytebase.v1.SubscriptionService.CreatePurchase",- path: "/bytebase.v1.SubscriptionService/CreatePurchase",- service: "SubscriptionService",- method: "CreatePurchase",- summary: "CreatePurchase",- description:- "CreatePurchase creates a new subscription purchase (SaaS only).\n Returns a Stripe Checkout URL for the user to complete payment.",- requestSchemaRef: "#/components/schemas/bytebase.v1.CreatePurchaseRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.PurchaseResponse",- },- {- operationId: "bytebase.v1.SubscriptionService.ExportVCSProviderUsers",- path: "/bytebase.v1.SubscriptionService/ExportVCSProviderUsers",- service: "SubscriptionService",- method: "ExportVCSProviderUsers",- summary: "ExportVCSProviderUsers",- description: "Exports active VCS users as CSV.",- requestSchemaRef:- "#/components/schemas/bytebase.v1.ExportVCSProviderUsersRequest",- responseSchemaRef: "#/components/schemas/google.api.HttpBody",- },- {- operationId: "bytebase.v1.SubscriptionService.GetPaymentInfo",- path: "/bytebase.v1.SubscriptionService/GetPaymentInfo",- service: "SubscriptionService",- method: "GetPaymentInfo",- summary: "GetPaymentInfo",- description:- "GetPaymentInfo returns payment details for the current subscription (SaaS only).",- requestSchemaRef: "#/components/schemas/bytebase.v1.GetPaymentInfoRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.PaymentInfo",- },- {- operationId: "bytebase.v1.SubscriptionService.GetSubscription",- path: "/bytebase.v1.SubscriptionService/GetSubscription",- service: "SubscriptionService",- method: "GetSubscription",- summary: "GetSubscription",- description:- "GetSubscription returns the current subscription.\n If there is no license, we will return a free plan subscription without expiration time.\n If there is expired license, we will return a free plan subscription with the expiration time of the expired license.",- requestSchemaRef: "#/components/schemas/bytebase.v1.GetSubscriptionRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Subscription",- },- {- operationId: "bytebase.v1.SubscriptionService.ListPurchasePlans",- path: "/bytebase.v1.SubscriptionService/ListPurchasePlans",- service: "SubscriptionService",- method: "ListPurchasePlans",- summary: "ListPurchasePlans",- description:- "ListPurchasePlans returns available plans for self-service purchase.",- requestSchemaRef:- "#/components/schemas/bytebase.v1.ListPurchasePlansRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.ListPurchasePlansResponse",- },- {- operationId: "bytebase.v1.SubscriptionService.UpdatePurchase",- path: "/bytebase.v1.SubscriptionService/UpdatePurchase",- service: "SubscriptionService",- method: "UpdatePurchase",- summary: "UpdatePurchase",- description:- "UpdatePurchase updates an existing subscription (SaaS only).\n May return a Stripe Checkout URL if payment method change is needed.",- requestSchemaRef: "#/components/schemas/bytebase.v1.UpdatePurchaseRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.PurchaseResponse",- },- {- operationId: "bytebase.v1.SubscriptionService.UploadLicense",- path: "/bytebase.v1.SubscriptionService/UploadLicense",- service: "SubscriptionService",- method: "UploadLicense",- summary: "UploadLicense",- description: "Uploads an enterprise license (self-hosted only).",- requestSchemaRef: "#/components/schemas/bytebase.v1.UploadLicenseRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Subscription",- },- {- operationId: "bytebase.v1.SubscriptionService.VerifyCheckoutSession",- path: "/bytebase.v1.SubscriptionService/VerifyCheckoutSession",- service: "SubscriptionService",- method: "VerifyCheckoutSession",- summary: "VerifyCheckoutSession",- description:- "VerifyCheckoutSession verifies a Stripe Checkout Session status (SaaS only).",- requestSchemaRef:- "#/components/schemas/bytebase.v1.VerifyCheckoutSessionRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.VerifyCheckoutSessionResponse",- },- {- operationId: "bytebase.v1.UserService.BatchGetUsers",- path: "/bytebase.v1.UserService/BatchGetUsers",- service: "UserService",- method: "BatchGetUsers",- summary: "BatchGetUsers",- description:- "Get the users in batch.\n Any authenticated user can batch get users.\n Permissions required: bb.users.get",- requestSchemaRef: "#/components/schemas/bytebase.v1.BatchGetUsersRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.BatchGetUsersResponse",- },- {- operationId: "bytebase.v1.UserService.CreateUser",- path: "/bytebase.v1.UserService/CreateUser",- service: "UserService",- method: "CreateUser",- summary: "CreateUser",- description:- "Creates a user in the caller's workspace (admin action, self-hosted only).\n In SaaS mode, admins should add users via workspace IAM policy instead.\n Permissions required: bb.users.create",- requestSchemaRef: "#/components/schemas/bytebase.v1.CreateUserRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.User",- },- {- operationId: "bytebase.v1.UserService.DeleteUser",- path: "/bytebase.v1.UserService/DeleteUser",- service: "UserService",- method: "DeleteUser",- summary: "DeleteUser",- description:- "Deletes a user. Requires bb.users.delete permission with additional validation: the last remaining workspace admin cannot be deleted.\n Permissions required: bb.users.delete",- requestSchemaRef: "#/components/schemas/bytebase.v1.DeleteUserRequest",- responseSchemaRef: "#/components/schemas/google.protobuf.Empty",- },- {- operationId: "bytebase.v1.UserService.GetCurrentUser",- path: "/bytebase.v1.UserService/GetCurrentUser",- service: "UserService",- method: "GetCurrentUser",- summary: "GetCurrentUser",- description:- "Get the current authenticated user.\n Permissions required: None",- requestSchemaRef: "#/components/schemas/google.protobuf.Empty",- responseSchemaRef: "#/components/schemas/bytebase.v1.User",- },- {- operationId: "bytebase.v1.UserService.GetUser",- path: "/bytebase.v1.UserService/GetUser",- service: "UserService",- method: "GetUser",- summary: "GetUser",- description:- "Get the user.\n Any authenticated user can get the user.\n Permissions required: bb.users.get",- requestSchemaRef: "#/components/schemas/bytebase.v1.GetUserRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.User",- },- {- operationId: "bytebase.v1.UserService.ListUsers",- path: "/bytebase.v1.UserService/ListUsers",- service: "UserService",- method: "ListUsers",- summary: "ListUsers",- description:- "List all users.\n Any authenticated user can list users.\n Permissions required: bb.users.list",- requestSchemaRef: "#/components/schemas/bytebase.v1.ListUsersRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.ListUsersResponse",- },- {- operationId: "bytebase.v1.UserService.UndeleteUser",- path: "/bytebase.v1.UserService/UndeleteUser",- service: "UserService",- method: "UndeleteUser",- summary: "UndeleteUser",- description:- "Restores a deleted user.\n Permissions required: bb.users.undelete",- requestSchemaRef: "#/components/schemas/bytebase.v1.UndeleteUserRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.User",- },- {- operationId: "bytebase.v1.UserService.UpdateEmail",- path: "/bytebase.v1.UserService/UpdateEmail",- service: "UserService",- method: "UpdateEmail",- summary: "UpdateEmail",- description:- "Updates a user's email address.\n Permissions required: bb.users.updateEmail",- requestSchemaRef: "#/components/schemas/bytebase.v1.UpdateEmailRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.User",- },- {- operationId: "bytebase.v1.UserService.UpdateUser",- path: "/bytebase.v1.UserService/UpdateUser",- service: "UserService",- method: "UpdateUser",- summary: "UpdateUser",- description:- "Updates a user. Users can update their own profile, or users with bb.users.update permission can update any user.\n Note: Email updates are not supported through this API. Use UpdateEmail instead.\n Permissions required: bb.users.update (or self)",- requestSchemaRef: "#/components/schemas/bytebase.v1.UpdateUserRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.User",- },- {- operationId: "bytebase.v1.WorkloadIdentityService.CreateWorkloadIdentity",- path: "/bytebase.v1.WorkloadIdentityService/CreateWorkloadIdentity",- service: "WorkloadIdentityService",- method: "CreateWorkloadIdentity",- summary: "CreateWorkloadIdentity",- description:- "Creates a new workload identity.\n For workspace-level: parent is workspaces/{id}, permission bb.workloadIdentities.create on workspace.\n For project-level: parent is projects/{project}, permission bb.workloadIdentities.create on project.",- requestSchemaRef:- "#/components/schemas/bytebase.v1.CreateWorkloadIdentityRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.WorkloadIdentity",- },- {- operationId: "bytebase.v1.WorkloadIdentityService.DeleteWorkloadIdentity",- path: "/bytebase.v1.WorkloadIdentityService/DeleteWorkloadIdentity",- service: "WorkloadIdentityService",- method: "DeleteWorkloadIdentity",- summary: "DeleteWorkloadIdentity",- description:- "Deletes a workload identity.\n Permissions required: bb.workloadIdentities.delete",- requestSchemaRef:- "#/components/schemas/bytebase.v1.DeleteWorkloadIdentityRequest",- responseSchemaRef: "#/components/schemas/google.protobuf.Empty",- },- {- operationId: "bytebase.v1.WorkloadIdentityService.GetWorkloadIdentity",- path: "/bytebase.v1.WorkloadIdentityService/GetWorkloadIdentity",- service: "WorkloadIdentityService",- method: "GetWorkloadIdentity",- summary: "GetWorkloadIdentity",- description:- "Gets a workload identity by name.\n Permissions required: bb.workloadIdentities.get",- requestSchemaRef:- "#/components/schemas/bytebase.v1.GetWorkloadIdentityRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.WorkloadIdentity",- },- {- operationId: "bytebase.v1.WorkloadIdentityService.ListWorkloadIdentities",- path: "/bytebase.v1.WorkloadIdentityService/ListWorkloadIdentities",- service: "WorkloadIdentityService",- method: "ListWorkloadIdentities",- summary: "ListWorkloadIdentities",- description:- "Lists workload identities.\n For workspace-level: parent is workspaces/{id}, permission bb.workloadIdentities.list on workspace.\n For project-level: parent is projects/{project}, permission bb.workloadIdentities.list on project.",- requestSchemaRef:- "#/components/schemas/bytebase.v1.ListWorkloadIdentitiesRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.ListWorkloadIdentitiesResponse",- },- {- operationId: "bytebase.v1.WorkloadIdentityService.UndeleteWorkloadIdentity",- path: "/bytebase.v1.WorkloadIdentityService/UndeleteWorkloadIdentity",- service: "WorkloadIdentityService",- method: "UndeleteWorkloadIdentity",- summary: "UndeleteWorkloadIdentity",- description:- "Restores a deleted workload identity.\n Permissions required: bb.workloadIdentities.undelete",- requestSchemaRef:- "#/components/schemas/bytebase.v1.UndeleteWorkloadIdentityRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.WorkloadIdentity",- },- {- operationId: "bytebase.v1.WorkloadIdentityService.UpdateWorkloadIdentity",- path: "/bytebase.v1.WorkloadIdentityService/UpdateWorkloadIdentity",- service: "WorkloadIdentityService",- method: "UpdateWorkloadIdentity",- summary: "UpdateWorkloadIdentity",- description:- "Updates a workload identity.\n Permissions required: bb.workloadIdentities.update",- requestSchemaRef:- "#/components/schemas/bytebase.v1.UpdateWorkloadIdentityRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.WorkloadIdentity",- },- {- operationId: "bytebase.v1.WorksheetService.BatchUpdateWorksheetOrganizer",- path: "/bytebase.v1.WorksheetService/BatchUpdateWorksheetOrganizer",- service: "WorksheetService",- method: "BatchUpdateWorksheetOrganizer",- summary: "BatchUpdateWorksheetOrganizer",- description:- "Batch update the organizers of worksheets.\n The access is the same as UpdateWorksheet method.\n Permissions required: bb.worksheets.get (or creator, or project member for shared worksheets)",- requestSchemaRef:- "#/components/schemas/bytebase.v1.BatchUpdateWorksheetOrganizerRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.BatchUpdateWorksheetOrganizerResponse",- },- {- operationId: "bytebase.v1.WorksheetService.CreateWorksheet",- path: "/bytebase.v1.WorksheetService/CreateWorksheet",- service: "WorksheetService",- method: "CreateWorksheet",- summary: "CreateWorksheet",- description:- "Creates a personal worksheet used in SQL Editor. Any authenticated user can create their own worksheets.\n Permissions required: None (authenticated users only)",- requestSchemaRef: "#/components/schemas/bytebase.v1.CreateWorksheetRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Worksheet",- },- {- operationId: "bytebase.v1.WorksheetService.DeleteWorksheet",- path: "/bytebase.v1.WorksheetService/DeleteWorksheet",- service: "WorksheetService",- method: "DeleteWorksheet",- summary: "DeleteWorksheet",- description:- "Delete a worksheet.\n The access is the same as UpdateWorksheet method.\n Permissions required: bb.worksheets.manage (or creator, or project member for PROJECT_WRITE worksheets)",- requestSchemaRef: "#/components/schemas/bytebase.v1.DeleteWorksheetRequest",- responseSchemaRef: "#/components/schemas/google.protobuf.Empty",- },- {- operationId: "bytebase.v1.WorksheetService.GetWorksheet",- path: "/bytebase.v1.WorksheetService/GetWorksheet",- service: "WorksheetService",- method: "GetWorksheet",- summary: "GetWorksheet",- description:- "Get a worksheet by name.\n The users can access this method if,\n - they are the creator of the worksheet;\n - they have bb.worksheets.get permission on the workspace;\n - the sheet is shared with them with PROJECT_READ and PROJECT_WRITE visibility, and they have bb.projects.get permission on the project.\n Permissions required: bb.worksheets.get (or creator, or project member for shared worksheets)",- requestSchemaRef: "#/components/schemas/bytebase.v1.GetWorksheetRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Worksheet",- },- {- operationId: "bytebase.v1.WorksheetService.SearchWorksheets",- path: "/bytebase.v1.WorksheetService/SearchWorksheets",- service: "WorksheetService",- method: "SearchWorksheets",- summary: "SearchWorksheets",- description:- "Search for worksheets.\n This is used for finding my worksheets or worksheets shared by other people.\n The sheet accessibility is the same as GetWorksheet().\n Permissions required: bb.worksheets.get (or creator, or project member for shared worksheets)",- requestSchemaRef:- "#/components/schemas/bytebase.v1.SearchWorksheetsRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.SearchWorksheetsResponse",- },- {- operationId: "bytebase.v1.WorksheetService.UpdateWorksheet",- path: "/bytebase.v1.WorksheetService/UpdateWorksheet",- service: "WorksheetService",- method: "UpdateWorksheet",- summary: "UpdateWorksheet",- description:- "Update a worksheet.\n The users can access this method if,\n - they are the creator of the worksheet;\n - they have bb.worksheets.manage permission on the workspace;\n - the sheet is shared with them with PROJECT_WRITE visibility, and they have bb.projects.get permission on the project.\n Permissions required: bb.worksheets.manage (or creator, or project member for PROJECT_WRITE worksheets)",- requestSchemaRef: "#/components/schemas/bytebase.v1.UpdateWorksheetRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Worksheet",- },- {- operationId: "bytebase.v1.WorksheetService.UpdateWorksheetOrganizer",- path: "/bytebase.v1.WorksheetService/UpdateWorksheetOrganizer",- service: "WorksheetService",- method: "UpdateWorksheetOrganizer",- summary: "UpdateWorksheetOrganizer",- description:- "Update the organizer of a worksheet.\n The access is the same as UpdateWorksheet method.\n Permissions required: bb.worksheets.get (or creator, or project member for shared worksheets)",- requestSchemaRef:- "#/components/schemas/bytebase.v1.UpdateWorksheetOrganizerRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.WorksheetOrganizer",- },- {- operationId: "bytebase.v1.WorkspaceService.DeleteWorkspace",- path: "/bytebase.v1.WorkspaceService/DeleteWorkspace",- service: "WorkspaceService",- method: "DeleteWorkspace",- summary: "DeleteWorkspace",- description:- "Deletes a workspace. SaaS only. Cancels any active subscription and\n soft-deletes the workspace so all associated data becomes inaccessible.\n Requires workspace admin permission.",- requestSchemaRef: "#/components/schemas/bytebase.v1.DeleteWorkspaceRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.LoginResponse",- },- {- operationId: "bytebase.v1.WorkspaceService.GetIamPolicy",- path: "/bytebase.v1.WorkspaceService/GetIamPolicy",- service: "WorkspaceService",- method: "GetIamPolicy",- summary: "GetIamPolicy",- description:- "Retrieves IAM policy for the workspace.\n Permissions required: bb.workspaces.getIamPolicy",- requestSchemaRef: "#/components/schemas/bytebase.v1.GetIamPolicyRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.IamPolicy",- },- {- operationId: "bytebase.v1.WorkspaceService.GetWorkspace",- path: "/bytebase.v1.WorkspaceService/GetWorkspace",- service: "WorkspaceService",- method: "GetWorkspace",- summary: "GetWorkspace",- description:- 'Gets a workspace by name.\n Supports "workspaces/-" to resolve the current workspace:\n - Authenticated: uses the workspace from JWT context\n - Self-hosted unauthenticated: returns the single workspace\n - SaaS unauthenticated: returns minimal response',- requestSchemaRef: "#/components/schemas/bytebase.v1.GetWorkspaceRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Workspace",- },- {- operationId: "bytebase.v1.WorkspaceService.LeaveWorkspace",- path: "/bytebase.v1.WorkspaceService/LeaveWorkspace",- service: "WorkspaceService",- method: "LeaveWorkspace",- summary: "LeaveWorkspace",- description:- "Removes the calling user from a workspace and switches to the next\n available workspace. Available to any workspace member. Fails if the\n caller is the last workspace admin.",- requestSchemaRef: "#/components/schemas/bytebase.v1.LeaveWorkspaceRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.LoginResponse",- },- {- operationId: "bytebase.v1.WorkspaceService.ListWorkspaces",- path: "/bytebase.v1.WorkspaceService/ListWorkspaces",- service: "WorkspaceService",- method: "ListWorkspaces",- summary: "ListWorkspaces",- description: "Lists all workspaces the current user is a member of.",- requestSchemaRef: "#/components/schemas/bytebase.v1.ListWorkspacesRequest",- responseSchemaRef:- "#/components/schemas/bytebase.v1.ListWorkspacesResponse",- },- {- operationId: "bytebase.v1.WorkspaceService.SetIamPolicy",- path: "/bytebase.v1.WorkspaceService/SetIamPolicy",- service: "WorkspaceService",- method: "SetIamPolicy",- summary: "SetIamPolicy",- description:- "Sets IAM policy for the workspace.\n Permissions required: bb.workspaces.setIamPolicy",- requestSchemaRef: "#/components/schemas/bytebase.v1.SetIamPolicyRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.IamPolicy",- },- {- operationId: "bytebase.v1.WorkspaceService.UpdateWorkspace",- path: "/bytebase.v1.WorkspaceService/UpdateWorkspace",- service: "WorkspaceService",- method: "UpdateWorkspace",- summary: "UpdateWorkspace",- description: "Updates a workspace. Currently only title can be updated.",- requestSchemaRef: "#/components/schemas/bytebase.v1.UpdateWorkspaceRequest",- responseSchemaRef: "#/components/schemas/bytebase.v1.Workspace",- },-];--export const schemas: Record<string, SchemaInfo> = {- "bytebase.v1.AIChatMessage": {- type: "object",- properties: [- {- name: "content",- type: "string",- description:- "The text content of the message. Optional for assistant messages that only contain tool calls.",- },- {- name: "role",- type: "bytebase.v1.AIChatMessageRole",- description: "The role of the message sender.",- },- {- name: "toolCallId",- type: "string",- description:- "The ID of the tool call this message is responding to. Only present in tool messages.",- },- {- name: "toolCalls",- type: "array<bytebase.v1.AIChatToolCall>",- description:- "Tool calls made by the assistant. Only present in assistant messages.",- items: {- name: "item",- type: "bytebase.v1.AIChatToolCall",- },- },- ],- description: "A single message in the conversation.",- },- "bytebase.v1.AIChatMessageRole": {- type: "enum",- values: [- "AI_CHAT_MESSAGE_ROLE_UNSPECIFIED",- "AI_CHAT_MESSAGE_ROLE_SYSTEM",- "AI_CHAT_MESSAGE_ROLE_USER",- "AI_CHAT_MESSAGE_ROLE_ASSISTANT",- "AI_CHAT_MESSAGE_ROLE_TOOL",- ],- description: "Role of a chat message.",- },- "bytebase.v1.AIChatRequest": {- type: "object",- properties: [- {- name: "messages",- type: "array<bytebase.v1.AIChatMessage>",- description: "The conversation messages.",- items: {- name: "item",- type: "bytebase.v1.AIChatMessage",- },- },- {- name: "toolDefinitions",- type: "array<bytebase.v1.AIChatToolDefinition>",- description: "The tool definitions available to the AI.",- items: {- name: "item",- type: "bytebase.v1.AIChatToolDefinition",- },- },- ],- description: "Request message for AIService.Chat.",- },- "bytebase.v1.AIChatResponse": {- type: "object",- properties: [- {- name: "content",- type: "string",- description:- "The text content of the AI response. Optional when the response only contains tool calls.",- },- {- name: "toolCalls",- type: "array<bytebase.v1.AIChatToolCall>",- description: "Tool calls the AI wants to make.",- items: {- name: "item",- type: "bytebase.v1.AIChatToolCall",- },- },- {- name: "usage",- type: "bytebase.v1.AIChatUsage",- description: "Token usage for this provider call, when available.",- },- ],- description: "Response message for AIService.Chat.",- },- "bytebase.v1.AIChatToolCall": {- type: "object",- properties: [- {- name: "arguments",- type: "string",- description: "The JSON-encoded arguments to pass to the tool.",- },- {- name: "id",- type: "string",- description: "The unique ID of this tool call.",- },- {- name: "metadata",- type: "string",- description:- "Opaque provider-specific metadata (e.g., Gemini thought_signature).\n Frontend must echo this back unchanged when sending tool results.",- },- {- name: "name",- type: "string",- description: "The name of the tool to call.",- },- ],- description: "A tool call made by the AI.",- },- "bytebase.v1.AIChatToolDefinition": {- type: "object",- properties: [- {- name: "description",- type: "string",- description: "A description of what the tool does.",- },- {- name: "name",- type: "string",- description: "The name of the tool.",- },- {- name: "parametersSchema",- type: "string",- description: "The JSON Schema describing the tool's parameters.",- },- ],- description: "A tool definition that the AI can invoke.",- },- "bytebase.v1.AIChatUsage": {- type: "object",- properties: [- {- name: "totalTokens",- type: "integer",- format: "int32",- description: "Total tokens used by the provider call.",- },- ],- description: "Token usage for a single AI provider call.",- },- "bytebase.v1.AICompletionRequest": {- type: "object",- properties: [- {- name: "messages",- type: "array<bytebase.v1.AICompletionRequest.Message>",- items: {- name: "item",- type: "bytebase.v1.AICompletionRequest.Message",- },- },- ],- description: "",- },- "bytebase.v1.AICompletionRequest.Message": {- type: "object",- properties: [- {- name: "content",- type: "string",- },- {- name: "role",- type: "string",- },- ],- description: "",- },- "bytebase.v1.AICompletionResponse": {- type: "object",- properties: [- {- name: "candidates",- type: "array<bytebase.v1.AICompletionResponse.Candidate>",- description:- "candidates is used for results with multiple choices and candidates. Used\n for OpenAI and Gemini.",- items: {- name: "item",- type: "bytebase.v1.AICompletionResponse.Candidate",- },- },- ],- description: "",- },- "bytebase.v1.AICompletionResponse.Candidate": {- type: "object",- properties: [- {- name: "content",- type: "bytebase.v1.AICompletionResponse.Candidate.Content",- },- ],- description: "",- },- "bytebase.v1.AICompletionResponse.Candidate.Content": {- type: "object",- properties: [- {- name: "parts",- type: "array<bytebase.v1.AICompletionResponse.Candidate.Content.Part>",- description: "parts is used for a result content with multiple parts.",- items: {- name: "item",- type: "bytebase.v1.AICompletionResponse.Candidate.Content.Part",- },- },- ],- description: "",- },- "bytebase.v1.AICompletionResponse.Candidate.Content.Part": {- type: "object",- properties: [- {- name: "text",- type: "string",- },- ],- description: "",- },- "bytebase.v1.AISetting": {- type: "object",- properties: [- {- name: "apiKey",- type: "string",- },- {- name: "enabled",- type: "boolean",- },- {- name: "endpoint",- type: "string",- },- {- name: "model",- type: "string",- },- {- name: "provider",- type: "bytebase.v1.AISetting.Provider",- },- {- name: "version",- type: "string",- },- ],- description: "",- },- "bytebase.v1.AISetting.Provider": {- type: "enum",- values: [- "PROVIDER_UNSPECIFIED",- "OPEN_AI",- "CLAUDE",- "GEMINI",- "AZURE_OPENAI",- ],- description: "",- },- "bytebase.v1.AccessGrant": {- type: "object",- properties: [- {- name: "createTime",- type: "google.protobuf.Timestamp",- },- {- name: "creator",- type: "string",- description: "The creator of the access grant.\n Format: users/{email}",- },- {- name: "expireTime",- type: "google.protobuf.Timestamp",- description: "The expiration time of the access grant.",- },- {- name: "export",- type: "boolean",- description: "Whether export the query result.",- },- {- name: "issue",- type: "string",- description:- "The issue associated with the access grant.\n Can be empty.\n Format: projects/{project}/issues/{issue}",- },- {- name: "name",- type: "string",- description:- "The name of the access grant, generated by the server.\n Format: projects/{project}/accessGrants/{access_grant}\n The {access_grant} segment is a server-generated unique ID.",- },- {- name: "query",- type: "string",- description: "The query permission granted.",- },- {- name: "reason",- type: "string",- },- {- name: "status",- type: "bytebase.v1.AccessGrant.Status",- description:- "The status of the access grant.\n An ACTIVE grant with `expire_time` in the past is effectively expired\n and no longer authorizes access. Use `expire_time` to determine\n whether an ACTIVE grant has expired.",- },- {- name: "targets",- type: "array<string>",- description:- "The target databases for this access grant.\n Format: instances/{instance}/databases/{database}",- items: {- name: "item",- type: "string",- },- },- {- name: "ttl",- type: "google.protobuf.Duration",- description:- "Input only. The time-to-live duration for the access grant.\n The server computes `expire_time` from this value at activation time.",- },- {- name: "unmask",- type: "boolean",- description: "Whether the grant allows unmasking sensitive data.",- },- {- name: "updateTime",- type: "google.protobuf.Timestamp",- },- ],- description: "",- },- "bytebase.v1.AccessGrant.Status": {- type: "enum",- values: ["STATUS_UNSPECIFIED", "PENDING", "ACTIVE", "REVOKED"],- description: "The status of the access grant.",- },- "bytebase.v1.ActivateAccessGrantRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the access grant to activate.\n Format: projects/{project}/accessGrants/{access_grant}",- },- ],- description: "",- },- "bytebase.v1.Activity.Type": {- type: "enum",- values: [- "TYPE_UNSPECIFIED",- "ISSUE_CREATED",- "ISSUE_APPROVAL_REQUESTED",- "ISSUE_SENT_BACK",- "PIPELINE_FAILED",- "PIPELINE_COMPLETED",- "ISSUE_APPROVED",- ],- description: "Activity type enumeration.",- },- "bytebase.v1.ActuatorInfo": {- type: "object",- properties: [- {- name: "activatedInstanceCount",- type: "integer",- format: "int32",- description: "The number of activated database instances.",- },- {- name: "activatedUserCount",- type: "integer",- format: "int32",- description: "The number of activated users.",- },- {- name: "activeVcsUserCount",- type: "integer",- format: "int32",- description:- "The number of active VCS users seen in the active window.",- },- {- name: "defaultProject",- type: "string",- description:- "The default project for unassigned databases.\n Format: projects/{id}",- },- {- name: "docker",- type: "boolean",- description: "Whether the Bytebase instance is running in Docker.",- },- {- name: "enableSample",- type: "boolean",- description: "Whether sample data setup is enabled.",- },- {- name: "externalUrl",- type: "string",- description:- "The external URL where users or webhook callbacks access Bytebase.",- },- {- name: "externalUrlFromFlag",- type: "boolean",- description:- "Whether the external URL is set via command-line flag (and thus cannot be changed via UI).",- },- {- name: "gitCommit",- type: "string",- description: "The git commit hash of the build.",- },- {- name: "host",- type: "string",- description: "The host address of the Bytebase instance.",- },- {- name: "lastActiveTime",- type: "google.protobuf.Timestamp",- description:- "The last time any API call was made, refreshed on each request.",- },- {- name: "port",- type: "string",- description: "The port number of the Bytebase instance.",- },- {- name: "readonly",- type: "boolean",- description:- "Whether the Bytebase instance is running in read-only mode.",- },- {- name: "replicaCount",- type: "integer",- format: "int32",- description:- "The number of active replicas (servers sharing the same database).",- },- {- name: "restriction",- type: "bytebase.v1.Restriction",- },- {- name: "saas",- type: "boolean",- description:- "Whether the Bytebase instance is running in SaaS mode where some features cannot be edited by users.",- },- {- name: "totalInstanceCount",- type: "integer",- format: "int32",- description: "The total number of database instances.",- },- {- name: "unlicensedFeatures",- type: "array<string>",- description: "List of features that are not licensed.",- items: {- name: "item",- type: "string",- },- },- {- name: "userCountInIam",- type: "integer",- format: "int32",- description:- "The number of users in the workspace IAM (for seat limit display).",- },- {- name: "version",- type: "string",- description: "The Bytebase server version.",- },- {- name: "workspace",- type: "string",- description:- "The unique identifier for the workspace.\n Format: workspaces/{id}",- },- ],- description:- "System information and configuration for the Bytebase instance.\n Actuator concept is similar to the Spring Boot Actuator.",- },- "bytebase.v1.AddDataSourceRequest": {- type: "object",- properties: [- {- name: "dataSource",- type: "bytebase.v1.DataSource",- description:- "Identified by data source ID.\n Only READ_ONLY data source can be added.",- },- {- name: "name",- type: "string",- description:- "The name of the instance to add a data source to.\n Format: instances/{instance}",- },- {- name: "validateOnly",- type: "boolean",- description: "Validate only also tests the data source connection.",- },- ],- description: "",- },- "bytebase.v1.AddWebhookRequest": {- type: "object",- properties: [- {- name: "project",- type: "string",- description:- "The name of the project to add the webhook to.\n Format: projects/{project}",- },- {- name: "webhook",- type: "bytebase.v1.Webhook",- description: "The webhook to add.",- },- ],- description: "",- },- "bytebase.v1.AdminExecuteRequest": {- type: "object",- properties: [- {- name: "container",- type: "string",- description:- "Container is the container name to execute the query against, used for\n CosmosDB only.",- },- {- name: "limit",- type: "integer",- format: "int32",- description: "The maximum number of rows to return.",- },- {- name: "name",- type: "string",- description:- "The name is the instance name to execute the query against.\n Format: instances/{instance}/databases/{databaseName}",- },- {- name: "schema",- type: "string",- description:- "The default schema to execute the statement. Equals to the current schema\n in Oracle and search path in Postgres.",- },- {- name: "statement",- type: "string",- description: "The SQL statement to execute.",- },- ],- description: "",- },- "bytebase.v1.AdminExecuteResponse": {- type: "object",- properties: [- {- name: "results",- type: "array<bytebase.v1.QueryResult>",- description: "The query results.",- items: {- name: "item",- type: "bytebase.v1.QueryResult",- },- },- ],- description: "",- },- "bytebase.v1.Advice": {- type: "object",- properties: [- {- name: "code",- type: "integer",- format: "int32",- description: "The advice code.",- },- {- name: "content",- type: "string",- description: "The advice content.",- },- {- name: "endPosition",- type: "bytebase.v1.Position",- },- {- name: "ruleType",- type: "bytebase.v1.Advice.RuleType",- description: "The type of linting rule that generated this advice.",- },- {- name: "startPosition",- type: "bytebase.v1.Position",- description:- "The start_position is inclusive and the end_position is exclusive.\n TODO: use range instead",- },- {- name: "status",- type: "bytebase.v1.Advice.Level",- description: "The advice level.",- },- {- name: "title",- type: "string",- description: "The advice title.",- },- ],- description: "",- },- "bytebase.v1.Advice.Level": {- type: "enum",- values: ["ADVICE_LEVEL_UNSPECIFIED", "SUCCESS", "WARNING", "ERROR"],- description: "Level represents the severity level of the advice.",- },- "bytebase.v1.Advice.RuleType": {- type: "enum",- values: ["RULE_TYPE_UNSPECIFIED", "PARSER_BASED", "AI_POWERED"],- description: "RuleType indicates the source of the linting rule.",- },- "bytebase.v1.Algorithm": {- type: "object",- properties: [- {- name: "fullMask",- type: "bytebase.v1.Algorithm.FullMask",- },- {- name: "innerOuterMask",- type: "bytebase.v1.Algorithm.InnerOuterMask",- },- {- name: "md5Mask",- type: "bytebase.v1.Algorithm.MD5Mask",- },- {- name: "rangeMask",- type: "bytebase.v1.Algorithm.RangeMask",- },- ],- description: "",- },- "bytebase.v1.Algorithm.FullMask": {- type: "object",- properties: [- {- name: "substitution",- type: "string",- description:- "substitution is the string used to replace the original value, the\n max length of the string is 16 bytes.",- },- ],- description: "",- },- "bytebase.v1.Algorithm.InnerOuterMask": {- type: "object",- properties: [- {- name: "prefixLen",- type: "integer",- format: "int32",- },- {- name: "substitution",- type: "string",- },- {- name: "suffixLen",- type: "integer",- format: "int32",- },- {- name: "type",- type: "bytebase.v1.Algorithm.InnerOuterMask.MaskType",- },- ],- description: "",- },- "bytebase.v1.Algorithm.InnerOuterMask.MaskType": {- type: "enum",- values: ["MASK_TYPE_UNSPECIFIED", "INNER", "OUTER"],- description: "",- },- "bytebase.v1.Algorithm.MD5Mask": {- type: "object",- properties: [- {- name: "salt",- type: "string",- description:- "salt is the salt value to generate a different hash that with the word alone.",- },- ],- description: "",- },- "bytebase.v1.Algorithm.RangeMask": {- type: "object",- properties: [- {- name: "slices",- type: "array<bytebase.v1.Algorithm.RangeMask.Slice>",- description:- "We store it as a repeated field to face the fact that the original value may have multiple parts should be masked.\n But frontend can be started with a single rule easily.",- items: {- name: "item",- type: "bytebase.v1.Algorithm.RangeMask.Slice",- },- },- ],- description: "",- },- "bytebase.v1.Algorithm.RangeMask.Slice": {- type: "object",- properties: [- {- name: "end",- type: "integer",- format: "int32",- description:- "end is the end character index (exclusive) of the original value.\n Uses character indices (not byte offsets) for display-oriented masking.",- },- {- name: "start",- type: "integer",- format: "int32",- description:- "start is the start character index (0-based) of the original value, should be less than end.\n Uses character indices (not byte offsets) for display-oriented masking.\n Example: For \"你好world\", character index 2 refers to 'w' (the 3rd character).",- },- {- name: "substitution",- type: "string",- description:- "substitution is the string used to replace the OriginalValue[start:end).",- },- ],- description: "",- },- "bytebase.v1.Announcement": {- type: "object",- properties: [- {- name: "link",- type: "string",- description:- "The optional link, user can follow the link to check extra details",- },- {- name: "text",- type: "string",- description: "The text of announcement",- },- {- name: "theme",- type: "bytebase.v1.Announcement.AnnouncementTheme",- description:- "Banner colors. Built-in presets (info/warning/critical) are a\n frontend-only concept that seeds these colors; the store only holds them.",- },- ],- description: "",- },- "bytebase.v1.Announcement.AnnouncementTheme": {- type: "object",- properties: [- {- name: "background",- type: "google.type.Color",- },- {- name: "text",- type: "google.type.Color",- },- ],- description: "",- },- "bytebase.v1.AppIMSetting": {- type: "object",- properties: [- {- name: "settings",- type: "array<bytebase.v1.AppIMSetting.IMSetting>",- items: {- name: "item",- type: "bytebase.v1.AppIMSetting.IMSetting",- },- },- ],- description: "",- },- "bytebase.v1.AppIMSetting.DingTalk": {- type: "object",- properties: [- {- name: "clientId",- type: "string",- },- {- name: "clientSecret",- type: "string",- },- {- name: "robotCode",- type: "string",- },- ],- description: "",- },- "bytebase.v1.AppIMSetting.Feishu": {- type: "object",- properties: [- {- name: "appId",- type: "string",- },- {- name: "appSecret",- type: "string",- },- ],- description: "",- },- "bytebase.v1.AppIMSetting.IMSetting": {- type: "object",- properties: [- {- name: "dingtalk",- type: "bytebase.v1.AppIMSetting.DingTalk",- },- {- name: "feishu",- type: "bytebase.v1.AppIMSetting.Feishu",- },- {- name: "lark",- type: "bytebase.v1.AppIMSetting.Lark",- },- {- name: "slack",- type: "bytebase.v1.AppIMSetting.Slack",- },- {- name: "teams",- type: "bytebase.v1.AppIMSetting.Teams",- },- {- name: "type",- type: "bytebase.v1.WebhookType",- },- {- name: "wecom",- type: "bytebase.v1.AppIMSetting.Wecom",- },- ],- description: "",- },- "bytebase.v1.AppIMSetting.Lark": {- type: "object",- properties: [- {- name: "appId",- type: "string",- },- {- name: "appSecret",- type: "string",- },- ],- description: "",- },- "bytebase.v1.AppIMSetting.Slack": {- type: "object",- properties: [- {- name: "token",- type: "string",- },- ],- description: "",- },- "bytebase.v1.AppIMSetting.Teams": {- type: "object",- properties: [- {- name: "clientId",- type: "string",- description: "Azure AD application (client) ID.",- },- {- name: "clientSecret",- type: "string",- description: "Azure AD client secret.",- },- {- name: "tenantId",- type: "string",- description: "Azure AD tenant ID (Directory ID).",- },- ],- description: "",- },- "bytebase.v1.AppIMSetting.Wecom": {- type: "object",- properties: [- {- name: "agentId",- type: "string",- },- {- name: "corpId",- type: "string",- },- {- name: "secret",- type: "string",- },- ],- description: "",- },- "bytebase.v1.ApprovalFlow": {- type: "object",- properties: [- {- name: "roles",- type: "array<string>",- description: "The roles required for approval in order.",- items: {- name: "item",- type: "string",- },- },- ],- description: "",- },- "bytebase.v1.ApprovalStatus": {- type: "enum",- values: [- "APPROVAL_STATUS_UNSPECIFIED",- "CHECKING",- "PENDING",- "APPROVED",- "REJECTED",- "SKIPPED",- ],- description:- "Approval workflow status for an issue or a plan.\n Lives at the top level so both plan_service.proto and issue_service.proto\n can reference it without a circular import.",- },- "bytebase.v1.ApprovalTemplate": {- type: "object",- properties: [- {- name: "description",- type: "string",- description: "The description of the approval template.",- },- {- name: "flow",- type: "bytebase.v1.ApprovalFlow",- description: "The approval flow definition.",- },- {- name: "title",- type: "string",- description: "The title of the approval template.",- },- ],- description: "",- },- "bytebase.v1.ApproveIssueRequest": {- type: "object",- properties: [- {- name: "comment",- type: "string",- description: "The comment explaining the approval decision.",- },- {- name: "name",- type: "string",- description:- "The name of the issue to add an approver.\n Format: projects/{project}/issues/{issue}",- },- ],- description: "",- },- "bytebase.v1.AuditData": {- type: "object",- properties: [- {- name: "policyDelta",- type: "bytebase.v1.PolicyDelta",- description: "Changes to IAM policies.",- },- ],- description: "Additional audit data specific to certain operations.",- },- "bytebase.v1.AuditLog": {- type: "object",- properties: [- {- name: "createTime",- type: "google.protobuf.Timestamp",- description: "The timestamp when the audit log was created.",- },- {- name: "latency",- type: "google.protobuf.Duration",- description: "The duration of the operation.",- },- {- name: "method",- type: "string",- description:- "The method or action being audited.\n For example: /bytebase.v1.SQLService/Query or bb.project.repository.push",- },- {- name: "name",- type: "string",- description:- "The name of the log.\n Formats:\n - projects/{project}/auditLogs/{uid}\n - workspaces/{workspace}/auditLogs/{uid}",- },- {- name: "request",- type: "string",- description: "The request payload in JSON format.",- },- {- name: "requestMetadata",- type: "bytebase.v1.RequestMetadata",- description: "Metadata about the request context.",- },- {- name: "resource",- type: "string",- description: "The resource associated with this audit log.",- },- {- name: "response",- type: "string",- description:- "The response payload in JSON format.\n Some fields may be omitted if they are too large or contain sensitive information.",- },- {- name: "serviceData",- type: "google.protobuf.Any",- description:- "Service-specific metadata about the request, response, and activities.",- },- {- name: "severity",- type: "bytebase.v1.AuditLog.Severity",- description: "The severity level of this audit log entry.",- },- {- name: "status",- type: "google.rpc.Status",- description: "The status of the operation.",- },- {- name: "user",- type: "string",- description:- "The user who performed the action.\n Format: users/{email}",- },- ],- description: "Audit log entry recording system activity or API call.",- },- "bytebase.v1.AuditLog.Severity": {- type: "enum",- values: [- "SEVERITY_UNSPECIFIED",- "DEBUG",- "INFO",- "NOTICE",- "WARNING",- "ERROR",- "CRITICAL",- "ALERT",- "EMERGENCY",- ],- description: "Severity level for audit log entries.",- },- "bytebase.v1.AuthMethod": {- type: "enum",- values: ["AUTH_METHOD_UNSPECIFIED", "IAM", "CUSTOM"],- description: "Authorization method for RPC calls.",- },- "bytebase.v1.BatchCancelTaskRunsRequest": {- type: "object",- properties: [- {- name: "parent",- type: "string",- description:- "The task name for the taskRuns.\n Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}\n Use `projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/-` to cancel task runs under the same stage.",- },- {- name: "taskRuns",- type: "array<string>",- description:- "The taskRuns to cancel.\n Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}",- items: {- name: "item",- type: "string",- },- },- ],- description: "",- },- "bytebase.v1.BatchCreateRevisionsRequest": {- type: "object",- properties: [- {- name: "parent",- type: "string",- description:- "The parent resource shared by all revisions being created.\n Format: instances/{instance}/databases/{database}",- },- {- name: "requests",- type: "array<bytebase.v1.CreateRevisionRequest>",- description:- "The request message specifying the revisions to create.\n A maximum of 100 revisions can be created in a batch.",- items: {- name: "item",- type: "bytebase.v1.CreateRevisionRequest",- },- },- ],- description: "",- },- "bytebase.v1.BatchCreateRevisionsResponse": {- type: "object",- properties: [- {- name: "revisions",- type: "array<bytebase.v1.Revision>",- description: "The created revisions.",- items: {- name: "item",- type: "bytebase.v1.Revision",- },- },- ],- description: "",- },- "bytebase.v1.BatchCreateSheetsRequest": {- type: "object",- properties: [- {- name: "parent",- type: "string",- description:- "The parent resource where all sheets will be created.\n Format: projects/{project}",- },- {- name: "requests",- type: "array<bytebase.v1.CreateSheetRequest>",- items: {- name: "item",- type: "bytebase.v1.CreateSheetRequest",- },- },- ],- description: "",- },- "bytebase.v1.BatchCreateSheetsResponse": {- type: "object",- properties: [- {- name: "sheets",- type: "array<bytebase.v1.Sheet>",- items: {- name: "item",- type: "bytebase.v1.Sheet",- },- },- ],- description: "",- },- "bytebase.v1.BatchDeleteProjectsRequest": {- type: "object",- properties: [- {- name: "names",- type: "array<string>",- description:- "The names of the projects to delete.\n Format: projects/{project}",- items: {- name: "item",- type: "string",- },- },- {- name: "purge",- type: "boolean",- description:- "If set to true, permanently purge the soft-deleted projects and all related resources.\n This operation is irreversible. Following AIP-165, this should only be used for\n administrative cleanup of old soft-deleted projects.\n All projects must already be soft-deleted for this to work.\n When purge=true, all databases will be moved to the default project before deletion.\n When purge=false (soft delete/archive), the projects and their databases/issues remain unchanged.",- },- ],- description: "",- },- "bytebase.v1.BatchDeparseRequest": {- type: "object",- properties: [- {- name: "expressions",- type: "array<google.api.expr.v1alpha1.Expr>",- description: "The CEL expression ASTs to deparse.",- items: {- name: "item",- type: "google.api.expr.v1alpha1.Expr",- },- },- ],- description: "Request message for batch deparsing CEL expressions.",- },- "bytebase.v1.BatchDeparseResponse": {- type: "object",- properties: [- {- name: "expressions",- type: "array<string>",- description: "The deparsed CEL expressions as strings.",- items: {- name: "item",- type: "string",- },- },- ],- description: "Response message for batch deparsing CEL expressions.",- },- "bytebase.v1.BatchGetDatabasesRequest": {- type: "object",- properties: [- {- name: "names",- type: "array<string>",- description: "The list of database names to retrieve.",- items: {- name: "item",- type: "string",- },- },- {- name: "parent",- type: "string",- description:- 'The parent resource shared by all databases being retrieved.\n - projects/{project}: batch get databases in a project;\n - instances/{instances}: batch get databases in a instance;\n Use "-" as wildcard to batch get databases across parent.',- },- ],- description: "",- },- "bytebase.v1.BatchGetDatabasesResponse": {- type: "object",- properties: [- {- name: "databases",- type: "array<bytebase.v1.Database>",- description: "The databases from the specified request.",- items: {- name: "item",- type: "bytebase.v1.Database",- },- },- ],- description: "",- },- "bytebase.v1.BatchGetGroupsRequest": {- type: "object",- properties: [- {- name: "names",- type: "array<string>",- description: "The group names to retrieve.\n Format: groups/{email}",- items: {- name: "item",- type: "string",- },- },- ],- description: "Request message for batch getting groups.",- },- "bytebase.v1.BatchGetGroupsResponse": {- type: "object",- properties: [- {- name: "groups",- type: "array<bytebase.v1.Group>",- description: "The groups from the specified request.",- items: {- name: "item",- type: "bytebase.v1.Group",- },- },- ],- description: "Response message for batch getting groups.",- },- "bytebase.v1.BatchGetProjectsRequest": {- type: "object",- properties: [- {- name: "names",- type: "array<string>",- description:- "The names of projects to retrieve.\n Format: projects/{project}",- items: {- name: "item",- type: "string",- },- },- ],- description: "",- },- "bytebase.v1.BatchGetProjectsResponse": {- type: "object",- properties: [- {- name: "projects",- type: "array<bytebase.v1.Project>",- description: "The projects from the specified request.",- items: {- name: "item",- type: "bytebase.v1.Project",- },- },- ],- description: "",- },- "bytebase.v1.BatchGetUsersRequest": {- type: "object",- properties: [- {- name: "names",- type: "array<string>",- description: "The user names to retrieve.\n Format: users/{email}",- items: {- name: "item",- type: "string",- },- },- ],- description: "",- },- "bytebase.v1.BatchGetUsersResponse": {- type: "object",- properties: [- {- name: "users",- type: "array<bytebase.v1.User>",- description: "The users from the specified request.",- items: {- name: "item",- type: "bytebase.v1.User",- },- },- ],- description: "",- },- "bytebase.v1.BatchParseRequest": {- type: "object",- properties: [- {- name: "expressions",- type: "array<string>",- description: "The CEL expression strings to parse.",- items: {- name: "item",- type: "string",- },- },- ],- description: "Request message for batch parsing CEL expressions.",- },- "bytebase.v1.BatchParseResponse": {- type: "object",- properties: [- {- name: "expressions",- type: "array<google.api.expr.v1alpha1.Expr>",- description: "The parsed CEL expressions as AST.",- items: {- name: "item",- type: "google.api.expr.v1alpha1.Expr",- },- },- ],- description: "Response message for batch parsing CEL expressions.",- },- "bytebase.v1.BatchRunTasksRequest": {- type: "object",- properties: [- {- name: "parent",- type: "string",- description:- "The stage name for the tasks.\n Format: projects/{project}/plans/{plan}/rollout/stages/{stage}",- },- {- name: "runTime",- type: "google.protobuf.Timestamp",- description: "The task run should run after run_time.",- },- {- name: "skipPriorBackup",- type: "boolean",- description:- "If true, skip prior backup for this run even if the task has prior backup enabled.",- },- {- name: "tasks",- type: "array<string>",- description:- "The tasks to run.\n Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}",- items: {- name: "item",- type: "string",- },- },- ],- description: "",- },- "bytebase.v1.BatchSkipTasksRequest": {- type: "object",- properties: [- {- name: "parent",- type: "string",- description:- "The stage name for the tasks.\n Format: projects/{project}/plans/{plan}/rollout/stages/{stage}",- },- {- name: "reason",- type: "string",- description: "The reason for skipping the tasks.",- },- {- name: "tasks",- type: "array<string>",- description:- "The tasks to skip.\n Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}",- items: {- name: "item",- type: "string",- },- },- ],- description: "",- },- "bytebase.v1.BatchSyncDatabasesRequest": {- type: "object",- properties: [- {- name: "names",- type: "array<string>",- description: "The list of database names to sync.",- items: {- name: "item",- type: "string",- },- },- {- name: "parent",- type: "string",- description:- "The parent resource shared by all databases being updated.\n Format: instances/{instance}\n If the operation spans parents, a dash (-) may be accepted as a wildcard.",- },- ],- description: "",- },- "bytebase.v1.BatchSyncInstancesRequest": {- type: "object",- properties: [- {- name: "requests",- type: "array<bytebase.v1.SyncInstanceRequest>",- description:- "The request message specifying the instances to sync.\n A maximum of 1000 instances can be synced in a batch.",- items: {- name: "item",- type: "bytebase.v1.SyncInstanceRequest",- },- },- ],- description: "",- },- "bytebase.v1.BatchUpdateDatabasesRequest": {- type: "object",- properties: [- {- name: "parent",- type: "string",- description:- "The parent resource shared by all databases being updated.\n Format: instances/{instance}\n If the operation spans parents, a dash (-) may be accepted as a wildcard.\n We only support updating the project of databases for now.",- },- {- name: "requests",- type: "array<bytebase.v1.UpdateDatabaseRequest>",- description:- "The request message specifying the resources to update.\n A maximum of 1000 databases can be modified in a batch.",- items: {- name: "item",- type: "bytebase.v1.UpdateDatabaseRequest",- },- },- ],- description: "",- },- "bytebase.v1.BatchUpdateDatabasesResponse": {- type: "object",- properties: [- {- name: "databases",- type: "array<bytebase.v1.Database>",- description: "Databases updated.",- items: {- name: "item",- type: "bytebase.v1.Database",- },- },- ],- description: "",- },- "bytebase.v1.BatchUpdateInstancesRequest": {- type: "object",- properties: [- {- name: "requests",- type: "array<bytebase.v1.UpdateInstanceRequest>",- description: "The request message specifying the resources to update.",- items: {- name: "item",- type: "bytebase.v1.UpdateInstanceRequest",- },- },- ],- description: "",- },- "bytebase.v1.BatchUpdateInstancesResponse": {- type: "object",- properties: [- {- name: "instances",- type: "array<bytebase.v1.Instance>",- items: {- name: "item",- type: "bytebase.v1.Instance",- },- },- ],- description: "",- },- "bytebase.v1.BatchUpdateIssuesStatusRequest": {- type: "object",- properties: [- {- name: "issues",- type: "array<string>",- description:- "The list of issues to update.\n Format: projects/{project}/issues/{issue}",- items: {- name: "item",- type: "string",- },- },- {- name: "parent",- type: "string",- description:- "The parent resource shared by all issues being updated.\n Format: projects/{project}\n If the operation spans parents, a dash (-) may be accepted as a wildcard.\n We only support updating the status of databases for now.",- },- {- name: "reason",- type: "string",- description: "The reason for the status change.",- },- {- name: "status",- type: "bytebase.v1.IssueStatus",- description: "The new status.",- },- ],- description: "",- },- "bytebase.v1.BatchUpdateWorksheetOrganizerRequest": {- type: "object",- properties: [- {- name: "requests",- type: "array<bytebase.v1.UpdateWorksheetOrganizerRequest>",- items: {- name: "item",- type: "bytebase.v1.UpdateWorksheetOrganizerRequest",- },- },- ],- description: "",- },- "bytebase.v1.BatchUpdateWorksheetOrganizerResponse": {- type: "object",- properties: [- {- name: "worksheetOrganizers",- type: "array<bytebase.v1.WorksheetOrganizer>",- items: {- name: "item",- type: "bytebase.v1.WorksheetOrganizer",- },- },- ],- description: "",- },- "bytebase.v1.BillingInterval": {- type: "enum",- values: ["BILLING_INTERVAL_UNSPECIFIED", "MONTH", "YEAR"],- description: "",- },- "bytebase.v1.Binding": {- type: "object",- properties: [- {- name: "condition",- type: "google.type.Expr",- description:- 'The condition that is associated with this binding, only used in the project IAM policy.\n If the condition evaluates to true, then this binding applies to the current request.\n If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding.\n The syntax and semantics of CEL are documented at https://github.com/google/cel-spec\n\n Support variables:\n resource.database: the database full name in "instances/{instance}/databases/{database}" format, used by any role with SQL Editor read (e.g. "roles/sqlEditorUser", "roles/sqlEditorReadUser") or write (bb.sql.ddl / bb.sql.dml) access, support "==" operator.\n resource.schema_name: the schema name, used by any role with SQL Editor read or write (bb.sql.ddl / bb.sql.dml) access; for writes it is evaluated per write-target table, support "==" operator.\n resource.table_name: the table name, used by any role with SQL Editor read or write (bb.sql.ddl / bb.sql.dml) access; for writes it is evaluated per write-target table, support "==" operator.\n resource.environment_id: the environment to allow the DDL/DML operation in the SQL Editor, only works for the role with bb.sql.ddl or bb.sql.dml permissions. Support "in" operator.\n request.time: the expiration. Only support "<" operation in `request.time < timestamp("{ISO datetime string format}")`.\n\n Known limitations of table/schema-scoped DDL/DML grants:\n - The scope only gates the write target, not the read sources of a write: e.g. `INSERT INTO granted_table SELECT * FROM other_table` may read `other_table` without a grant on it, so a table-scoped write grant is not an exfiltration boundary.\n - It must be paired with a database/project-level read grant: a table-scoped grant alone does not satisfy the SQL Editor query method permission (bb.databases.get).\n - A resource.schema_name-scoped grant only authorizes a write whose schema is unambiguous — qualify the table (schema.table) or select the schema for the SQL Editor session. An unqualified write whose effective schema cannot be determined ahead of execution is denied (qualify it, or use a table-only grant).\n - Multi-statement batches are authorized at the database level: an earlier statement can rebind the session\'s default schema or database mid-batch, so per-table/schema scoping is dropped and a table/schema-scoped grant requires a database-level grant. The database-level check is still per target database — a qualified cross-database write is gated by a grant on its own database, not the request database — but an unqualified write whose session default is rebound mid-batch is evaluated against the database it literally names, so qualify cross-database writes or run them as single statements.\n - A write target in a different project than the SQL-Editor session\'s database is denied: the per-target check evaluates the session project\'s IAM policy, so a cross-project write is failed closed (to write it, open the SQL Editor on a database in the target project).\n - Enforcement is on the statement\'s literal write target; writes routed elsewhere by a view/synonym, or into a temporary schema (e.g. pg_temp), are evaluated against what the statement names, not the ultimate base object.\n - Write-target gating uses an ALLOWLIST of statement types the resolver models. It does NOT cover every syntactically-identifiable cross-database write; statement types off the allowlist are authorized against the request database. The allowlist is:\n - Modeled table/data writes (per-table/schema-scopable): INSERT/UPDATE/DELETE/TRUNCATE/MERGE, LOAD DATA, IMPORT INTO, CREATE TABLE AS / SELECT INTO, and table-level CREATE/DROP/ALTER/RENAME/index.\n - Modeled non-table object DDL (gated at the DATABASE level by the object\'s own explicit database/schema qualifier; an unqualified name keeps the request-database check): CREATE/ALTER/DROP of view, procedure/function/routine, trigger, sequence, synonym, type, and (Oracle) package and cluster; plus Oracle ALTER/DROP MATERIALIZED VIEW (Oracle CREATE MATERIALIZED VIEW is not modeled — see below).\n NOT modeled (these fall back to the request-database check, so a qualified cross-database one is authorized against the request database): MySQL CREATE TRIGGER and CREATE/ALTER/DROP EVENT (bare-string AST names); MSSQL ALTER of view/procedure/function/trigger (no ALTER node in the grammar); Oracle CREATE MATERIALIZED VIEW and the niche object DDL — dimension, attribute dimension, hierarchy, analytic view, JSON duality view, materialized zonemap, operator, in-memory join group, property graph, vector index, index type, domain; COPY ... FROM; and engine-specific bulk-load / deprecated text writes. A structural "write-target object database" extraction layer to remove this allowlist dependence is tracked as a follow-up.\n - Out of scope (read sources / indirect effects): the tables a write READS (INSERT … SELECT, MERGE … USING, CREATE TABLE AS … SELECT) and objects reached indirectly via views/synonyms/function bodies/triggers are NOT gated.\n Invariant: for a statement ON the modeled allowlist that explicitly names a different database as its write target, the ACL uses that target database, not the request database. Statement types OFF the allowlist are authorized against the request database.\n\n For example:\n resource.database == "instances/local-pg/databases/postgres" && resource.schema_name in ["public","another_schema"]\n resource.database == "instances/local-pg/databases/bytebase" && resource.schema_name == "public" && resource.table_name in ["audit_log"]\n resource.database == "instances/local-pg/databases/postgres" && resource.environment_id in ["test"]\n request.time < timestamp("2025-04-26T11:24:48.655Z")',- },- {- name: "members",- type: "array<string>",- description:- "Specifies the principals requesting access for a Bytebase resource.\n For users, the member should be: user:{email}\n For groups, the member should be: group:{email}\n For service accounts, the member should be: serviceAccount:{email}\n For workload identities, the member should be: workloadIdentity:{email}",- items: {- name: "item",- type: "string",- },- },- {- name: "parsedExpr",- type: "google.api.expr.v1alpha1.Expr",- description: "The parsed expression of the condition.",- },- {- name: "role",- type: "string",- description:- "The role that is assigned to the members.\n Format: roles/{role}",- },- ],- description:- "Binding associates members with a role and optional conditions.",- },- "bytebase.v1.BindingDelta": {- type: "object",- properties: [- {- name: "action",- type: "bytebase.v1.BindingDelta.Action",- description: "The action that was performed on a Binding.",- },- {- name: "condition",- type: "google.type.Expr",- description: "The condition that is associated with this binding.",- },- {- name: "member",- type: "string",- description: "Follows the same format of Binding.members.",- },- {- name: "role",- type: "string",- description:- "Role that is assigned to `members`.\n For example, `roles/projectOwner`.",- },- ],- description: "A single change to a binding.",- },- "bytebase.v1.BindingDelta.Action": {- type: "enum",- values: ["ACTION_UNSPECIFIED", "ADD", "REMOVE"],- description: "Type of action performed on a binding.",- },- "bytebase.v1.BoundingBox": {- type: "object",- properties: [- {- name: "xmax",- type: "number",- format: "double",- description: "Maximum X coordinate",- },- {- name: "xmin",- type: "number",- format: "double",- description: "Minimum X coordinate",- },- {- name: "ymax",- type: "number",- format: "double",- description: "Maximum Y coordinate",- },- {- name: "ymin",- type: "number",- format: "double",- description: "Minimum Y coordinate",- },- ],- description:- "BoundingBox defines the spatial bounds for GEOMETRY spatial indexes.",- },- "bytebase.v1.CancelPlanCheckRunRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the plan check run to cancel.\n Format: projects/{project}/plans/{plan}/planCheckRun",- },- ],- description: "",- },- "bytebase.v1.CancelPurchaseRequest": {- type: "object",- properties: [- {- name: "comment",- type: "string",- description:- "Optional free-form comment. Max 500 chars (Stripe limit).",- },- {- name: "feedback",- type: "string",- description:- 'Reason the customer is canceling. Maps to Stripe\'s cancellation_details.feedback.\n Valid Stripe values: "customer_service", "low_quality", "missing_features",\n "switched_service", "too_complex", "too_expensive", "unused", "other".\n Required.',- },- ],- description: "",- },- "bytebase.v1.Changelog": {- type: "object",- properties: [- {- name: "createTime",- type: "google.protobuf.Timestamp",- },- {- name: "name",- type: "string",- description:- "Format: instances/{instance}/databases/{database}/changelogs/{changelog}",- },- {- name: "planTitle",- type: "string",- description:- "The title of the plan associated with this changelog's task run.\n This field is populated by deriving the plan from task_run for display purposes.",- },- {- name: "schema",- type: "string",- },- {- name: "schemaSize",- type: "integer",- format: "int64",- },- {- name: "status",- type: "bytebase.v1.Changelog.Status",- },- {- name: "taskRun",- type: "string",- description:- "Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}",- },- ],- description: "",- },- "bytebase.v1.Changelog.Status": {- type: "enum",- values: ["STATUS_UNSPECIFIED", "PENDING", "DONE", "FAILED"],- description: "",- },- "bytebase.v1.ChangelogView": {- type: "enum",- values: [- "CHANGELOG_VIEW_UNSPECIFIED",- "CHANGELOG_VIEW_BASIC",- "CHANGELOG_VIEW_FULL",- ],- description: "",- },- "bytebase.v1.CheckConstraintMetadata": {- type: "object",- properties: [- {- name: "expression",- type: "string",- description: "The expression is the expression of a check constraint.",- },- {- name: "name",- type: "string",- description: "The name is the name of a check constraint.",- },- ],- description:- "CheckConstraintMetadata is the metadata for check constraints.",- },- "bytebase.v1.CheckReleaseRequest": {- type: "object",- properties: [- {- name: "customRules",- type: "string",- description:- 'Custom linting rules in natural language for AI-powered validation.\n Each rule should be a clear statement describing the desired schema constraint.\n Example: "All tables must have a primary key"\n Example: "VARCHAR columns should specify a maximum length"',- },- {- name: "parent",- type: "string",- description: "Format: projects/{project}",- },- {- name: "release",- type: "bytebase.v1.Release",- description: "The release to check.",- },- {- name: "targets",- type: "array<string>",- description:- "The targets to dry-run the release.\n Can be database or databaseGroup.\n Format:\n projects/{project}/databaseGroups/{databaseGroup}\n instances/{instance}/databases/{database}",- items: {- name: "item",- type: "string",- },- },- {- name: "vcsUser",- type: "bytebase.v1.VCSUser",- description:- "The non-bot VCS pull request or merge request creator observed by bytebase-release.\n If absent, Bytebase skips VCS user tracking and VCS user limit enforcement.",- },- ],- description: "",- },- "bytebase.v1.CheckReleaseResponse": {- type: "object",- properties: [- {- name: "affectedRows",- type: "integer",- format: "int64",- description: "The total affected rows across all checks.",- },- {- name: "results",- type: "array<bytebase.v1.CheckReleaseResponse.CheckResult>",- description: "The check results for each file and target combination.",- items: {- name: "item",- type: "bytebase.v1.CheckReleaseResponse.CheckResult",- },- },- {- name: "riskLevel",- type: "bytebase.v1.RiskLevel",- description: "The aggregated risk level of the check.",- },- ],- description: "",- },- "bytebase.v1.CheckReleaseResponse.CheckResult": {- type: "object",- properties: [- {- name: "advices",- type: "array<bytebase.v1.Advice>",- description: "The list of advice for the file and the target.",- items: {- name: "item",- type: "bytebase.v1.Advice",- },- },- {- name: "affectedRows",- type: "integer",- format: "int64",- description:- "The count of affected rows of the statement on the target.",- },- {- name: "file",- type: "string",- description: "The file path that is being checked.",- },- {- name: "riskLevel",- type: "bytebase.v1.RiskLevel",- description: "The risk level of the statement on the target.",- },- {- name: "target",- type: "string",- description:- "The target that the check is performed on.\n Should be a database. Format: instances/{instance}/databases/{database}",- },- ],- description: "Check result for a single release file on a target database.",- },- "bytebase.v1.ColumnCatalog": {- type: "object",- properties: [- {- name: "classification",- type: "string",- description: "The data classification level for this column.",- },- {- name: "labels",- type: "object",- description: "User-defined labels for this column.",- additionalProperties: {- name: "value",- type: "string",- },- },- {- name: "name",- type: "string",- description: "The column name.",- },- {- name: "objectSchema",- type: "bytebase.v1.ObjectSchema",- description: "Object schema for complex column types like JSON.",- },- {- name: "semanticType",- type: "string",- description: "The semantic type describing the data purpose.",- },- ],- description: "Column metadata within a table.",- },- "bytebase.v1.ColumnCatalog.LabelsEntry": {- type: "object",- properties: [- {- name: "key",- type: "string",- },- {- name: "value",- type: "string",- },- ],- description: "",- },- "bytebase.v1.ColumnMetadata": {- type: "object",- properties: [- {- name: "characterSet",- type: "string",- description: "The character_set is the character_set of a column.",- },- {- name: "collation",- type: "string",- description: "The collation is the collation of a column.",- },- {- name: "comment",- type: "string",- description: "The comment is the comment of a column.",- },- {- name: "default",- type: "string",- description: "The default value of column.",- },- {- name: "defaultConstraintName",- type: "string",- description:- "The default_constraint_name is the name of the default constraint, MSSQL only.\n In MSSQL, default values are implemented as named constraints. When modifying or\n dropping a column's default value, you must reference the constraint by name.\n This field stores the actual constraint name from the database.\n\n Example: A column definition like:\n CREATE TABLE employees (\n status NVARCHAR(20) DEFAULT 'active'\n )\n\n Will create a constraint with an auto-generated name like 'DF__employees__statu__3B75D760'\n or a user-defined name if specified:\n ALTER TABLE employees ADD CONSTRAINT DF_employees_status DEFAULT 'active' FOR status\n\n To modify the default, you must first drop the existing constraint by name:\n ALTER TABLE employees DROP CONSTRAINT DF__employees__statu__3B75D760\n ALTER TABLE employees ADD CONSTRAINT DF_employees_status DEFAULT 'inactive' FOR status\n\n This field is populated when syncing from the database. When empty (e.g., when parsing\n from SQL files), the system cannot automatically drop the constraint.",- },- {- name: "defaultOnNull",- type: "boolean",- description:- "Oracle specific metadata.\n The default_on_null is the default on null of a column.",- },- {- name: "generation",- type: "bytebase.v1.GenerationMetadata",- description: "The generation is the generation of a column.",- },- {- name: "hasDefault",- type: "boolean",- },- {- name: "identityGeneration",- type: "bytebase.v1.ColumnMetadata.IdentityGeneration",- description:- "The identity_generation is for identity columns, PG only.",- },- {- name: "identityIncrement",- type: "integer",- format: "int64",- description:- "The identity_increment is for identity columns, MSSQL only.",- },- {- name: "identitySeed",- type: "integer",- format: "int64",- description: "The identity_seed is for identity columns, MSSQL only.",- },- {- name: "isIdentity",- type: "boolean",- },- {- name: "isInvisible",- type: "boolean",- description:- "Whether the column is invisible (hidden from SELECT *), MySQL 8.0.23+ only.",- },- {- name: "name",- type: "string",- description: "The name is the name of a column.",- },- {- name: "nullable",- type: "boolean",- description: "The nullable is the nullable of a column.",- },- {- name: "onUpdate",- type: "string",- description:- "The on_update is the on update action of a column.\n For MySQL like databases, it's only supported for TIMESTAMP columns with\n CURRENT_TIMESTAMP as on update value.",- },- {- name: "position",- type: "integer",- format: "int32",- description: "The position is the position in columns.",- },- {- name: "srid",- type: "integer",- description:- "The spatial reference system identifier of a spatial column, MySQL 8.0 only.\n Unset means the column declares no SRID; presence carries the explicit SRID,\n including the valid SRID 0. SRS_IDs are unsigned 32-bit (custom SRSs may exceed\n int32).",- },- {- name: "type",- type: "string",- description: "The type is the type of a column.",- },- ],- description: "ColumnMetadata is the metadata for columns.",- },- "bytebase.v1.ColumnMetadata.IdentityGeneration": {- type: "enum",- values: ["IDENTITY_GENERATION_UNSPECIFIED", "ALWAYS", "BY_DEFAULT"],- description: "",- },- "bytebase.v1.CompositeTypeAttribute": {- type: "object",- properties: [- {- name: "collation",- type: "string",- description:- 'The non-default collation of the attribute as an emit-ready SQL\n identifier reference (quoted as needed, schema-qualified when outside\n pg_catalog), empty otherwise. e.g. `"C"` or `locale.en_us`.',- },- {- name: "comment",- type: "string",- description: "The comment describing the attribute.",- },- {- name: "name",- type: "string",- description: "The name of the attribute.",- },- {- name: "type",- type: "string",- description:- "The attribute type. User-defined types are always schema-qualified.",- },- ],- description: "",- },- "bytebase.v1.CompositeTypeMetadata": {- type: "object",- properties: [- {- name: "attributes",- type: "array<bytebase.v1.CompositeTypeAttribute>",- description: "The ordered attributes of the composite type.",- items: {- name: "item",- type: "bytebase.v1.CompositeTypeAttribute",- },- },- {- name: "comment",- type: "string",- description: "The comment describing the composite type.",- },- {- name: "name",- type: "string",- description: "The name of the composite type.",- },- ],- description: "",- },- "bytebase.v1.CreateAccessGrantRequest": {- type: "object",- properties: [- {- name: "accessGrant",- type: "bytebase.v1.AccessGrant",- description: "The access grant to create.",- },- {- name: "parent",- type: "string",- description:- "The parent project for the access grant.\n Format: projects/{project}",- },- ],- description: "",- },- "bytebase.v1.CreateDatabaseGroupRequest": {- type: "object",- properties: [- {- name: "databaseGroup",- type: "bytebase.v1.DatabaseGroup",- description: "The database group to create.",- },- {- name: "databaseGroupId",- type: "string",- description:- "The ID to use for the database group, which will become the final component of\n the database group's resource name.\n\n This value should be 4-63 characters, and valid characters\n are /[a-z][0-9]-/.",- },- {- name: "parent",- type: "string",- description:- "The parent resource where this database group will be created.\n Format: projects/{project}",- },- {- name: "validateOnly",- type: "boolean",- description:- "If set, validate the create request and preview the full database group response, but do not actually create it.",- },- ],- description: "Request message for creating a database group.",- },- "bytebase.v1.CreateGroupRequest": {- type: "object",- properties: [- {- name: "group",- type: "bytebase.v1.Group",- description: "The group to create.",- },- {- name: "groupEmail",- type: "string",- description:- "The email to use for the group, which will become the final component\n of the group's resource name.",- },- ],- description: "Request message for creating a group.",- },- "bytebase.v1.CreateIdentityProviderRequest": {- type: "object",- properties: [- {- name: "identityProvider",- type: "bytebase.v1.IdentityProvider",- description: "The identity provider to create.",- },- {- name: "identityProviderId",- type: "string",- description:- "The ID to use for the identity provider, which will become the final component of\n the identity provider's resource name.\n\n This value should be 4-63 characters, and valid characters\n are /[a-z][0-9]-/.",- },- {- name: "validateOnly",- type: "boolean",- description:- "If set to true, the request will be validated without actually creating the identity provider.",- },- ],- description: "",- },- "bytebase.v1.CreateInstanceRequest": {- type: "object",- properties: [- {- name: "initialDatabaseProject",- type: "string",- description:- "The project to assign newly discovered databases to during initial sync.\n Format: projects/{project}",- },- {- name: "instance",- type: "bytebase.v1.Instance",- description: "The instance to create.",- },- {- name: "instanceId",- type: "string",- description:- "The ID to use for the instance, which will become the final component of\n the instance's resource name.\n\n This value should be 4-63 characters, and valid characters\n are /[a-z][0-9]-/.",- },- {- name: "validateOnly",- type: "boolean",- description: "Validate only also tests the data source connection.",- },- ],- description: "",- },- "bytebase.v1.CreateIssueCommentRequest": {- type: "object",- properties: [- {- name: "issueComment",- type: "bytebase.v1.IssueComment",- description: "The comment to create.",- },- {- name: "parent",- type: "string",- description:- "The issue name\n Format: projects/{project}/issues/{issue}",- },- ],- description: "",- },- "bytebase.v1.CreateIssueRequest": {- type: "object",- properties: [- {- name: "issue",- type: "bytebase.v1.Issue",- description: "The issue to create.",- },- {- name: "parent",- type: "string",- description:- "The parent, which owns this collection of issues.\n Format: projects/{project}",- },- ],- description: "",- },- "bytebase.v1.CreatePlanRequest": {- type: "object",- properties: [- {- name: "parent",- type: "string",- description:- "The parent project where this plan will be created.\n Format: projects/{project}",- },- {- name: "plan",- type: "bytebase.v1.Plan",- description: "The plan to create.",- },- ],- description: "",- },- "bytebase.v1.CreatePolicyRequest": {- type: "object",- properties: [- {- name: "parent",- type: "string",- description:- "The parent resource where this instance will be created.\n Workspace resource name: workspaces/{workspace-id}.\n Environment resource name: environments/environment-id.\n Instance resource name: instances/instance-id.\n Database resource name: instances/instance-id/databases/database-name.",- },- {- name: "policy",- type: "bytebase.v1.Policy",- description: "The policy to create.",- },- {- name: "type",- type: "bytebase.v1.PolicyType",- description: "The type of policy to create.",- },- ],- description: "",- },- "bytebase.v1.CreateProjectRequest": {- type: "object",- properties: [- {- name: "project",- type: "bytebase.v1.Project",- description: "The project to create.",- },- {- name: "projectId",- type: "string",- description:- "The ID to use for the project, which will become the final component of\n the project's resource name.\n\n This value should be 4-63 characters, and valid characters\n are /[a-z][0-9]-/.",- },- ],- description: "",- },- "bytebase.v1.CreatePurchaseRequest": {- type: "object",- properties: [- {- name: "interval",- type: "bytebase.v1.BillingInterval",- },- {- name: "plan",- type: "bytebase.v1.PlanType",- },- {- name: "seats",- type: "integer",- format: "int32",- },- ],- description: "",- },- "bytebase.v1.CreateReleaseRequest": {- type: "object",- properties: [- {- name: "parent",- type: "string",- description: "Format: projects/{project}",- },- {- name: "release",- type: "bytebase.v1.Release",- description: "The release to create.",- },- {- name: "releaseIdTemplate",- type: "string",- description:- 'Template for release ID generation.\n Available variables: {date}, {time}, {timestamp}, {iteration}.\n Example: "release_{date}-RC{iteration}" generates "release_20260119-RC00".\n Default: "release_{date}-RC{iteration}".',- },- {- name: "releaseIdTimezone",- type: "string",- description:- 'Timezone for {date} and {time} variables in the template.\n Must be a valid IANA timezone (e.g., "UTC", "America/Los_Angeles").\n Default: "UTC".',- },- ],- description: "",- },- "bytebase.v1.CreateReviewConfigRequest": {- type: "object",- properties: [- {- name: "reviewConfig",- type: "bytebase.v1.ReviewConfig",- description: "The SQL review config to create.",- },- ],- description: "",- },- "bytebase.v1.CreateRevisionRequest": {- type: "object",- properties: [- {- name: "parent",- type: "string",- description: "Format: instances/{instance}/databases/{database}",- },- {- name: "revision",- type: "bytebase.v1.Revision",- description: "The revision to create.",- },- ],- description: "",- },- "bytebase.v1.CreateRoleRequest": {- type: "object",- properties: [- {- name: "role",- type: "bytebase.v1.Role",- description: "The role to create.",- },- {- name: "roleId",- type: "string",- description:- "The ID to use for the role, which will become the final component\n of the role's resource name.\n\n This value should be 4-63 characters, and valid characters\n are /[a-z][A-Z][0-9]/.",- },- ],- description: "",- },- "bytebase.v1.CreateRolloutRequest": {- type: "object",- properties: [- {- name: "parent",- type: "string",- description:- "The parent plan for which this rollout will be created.\n Format: projects/{project}/plans/{plan}",- },- {- name: "target",- type: "string",- description:- 'Create the rollout only for the specified target.\n Format: environments/{environment}\n If unspecified, all stages are created.\n If set to "", no stages are created.',- },- ],- description: "",- },- "bytebase.v1.CreateServiceAccountRequest": {- type: "object",- properties: [- {- name: "parent",- type: "string",- description:- "The parent resource where this service account will be created.\n Format: projects/{project} for project-level, workspaces/{id} for workspace-level.",- },- {- name: "serviceAccount",- type: "bytebase.v1.ServiceAccount",- description: "The service account to create.",- },- {- name: "serviceAccountId",- type: "string",- description:- "The ID to use for the service account, which will become the final component\n of the service account's email in the format: {service_account_id}@service.bytebase.com\n or {service_account_id}@{project-id}.service.bytebase.com",- },- ],- description: "Request message for creating a service account.",- },- "bytebase.v1.CreateSheetRequest": {- type: "object",- properties: [- {- name: "parent",- type: "string",- description:- "The parent resource where this sheet will be created.\n Format: projects/{project}",- },- {- name: "sheet",- type: "bytebase.v1.Sheet",- description: "The sheet to create.",- },- ],- description: "",- },- "bytebase.v1.CreateUserRequest": {- type: "object",- properties: [- {- name: "user",- type: "bytebase.v1.User",- description: "The user to create.",- },- ],- description: "",- },- "bytebase.v1.CreateWorkloadIdentityRequest": {- type: "object",- properties: [- {- name: "parent",- type: "string",- description:- "The parent resource where this workload identity will be created.\n Format: projects/{project} for project-level, workspaces/{id} for workspace-level.",- },- {- name: "workloadIdentity",- type: "bytebase.v1.WorkloadIdentity",- description: "The workload identity to create.",- },- {- name: "workloadIdentityId",- type: "string",- description:- "The ID to use for the workload identity, which will become the final component\n of the workload identity's email in the format: {workload_identity_id}@workload.bytebase.com\n or {workload_identity_id}@{project-id}.workload.bytebase.com",- },- ],- description: "Request message for creating a workload identity.",- },- "bytebase.v1.CreateWorksheetRequest": {- type: "object",- properties: [- {- name: "parent",- type: "string",- description:- "The parent resource where this worksheet will be created.\n Format: projects/{project}",- },- {- name: "worksheet",- type: "bytebase.v1.Worksheet",- description: "The worksheet to create.",- },- ],- description: "",- },- "bytebase.v1.DataClassificationSetting": {- type: "object",- properties: [- {- name: "configs",- type: "array<bytebase.v1.DataClassificationSetting.DataClassificationConfig>",- items: {- name: "item",- type: "bytebase.v1.DataClassificationSetting.DataClassificationConfig",- },- },- ],- description: "",- },- "bytebase.v1.DataClassificationSetting.DataClassificationConfig": {- type: "object",- properties: [- {- name: "classification",- type: "object",- description:- "classification is the id - DataClassification map.\n The id should in [0-9]+-[0-9]+-[0-9]+ format.",- additionalProperties: {- name: "value",- type: "bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification",- },- },- {- name: "id",- type: "string",- description:- "id is the uuid for classification. Each project can chose one classification config.",- },- {- name: "levels",- type: "array<bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level>",- description: "levels is user defined level list for classification.",- items: {- name: "item",- type: "bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level",- },- },- {- name: "title",- type: "string",- },- ],- description: "",- },- "bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry":- {- type: "object",- properties: [- {- name: "key",- type: "string",- },- {- name: "value",- type: "bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification",- },- ],- description: "",- },- "bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification":- {- type: "object",- properties: [- {- name: "id",- type: "string",- description:- "id is the classification id in [0-9]+-[0-9]+-[0-9]+ format.",- },- {- name: "level",- type: "integer",- format: "int32",- description: "The sensitivity level. Maps to Level.level.",- },- {- name: "title",- type: "string",- },- ],- description: "",- },- "bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level": {- type: "object",- properties: [- {- name: "level",- type: "integer",- format: "int32",- description: "The numeric level for ordering. Higher = more sensitive.",- },- {- name: "title",- type: "string",- },- ],- description: "",- },- "bytebase.v1.DataSource": {- type: "object",- properties: [- {- name: "additionalAddresses",- type: "array<bytebase.v1.DataSource.Address>",- description: "additional_addresses is used for MongoDB replica set.",- items: {- name: "item",- type: "bytebase.v1.DataSource.Address",- },- },- {- name: "authenticationDatabase",- type: "string",- description:- "authentication_database is the database name to authenticate against, which stores the user credentials.",- },- {- name: "authenticationPrivateKey",- type: "string",- description:- "PKCS#8 private key in PEM format. If it's empty string, no private key is required.\n Used for authentication when connecting to the data source.",- },- {- name: "authenticationPrivateKeyPassphrase",- type: "string",- description:- "Passphrase for the encrypted PKCS#8 private key. Only used when the private key is encrypted.",- },- {- name: "authenticationType",- type: "bytebase.v1.DataSource.AuthenticationType",- },- {- name: "awsCredential",- type: "bytebase.v1.DataSource.AWSCredential",- },- {- name: "azureCredential",- type: "bytebase.v1.DataSource.AzureCredential",- },- {- name: "cloudSqlIpType",- type: "bytebase.v1.DataSource.CloudSQLIPType",- description:- "cloud_sql_ip_type selects the Cloud SQL IP type for Google Cloud SQL IAM connections.\n CLOUD_SQL_IP_TYPE_UNSPECIFIED is treated as PUBLIC for backward compatibility.",- },- {- name: "cluster",- type: "string",- description:- "Cluster is the cluster name for the data source. Used by CockroachDB.",- },- {- name: "database",- type: "string",- description: "The name of the database to connect to.",- },- {- name: "directConnection",- type: "boolean",- description:- "direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string.",- },- {- name: "externalSecret",- type: "bytebase.v1.DataSourceExternalSecret",- },- {- name: "extraConnectionParameters",- type: "object",- description:- "Extra connection parameters for the database connection.\n For PostgreSQL HA, this can be used to set target_session_attrs=read-write",- additionalProperties: {- name: "value",- type: "string",- },- },- {- name: "gcpCredential",- type: "bytebase.v1.DataSource.GCPCredential",- },- {- name: "host",- type: "string",- description: "The hostname or IP address of the database server.",- },- {- name: "id",- type: "string",- description: "The unique identifier for this data source.",- },- {- name: "masterName",- type: "string",- description:- "master_name is the master name used by connecting redis-master via redis sentinel.",- },- {- name: "masterPassword",- type: "string",- },- {- name: "masterUsername",- type: "string",- description:- "master_username and master_password are master credentials used by redis sentinel mode.",- },- {- name: "password",- type: "string",- description: "The password for database authentication.",- },- {- name: "port",- type: "string",- description: "The port number of the database server.",- },- {- name: "redisType",- type: "bytebase.v1.DataSource.RedisType",- },- {- name: "region",- type: "string",- description:- "region is the location of where the DB is, works for AWS RDS. For example, us-east-1.",- },- {- name: "replicaSet",- type: "string",- description: "replica_set is used for MongoDB replica set.",- },- {- name: "saslConfig",- type: "bytebase.v1.SASLConfig",- },- {- name: "serviceName",- type: "string",- },- {- name: "sid",- type: "string",- description: "sid and service_name are used for Oracle.",- },- {- name: "srv",- type: "boolean",- description:- "srv, authentication_database and replica_set are used for MongoDB.\n srv is a boolean flag that indicates whether the host is a DNS SRV record.",- },- {- name: "sshHost",- type: "string",- description:- "Connection over SSH.\n The hostname of the SSH server agent.\n Required.",- },- {- name: "sshPassword",- type: "string",- description:- "The password to login the server. If it's empty string, no password is required.",- },- {- name: "sshPort",- type: "string",- description:- "The port of the SSH server agent. It's 22 typically.\n Required.",- },- {- name: "sshPrivateKey",- type: "string",- description:- 'The private key to login the server. If it\'s empty string, we will use the system default private key from os.Getenv("SSH_AUTH_SOCK").',- },- {- name: "sshUser",- type: "string",- description: "The user to login the server.\n Required.",- },- {- name: "sslCa",- type: "string",- description: "The SSL certificate authority certificate.",- },- {- name: "sslCaPath",- type: "string",- description:- "The local filesystem path to the SSL certificate authority certificate.",- },- {- name: "sslCaPathSet",- type: "boolean",- description:- "Whether an SSL certificate authority path has been configured.",- },- {- name: "sslCaSet",- type: "boolean",- description:- "Whether an SSL certificate authority certificate has been configured.",- },- {- name: "sslCert",- type: "string",- description: "The SSL client certificate.",- },- {- name: "sslCertPath",- type: "string",- description: "The local filesystem path to the SSL client certificate.",- },- {- name: "sslCertPathSet",- type: "boolean",- description:- "Whether an SSL client certificate path has been configured.",- },- {- name: "sslCertSet",- type: "boolean",- description: "Whether an SSL client certificate has been configured.",- },- {- name: "sslKey",- type: "string",- description: "The SSL client private key.",- },- {- name: "sslKeyPath",- type: "string",- description: "The local filesystem path to the SSL client private key.",- },- {- name: "sslKeyPathSet",- type: "boolean",- description:- "Whether an SSL client private key path has been configured.",- },- {- name: "sslKeySet",- type: "boolean",- description: "Whether an SSL client private key has been configured.",- },- {- name: "type",- type: "bytebase.v1.DataSourceType",- description: "The type of data source (ADMIN or READ_ONLY).",- },- {- name: "username",- type: "string",- description: "The username for database authentication.",- },- {- name: "useSsl",- type: "boolean",- description:- "Use SSL to connect to the data source. By default, we use system default SSL configuration.",- },- {- name: "verifyTlsCertificate",- type: "boolean",- description:- "verify_tls_certificate enables TLS certificate verification for SSL connections.\n Default is false (no verification) for backward compatibility.\n Set to true for secure connections (recommended for production).\n Only set to false for development or when certificates cannot be properly\n validated (e.g., self-signed certs, VPN environments).",- },- {- name: "warehouseId",- type: "string",- description: "warehouse_id is used by Databricks.",- },- ],- description: "",- },- "bytebase.v1.DataSource.AWSCredential": {- type: "object",- properties: [- {- name: "accessKeyId",- type: "string",- },- {- name: "externalId",- type: "string",- description:- "Optional external ID for additional security when assuming role.\n See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html",- },- {- name: "roleArn",- type: "string",- description:- "ARN of IAM role to assume for cross-account access.\n See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html",- },- {- name: "secretAccessKey",- type: "string",- },- {- name: "sessionToken",- type: "string",- },- ],- description: "",- },- "bytebase.v1.DataSource.Address": {- type: "object",- properties: [- {- name: "host",- type: "string",- },- {- name: "port",- type: "string",- },- ],- description: "",- },- "bytebase.v1.DataSource.AuthenticationType": {- type: "enum",- values: [- "AUTHENTICATION_UNSPECIFIED",- "PASSWORD",- "GOOGLE_CLOUD_SQL_IAM",- "AWS_RDS_IAM",- "AZURE_IAM",- ],- description: "",- },- "bytebase.v1.DataSource.AzureCredential": {- type: "object",- properties: [- {- name: "clientId",- type: "string",- },- {- name: "clientSecret",- type: "string",- },- {- name: "tenantId",- type: "string",- },- ],- description: "",- },- "bytebase.v1.DataSource.CloudSQLIPType": {- type: "enum",- values: ["CLOUD_SQL_IP_TYPE_UNSPECIFIED", "PUBLIC", "PRIVATE", "PSC"],- description:- "CloudSQLIPType selects which Cloud SQL IP to dial for Google Cloud SQL IAM connections.",- },- "bytebase.v1.DataSource.ExtraConnectionParametersEntry": {- type: "object",- properties: [- {- name: "key",- type: "string",- },- {- name: "value",- type: "string",- },- ],- description: "",- },- "bytebase.v1.DataSource.GCPCredential": {- type: "object",- properties: [- {- name: "content",- type: "string",- },- ],- description: "",- },- "bytebase.v1.DataSource.RedisType": {- type: "enum",- values: ["REDIS_TYPE_UNSPECIFIED", "STANDALONE", "SENTINEL", "CLUSTER"],- description: "",- },- "bytebase.v1.DataSourceExternalSecret": {- type: "object",- properties: [- {- name: "appRole",- type: "bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption",- description: "AppRole authentication configuration.",- },- {- name: "authType",- type: "bytebase.v1.DataSourceExternalSecret.AuthType",- description:- "The authentication method for accessing the secret store.",- },- {- name: "engineName",- type: "string",- description: "engine name is the name for secret engine.",- },- {- name: "passwordKeyName",- type: "string",- description: "the key name for the password.",- },- {- name: "secretName",- type: "string",- description: "the secret name in the engine to store the password.",- },- {- name: "secretType",- type: "bytebase.v1.DataSourceExternalSecret.SecretType",- description: "The type of external secret store.",- },- {- name: "skipVaultTlsVerification",- type: "boolean",- description:- "TLS configuration for connecting to Vault server.\n These fields are separate from the database TLS configuration in DataSource.\n skip_vault_tls_verification disables TLS certificate verification for Vault connections.\n Default is false (verification enabled) for security.\n Only set to true for development or when certificates cannot be properly validated.",- },- {- name: "token",- type: "string",- description:- "Token for direct authentication. Interpreted according to token_type:\n the literal token (PLAIN), an environment variable name (ENVIRONMENT),\n or a file path (FILE).",- },- {- name: "tokenType",- type: "bytebase.v1.DataSourceExternalSecret.TokenType",- description:- "How to interpret the token field when auth_type is TOKEN.",- },- {- name: "url",- type: "string",- description: "The URL of the external secret store.",- },- {- name: "vaultSslCa",- type: "string",- description: "CA certificate for Vault server verification.",- },- {- name: "vaultSslCert",- type: "string",- description:- "Client certificate for mutual TLS authentication with Vault.",- },- {- name: "vaultSslKey",- type: "string",- description:- "Client private key for mutual TLS authentication with Vault.",- },- ],- description: "",- },- "bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption": {- type: "object",- properties: [- {- name: "mountPath",- type: "string",- description: "The path where the approle auth method is mounted.",- },- {- name: "roleId",- type: "string",- description: "The role ID for Vault AppRole authentication.",- },- {- name: "secretId",- type: "string",- description: "the secret id for the role without ttl.",- },- {- name: "type",- type: "bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType",- description: "The type of secret for AppRole authentication.",- },- ],- description: "",- },- "bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType": {- type: "enum",- values: ["SECRET_TYPE_UNSPECIFIED", "PLAIN", "ENVIRONMENT"],- description: "",- },- "bytebase.v1.DataSourceExternalSecret.AuthType": {- type: "enum",- values: ["AUTH_TYPE_UNSPECIFIED", "TOKEN", "VAULT_APP_ROLE"],- description: "",- },- "bytebase.v1.DataSourceExternalSecret.SecretType": {- type: "enum",- values: [- "SECRET_TYPE_UNSPECIFIED",- "VAULT_KV_V2",- "AWS_SECRETS_MANAGER",- "GCP_SECRET_MANAGER",- "AZURE_KEY_VAULT",- ],- description: "",- },- "bytebase.v1.DataSourceExternalSecret.TokenType": {- type: "enum",- values: ["TOKEN_TYPE_UNSPECIFIED", "PLAIN", "ENVIRONMENT", "FILE"],- description: "",- },- "bytebase.v1.DataSourceType": {- type: "enum",- values: ["DATA_SOURCE_UNSPECIFIED", "ADMIN", "READ_ONLY"],- description: "",- },- "bytebase.v1.Database": {- type: "object",- properties: [- {- name: "backupAvailable",- type: "boolean",- description: "The database is available for DML prior backup.",- },- {- name: "effectiveEnvironment",- type: "string",- description:- "The effective environment based on environment tag above and environment\n tag on the instance. Inheritance follows\n https://cloud.google.com/resource-manager/docs/tags/tags-overview.",- },- {- name: "environment",- type: "string",- description:- "The environment resource.\n Format: environments/prod where prod is the environment resource ID.",- },- {- name: "instanceResource",- type: "bytebase.v1.InstanceResource",- description: "The instance resource.",- },- {- name: "labels",- type: "object",- description: "Labels will be used for deployment and policy control.",- additionalProperties: {- name: "value",- type: "string",- },- },- {- name: "name",- type: "string",- description:- "The name of the database.\n Format: instances/{instance}/databases/{database}\n {database} is the database name in the instance.",- },- {- name: "project",- type: "string",- description: "The project for a database.\n Format: projects/{project}",- },- {- name: "release",- type: "string",- description:- "The release that was last applied to this database.\n Format: projects/{project}/releases/{release_id}\n Example: projects/my-project/releases/release_20260115-RC00",- },- {- name: "state",- type: "bytebase.v1.State",- description: "The existence of a database.",- },- {- name: "successfulSyncTime",- type: "google.protobuf.Timestamp",- description: "The latest synchronization time.",- },- {- name: "syncError",- type: "string",- description: "The error message if sync failed.",- },- {- name: "syncStatus",- type: "bytebase.v1.SyncStatus",- description: "The sync status of the database.",- },- ],- description: "",- },- "bytebase.v1.Database.LabelsEntry": {- type: "object",- properties: [- {- name: "key",- type: "string",- },- {- name: "value",- type: "string",- },- ],- description: "",- },- "bytebase.v1.DatabaseCatalog": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the database catalog.\n Format: instances/{instance}/databases/{database}/catalog",- },- {- name: "schemas",- type: "array<bytebase.v1.SchemaCatalog>",- description: "The schemas in the database.",- items: {- name: "item",- type: "bytebase.v1.SchemaCatalog",- },- },- ],- description:- "Catalog metadata for a database including schemas, tables, and columns.",- },- "bytebase.v1.DatabaseChangeMode": {- type: "enum",- values: ["DATABASE_CHANGE_MODE_UNSPECIFIED", "PIPELINE", "EDITOR"],- description: "",- },- "bytebase.v1.DatabaseGroup": {- type: "object",- properties: [- {- name: "databaseExpr",- type: "google.type.Expr",- description:- 'The condition that is associated with this database group.\n The syntax and semantics of CEL are documented at https://github.com/google/cel-spec\n\n Support variables:\n resource.environment_id: the environment resource id. Support "==", "!=", "in [XX]", "!(in [xx])" operations.\n resource.instance_id: the instance resource id. Support "==", "!=", "in [XX]", "!(in [xx])", "contains", "matches", "startsWith", "endsWith" operations.\n resource.database_name: the database name. Support "==", "!=", "in [XX]", "!(in [xx])", "contains", "matches", "startsWith", "endsWith" operations.\n resource.database_labels: the database labels. Support map access operations.\n All variables should join with "&&" condition.\n\n For example:\n resource.environment_id == "test" && resource.database_name.startsWith("sample_")\n resource.database_labels["tenant"] == "tenant1"',- },- {- name: "matchedDatabases",- type: "array<bytebase.v1.DatabaseGroup.Database>",- description:- "The list of databases that match the database group condition.",- items: {- name: "item",- type: "bytebase.v1.DatabaseGroup.Database",- },- },- {- name: "name",- type: "string",- description:- "The name of the database group.\n Format: projects/{project}/databaseGroups/{databaseGroup}",- },- {- name: "title",- type: "string",- description:- "The short name used in actual databases specified by users.",- },- ],- description: "A group of databases matched by expressions.",- },- "bytebase.v1.DatabaseGroup.Database": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The resource name of the database.\n Format: instances/{instance}/databases/{database}",- },- ],- description: "A database within a database group.",- },- "bytebase.v1.DatabaseGroupView": {- type: "enum",- values: [- "DATABASE_GROUP_VIEW_UNSPECIFIED",- "DATABASE_GROUP_VIEW_BASIC",- "DATABASE_GROUP_VIEW_FULL",- ],- description: "View options for database group responses.",- },- "bytebase.v1.DatabaseMetadata": {- type: "object",- properties: [- {- name: "characterSet",- type: "string",- description: "The character_set is the character set of a database.",- },- {- name: "collation",- type: "string",- description: "The collation is the collation of a database.",- },- {- name: "extensions",- type: "array<bytebase.v1.ExtensionMetadata>",- description: "The extensions is the list of extensions in a database.",- items: {- name: "item",- type: "bytebase.v1.ExtensionMetadata",- },- },- {- name: "name",- type: "string",- description:- "The database metadata name.\n\n Format: instances/{instance}/databases/{database}/metadata",- },- {- name: "owner",- type: "string",- description: "The owner of the database.",- },- {- name: "schemas",- type: "array<bytebase.v1.SchemaMetadata>",- description: "The schemas is the list of schemas in a database.",- items: {- name: "item",- type: "bytebase.v1.SchemaMetadata",- },- },- {- name: "searchPath",- type: "string",- description:- "The search_path is the search path of a PostgreSQL database.",- },- ],- description: "DatabaseMetadata is the metadata for databases.",- },- "bytebase.v1.DatabaseSDLSchema": {- type: "object",- properties: [- {- name: "contentType",- type: "string",- description:- 'The MIME type of the schema content.\n Indicates how the client should interpret the schema field.\n Examples:\n - "text/plain; charset=utf-8" for SINGLE_FILE format\n - "application/zip" for MULTI_FILE format',- },- {- name: "schema",- type: "string",- format: "byte",- description:- "The SDL schema content.\n - For SINGLE_FILE format: contains the complete SDL schema as a text string.\n - For MULTI_FILE format: contains the ZIP archive as binary data.",- },- ],- description: "DatabaseSDLSchema contains the schema in SDL format.",- },- "bytebase.v1.DatabaseSchema": {- type: "object",- properties: [- {- name: "schema",- type: "string",- description: "The schema dump from database.",- },- ],- description: "DatabaseSchema is the metadata for databases.",- },- "bytebase.v1.DeleteDatabaseGroupRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the database group to delete.\n Format: projects/{project}/databaseGroups/{databaseGroup}",- },- ],- description: "Request message for deleting a database group.",- },- "bytebase.v1.DeleteGroupRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the group to delete.\n Format: groups/{email}",- },- ],- description: "Request message for deleting a group.",- },- "bytebase.v1.DeleteIdentityProviderRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the identity provider to delete.\n Format: idps/{identity_provider}",- },- ],- description: "",- },- "bytebase.v1.DeleteInstanceRequest": {- type: "object",- properties: [- {- name: "force",- type: "boolean",- description:- "If set to true, any databases and sheets from this project will also be moved to default project, and all open issues will be closed.",- },- {- name: "name",- type: "string",- description:- "The name of the instance to delete.\n Format: instances/{instance}",- },- {- name: "purge",- type: "boolean",- description:- "If set to true, permanently purge the soft-deleted instance and all related resources.\n This operation is irreversible. Following AIP-165, this should only be used for\n administrative cleanup of old soft-deleted instances.\n The instance must already be soft-deleted for this to work.",- },- ],- description: "",- },- "bytebase.v1.DeletePolicyRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The policy's `name` field is used to identify the instance to update.\n Format: {resource name}/policies/{policy type}\n Workspace resource name: workspaces/{workspace-id}.\n Environment resource name: environments/environment-id.\n Instance resource name: instances/instance-id.\n Database resource name: instances/instance-id/databases/database-name.",- },- ],- description: "",- },- "bytebase.v1.DeleteProjectRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the project to delete.\n Format: projects/{project}",- },- {- name: "purge",- type: "boolean",- description:- "If set to true, permanently purge the soft-deleted project and all related resources.\n This operation is irreversible. Following AIP-165, this should only be used for\n administrative cleanup of old soft-deleted projects.\n The project must already be soft-deleted for this to work.\n When purge=true, all databases will be moved to the default project before deletion.\n When purge=false (soft delete/archive), the project and its databases/issues remain unchanged.",- },- ],- description: "",- },- "bytebase.v1.DeleteReleaseRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the release to delete.\n Format: projects/{project}/releases/{release}",- },- ],- description: "",- },- "bytebase.v1.DeleteReviewConfigRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the SQL review config to delete.\n Format: reviewConfigs/{reviewConfig}",- },- ],- description: "",- },- "bytebase.v1.DeleteRevisionRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the revision to delete.\n Format: instances/{instance}/databases/{database}/revisions/{revision}",- },- ],- description: "",- },- "bytebase.v1.DeleteRoleRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description: "The name of the role to delete.\n Format: roles/{role}",- },- ],- description: "",- },- "bytebase.v1.DeleteServiceAccountRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the service account to delete.\n Format: serviceAccounts/{email}",- },- ],- description: "Request message for deleting a service account.",- },- "bytebase.v1.DeleteUserRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description: "The name of the user to delete.\n Format: users/{email}",- },- ],- description: "",- },- "bytebase.v1.DeleteWorkloadIdentityRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the workload identity to delete.\n Format: workloadIdentities/{email}",- },- ],- description: "Request message for deleting a workload identity.",- },- "bytebase.v1.DeleteWorksheetRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the worksheet to delete.\n Format: projects/{project}/worksheets/{worksheet}",- },- ],- description: "",- },- "bytebase.v1.DeleteWorkspaceRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description: "Format: workspaces/{workspace}",- },- ],- description: "",- },- "bytebase.v1.DependencyColumn": {- type: "object",- properties: [- {- name: "column",- type: "string",- description: "The column is the name of a reference column.",- },- {- name: "schema",- type: "string",- description: "The schema is the schema of a reference column.",- },- {- name: "table",- type: "string",- description: "The table is the table of a reference column.",- },- ],- description: "DependencyColumn is the metadata for dependency columns.",- },- "bytebase.v1.DependencyTable": {- type: "object",- properties: [- {- name: "schema",- type: "string",- description: "The schema is the schema of a reference table.",- },- {- name: "table",- type: "string",- description: "The table is the name of a reference table.",- },- ],- description: "",- },- "bytebase.v1.DiffMetadataRequest": {- type: "object",- properties: [- {- name: "engine",- type: "bytebase.v1.Engine",- description: "The database engine of the schema.",- },- {- name: "sourceMetadata",- type: "bytebase.v1.DatabaseMetadata",- description: "The metadata of the source schema.",- },- {- name: "targetMetadata",- type: "bytebase.v1.DatabaseMetadata",- description: "The metadata of the target schema.",- },- ],- description: "",- },- "bytebase.v1.DiffMetadataResponse": {- type: "object",- properties: [- {- name: "diff",- type: "string",- description: "The diff of the metadata.",- },- ],- description: "",- },- "bytebase.v1.DiffSchemaRequest": {- type: "object",- properties: [- {- name: "changelog",- type: "string",- description:- "The resource name of the changelog\n Format:\n instances/{instance}/databases/{database}/changelogs/{changelog}",- },- {- name: "name",- type: "string",- description:- "The name of the database or changelog.\n Format:\n database: instances/{instance}/databases/{database}\n changelog: instances/{instance}/databases/{database}/changelogs/{changelog}",- },- {- name: "schema",- type: "string",- description: "The target schema.",- },- ],- description: "",- },- "bytebase.v1.DiffSchemaResponse": {- type: "object",- properties: [- {- name: "diff",- type: "string",- },- ],- description: "",- },- "bytebase.v1.DimensionConstraint": {- type: "object",- properties: [- {- name: "dimension",- type: "string",- description: "Dimension name/type (X, Y, Z, M, etc.)",- },- {- name: "maxValue",- type: "number",- format: "double",- description: "Maximum value for this dimension",- },- {- name: "minValue",- type: "number",- format: "double",- description: "Minimum value for this dimension",- },- {- name: "tolerance",- type: "number",- format: "double",- description: "Tolerance for this dimension",- },- ],- description:- "DimensionConstraint defines constraints for a spatial dimension.",- },- "bytebase.v1.DimensionalConfig": {- type: "object",- properties: [- {- name: "constraints",- type: "array<bytebase.v1.DimensionConstraint>",- description: "Coordinate system constraints",- items: {- name: "item",- type: "bytebase.v1.DimensionConstraint",- },- },- {- name: "dataType",- type: "string",- description:- "Spatial data type (GEOMETRY, GEOGRAPHY, POINT, POLYGON, etc.)",- },- {- name: "dimensions",- type: "integer",- format: "int32",- description: "Number of dimensions (2-4, default 2)",- },- {- name: "srid",- type: "integer",- format: "int32",- description: "Spatial reference system identifier (SRID)",- },- ],- description:- "DimensionalConfig defines dimensional and constraint parameters for spatial indexes.",- },- "bytebase.v1.EmailSetting": {- type: "object",- properties: [- {- name: "from",- type: "string",- },- {- name: "fromName",- type: "string",- },- {- name: "smtp",- type: "bytebase.v1.EmailSetting.SMTPConfig",- },- {- name: "type",- type: "bytebase.v1.EmailSetting.Type",- },- ],- description: "",- },- "bytebase.v1.EmailSetting.SMTPConfig": {- type: "object",- properties: [- {- name: "authentication",- type: "bytebase.v1.EmailSetting.SMTPConfig.Authentication",- },- {- name: "encryption",- type: "bytebase.v1.EmailSetting.SMTPConfig.Encryption",- },- {- name: "host",- type: "string",- },- {- name: "password",- type: "string",- },- {- name: "port",- type: "integer",- format: "int32",- },- {- name: "username",- type: "string",- },- ],- description: "",- },- "bytebase.v1.EmailSetting.SMTPConfig.Authentication": {- type: "enum",- values: [- "AUTHENTICATION_UNSPECIFIED",- "AUTHENTICATION_NONE",- "PLAIN",- "LOGIN",- "CRAM_MD5",- ],- description: "",- },- "bytebase.v1.EmailSetting.SMTPConfig.Encryption": {- type: "enum",- values: [- "ENCRYPTION_UNSPECIFIED",- "ENCRYPTION_NONE",- "STARTTLS",- "SSL_TLS",- ],- description: "",- },- "bytebase.v1.EmailSetting.Type": {- type: "enum",- values: ["TYPE_UNSPECIFIED", "SMTP"],- description: "",- },- "bytebase.v1.Engine": {- type: "enum",- values: [- "ENGINE_UNSPECIFIED",- "CLICKHOUSE",- "MYSQL",- "POSTGRES",- "SNOWFLAKE",- "SQLITE",- "TIDB",- "MONGODB",- "REDIS",- "ORACLE",- "SPANNER",- "MSSQL",- "REDSHIFT",- "MARIADB",- "OCEANBASE",- "STARROCKS",- "DORIS",- "HIVE",- "ELASTICSEARCH",- "BIGQUERY",- "DYNAMODB",- "DATABRICKS",- "COCKROACHDB",- "COSMOSDB",- "TRINO",- "CASSANDRA",- ],- description: "Database engine type.",- },- "bytebase.v1.EnumTypeMetadata": {- type: "object",- properties: [- {- name: "comment",- type: "string",- description: "The comment describing the enum type.",- },- {- name: "name",- type: "string",- description: "The name of a type.",- },- {- name: "skipDump",- type: "boolean",- description:- "Whether to skip this enum type during schema dump operations.",- },- {- name: "values",- type: "array<string>",- description: "The enum values of a type.",- items: {- name: "item",- type: "string",- },- },- ],- description: "",- },- "bytebase.v1.EnvironmentSetting": {- type: "object",- properties: [- {- name: "environments",- type: "array<bytebase.v1.EnvironmentSetting.Environment>",- items: {- name: "item",- type: "bytebase.v1.EnvironmentSetting.Environment",- },- },- ],- description: "",- },- "bytebase.v1.EnvironmentSetting.Environment": {- type: "object",- properties: [- {- name: "color",- type: "google.type.Color",- },- {- name: "id",- type: "string",- description:- "The resource id of the environment.\n This value should be 4-63 characters, and valid characters\n are /[a-z][0-9]-/.",- },- {- name: "name",- type: "string",- description:- "The resource name of the environment.\n Format: environments/{environment}.\n Output only.",- },- {- name: "tags",- type: "object",- additionalProperties: {- name: "value",- type: "string",- },- },- {- name: "title",- type: "string",- description: "The display name of the environment.",- },- ],- description: "",- },- "bytebase.v1.EnvironmentSetting.Environment.TagsEntry": {- type: "object",- properties: [- {- name: "key",- type: "string",- },- {- name: "value",- type: "string",- },- ],- description: "",- },- "bytebase.v1.EventMetadata": {- type: "object",- properties: [- {- name: "characterSetClient",- type: "string",- description: "The character set used by the client creating the event.",- },- {- name: "collationConnection",- type: "string",- description:- "The collation used for the connection when creating the event.",- },- {- name: "comment",- type: "string",- description: "The comment is the comment of an event.",- },- {- name: "definition",- type: "string",- description: "The schedule of the event.",- },- {- name: "name",- type: "string",- description: "The name of the event.",- },- {- name: "sqlMode",- type: "string",- description: "The SQL mode setting for the event.",- },- {- name: "timeZone",- type: "string",- description: "The time zone of the event.",- },- ],- description: "",- },- "bytebase.v1.ExchangeTokenRequest": {- type: "object",- properties: [- {- name: "email",- type: "string",- description:- "Workload Identity email for identifying which identity to authenticate as.\n Format: {name}@workload.bytebase.com",- },- {- name: "token",- type: "string",- description: "External OIDC token (JWT) from CI/CD platform.",- },- ],- description: "",- },- "bytebase.v1.ExchangeTokenResponse": {- type: "object",- properties: [- {- name: "accessToken",- type: "string",- description: "Bytebase access token.",- },- ],- description: "",- },- "bytebase.v1.ExportAuditLogsRequest": {- type: "object",- properties: [- {- name: "filter",- type: "string",- description:- "The filter of the log. It should be a valid CEL expression.\n Check the filter field in the SearchAuditLogsRequest message.",- },- {- name: "format",- type: "bytebase.v1.ExportFormat",- description: "The export format.",- },- {- name: "orderBy",- type: "string",- description:- 'The order by of the log.\n Only support order by create_time. The default sorting order is ascending.\n For example:\n - order_by = "create_time asc"\n - order_by = "create_time desc"',- },- {- name: "pageSize",- type: "integer",- format: "int32",- description:- "The maximum number of logs to return.\n The service may return fewer than this value.\n If unspecified, at most 10 log entries will be returned.\n The maximum value is 5000; values above 5000 will be coerced to 5000.",- },- {- name: "pageToken",- type: "string",- description:- "A page token, received from a previous `ExportAuditLogs` call.\n Provide this to retrieve the subsequent page.",- },- {- name: "parent",- type: "string",- },- ],- description: "Request message for exporting audit logs.",- },- "bytebase.v1.ExportAuditLogsResponse": {- type: "object",- properties: [- {- name: "content",- type: "string",- format: "byte",- description: "The exported audit log content in the requested format.",- },- {- name: "nextPageToken",- type: "string",- description:- "A token to retrieve next page of log entities.\n Pass this value in the page_token field in the subsequent call\n to retrieve the next page of log entities.",- },- ],- description: "Response message for exporting audit logs.",- },- "bytebase.v1.ExportFormat": {- type: "enum",- values: ["FORMAT_UNSPECIFIED", "CSV", "JSON", "SQL", "XLSX"],- description: "Data export format.",- },- "bytebase.v1.ExportRequest": {- type: "object",- properties: [- {- name: "admin",- type: "boolean",- description:- "The admin is used for workspace owner and DBA for exporting data from SQL\n Editor Admin mode. The exported data is not masked.",- },- {- name: "dataSourceId",- type: "string",- description:- "The id of data source.\n If omitted, Export resolves the data source server-side by using the\n single read-only data source when exactly one exists, or the admin data\n source otherwise. It can also be set explicitly to export from the admin\n data source or a specific read-only data source.",- },- {- name: "format",- type: "bytebase.v1.ExportFormat",- description: "The export format.",- },- {- name: "limit",- type: "integer",- format: "int32",- description: "The maximum number of rows to return.",- },- {- name: "name",- type: "string",- description:- "The name is the resource name to execute the export against.\n Format: instances/{instance}/databases/{database}\n Format: instances/{instance}\n Format: projects/{project}/plans/{plan}/rollout\n Format: projects/{project}/plans/{plan}/rollout/stages/{stage}",- },- {- name: "password",- type: "string",- description: "The zip password provide by users.",- },- {- name: "schema",- type: "string",- description:- "The default schema to search objects. Equals to the current schema in\n Oracle and search path in Postgres.",- },- {- name: "statement",- type: "string",- description: "The SQL statement to execute.",- },- ],- description: "",- },- "bytebase.v1.ExportResponse": {- type: "object",- properties: [- {- name: "appliedAccessGrant",- type: "string",- description:- "The just-in-time access grant applied to this export, if any.\n Format: projects/{project}/accessGrants/{accessGrant}.\n Empty when the user was authorized through normal ACL rather than a grant.",- },- {- name: "content",- type: "string",- format: "byte",- description: "The export file content.",- },- ],- description: "",- },- "bytebase.v1.ExtensionMetadata": {- type: "object",- properties: [- {- name: "description",- type: "string",- description: "The description is the description of an extension.",- },- {- name: "name",- type: "string",- description: "The name is the name of an extension.",- },- {- name: "schema",- type: "string",- description:- "The schema is the extension that is installed to. But the extension usage\n is not limited to the schema.",- },- {- name: "version",- type: "string",- description: "The version is the version of an extension.",- },- ],- description: "ExtensionMetadata is the metadata for extensions.",- },- "bytebase.v1.ExternalTableMetadata": {- type: "object",- properties: [- {- name: "columns",- type: "array<bytebase.v1.ColumnMetadata>",- description:- "The columns is the ordered list of columns in a foreign table.",- items: {- name: "item",- type: "bytebase.v1.ColumnMetadata",- },- },- {- name: "externalDatabaseName",- type: "string",- description:- "The external_database_name is the name of the external database.",- },- {- name: "externalServerName",- type: "string",- description:- "The external_server_name is the name of the external server.",- },- {- name: "name",- type: "string",- description: "The name is the name of a external table.",- },- ],- description: "",- },- "bytebase.v1.FieldMapping": {- type: "object",- properties: [- {- name: "displayName",- type: "string",- description:- "DisplayName is the field name of display name in 3rd-party idp user info. Optional.",- },- {- name: "groups",- type: "string",- description:- "Groups is the field name of groups in 3rd-party idp user info. Optional.\n Mainly used for OIDC: https://developer.okta.com/docs/guides/customize-tokens-groups-claim/main/",- },- {- name: "identifier",- type: "string",- description:- "Identifier is the field name of the unique identifier in 3rd-party idp user info. Required.",- },- {- name: "phone",- type: "string",- description:- "Phone is the field name of primary phone in 3rd-party idp user info. Optional.",- },- ],- description:- "FieldMapping saves the field names from user info API of identity provider.\n As we save all raw json string of user info response data into `principal.idp_user_info`,\n we can extract the relevant data based with `FieldMapping`.",- },- "bytebase.v1.ForeignKeyMetadata": {- type: "object",- properties: [- {- name: "columns",- type: "array<string>",- description:- "The columns are the ordered referencing columns of a foreign key.",- items: {- name: "item",- type: "string",- },- },- {- name: "matchType",- type: "string",- description:- "The match_type is the match type of a foreign key.\n The match_type is the PostgreSQL specific field.\n It's empty string for other databases.",- },- {- name: "name",- type: "string",- description: "The name is the name of a foreign key.",- },- {- name: "onDelete",- type: "string",- description: "The on_delete is the on delete action of a foreign key.",- },- {- name: "onUpdate",- type: "string",- description: "The on_update is the on update action of a foreign key.",- },- {- name: "referencedColumns",- type: "array<string>",- description:- "The referenced_columns are the ordered referenced columns of a foreign key.",- items: {- name: "item",- type: "string",- },- },- {- name: "referencedSchema",- type: "string",- description:- "The referenced_schema is the referenced schema name of a foreign key.\n It is an empty string for databases without such concept such as MySQL.",- },- {- name: "referencedTable",- type: "string",- description:- "The referenced_table is the referenced table name of a foreign key.",- },- ],- description: "ForeignKeyMetadata is the metadata for foreign keys.",- },- "bytebase.v1.FunctionMetadata": {- type: "object",- properties: [- {- name: "characterSetClient",- type: "string",- description: "MySQL specific metadata.",- },- {- name: "collationConnection",- type: "string",- },- {- name: "comment",- type: "string",- },- {- name: "databaseCollation",- type: "string",- },- {- name: "definition",- type: "string",- description: "The definition is the definition of a function.",- },- {- name: "dependencyTables",- type: "array<bytebase.v1.DependencyTable>",- description:- "The dependency_tables is the list of dependency tables of a function.\n For PostgreSQL, it's the list of tables that the function depends on the return type definition.",- items: {- name: "item",- type: "bytebase.v1.DependencyTable",- },- },- {- name: "name",- type: "string",- description: "The name is the name of a function.",- },- {- name: "signature",- type: "string",- description:- "The signature is the name with the number and type of input arguments the\n function takes.",- },- {- name: "skipDump",- type: "boolean",- },- {- name: "sqlMode",- type: "string",- },- ],- description: "FunctionMetadata is the metadata for functions.",- },- "bytebase.v1.GenerationMetadata": {- type: "object",- properties: [- {- name: "expression",- type: "string",- },- {- name: "type",- type: "bytebase.v1.GenerationMetadata.Type",- },- ],- description: "",- },- "bytebase.v1.GenerationMetadata.Type": {- type: "enum",- values: ["TYPE_UNSPECIFIED", "VIRTUAL", "STORED"],- description: "",- },- "bytebase.v1.GetAccessGrantRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the access grant to retrieve.\n Format: projects/{project}/accessGrants/{access_grant}",- },- ],- description: "",- },- "bytebase.v1.GetActuatorInfoRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "Optional. The workspace to scope the response to.\n Format: workspaces/{workspace}\n When unset, the workspace is resolved from the request context (self-hosted)\n or no workspace-scoped fields are returned (SaaS).",- },- ],- description: "Request message for getting actuator information.",- },- "bytebase.v1.GetChangelogRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the changelog to retrieve.\n Format: instances/{instance}/databases/{database}/changelogs/{changelog}",- },- {- name: "view",- type: "bytebase.v1.ChangelogView",- },- ],- description: "",- },- "bytebase.v1.GetDatabaseCatalogRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the database catalog to retrieve.\n Format: instances/{instance}/databases/{database}/catalog",- },- ],- description: "Request message for getting a database catalog.",- },- "bytebase.v1.GetDatabaseGroupRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the database group to retrieve.\n Format: projects/{project}/databaseGroups/{databaseGroup}",- },- {- name: "view",- type: "bytebase.v1.DatabaseGroupView",- description:- "The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC.",- },- ],- description: "Request message for getting a database group.",- },- "bytebase.v1.GetDatabaseMetadataRequest": {- type: "object",- properties: [- {- name: "filter",- type: "string",- description:- 'Filter is used to filter databases returned in the list.\n The syntax and semantics of CEL are documented at https://github.com/google/cel-spec\n\n Supported filter:\n - schema: the schema name, support "==" operator.\n - table: the table name, support "==" and ".contains()" operator.\n\n For example:\n schema == "schema-a"\n table == "table-a"\n table.contains("table-a")\n schema == "schema-a" && table.contains("sample")\n The filter is used to search for tables containing "sample" in the schema "schemas/schema-a".\n The column masking level will only be returned when a table filter is used.',- },- {- name: "limit",- type: "integer",- format: "int32",- description:- "Limit the response size of returned table metadata per schema.\n For example, if the database has 3 schemas, and each schema has 100 tables,\n if limit is 20, then only 20 tables will be returned for each schema, total 60 tables.\n Default 0, means no limit.",- },- {- name: "name",- type: "string",- description:- "The name of the database to retrieve metadata.\n Format: instances/{instance}/databases/{database}/metadata",- },- ],- description: "",- },- "bytebase.v1.GetDatabaseRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the database to retrieve.\n Format: instances/{instance}/databases/{database}",- },- ],- description: "",- },- "bytebase.v1.GetDatabaseSDLSchemaRequest": {- type: "object",- properties: [- {- name: "format",- type: "bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat",- description: "The format of the SDL schema output.",- },- {- name: "name",- type: "string",- description:- "The name of the database to retrieve SDL schema.\n Format: instances/{instance}/databases/{database}/sdlSchema",- },- ],- description: "",- },- "bytebase.v1.GetDatabaseSDLSchemaRequest.SDLFormat": {- type: "enum",- values: ["SDL_FORMAT_UNSPECIFIED", "SINGLE_FILE", "MULTI_FILE"],- description: "SDLFormat specifies the output format for SDL schema.",- },- "bytebase.v1.GetDatabaseSchemaRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the database to retrieve schema.\n Format: instances/{instance}/databases/{database}/schema",- },- ],- description: "",- },- "bytebase.v1.GetGroupRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the group to retrieve.\n Format: groups/{email}",- },- ],- description: "Request message for getting a group.",- },- "bytebase.v1.GetIamPolicyRequest": {- type: "object",- properties: [- {- name: "resource",- type: "string",- description:- "The name of the resource to get the IAM policy.\n Format: projects/{project}\n Format: workspaces/{workspace}",- },- ],- description: "Request message for getting an IAM policy.",- },- "bytebase.v1.GetIdentityProviderRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the identity provider to retrieve.\n Format: idps/{idp}",- },- ],- description: "",- },- "bytebase.v1.GetInstanceRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the instance to retrieve.\n Format: instances/{instance}",- },- ],- description: "",- },- "bytebase.v1.GetIssueRequest": {- type: "object",- properties: [- {- name: "force",- type: "boolean",- description: "If set to true, bypass cache and fetch the latest data.",- },- {- name: "name",- type: "string",- description:- "The name of the issue to retrieve.\n Format: projects/{project}/issues/{issue}",- },- ],- description: "",- },- "bytebase.v1.GetPlanCheckRunRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the plan check run to retrieve.\n Format: projects/{project}/plans/{plan}/planCheckRun",- },- ],- description: "",- },- "bytebase.v1.GetPlanRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the plan to retrieve.\n Format: projects/{project}/plans/{plan}",- },- ],- description: "",- },- "bytebase.v1.GetPolicyRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the policy to retrieve.\n Format: {resource type}/{resource id}/policies/{policy type}",- },- ],- description: "",- },- "bytebase.v1.GetProjectRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the project to retrieve.\n Format: projects/{project}",- },- ],- description: "",- },- "bytebase.v1.GetQueryHistoryRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the query history to retrieve.\n Format: projects/{project}/queryHistories/{id}",- },- ],- description: "",- },- "bytebase.v1.GetReleaseRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description: "Format: projects/{project}/releases/{release}",- },- ],- description: "",- },- "bytebase.v1.GetReviewConfigRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the SQL review config to retrieve.\n Format: reviewConfigs/{reviewConfig}",- },- ],- description: "",- },- "bytebase.v1.GetRevisionRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the revision.\n Format: instances/{instance}/databases/{database}/revisions/{revision}",- },- ],- description: "",- },- "bytebase.v1.GetRoleRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description: "The name of the role to retrieve.\n Format: roles/{role}",- },- ],- description: "",- },- "bytebase.v1.GetRolloutRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the rollout to retrieve.\n This is the rollout resource name, which is the plan name plus /rollout suffix.\n Format: projects/{project}/plans/{plan}/rollout",- },- ],- description: "",- },- "bytebase.v1.GetSchemaStringRequest": {- type: "object",- properties: [- {- name: "metadata",- type: "bytebase.v1.DatabaseMetadata",- description:- "If use the metadata to generate the schema string, the type is OBJECT_TYPE_UNSPECIFIED.\n Also the schema and object are empty.",- },- {- name: "name",- type: "string",- description:- "The name of the database.\n Format: instances/{instance}/databases/{database}",- },- {- name: "object",- type: "string",- description: "It's empty for DATABASE and SCHEMA.",- },- {- name: "schema",- type: "string",- description: "It's empty for DATABASE.",- },- {- name: "type",- type: "bytebase.v1.GetSchemaStringRequest.ObjectType",- },- ],- description: "",- },- "bytebase.v1.GetSchemaStringRequest.ObjectType": {- type: "enum",- values: [- "OBJECT_TYPE_UNSPECIFIED",- "DATABASE",- "SCHEMA",- "TABLE",- "VIEW",- "MATERIALIZED_VIEW",- "FUNCTION",- "PROCEDURE",- "SEQUENCE",- ],- description: "",- },- "bytebase.v1.GetSchemaStringResponse": {- type: "object",- properties: [- {- name: "schemaString",- type: "string",- },- ],- description: "",- },- "bytebase.v1.GetServiceAccountRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the service account to retrieve.\n Format: serviceAccounts/{email}",- },- ],- description: "Request message for getting a service account.",- },- "bytebase.v1.GetSettingRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description: "The resource name of the setting.",- },- ],- description: "The request message for getting a setting.",- },- "bytebase.v1.GetSettingResponse": {- type: "object",- properties: [- {- name: "setting",- type: "bytebase.v1.Setting",- },- ],- description: "The response message for getting a setting.",- },- "bytebase.v1.GetSheetRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the sheet to retrieve.\n Format: projects/{project}/sheets/{sheet}",- },- {- name: "raw",- type: "boolean",- description:- "By default, the content of the sheet is cut off, set the `raw` to true to retrieve the full content.",- },- ],- description: "",- },- "bytebase.v1.GetTaskRunLogRequest": {- type: "object",- properties: [- {- name: "parent",- type: "string",- description:- "Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}",- },- ],- description: "",- },- "bytebase.v1.GetTaskRunRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}",- },- ],- description: "",- },- "bytebase.v1.GetTaskRunSessionRequest": {- type: "object",- properties: [- {- name: "parent",- type: "string",- description:- "Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}",- },- ],- description: "",- },- "bytebase.v1.GetUserRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the user to retrieve.\n Format: users/{email}",- },- ],- description: "",- },- "bytebase.v1.GetWorkloadIdentityRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the workload identity to retrieve.\n Format: workloadIdentities/{email}",- },- ],- description: "Request message for getting a workload identity.",- },- "bytebase.v1.GetWorksheetRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the worksheet to retrieve.\n Format: projects/{project}/worksheets/{worksheet}",- },- ],- description: "",- },- "bytebase.v1.GetWorkspaceRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- 'The workspace name, format: workspaces/{workspace}.\n Use "workspaces/-" to get the current/default workspace.',- },- ],- description: "",- },- "bytebase.v1.GridLevel": {- type: "object",- properties: [- {- name: "density",- type: "string",- description: "Grid density (LOW, MEDIUM, HIGH)",- },- {- name: "level",- type: "integer",- format: "int32",- description: "Grid level number (1-4 for SQL Server)",- },- ],- description:- "GridLevel defines a tessellation grid level with its density.",- },- "bytebase.v1.Group": {- type: "object",- properties: [- {- name: "description",- type: "string",- description: "The description of the group.",- },- {- name: "email",- type: "string",- description: "The unique email for the group.",- },- {- name: "members",- type: "array<bytebase.v1.GroupMember>",- description: "The members of the group.",- items: {- name: "item",- type: "bytebase.v1.GroupMember",- },- },- {- name: "name",- type: "string",- description:- "The name of the group to retrieve.\n Format: groups/{group}, the group should be email or uuid.",- },- {- name: "source",- type: "string",- description:- "The source system where the group originated (e.g., Entra ID for SCIM sync).",- },- {- name: "title",- type: "string",- description: "The display title of the group.",- },- ],- description: "A group of users within the workspace.",- },- "bytebase.v1.GroupMember": {- type: "object",- properties: [- {- name: "member",- type: "string",- description:- "Member is the principal who belong to this group.\n\n Format: users/[email protected]",- },- {- name: "role",- type: "bytebase.v1.GroupMember.Role",- description: "The member's role in the group.",- },- ],- description: "A member of a group with a role.",- },- "bytebase.v1.GroupMember.Role": {- type: "enum",- values: ["ROLE_UNSPECIFIED", "OWNER", "MEMBER"],- description: "The role of a group member.",- },- "bytebase.v1.IamPolicy": {- type: "object",- properties: [- {- name: "bindings",- type: "array<bytebase.v1.Binding>",- description:- "Collection of binding.\n A binding binds one or more project members to a single project role.",- items: {- name: "item",- type: "bytebase.v1.Binding",- },- },- {- name: "etag",- type: "string",- description:- "The current etag of the policy.\n If an etag is provided and does not match the current etag of the policy,\n the call will be blocked and an ABORTED error will be returned.",- },- ],- description: "IAM policy that binds members to roles.",- },- "bytebase.v1.IdentityProvider": {- type: "object",- properties: [- {- name: "config",- type: "bytebase.v1.IdentityProviderConfig",- description: "The configuration details for the identity provider.",- },- {- name: "domain",- type: "string",- description:- "The domain for email matching when using this identity provider.",- },- {- name: "name",- type: "string",- description: "The name of the identity provider.\n Format: idps/{idp}",- },- {- name: "title",- type: "string",- description: "The display title of the identity provider.",- },- {- name: "type",- type: "bytebase.v1.IdentityProviderType",- description: "The type of identity provider protocol.",- },- ],- description: "",- },- "bytebase.v1.IdentityProviderConfig": {- type: "object",- properties: [- {- name: "ldapConfig",- type: "bytebase.v1.LDAPIdentityProviderConfig",- description: "LDAP protocol configuration.",- },- {- name: "oauth2Config",- type: "bytebase.v1.OAuth2IdentityProviderConfig",- description: "OAuth2 protocol configuration.",- },- {- name: "oidcConfig",- type: "bytebase.v1.OIDCIdentityProviderConfig",- description: "OIDC protocol configuration.",- },- ],- description: "",- },- "bytebase.v1.IdentityProviderContext": {- type: "object",- properties: [- {- name: "oauth2Context",- type: "bytebase.v1.OAuth2IdentityProviderContext",- description: "OAuth2 authentication context.",- },- {- name: "oidcContext",- type: "bytebase.v1.OIDCIdentityProviderContext",- description: "OpenID Connect authentication context.",- },- ],- description: "Context for identity provider authentication.",- },- "bytebase.v1.IdentityProviderType": {- type: "enum",- values: ["IDENTITY_PROVIDER_TYPE_UNSPECIFIED", "OAUTH2", "OIDC", "LDAP"],- description: "",- },- "bytebase.v1.IndexMetadata": {- type: "object",- properties: [- {- name: "comment",- type: "string",- description: "The comment is the comment of an index.",- },- {- name: "definition",- type: "string",- description: "The definition of an index.",- },- {- name: "descending",- type: "array<boolean>",- description: "The descending is the ordered descending of an index.",- items: {- name: "item",- type: "boolean",- },- },- {- name: "expressions",- type: "array<string>",- description:- "The expressions are the ordered columns or expressions of an index.\n This could refer to a column or an expression.",- items: {- name: "item",- type: "string",- },- },- {- name: "granularity",- type: "integer",- format: "int64",- description:- "The number of granules in the block. It's a ClickHouse specific field.",- },- {- name: "isConstraint",- type: "boolean",- description:- "It's a PostgreSQL specific field.\n The unique constraint and unique index are not the same thing in PostgreSQL.",- },- {- name: "keyLength",- type: "array<integer>",- description:- "The key_lengths are the ordered key lengths of an index.\n If the key length is not specified, it's -1.",- items: {- name: "item",- type: "integer",- format: "int64",- },- },- {- name: "name",- type: "string",- description: "The name is the name of an index.",- },- {- name: "opclassDefaults",- type: "array<boolean>",- description:- "True if the operator class is the default. (PostgreSQL specific).",- items: {- name: "item",- type: "boolean",- },- },- {- name: "opclassNames",- type: "array<string>",- description:- "https://www.postgresql.org/docs/current/catalog-pg-opclass.html\n Name of the operator class for each column. (PostgreSQL specific).",- items: {- name: "item",- type: "string",- },- },- {- name: "parentIndexName",- type: "string",- description: "The index name of the parent index.",- },- {- name: "parentIndexSchema",- type: "string",- description: "The schema name of the parent index.",- },- {- name: "primary",- type: "boolean",- description: "The primary is whether the index is a primary key index.",- },- {- name: "spatialConfig",- type: "bytebase.v1.SpatialIndexConfig",- description:- "Spatial index configuration for spatial databases like SQL Server, PostgreSQL with PostGIS, etc.",- },- {- name: "type",- type: "string",- description: "The type is the type of an index.",- },- {- name: "unique",- type: "boolean",- description: "The unique is whether the index is unique.",- },- {- name: "visible",- type: "boolean",- description: "The visible is whether the index is visible.",- },- ],- description: "IndexMetadata is the metadata for indexes.",- },- "bytebase.v1.Instance": {- type: "object",- properties: [- {- name: "activation",- type: "boolean",- description: "Whether the instance is activated for use.",- },- {- name: "dataSources",- type: "array<bytebase.v1.DataSource>",- description:- "Data source configurations for connecting to the instance.",- items: {- name: "item",- type: "bytebase.v1.DataSource",- },- },- {- name: "engine",- type: "bytebase.v1.Engine",- description: "The database engine type.",- },- {- name: "engineVersion",- type: "string",- description: "The version of the database engine.",- },- {- name: "environment",- type: "string",- description:- "The environment resource.\n Format: environments/prod where prod is the environment resource ID.",- },- {- name: "externalLink",- type: "string",- description: "External URL to the database instance console.",- },- {- name: "labels",- type: "object",- description:- 'Labels are key-value pairs that can be attached to the instance.\n For example, { "org_group": "infrastructure", "environment": "production" }',- additionalProperties: {- name: "value",- type: "string",- },- },- {- name: "lastSyncTime",- type: "google.protobuf.Timestamp",- description: "The last time the instance was synced.",- },- {- name: "name",- type: "string",- description: "The name of the instance.\n Format: instances/{instance}",- },- {- name: "roles",- type: "array<bytebase.v1.InstanceRole>",- description: "Database roles available in this instance.",- items: {- name: "item",- type: "bytebase.v1.InstanceRole",- },- },- {- name: "state",- type: "bytebase.v1.State",- description: "The lifecycle state of the instance.",- },- {- name: "syncDatabases",- type: "bytebase.v1.SyncDatabases",- description:- "Enable sync for following databases.\n Not set means sync all schemas & databases.",- },- {- name: "syncInterval",- type: "google.protobuf.Duration",- description: "How often the instance is synced.",- },- {- name: "title",- type: "string",- description: "The display title of the instance.",- },- ],- description: "",- },- "bytebase.v1.Instance.LabelsEntry": {- type: "object",- properties: [- {- name: "key",- type: "string",- },- {- name: "value",- type: "string",- },- ],- description: "",- },- "bytebase.v1.InstanceResource": {- type: "object",- properties: [- {- name: "activation",- type: "boolean",- description: "Whether the instance is activated.",- },- {- name: "dataSources",- type: "array<bytebase.v1.DataSource>",- description: "Data source configurations for the instance.",- items: {- name: "item",- type: "bytebase.v1.DataSource",- },- },- {- name: "engine",- type: "bytebase.v1.Engine",- description: "The database engine type.",- },- {- name: "engineVersion",- type: "string",- description: "The version of the database engine.",- },- {- name: "environment",- type: "string",- description:- "The environment resource.\n Format: environments/prod where prod is the environment resource ID.",- },- {- name: "name",- type: "string",- description: "The name of the instance.\n Format: instances/{instance}",- },- {- name: "title",- type: "string",- description: "The display title of the instance.",- },- ],- description: "",- },- "bytebase.v1.InstanceRole": {- type: "object",- properties: [- {- name: "attribute",- type: "string",- description:- 'The role attribute.\n For PostgreSQL, it contains super_user, no_inherit, create_role, create_db, can_login, replication, and bypass_rls. Docs: https://www.postgresql.org/docs/current/role-attributes.html\n For MySQL, it\'s the global privileges as GRANT statements, which means it only contains "GRANT ... ON *.* TO ...". Docs: https://dev.mysql.com/doc/refman/8.0/en/grant.html',- },- {- name: "connectionLimit",- type: "integer",- format: "int32",- description: "The connection count limit for this role.",- },- {- name: "name",- type: "string",- description:- "The name of the role.\n Format: instances/{instance}/roles/{role}\n The role name is the unique name for the role.",- },- {- name: "password",- type: "string",- description: "The role password.",- },- {- name: "roleName",- type: "string",- description: "The role name. It's unique within the instance.",- },- {- name: "validUntil",- type: "string",- description: "The expiration for the role's password.",- },- ],- description: "InstanceRole is the API message for instance role.",- },- "bytebase.v1.Issue": {- type: "object",- properties: [- {- name: "accessGrant",- type: "string",- description:- "The access grant associated with this issue.\n Format: projects/{project}/accessGrants/{access_grant}",- },- {- name: "approvalStatus",- type: "bytebase.v1.ApprovalStatus",- description: "The overall approval status for the issue.",- },- {- name: "approvalTemplate",- type: "bytebase.v1.ApprovalTemplate",- description: "The approval template for the issue.",- },- {- name: "approvers",- type: "array<bytebase.v1.Issue.Approver>",- items: {- name: "item",- type: "bytebase.v1.Issue.Approver",- },- },- {- name: "createTime",- type: "google.protobuf.Timestamp",- },- {- name: "creator",- type: "string",- description: "Format: users/[email protected]",- },- {- name: "description",- type: "string",- description: "The description of the issue.",- },- {- name: "draft",- type: "boolean",- description: "Whether this issue is a Draft Review Issue.",- },- {- name: "labels",- type: "array<string>",- description:- "Labels attached to the issue for categorization and filtering.",- items: {- name: "item",- type: "string",- },- },- {- name: "name",- type: "string",- description:- "The name of the issue.\n Format: projects/{project}/issues/{issue}",- },- {- name: "plan",- type: "string",- description:- "The plan associated with the issue.\n Can be empty.\n Format: projects/{project}/plans/{plan}",- },- {- name: "riskLevel",- type: "bytebase.v1.RiskLevel",- description: "The risk level of the issue.",- },- {- name: "roleGrant",- type: "bytebase.v1.RoleGrant",- description: "Used if the issue type is ROLE_GRANT.",- },- {- name: "status",- type: "bytebase.v1.IssueStatus",- description: "The status of the issue.",- },- {- name: "title",- type: "string",- description: "The title of the issue.",- },- {- name: "type",- type: "bytebase.v1.Issue.Type",- },- {- name: "updateTime",- type: "google.protobuf.Timestamp",- },- ],- description: "",- },- "bytebase.v1.Issue.Approver": {- type: "object",- properties: [- {- name: "principal",- type: "string",- description: "Format: users/[email protected]",- },- {- name: "status",- type: "bytebase.v1.Issue.Approver.Status",- description: "The new status.",- },- ],- description: "Approvers and their approval status for the issue.",- },- "bytebase.v1.Issue.Approver.Status": {- type: "enum",- values: ["STATUS_UNSPECIFIED", "PENDING", "APPROVED", "REJECTED"],- description: "The approval status of an approver.",- },- "bytebase.v1.Issue.Type": {- type: "enum",- values: [- "TYPE_UNSPECIFIED",- "DATABASE_CHANGE",- "ROLE_GRANT",- "DATABASE_EXPORT",- "ACCESS_GRANT",- ],- description: "The type of issue.",- },- "bytebase.v1.IssueComment": {- type: "object",- properties: [- {- name: "approval",- type: "bytebase.v1.IssueComment.Approval",- description: "Approval event.",- },- {- name: "comment",- type: "string",- description: "The text content of the comment.",- },- {- name: "createTime",- type: "google.protobuf.Timestamp",- },- {- name: "creator",- type: "string",- description: "Format: users/{email}",- },- {- name: "issueUpdate",- type: "bytebase.v1.IssueComment.IssueUpdate",- description: "Issue update event.",- },- {- name: "name",- type: "string",- description:- "Format: projects/{project}/issues/{issue}/issueComments/{issueComment-uid}",- },- {- name: "payload",- type: "string",- description: "TODO: use struct message instead.",- },- {- name: "planUpdate",- type: "bytebase.v1.IssueComment.PlanUpdate",- description: "Plan update event.",- },- {- name: "reviewSubmission",- type: "bytebase.v1.IssueComment.ReviewSubmission",- description: "Review submission event.",- },- {- name: "updateTime",- type: "google.protobuf.Timestamp",- },- ],- description: "A comment on an issue.",- },- "bytebase.v1.IssueComment.Approval": {- type: "object",- properties: [- {- name: "status",- type: "bytebase.v1.IssueComment.Approval.Status",- description: "The approval status.",- },- ],- description: "Approval event information.",- },- "bytebase.v1.IssueComment.Approval.Status": {- type: "enum",- values: ["STATUS_UNSPECIFIED", "PENDING", "APPROVED", "REJECTED"],- description: "Approval status values.",- },- "bytebase.v1.IssueComment.IssueUpdate": {- type: "object",- properties: [- {- name: "fromDescription",- type: "string",- },- {- name: "fromLabels",- type: "array<string>",- items: {- name: "item",- type: "string",- },- },- {- name: "fromStatus",- type: "bytebase.v1.IssueStatus",- },- {- name: "fromTitle",- type: "string",- },- {- name: "toDescription",- type: "string",- },- {- name: "toLabels",- type: "array<string>",- items: {- name: "item",- type: "string",- },- },- {- name: "toStatus",- type: "bytebase.v1.IssueStatus",- },- {- name: "toTitle",- type: "string",- },- ],- description: "Issue update event information.",- },- "bytebase.v1.IssueComment.PlanUpdate": {- type: "object",- properties: [- {- name: "fromSpecs",- type: "array<bytebase.v1.Plan.Spec>",- items: {- name: "item",- type: "bytebase.v1.Plan.Spec",- },- },- {- name: "toSpecs",- type: "array<bytebase.v1.Plan.Spec>",- items: {- name: "item",- type: "bytebase.v1.Plan.Spec",- },- },- ],- description:- "Plan update event information (snapshot of plan.config.specs before\n and after a PlanService.UpdatePlan call that mutated specs).",- },- "bytebase.v1.IssueStatus": {- type: "enum",- values: ["ISSUE_STATUS_UNSPECIFIED", "OPEN", "DONE", "CANCELED"],- description: "The status of an issue.",- },- "bytebase.v1.KerberosConfig": {- type: "object",- properties: [- {- name: "instance",- type: "string",- description: "The instance component of the Kerberos principal.",- },- {- name: "kdcHost",- type: "string",- description: "The hostname of the Key Distribution Center (KDC).",- },- {- name: "kdcPort",- type: "string",- description: "The port of the Key Distribution Center (KDC).",- },- {- name: "kdcTransportProtocol",- type: "string",- description:- "The transport protocol for KDC communication (tcp or udp).",- },- {- name: "keytab",- type: "string",- format: "byte",- description: "The keytab file contents for authentication.",- },- {- name: "primary",- type: "string",- description: "The primary component of the Kerberos principal.",- },- {- name: "realm",- type: "string",- description: "The Kerberos realm.",- },- ],- description: "",- },- "bytebase.v1.LDAPIdentityProviderConfig": {- type: "object",- properties: [- {- name: "baseDn",- type: "string",- description:- 'BaseDN is the base DN to search for users, e.g., "ou=users,dc=example,dc=com".',- },- {- name: "bindDn",- type: "string",- description:- "BindDN is the DN of the user to bind as a service account to perform\n search requests.",- },- {- name: "bindPassword",- type: "string",- description:- "BindPassword is the password of the user to bind as a service account.",- },- {- name: "fieldMapping",- type: "bytebase.v1.FieldMapping",- description:- "FieldMapping is the mapping of the user attributes returned by the LDAP\n server.",- },- {- name: "host",- type: "string",- description:- 'Host is the hostname or IP address of the LDAP server, e.g.,\n "ldap.example.com".',- },- {- name: "port",- type: "integer",- format: "int32",- description:- "Port is the port number of the LDAP server, e.g., 389. When not set, the\n default port of the corresponding security protocol will be used, i.e. 389\n for StartTLS and 636 for LDAPS.",- },- {- name: "securityProtocol",- type: "bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol",- description:- "SecurityProtocol is the security protocol to be used for establishing\n connections with the LDAP server.",- },- {- name: "skipTlsVerify",- type: "boolean",- description:- "SkipTLSVerify controls whether to skip TLS certificate verification.",- },- {- name: "userFilter",- type: "string",- description:- 'UserFilter is the filter to search for users, e.g., "(uid=%s)".',- },- ],- description:- "LDAPIdentityProviderConfig is the structure for LDAP identity provider config.",- },- "bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol": {- type: "enum",- values: ["SECURITY_PROTOCOL_UNSPECIFIED", "START_TLS", "LDAPS"],- description: "",- },- "bytebase.v1.Label": {- type: "object",- properties: [- {- name: "color",- type: "google.type.Color",- description: "The label color.",- },- {- name: "group",- type: "string",- description: "The group this label belongs to.",- },- {- name: "value",- type: "string",- description: "The label value/name.",- },- ],- description: "A label for categorizing and organizing issues.",- },- "bytebase.v1.LeaveWorkspaceRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description: "Format: workspaces/{workspace}",- },- ],- description: "",- },- "bytebase.v1.ListAccessGrantsRequest": {- type: "object",- properties: [- {- name: "filter",- type: "string",- description:- 'Filter expression using AIP-160 syntax.\n Supported fields:\n - name: the fullname in "projects/{project}/accessGrants/{access_grant}" format, support "==" operator.\n - creator: the creator name in "users/{email}" format, support "==" operator.\n - status: the access status, support "==" and "in" operator.\n - issue: the access issue fullname, support "==" operator.\n - expire_time: the access expire time in "2006-01-02T15:04:05Z07:00" format, support ">=", ">", "<=" and "<" operator.\n - create_time: the access creation time in "2006-01-02T15:04:05Z07:00" format, support ">=", ">", "<=" and "<" operator.\n - query: the access query, support "==" and ".contains(xx)" operator\n - target: the target database fullname, support "==" operator.\n - unmask: whether the grant allows unmasking sensitive data, support "==" operator with a boolean literal.\n - export: whether the grant allows exporting the query result, support "==" operator with a boolean literal.\n\n Examples:\n - creator == "users/[email protected]"\n - status == "ACTIVE"\n - status in ["ACTIVE", "PENDING"]\n - creator == "users/[email protected]" && status == "ACTIVE"\n - issue == "projects/x/issues/123"\n - status == "ACTIVE" && expire_time > "2024-02-01T00:00:00Z"\n - target == "instances/sample/databases/employee"\n - unmask == true\n - export == true && status == "ACTIVE"',- },- {- name: "orderBy",- type: "string",- description:- 'The order by of access grants.\n Support creator, expire_time, create_time. The default sorting order is ascending.\n For example:\n - order_by = "creator"\n - order_by = "expire_time desc"\n - order_by = "expire_time asc, create_time desc"',- },- {- name: "pageSize",- type: "integer",- format: "int32",- description: "The maximum number of access grants to return.",- },- {- name: "pageToken",- type: "string",- description: "A page token from a previous ListAccessGrants call.",- },- {- name: "parent",- type: "string",- description:- "The parent project of the access grants.\n Format: projects/{project}",- },- ],- description: "",- },- "bytebase.v1.ListAccessGrantsResponse": {- type: "object",- properties: [- {- name: "accessGrants",- type: "array<bytebase.v1.AccessGrant>",- description: "The access grants from the specified request.",- items: {- name: "item",- type: "bytebase.v1.AccessGrant",- },- },- {- name: "nextPageToken",- type: "string",- description:- "A token, which can be sent as `page_token` to retrieve the next page.\n If this field is omitted, there are no subsequent pages.",- },- ],- description: "",- },- "bytebase.v1.ListChangelogsRequest": {- type: "object",- properties: [- {- name: "filter",- type: "string",- description:- 'Filter is used to filter changelogs returned in the list.\n The syntax and semantics of CEL are documented at https://github.com/google/cel-spec\n\n Supported filter:\n - status: the changelog status, support "==" operation. check Changelog.Status for available values.\n - create_time: the changelog create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.\n\n Example:\n status == "DONE"\n status == "FAILED" && type == "SDL"\n create_time >= "2024-01-01T00:00:00Z" && create_time <= "2024-01-02T00:00:00Z"',- },- {- name: "pageSize",- type: "integer",- format: "int32",- description:- "The maximum number of changelogs to return. The service may return fewer\n than this value. If unspecified, at most 10 changelogs will be returned.\n The maximum value is 1000; values above 1000 will be coerced to 1000.",- },- {- name: "pageToken",- type: "string",- description:- "A page token, received from the previous call.\n Provide this to retrieve the subsequent page.\n\n When paginating, all other parameters provided must match\n the call that provided the page token.",- },- {- name: "parent",- type: "string",- description:- "The parent of the changelogs.\n Format: instances/{instance}/databases/{database}",- },- {- name: "view",- type: "bytebase.v1.ChangelogView",- },- ],- description: "",- },- "bytebase.v1.ListChangelogsResponse": {- type: "object",- properties: [- {- name: "changelogs",- type: "array<bytebase.v1.Changelog>",- description: "The list of changelogs.",- items: {- name: "item",- type: "bytebase.v1.Changelog",- },- },- {- name: "nextPageToken",- type: "string",- description:- "A token, which can be sent as `page_token` to retrieve the next page.\n If this field is omitted, there are no subsequent pages.",- },- ],- description: "",- },- "bytebase.v1.ListDatabaseGroupsRequest": {- type: "object",- properties: [- {- name: "parent",- type: "string",- description:- "The parent resource whose database groups are to be listed.\n Format: projects/{project}",- },- {- name: "view",- type: "bytebase.v1.DatabaseGroupView",- description:- "The view to return. Defaults to DATABASE_GROUP_VIEW_BASIC.",- },- ],- description: "Request message for listing database groups.",- },- "bytebase.v1.ListDatabaseGroupsResponse": {- type: "object",- properties: [- {- name: "databaseGroups",- type: "array<bytebase.v1.DatabaseGroup>",- description: "The database groups from the specified request.",- items: {- name: "item",- type: "bytebase.v1.DatabaseGroup",- },- },- ],- description: "Response message for listing database groups.",- },- "bytebase.v1.ListDatabasesRequest": {- type: "object",- properties: [- {- name: "filter",- type: "string",- description:- 'Filter is used to filter databases returned in the list.\n The syntax and semantics of CEL are documented at https://github.com/google/cel-spec\n\n Supported filter:\n - environment: the environment full name in "environments/{id}" format, support "==" operator.\n - name: the database name, support ".contains()" operator.\n - project: the project full name in "projects/{id}" format, support "==" operator.\n - instance: the instance full name in "instances/{id}" format, support "==" operator.\n - engine: the database engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.\n - exclude_unassigned: should be "true" or "false", will not show unassigned databases if it\'s true, support "==" operator.\n - table: filter by the database table, support "==" and ".contains()" operator.\n - labels.{key}: the database label, support "==" and "in" operators.\n\n For example:\n environment == "environments/{environment resource id}"\n environment == "" (find databases which environment is not set)\n project == "projects/{project resource id}"\n instance == "instances/{instance resource id}"\n name.contains("database name")\n engine == "MYSQL"\n engine in ["MYSQL", "POSTGRES"]\n !(engine in ["MYSQL", "POSTGRES"])\n exclude_unassigned == true\n table == "sample"\n table.contains("sam")\n labels.environment == "production"\n labels.region == "asia"\n labels.region in ["asia", "europe"]\n\n You can combine filter conditions like:\n environment == "environments/prod" && name.contains("employee")',- },- {- name: "orderBy",- type: "string",- description:- 'The order by of databases.\n Support name, project, instance. The default sorting order is ascending.\n For example:\n - order_by = "name" - order by name ascending\n - order_by = "name desc"\n - order_by = "name desc, project asc"',- },- {- name: "pageSize",- type: "integer",- format: "int32",- description:- "The maximum number of databases to return. The service may return fewer\n than this value.\n If unspecified, at most 10 databases will be returned.\n The maximum value is 1000; values above 1000 will be coerced to 1000.",- },- {- name: "pageToken",- type: "string",- description:- "A page token, received from a previous `ListDatabases` call.\n Provide this to retrieve the subsequent page.\n\n When paginating, all other parameters provided to `ListDatabases` must\n match the call that provided the page token.",- },- {- name: "parent",- type: "string",- description:- '- projects/{project}: list databases in a project, require "bb.projects.get" permission.\n - workspaces/{id}: list databases in the workspace, require "bb.databases.list" permission.\n - instances/{instances}: list databases in a instance, require "bb.instances.get" permission',- },- {- name: "showDeleted",- type: "boolean",- description: "Show deleted database if specified.",- },- ],- description: "",- },- "bytebase.v1.ListDatabasesResponse": {- type: "object",- properties: [- {- name: "databases",- type: "array<bytebase.v1.Database>",- description: "The databases from the specified request.",- items: {- name: "item",- type: "bytebase.v1.Database",- },- },- {- name: "nextPageToken",- type: "string",- description:- "A token, which can be sent as `page_token` to retrieve the next page.\n If this field is omitted, there are no subsequent pages.",- },- ],- description: "",- },- "bytebase.v1.ListGroupsRequest": {- type: "object",- properties: [- {- name: "filter",- type: "string",- description:- 'Filter is used to filter groups returned in the list.\n The syntax and semantics of CEL are documented at https://github.com/google/cel-spec\n\n Supported filter:\n - title: the group title, support "==" and ".contains()" operator.\n - email: the group email, support "==" and ".contains()" operator.\n - project: the project full name in "projects/{id}" format, support "==" operator.\n\n For example:\n title == "dba"\n email == "[email protected]"\n title.contains("dba")\n email.contains("dba")\n project == "projects/sample-project"\n You can combine filter conditions like:\n title.contains("dba") || email.contains("dba")',- },- {- name: "pageSize",- type: "integer",- format: "int32",- description:- "The maximum number of groups to return. The service may return fewer than\n this value.\n If unspecified, at most 10 groups will be returned.\n The maximum value is 1000; values above 1000 will be coerced to 1000.",- },- {- name: "pageToken",- type: "string",- description:- "A page token, received from a previous `ListGroups` call.\n Provide this to retrieve the subsequent page.\n\n When paginating, all other parameters provided to `ListGroups` must match\n the call that provided the page token.",- },- ],- description: "Request message for listing groups.",- },- "bytebase.v1.ListGroupsResponse": {- type: "object",- properties: [- {- name: "groups",- type: "array<bytebase.v1.Group>",- description: "The groups from the specified request.",- items: {- name: "item",- type: "bytebase.v1.Group",- },- },- {- name: "nextPageToken",- type: "string",- description:- "A token, which can be sent as `page_token` to retrieve the next page.\n If this field is omitted, there are no subsequent pages.",- },- ],- description: "Response message for listing groups.",- },- "bytebase.v1.ListIdentityProvidersRequest": {- type: "object",- properties: [- {- name: "parent",- type: "string",- description:- "The parent workspace whose identity providers should be listed.\n Format: workspaces/{workspace}\n When unset, the workspace is resolved from the request context.",- },- ],- description: "",- },- "bytebase.v1.ListIdentityProvidersResponse": {- type: "object",- properties: [- {- name: "identityProviders",- type: "array<bytebase.v1.IdentityProvider>",- description: "The identity providers from the specified request.",- items: {- name: "item",- type: "bytebase.v1.IdentityProvider",- },- },- ],- description: "",- },- "bytebase.v1.ListInstanceDatabaseRequest": {- type: "object",- properties: [- {- name: "instance",- type: "bytebase.v1.Instance",- description:- "The target instance. We need to set this field if the target instance is not created yet.",- },- {- name: "name",- type: "string",- description: "The name of the instance.\n Format: instances/{instance}",- },- ],- description: "",- },- "bytebase.v1.ListInstanceDatabaseResponse": {- type: "object",- properties: [- {- name: "databases",- type: "array<string>",- description: "All database name list in the instance.",- items: {- name: "item",- type: "string",- },- },- ],- description: "",- },- "bytebase.v1.ListInstanceRolesRequest": {- type: "object",- properties: [- {- name: "pageSize",- type: "integer",- format: "int32",- description:- "Not used.\n The maximum number of roles to return. The service may return fewer than\n this value.\n If unspecified, at most 10 roles will be returned.\n The maximum value is 1000; values above 1000 will be coerced to 1000.",- },- {- name: "pageToken",- type: "string",- description:- "Not used.\n A page token, received from a previous `ListInstanceRoles` call.\n Provide this to retrieve the subsequent page.\n\n When paginating, all other parameters provided to `ListInstanceRoles` must match\n the call that provided the page token.",- },- {- name: "parent",- type: "string",- description:- "The parent, which owns this collection of roles.\n Format: instances/{instance}",- },- {- name: "refresh",- type: "boolean",- description: "Refresh will refresh and return the latest data.",- },- ],- description: "",- },- "bytebase.v1.ListInstanceRolesResponse": {- type: "object",- properties: [- {- name: "nextPageToken",- type: "string",- description:- "A token, which can be sent as `page_token` to retrieve the next page.\n If this field is omitted, there are no subsequent pages.",- },- {- name: "roles",- type: "array<bytebase.v1.InstanceRole>",- description: "The roles from the specified request.",- items: {- name: "item",- type: "bytebase.v1.InstanceRole",- },- },- ],- description: "",- },- "bytebase.v1.ListInstancesRequest": {- type: "object",- properties: [- {- name: "filter",- type: "string",- description:- 'Filter the instance.\n The syntax and semantics of CEL are documented at https://github.com/google/cel-spec\n\n Supported filters:\n - name: the instance name, support "==" and ".contains()" operator.\n - resource_id: the instance id, support "==" and ".contains()" operator.\n - environment: the environment full name in "environments/{id}" format, support "==" operator.\n - state: the instance state, check State enum for values, support "==" operator.\n - engine: the instance engine, check Engine enum for values. Support "==", "in [xx]", "!(in [xx])" operator.\n - host: the instance host, support "==" and ".contains()" operator.\n - port: the instance port, support "==" and ".contains()" operator.\n - project: the project full name in "projects/{id}" format, support "==" operator.\n - labels.{key}: the instance label, support "==" and "in" operators.\n\n For example:\n name == "sample instance"\n name.contains("sample")\n resource_id == "sample-instance"\n resource_id.contains("sample")\n state == "DELETED"\n environment == "environments/test"\n environment == "" (find instances which environment is not set)\n engine == "MYSQL"\n engine in ["MYSQL", "POSTGRES"]\n !(engine in ["MYSQL", "POSTGRES"])\n host == "127.0.0.1"\n host.contains("127.0")\n port == "54321"\n port.contains("543")\n labels.org_group == "infrastructure"\n labels.environment in ["prod", "production"]\n project == "projects/sample-project"\n You can combine filter conditions like:\n name.contains("sample") && environment == "environments/test"\n host == "127.0.0.1" && port == "54321"',- },- {- name: "orderBy",- type: "string",- description:- 'The order by of instances.\n Support title, environment. The default sorting order is ascending.\n For example:\n - order_by = "title"\n - order_by = "title desc"\n - order_by = "title desc, environment asc"',- },- {- name: "pageSize",- type: "integer",- format: "int32",- description:- "The maximum number of instances to return. The service may return fewer than\n this value.\n If unspecified, at most 10 instances will be returned.\n The maximum value is 1000; values above 1000 will be coerced to 1000.",- },- {- name: "pageToken",- type: "string",- description:- "A page token, received from a previous `ListInstances` call.\n Provide this to retrieve the subsequent page.\n\n When paginating, all other parameters provided to `ListInstances` must match\n the call that provided the page token.",- },- {- name: "showDeleted",- type: "boolean",- description: "Show deleted instances if specified.",- },- ],- description: "",- },- "bytebase.v1.ListInstancesResponse": {- type: "object",- properties: [- {- name: "instances",- type: "array<bytebase.v1.Instance>",- description: "The instances from the specified request.",- items: {- name: "item",- type: "bytebase.v1.Instance",- },- },- {- name: "nextPageToken",- type: "string",- description:- "A token, which can be sent as `page_token` to retrieve the next page.\n If this field is omitted, there are no subsequent pages.",- },- ],- description: "",- },- "bytebase.v1.ListIssueCommentsRequest": {- type: "object",- properties: [- {- name: "pageSize",- type: "integer",- format: "int32",- description:- "The maximum number of issue comments to return. The service may return fewer than\n this value.\n If unspecified, at most 10 issue comments will be returned.\n The maximum value is 1000; values above 1000 will be coerced to 1000.",- },- {- name: "pageToken",- type: "string",- description:- "A page token, received from a previous `ListIssueComments` call.\n Provide this to retrieve the subsequent page.\n\n When paginating, all other parameters provided to `ListIssueComments` must match\n the call that provided the page token.",- },- {- name: "parent",- type: "string",- description: "Format: projects/{projects}/issues/{issue}",- },- ],- description: "",- },- "bytebase.v1.ListIssueCommentsResponse": {- type: "object",- properties: [- {- name: "issueComments",- type: "array<bytebase.v1.IssueComment>",- description: "The issue comments from the specified request.",- items: {- name: "item",- type: "bytebase.v1.IssueComment",- },- },- {- name: "nextPageToken",- type: "string",- description:- "A token, which can be sent as `page_token` to retrieve the next page.\n If this field is omitted, there are no subsequent pages.",- },- ],- description: "",- },- "bytebase.v1.ListIssuesRequest": {- type: "object",- properties: [- {- name: "filter",- type: "string",- description:- 'Filter is used to filter issues returned in the list.\n The syntax and semantics of CEL are documented at https://github.com/google/cel-spec\n\n Supported filters:\n - creator: issue creator full name in "users/{email or id}" format, support "==" operator.\n - status: the issue status, support "==" and "in" operator, check the IssueStatus enum for the values.\n - create_time: issue create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.\n - type: the issue type, support "==" and "in" operator, check the Type enum in the Issue message for the values.\n - labels: the issue labels, support "==" and "in" operator.\n - risk_level: the issue risk level, support "in" operator, check the RiskLevel enum for the values.\n - approval_status: issue approval status, support "==" operator.\n - current_approver: the issue approver, should in "users/{email} format", support "==" operator.\n\n For example:\n creator == "users/[email protected]" && status in ["OPEN", "DONE"]\n status == "CANCELED" && type == "DATABASE_CHANGE"\n labels in ["label1", "label2"]\n risk_level in ["HIGH", "MODERATE"]\n create_time >= "2025-01-02T15:04:05Z07:00"',- },- {- name: "orderBy",- type: "string",- description:- 'The order by of issues.\n Support:\n - create_time\n - update_time\n The default sorting order is ascending.\n For example:\n - order_by = "create_time desc"\n - order_by = "update_time asc"',- },- {- name: "pageSize",- type: "integer",- format: "int32",- description:- "The maximum number of issues to return. The service may return fewer than\n this value.\n If unspecified, at most 10 issues will be returned.\n The maximum value is 1000; values above 1000 will be coerced to 1000.",- },- {- name: "pageToken",- type: "string",- description:- "A page token, received from a previous `ListIssues` call.\n Provide this to retrieve the subsequent page.\n\n When paginating, all other parameters provided to `ListIssues` must match\n the call that provided the page token.",- },- {- name: "parent",- type: "string",- description:- "The parent, which owns this collection of issues.\n Format: projects/{project}",- },- {- name: "query",- type: "string",- description: "Query is the query statement.",- },- ],- description: "",- },- "bytebase.v1.ListIssuesResponse": {- type: "object",- properties: [- {- name: "issues",- type: "array<bytebase.v1.Issue>",- description: "The issues from the specified request.",- items: {- name: "item",- type: "bytebase.v1.Issue",- },- },- {- name: "nextPageToken",- type: "string",- description:- "A token, which can be sent as `page_token` to retrieve the next page.\n If this field is omitted, there are no subsequent pages.",- },- ],- description: "",- },- "bytebase.v1.ListPlansRequest": {- type: "object",- properties: [- {- name: "filter",- type: "string",- description:- 'Filter is used to filter plans returned in the list.\n The syntax and semantics of CEL are documented at https://github.com/google/cel-spec\n\n Supported filters:\n - creator: the plan creator full name in "users/{email or id}" format, support "==" operator.\n - create_time: the plan create time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.\n - has_rollout: whether the plan has rollout, support "==" operator, the value should be "true" or "false".\n - title: the plan title, support "==" operator for exact match and ".contains()" operator for case-insensitive substring match.\n - spec_type: the plan spec config type, support "==" operator, the value should be "create_database_config", "change_database_config", or "export_data_config".\n - state: the plan state, support "==" operator, the value should be "ACTIVE" or "DELETED".\n\n For example:\n creator == "users/[email protected]" && create_time >= "2025-01-02T15:04:05Z07:00"\n title == "My Plan"\n title.contains("database migration")\n spec_type == "change_database_config"\n state == "ACTIVE"',- },- {- name: "pageSize",- type: "integer",- format: "int32",- description:- "The maximum number of plans to return. The service may return fewer than\n this value.\n If unspecified, at most 10 plans will be returned.\n The maximum value is 1000; values above 1000 will be coerced to 1000.",- },- {- name: "pageToken",- type: "string",- description:- "A page token, received from a previous `ListPlans` call.\n Provide this to retrieve the subsequent page.\n\n When paginating, all other parameters provided to `ListPlans` must match\n the call that provided the page token.",- },- {- name: "parent",- type: "string",- description:- 'The parent, which owns this collection of plans.\n Format: projects/{project}\n Use "projects/-" to list all plans from all projects.',- },- ],- description: "",- },- "bytebase.v1.ListPlansResponse": {- type: "object",- properties: [- {- name: "nextPageToken",- type: "string",- description:- "A token, which can be sent as `page_token` to retrieve the next page.\n If this field is omitted, there are no subsequent pages.",- },- {- name: "plans",- type: "array<bytebase.v1.Plan>",- description: "The plans from the specified request.",- items: {- name: "item",- type: "bytebase.v1.Plan",- },- },- ],- description: "",- },- "bytebase.v1.ListPoliciesRequest": {- type: "object",- properties: [- {- name: "parent",- type: "string",- description:- "The parent, which owns this collection of policies.\n Format: {resource type}/{resource id}",- },- {- name: "policyType",- type: "bytebase.v1.PolicyType",- description: "Filter by specific policy type.",- },- {- name: "showDeleted",- type: "boolean",- description: "Show deleted policies if specified.",- },- ],- description: "",- },- "bytebase.v1.ListPoliciesResponse": {- type: "object",- properties: [- {- name: "policies",- type: "array<bytebase.v1.Policy>",- description: "The policies from the specified request.",- items: {- name: "item",- type: "bytebase.v1.Policy",- },- },- ],- description: "",- },- "bytebase.v1.ListProjectsRequest": {- type: "object",- properties: [- {- name: "filter",- type: "string",- description:- 'Filter the project.\n Check filter for SearchProjectsRequest for details.\n Supports filtering by name, resource_id, state, and labels (e.g., labels.environment == "production").',- },- {- name: "orderBy",- type: "string",- description:- 'The order by of projects.\n Support title. The default sorting order is ascending.\n For example:\n - order_by = "title"\n - order_by = "title desc"\n - order_by = "title asc"',- },- {- name: "pageSize",- type: "integer",- format: "int32",- description:- "The maximum number of projects to return. The service may return fewer than\n this value.\n If unspecified, at most 10 projects will be returned.\n The maximum value is 1000; values above 1000 will be coerced to 1000.",- },- {- name: "pageToken",- type: "string",- description:- "A page token, received from a previous `ListProjects` call.\n Provide this to retrieve the subsequent page.\n\n When paginating, all other parameters provided to `ListProjects` must match\n the call that provided the page token.",- },- {- name: "showDeleted",- type: "boolean",- description: "Show deleted projects if specified.",- },- ],- description: "",- },- "bytebase.v1.ListProjectsResponse": {- type: "object",- properties: [- {- name: "nextPageToken",- type: "string",- description:- "A token, which can be sent as `page_token` to retrieve the next page.\n If this field is omitted, there are no subsequent pages.",- },- {- name: "projects",- type: "array<bytebase.v1.Project>",- description: "The projects from the specified request.",- items: {- name: "item",- type: "bytebase.v1.Project",- },- },- ],- description: "",- },- "bytebase.v1.ListPurchasePlansResponse": {- type: "object",- properties: [- {- name: "plans",- type: "array<bytebase.v1.PurchasePlan>",- items: {- name: "item",- type: "bytebase.v1.PurchasePlan",- },- },- ],- description: "",- },- "bytebase.v1.ListReleaseCategoriesRequest": {- type: "object",- properties: [- {- name: "parent",- type: "string",- description: "Format: projects/{project}",- },- ],- description: "",- },- "bytebase.v1.ListReleaseCategoriesResponse": {- type: "object",- properties: [- {- name: "categories",- type: "array<string>",- description: "The unique category values in the project.",- items: {- name: "item",- type: "string",- },- },- ],- description: "",- },- "bytebase.v1.ListReleasesRequest": {- type: "object",- properties: [- {- name: "filter",- type: "string",- description:- 'Filter is used to filter releases returned in the list.\n The syntax and semantics of CEL are documented at https://github.com/google/cel-spec\n\n Supported filters:\n - category: release category, support "==" operator.\n\n For example:\n category == "webapp"',- },- {- name: "pageSize",- type: "integer",- format: "int32",- description:- "The maximum number of releases to return. The service may return fewer than this value.\n If unspecified, at most 10 releases will be returned.\n The maximum value is 1000; values above 1000 will be coerced to 1000.",- },- {- name: "pageToken",- type: "string",- description:- "A page token, received from a previous `ListReleases` call.\n Provide this to retrieve the subsequent page.\n\n When paginating, all other parameters provided to `ListReleases` must match\n the call that provided the page token.",- },- {- name: "parent",- type: "string",- description: "Format: projects/{project}",- },- {- name: "showDeleted",- type: "boolean",- description: "Show deleted releases if specified.",- },- ],- description: "",- },- "bytebase.v1.ListReleasesResponse": {- type: "object",- properties: [- {- name: "nextPageToken",- type: "string",- description:- "A token, which can be sent as `page_token` to retrieve the next page.\n If this field is omitted, there are no subsequent pages.",- },- {- name: "releases",- type: "array<bytebase.v1.Release>",- description: "The releases from the specified request.",- items: {- name: "item",- type: "bytebase.v1.Release",- },- },- ],- description: "",- },- "bytebase.v1.ListReviewConfigsResponse": {- type: "object",- properties: [- {- name: "reviewConfigs",- type: "array<bytebase.v1.ReviewConfig>",- description: "The SQL review configs from the specified request.",- items: {- name: "item",- type: "bytebase.v1.ReviewConfig",- },- },- ],- description: "",- },- "bytebase.v1.ListRevisionsRequest": {- type: "object",- properties: [- {- name: "pageSize",- type: "integer",- format: "int32",- description:- "The maximum number of revisions to return. The service may return fewer\n than this value. If unspecified, at most 10 revisions will be returned. The\n maximum value is 1000; values above 1000 will be coerced to 1000.",- },- {- name: "pageToken",- type: "string",- description:- "A page token, received from a previous `ListRevisions` call.\n Provide this to retrieve the subsequent page.\n\n When paginating, all other parameters provided to `ListRevisions` must\n match the call that provided the page token.",- },- {- name: "parent",- type: "string",- description:- "The parent of the revisions.\n Format: instances/{instance}/databases/{database}",- },- {- name: "showDeleted",- type: "boolean",- description: "Whether to include deleted revisions in the results.",- },- ],- description: "",- },- "bytebase.v1.ListRevisionsResponse": {- type: "object",- properties: [- {- name: "nextPageToken",- type: "string",- description:- "A token, which can be sent as `page_token` to retrieve the next page.\n If this field is omitted, there are no subsequent pages.",- },- {- name: "revisions",- type: "array<bytebase.v1.Revision>",- description: "The revisions from the specified request.",- items: {- name: "item",- type: "bytebase.v1.Revision",- },- },- ],- description: "",- },- "bytebase.v1.ListRolesResponse": {- type: "object",- properties: [- {- name: "roles",- type: "array<bytebase.v1.Role>",- description: "The roles from the specified request.",- items: {- name: "item",- type: "bytebase.v1.Role",- },- },- ],- description: "",- },- "bytebase.v1.ListRolloutsRequest": {- type: "object",- properties: [- {- name: "filter",- type: "string",- description:- 'Filter is used to filter rollouts returned in the list.\n The syntax and semantics of CEL are documented at https://github.com/google/cel-spec\n\n Supported filters:\n - update_time: rollout update time in "2006-01-02T15:04:05Z07:00" format, support ">=" or "<=" operator.\n - task_type: the task type, support "in" operator, check the Task.Type enum for the values.\n\n For example:\n update_time >= "2025-01-02T15:04:05Z07:00"\n task_type in ["DATABASE_MIGRATE", "DATABASE_EXPORT"]',- },- {- name: "pageSize",- type: "integer",- format: "int32",- description:- "The maximum number of rollouts to return. The service may return fewer than\n this value.\n If unspecified, at most 10 rollouts will be returned.\n The maximum value is 1000; values above 1000 will be coerced to 1000.",- },- {- name: "pageToken",- type: "string",- description:- "A page token, received from a previous `ListRollouts` call.\n Provide this to retrieve the subsequent page.\n\n When paginating, all other parameters provided to `ListRollouts` must match\n the call that provided the page token.",- },- {- name: "parent",- type: "string",- description:- 'The parent, which owns this collection of rollouts.\n Format: projects/{project}\n Use "projects/-" to list all rollouts from all projects.',- },- ],- description: "",- },- "bytebase.v1.ListRolloutsResponse": {- type: "object",- properties: [- {- name: "nextPageToken",- type: "string",- description:- "A token, which can be sent as `page_token` to retrieve the next page.\n If this field is omitted, there are no subsequent pages.",- },- {- name: "rollouts",- type: "array<bytebase.v1.Rollout>",- description: "The rollouts from the specified request.",- items: {- name: "item",- type: "bytebase.v1.Rollout",- },- },- ],- description: "",- },- "bytebase.v1.ListServiceAccountsRequest": {- type: "object",- properties: [- {- name: "filter",- type: "string",- description:- 'Filter is used to filter service accounts returned in the list.\n The syntax and semantics of CEL are documented at https://github.com/google/cel-spec\n\n Supported filter:\n - name: the service account name, support "==" and ".contains()" operator.\n - email: the service account email, support "==" and ".contains()" operator.\n - state: check State enum for values, support "==" operator.\n\n For example:\n name == "ed"\n name.contains("ed")\n state == "DELETED"\n email == "[email protected]"\n email.contains("ed")',- },- {- name: "pageSize",- type: "integer",- format: "int32",- description:- "The maximum number of service accounts to return. The service may return fewer than\n this value.\n If unspecified, at most 10 service accounts will be returned.\n The maximum value is 1000; values above 1000 will be coerced to 1000.",- },- {- name: "pageToken",- type: "string",- description:- "A page token, received from a previous `ListServiceAccounts` call.\n Provide this to retrieve the subsequent page.\n\n When paginating, all other parameters provided to `ListServiceAccounts` must match\n the call that provided the page token.",- },- {- name: "parent",- type: "string",- description:- "The parent resource.\n Format: projects/{project} for project-level, workspaces/{id} for workspace-level.",- },- {- name: "showDeleted",- type: "boolean",- description: "Show deleted service accounts if specified.",- },- ],- description: "Request message for listing service accounts.",- },- "bytebase.v1.ListServiceAccountsResponse": {- type: "object",- properties: [- {- name: "nextPageToken",- type: "string",- description:- "A token, which can be sent as `page_token` to retrieve the next page.\n If this field is omitted, there are no subsequent pages.",- },- {- name: "serviceAccounts",- type: "array<bytebase.v1.ServiceAccount>",- description: "The service accounts from the specified request.",- items: {- name: "item",- type: "bytebase.v1.ServiceAccount",- },- },- ],- description: "Response message for listing service accounts.",- },- "bytebase.v1.ListSettingsResponse": {- type: "object",- properties: [- {- name: "settings",- type: "array<bytebase.v1.Setting>",- description: "The settings from the specified request.",- items: {- name: "item",- type: "bytebase.v1.Setting",- },- },- ],- description: "",- },- "bytebase.v1.ListTaskRunsRequest": {- type: "object",- properties: [- {- name: "parent",- type: "string",- description:- 'The parent, which owns this collection of taskRuns.\n Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}\n Use "projects/{project}/plans/{plan}/rollout/stages/-/tasks/-" to list all taskRuns from a rollout.',- },- ],- description: "",- },- "bytebase.v1.ListTaskRunsResponse": {- type: "object",- properties: [- {- name: "taskRuns",- type: "array<bytebase.v1.TaskRun>",- description: "The taskRuns from the specified request.",- items: {- name: "item",- type: "bytebase.v1.TaskRun",- },- },- ],- description: "",- },- "bytebase.v1.ListUsersRequest": {- type: "object",- properties: [- {- name: "filter",- type: "string",- description:- 'Filter is used to filter users returned in the list.\n The syntax and semantics of CEL are documented at https://github.com/google/cel-spec\n\n Supported filter:\n - name: the user name, support "==" and ".contains()" operator.\n - email: the user email, support "==" and ".contains()" operator.\n - state: check State enum for values, support "==" operator.\n - project: the project full name in "projects/{id}" format, support "==" operator.\n\n For example:\n name == "ed"\n name.contains("ed")\n email == "[email protected]"\n email.contains("ed")\n state == "DELETED"\n project == "projects/sample-project"\n You can combine filter conditions like:\n name.contains("ed") && project == "projects/sample-project"\n (name == "ed" || email == "[email protected]") && project == "projects/sample-project"',- },- {- name: "pageSize",- type: "integer",- format: "int32",- description:- "The maximum number of users to return. The service may return fewer than\n this value.\n If unspecified, at most 10 users will be returned.\n The maximum value is 1000; values above 1000 will be coerced to 1000.",- },- {- name: "pageToken",- type: "string",- description:- "A page token, received from a previous `ListUsers` call.\n Provide this to retrieve the subsequent page.\n\n When paginating, all other parameters provided to `ListUsers` must match\n the call that provided the page token.",- },- {- name: "showDeleted",- type: "boolean",- description: "Show deleted users if specified.",- },- ],- description: "",- },- "bytebase.v1.ListUsersResponse": {- type: "object",- properties: [- {- name: "nextPageToken",- type: "string",- description:- "A token, which can be sent as `page_token` to retrieve the next page.\n If this field is omitted, there are no subsequent pages.",- },- {- name: "users",- type: "array<bytebase.v1.User>",- description: "The users from the specified request.",- items: {- name: "item",- type: "bytebase.v1.User",- },- },- ],- description: "",- },- "bytebase.v1.ListWorkloadIdentitiesRequest": {- type: "object",- properties: [- {- name: "filter",- type: "string",- description:- 'Filter is used to filter workload identities returned in the list.\n The syntax and semantics of CEL are documented at https://github.com/google/cel-spec\n\n Supported filter:\n - name: the workload identity name, support "==" and ".contains()" operator.\n - email: the workload identity email, support "==" and ".contains()" operator.\n - state: check State enum for values, support "==" operator.\n\n For example:\n name == "ed"\n name.contains("ed")\n state == "DELETED"\n email == "[email protected]"\n email.contains("ed")',- },- {- name: "pageSize",- type: "integer",- format: "int32",- description:- "The maximum number of workload identities to return. The service may return fewer than\n this value.\n If unspecified, at most 10 workload identities will be returned.\n The maximum value is 1000; values above 1000 will be coerced to 1000.",- },- {- name: "pageToken",- type: "string",- description:- "A page token, received from a previous `ListWorkloadIdentities` call.\n Provide this to retrieve the subsequent page.\n\n When paginating, all other parameters provided to `ListWorkloadIdentities` must match\n the call that provided the page token.",- },- {- name: "parent",- type: "string",- description:- "The parent resource.\n Format: projects/{project} for project-level, workspaces/{id} for workspace-level.",- },- {- name: "showDeleted",- type: "boolean",- description: "Show deleted workload identities if specified.",- },- ],- description: "Request message for listing workload identities.",- },- "bytebase.v1.ListWorkloadIdentitiesResponse": {- type: "object",- properties: [- {- name: "nextPageToken",- type: "string",- description:- "A token, which can be sent as `page_token` to retrieve the next page.\n If this field is omitted, there are no subsequent pages.",- },- {- name: "workloadIdentities",- type: "array<bytebase.v1.WorkloadIdentity>",- description: "The workload identities from the specified request.",- items: {- name: "item",- type: "bytebase.v1.WorkloadIdentity",- },- },- ],- description: "Response message for listing workload identities.",- },- "bytebase.v1.ListWorkspacesResponse": {- type: "object",- properties: [- {- name: "workspaces",- type: "array<bytebase.v1.Workspace>",- items: {- name: "item",- type: "bytebase.v1.Workspace",- },- },- ],- description: "",- },- "bytebase.v1.LoginRequest": {- type: "object",- properties: [- {- name: "email",- type: "string",- description: "User's email address.",- },- {- name: "emailCode",- type: "string",- description:- "6-digit code from email for passwordless login/signup.\n Pairs with `email`. Mutually exclusive with `password` and `idp_name`.",- },- {- name: "idpContext",- type: "bytebase.v1.IdentityProviderContext",- description:- "The idp_context is used to get the user information from identity provider.",- },- {- name: "idpName",- type: "string",- description: "The name of the identity provider.\n Format: idps/{idp}",- },- {- name: "mfaTempToken",- type: "string",- description:- "The mfa_temp_token is used to verify the user's identity by MFA.",- },- {- name: "otpCode",- type: "string",- description:- "The otp_code is used to verify the user's identity by MFA.",- },- {- name: "password",- type: "string",- description: "User's password for authentication.",- },- {- name: "recoveryCode",- type: "string",- description:- "The recovery_code is used to recovery the user's identity with MFA.",- },- {- name: "web",- type: "boolean",- description:- "If true, sets access token and refresh token as HTTP-only cookies instead of\n returning the token in the response body. Use for browser-based clients.",- },- {- name: "workspace",- type: "string",- description:- "Preferred workspace to land in after login. If the user is a member of this\n workspace, the token is issued for it; otherwise falls back to the default\n resolution (last login workspace → first membership). Typically populated\n from the ?workspace= query parameter in invite links.\n Format: workspaces/{workspace}",- },- ],- description: "",- },- "bytebase.v1.LoginResponse": {- type: "object",- properties: [- {- name: "mfaTempToken",- type: "string",- description: "Temporary token for MFA verification.",- },- {- name: "requireResetPassword",- type: "boolean",- description: "Whether user must reset password before continuing.",- },- {- name: "token",- type: "string",- description:- "Access token for authenticated requests.\n Only returned when web=false. For web=true, the token is set as an HTTP-only cookie.",- },- {- name: "user",- type: "bytebase.v1.User",- description: "The user from the successful login.",- },- ],- description: "",- },- "bytebase.v1.MaskingExemptionPolicy": {- type: "object",- properties: [- {- name: "exemptions",- type: "array<bytebase.v1.MaskingExemptionPolicy.Exemption>",- items: {- name: "item",- type: "bytebase.v1.MaskingExemptionPolicy.Exemption",- },- },- ],- description:- "MaskingExemptionPolicy is the allowlist of users who can access sensitive data.",- },- "bytebase.v1.MaskingExemptionPolicy.Exemption": {- type: "object",- properties: [- {- name: "condition",- type: "google.type.Expr",- description:- 'The condition that is associated with this exception policy instance.\n The syntax and semantics of CEL are documented at https://github.com/google/cel-spec\n If the condition is empty, means the user can access all databases without expiration.\n\n Support variables:\n resource.instance_id: the instance resource id. Only support "==" operation.\n resource.database_name: the database name. Only support "==" operation.\n resource.schema_name: the schema name. Only support "==" operation.\n resource.table_name: the table name. Only support "==" operation.\n resource.column_name: the column name. Only support "==" operation.\n request.time: the expiration. Only support "<" operation in `request.time < timestamp("{ISO datetime string format}")`\n All variables should join with "&&" condition.\n\n For example:\n resource.instance_id == "local" && resource.database_name == "employee" && request.time < timestamp("2025-04-30T11:10:39.000Z")\n resource.instance_id == "local" && resource.database_name == "employee"',- },- {- name: "members",- type: "array<string>",- description:- "Specifies the principals who are exempt from masking.\n For users, the member should be: user:{email}\n For groups, the member should be: group:{email}\n For service accounts, the member should be: serviceAccount:{email}\n For workload identities, the member should be: workloadIdentity:{email}",- items: {- name: "item",- type: "string",- },- },- ],- description: "",- },- "bytebase.v1.MaskingReason": {- type: "object",- properties: [- {- name: "algorithm",- type: "string",- description: "The masking algorithm used.",- },- {- name: "classificationLevel",- type: "integer",- format: "int32",- description: "The classification level that triggered masking.",- },- {- name: "context",- type: "string",- description:- 'Additional context (e.g., "Matched global rule: PII Protection").',- },- {- name: "maskingRuleId",- type: "string",- description: "The masking rule ID that matched (if applicable).",- },- {- name: "semanticTypeIcon",- type: "string",- description: "Icon associated with the semantic type (if any).",- },- {- name: "semanticTypeId",- type: "string",- description:- 'The semantic type that triggered masking (e.g., "SSN", "email", "phone").',- },- {- name: "semanticTypeTitle",- type: "string",- description: "Human-readable semantic type title.",- },- ],- description: "",- },- "bytebase.v1.MaskingRulePolicy": {- type: "object",- properties: [- {- name: "rules",- type: "array<bytebase.v1.MaskingRulePolicy.MaskingRule>",- description: "The list of masking rules.",- items: {- name: "item",- type: "bytebase.v1.MaskingRulePolicy.MaskingRule",- },- },- ],- description: "Policy for configuring data masking rules.",- },- "bytebase.v1.MaskingRulePolicy.MaskingRule": {- type: "object",- properties: [- {- name: "condition",- type: "google.type.Expr",- description:- 'The condition for the masking rule.\n The syntax and semantics of CEL are documented at https://github.com/google/cel-spec\n\n Support variables:\n resource.environment_id: the environment resource id.\n resource.project_id: the project resource id.\n resource.instance_id: the instance resource id.\n resource.database_name: the database name.\n resource.table_name: the table name.\n resource.column_name: the column name.\n resource.classification_level: the classification level (integer).\n\n Each variable support following operations:\n ==: the value equals the target.\n !=: the value not equals the target.\n in: the value matches one of the targets.\n !(in): the value not matches any of the targets.\n <, <=, >, >=: numeric comparison (classification_level only).\n\n For example:\n resource.environment_id == "test" && resource.project_id == "sample-project"\n resource.instance_id == "sample-instance" && resource.database_name == "employee" && resource.table_name in ["table1", "table2"]\n resource.environment_id != "test" || !(resource.project_id in ["poject1", "prject2"])\n resource.instance_id == "sample-instance" && (resource.database_name == "db1" || resource.database_name == "db2")',- },- {- name: "id",- type: "string",- description: "A unique identifier for the rule in UUID format.",- },- {- name: "semanticType",- type: "string",- description:- 'The semantic type of data to mask (e.g., "SSN", "EMAIL").',- },- ],- description: "A rule that defines when and how to mask data.",- },- "bytebase.v1.MaterializedViewMetadata": {- type: "object",- properties: [- {- name: "comment",- type: "string",- description: "The comment is the comment of a materialized view.",- },- {- name: "definition",- type: "string",- description: "The definition is the definition of a materialized view.",- },- {- name: "dependencyColumns",- type: "array<bytebase.v1.DependencyColumn>",- description:- "The dependency_columns is the list of dependency columns of a materialized\n view.",- items: {- name: "item",- type: "bytebase.v1.DependencyColumn",- },- },- {- name: "indexes",- type: "array<bytebase.v1.IndexMetadata>",- description: "The indexes is the list of indexes in a table.",- items: {- name: "item",- type: "bytebase.v1.IndexMetadata",- },- },- {- name: "name",- type: "string",- description: "The name is the name of a materialized view.",- },- {- name: "skipDump",- type: "boolean",- },- {- name: "triggers",- type: "array<bytebase.v1.TriggerMetadata>",- description: "The columns is the ordered list of columns in a table.",- items: {- name: "item",- type: "bytebase.v1.TriggerMetadata",- },- },- ],- description:- "MaterializedViewMetadata is the metadata for materialized views.",- },- "bytebase.v1.OAuth2AuthStyle": {- type: "enum",- values: ["OAUTH2_AUTH_STYLE_UNSPECIFIED", "IN_PARAMS", "IN_HEADER"],- description: "",- },- "bytebase.v1.OAuth2IdentityProviderConfig": {- type: "object",- properties: [- {- name: "authStyle",- type: "bytebase.v1.OAuth2AuthStyle",- description: "The authentication style for client credentials.",- },- {- name: "authUrl",- type: "string",- description: "The authorization endpoint URL for OAuth2 flow.",- },- {- name: "clientId",- type: "string",- description: "The OAuth2 client identifier.",- },- {- name: "clientSecret",- type: "string",- description: "The OAuth2 client secret for authentication.",- },- {- name: "fieldMapping",- type: "bytebase.v1.FieldMapping",- description:- "Mapping configuration for user attributes from OAuth2 response.",- },- {- name: "scopes",- type: "array<string>",- description: "The list of OAuth2 scopes to request.",- items: {- name: "item",- type: "string",- },- },- {- name: "skipTlsVerify",- type: "boolean",- description: "Whether to skip TLS certificate verification.",- },- {- name: "tokenUrl",- type: "string",- description:- "The token endpoint URL for exchanging authorization code.",- },- {- name: "userInfoUrl",- type: "string",- description: "The user information endpoint URL.",- },- ],- description:- "OAuth2IdentityProviderConfig is the structure for OAuth2 identity provider config.",- },- "bytebase.v1.OAuth2IdentityProviderContext": {- type: "object",- properties: [- {- name: "code",- type: "string",- description: "Authorization code from OAuth2 provider.",- },- ],- description: "OAuth2 authentication context.",- },- "bytebase.v1.OAuth2IdentityProviderTestRequestContext": {- type: "object",- properties: [- {- name: "code",- type: "string",- description: "Authorize code from website.",- },- ],- description: "",- },- "bytebase.v1.OIDCIdentityProviderConfig": {- type: "object",- properties: [- {- name: "authEndpoint",- type: "string",- description:- "The authorization endpoint of the OIDC provider.\n Should be fetched from the well-known configuration file of the OIDC provider.",- },- {- name: "authStyle",- type: "bytebase.v1.OAuth2AuthStyle",- description: "The authentication style for client credentials.",- },- {- name: "clientId",- type: "string",- description: "The OIDC client identifier.",- },- {- name: "clientSecret",- type: "string",- description: "The OIDC client secret for authentication.",- },- {- name: "fieldMapping",- type: "bytebase.v1.FieldMapping",- description:- "Mapping configuration for user attributes from OIDC claims.",- },- {- name: "issuer",- type: "string",- description: "The OIDC issuer URL for the identity provider.",- },- {- name: "scopes",- type: "array<string>",- description:- "The scopes that the OIDC provider supports.\n Should be fetched from the well-known configuration file of the OIDC provider.",- items: {- name: "item",- type: "string",- },- },- {- name: "skipTlsVerify",- type: "boolean",- description: "Whether to skip TLS certificate verification.",- },- ],- description:- "OIDCIdentityProviderConfig is the structure for OIDC identity provider config.",- },- "bytebase.v1.OIDCIdentityProviderContext": {- type: "object",- properties: [- {- name: "code",- type: "string",- description: "Authorization code from OIDC provider.",- },- ],- description: "OpenID Connect authentication context.",- },- "bytebase.v1.OIDCIdentityProviderTestRequestContext": {- type: "object",- properties: [- {- name: "code",- type: "string",- description: "Authorize code from OIDC provider.",- },- ],- description: "",- },- "bytebase.v1.ObjectSchema": {- type: "object",- properties: [- {- name: "arrayKind",- type: "bytebase.v1.ObjectSchema.ArrayKind",- description: "Array schema.",- },- {- name: "semanticType",- type: "string",- description: "The semantic type of this object.",- },- {- name: "structKind",- type: "bytebase.v1.ObjectSchema.StructKind",- description: "Struct schema.",- },- {- name: "type",- type: "bytebase.v1.ObjectSchema.Type",- description: "The data type of this object.",- },- ],- description: "Schema definition for object-type columns.",- },- "bytebase.v1.ObjectSchema.ArrayKind": {- type: "object",- properties: [- {- name: "kind",- type: "bytebase.v1.ObjectSchema",- description: "The schema of array elements.",- },- ],- description: "Array type with element schema.",- },- "bytebase.v1.ObjectSchema.StructKind": {- type: "object",- properties: [- {- name: "properties",- type: "object",- description: "Properties of the struct.",- additionalProperties: {- name: "value",- type: "bytebase.v1.ObjectSchema",- },- },- ],- description: "Structure type with named properties.",- },- "bytebase.v1.ObjectSchema.StructKind.PropertiesEntry": {- type: "object",- properties: [- {- name: "key",- type: "string",- },- {- name: "value",- type: "bytebase.v1.ObjectSchema",- },- ],- description: "",- },- "bytebase.v1.ObjectSchema.Type": {- type: "enum",- values: [- "TYPE_UNSPECIFIED",- "STRING",- "NUMBER",- "BOOLEAN",- "OBJECT",- "ARRAY",- ],- description: "Object schema data types.",- },- "bytebase.v1.PackageMetadata": {- type: "object",- properties: [- {- name: "definition",- type: "string",- description: "The definition is the definition of a package.",- },- {- name: "name",- type: "string",- description: "The name is the name of a package.",- },- ],- description: "PackageMetadata is the metadata for packages.",- },- "bytebase.v1.PaymentInfo": {- type: "object",- properties: [- {- name: "cancelAtPeriodEnd",- type: "boolean",- description:- "Whether the subscription is scheduled to cancel at the end of the current billing period.",- },- {- name: "currency",- type: "string",- },- {- name: "invoiceUrl",- type: "string",- description: "Stripe Billing Portal URL for invoice management.",- },- {- name: "nextPeriodPrice",- type: "string",- description:- "Amount that will be charged at the next renewal, in the smallest currency unit (e.g. cents).\n Empty when the subscription will not renew (e.g. scheduled to cancel at period end).",- },- {- name: "periodEnd",- type: "string",- },- {- name: "periodStart",- type: "string",- },- {- name: "totalPrice",- type: "string",- description:- "Total amount paid for the current billing period, in the smallest currency unit (e.g. cents).",- },- ],- description: "",- },- "bytebase.v1.PermissionDeniedDetail": {- type: "object",- properties: [- {- name: "method",- type: "string",- description: "The API method that was called.",- },- {- name: "requiredPermissions",- type: "array<string>",- description: "The permissions required but not granted to the user.",- items: {- name: "item",- type: "string",- },- },- {- name: "resources",- type: "array<string>",- description: "The resources the user was trying to access.",- items: {- name: "item",- type: "string",- },- },- ],- description:- "PermissionDeniedDetail provides structured information about permission failures.\n Used as error detail when returning CodePermissionDenied errors.",- },- "bytebase.v1.Plan": {- type: "object",- properties: [- {- name: "approvalStatus",- type: "bytebase.v1.ApprovalStatus",- description:- "The approval status of the linked issue.\n Unspecified when no linked issue exists.",- },- {- name: "createTime",- type: "google.protobuf.Timestamp",- },- {- name: "creator",- type: "string",- description: "Format: users/[email protected]",- },- {- name: "description",- type: "string",- description: "The description of the plan.",- },- {- name: "hasRollout",- type: "boolean",- description: "Whether the plan has started the rollout.",- },- {- name: "issue",- type: "string",- description:- "The issue associated with the plan.\n Can be empty.\n Format: projects/{project}/issues/{issue}",- },- {- name: "name",- type: "string",- description:- "The name of the plan.\n `plan` is a system generated ID.\n Format: projects/{project}/plans/{plan}",- },- {- name: "planCheckRunStatusCount",- type: "object",- description:- "The status count of the latest plan check runs.\n Keys are:\n - SUCCESS\n - WARNING\n - ERROR\n - RUNNING",- additionalProperties: {- name: "value",- type: "integer",- format: "int32",- },- },- {- name: "rolloutStageSummaries",- type: "array<bytebase.v1.Plan.RolloutStageSummary>",- description:- "Per-stage rollout status summary.\n Ordered by environment deployment order. Empty when no rollout exists.",- items: {- name: "item",- type: "bytebase.v1.Plan.RolloutStageSummary",- },- },- {- name: "specs",- type: "array<bytebase.v1.Plan.Spec>",- description: "The deployment specs for the plan.",- items: {- name: "item",- type: "bytebase.v1.Plan.Spec",- },- },- {- name: "state",- type: "bytebase.v1.State",- description: "The state of the plan.",- },- {- name: "title",- type: "string",- description: "The title of the plan.",- },- {- name: "updateTime",- type: "google.protobuf.Timestamp",- },- ],- description: "",- },- "bytebase.v1.Plan.ChangeDatabaseConfig": {- type: "object",- properties: [- {- name: "enablePriorBackup",- type: "boolean",- description:- "If set, a backup of the modified data will be created automatically before any changes are applied.",- },- {- name: "release",- type: "string",- description:- "The resource name of the release.\n Format: projects/{project}/releases/{release}",- },- {- name: "sheet",- type: "string",- description:- "The resource name of the sheet.\n Format: projects/{project}/sheets/{sheet}",- },- {- name: "targets",- type: "array<string>",- description:- "The list of targets.\n Multi-database format: [instances/{instance-id}/databases/{database-name}].\n Single database group format: [projects/{project}/databaseGroups/{databaseGroup}].",- items: {- name: "item",- type: "string",- },- },- ],- description: "",- },- "bytebase.v1.Plan.CreateDatabaseConfig": {- type: "object",- properties: [- {- name: "characterSet",- type: "string",- description: "character_set is the character set of the database.",- },- {- name: "cluster",- type: "string",- description:- 'cluster is the cluster of the database. This is only applicable to ClickHouse for "ON CLUSTER <<cluster>>".',- },- {- name: "collation",- type: "string",- description: "collation is the collation of the database.",- },- {- name: "database",- type: "string",- description: "The name of the database to create.",- },- {- name: "environment",- type: "string",- description:- "The environment resource.\n Format: environments/prod where prod is the environment resource ID.",- },- {- name: "owner",- type: "string",- description:- 'owner is the owner of the database. This is only applicable to Postgres for "WITH OWNER <<owner>>".',- },- {- name: "table",- type: "string",- description:- "table is the name of the table, if it is not empty, Bytebase should create a table after creating the database.\n For example, in MongoDB, it only creates the database when we first store data in that database.",- },- {- name: "target",- type: "string",- description:- "The resource name of the instance on which the database is created.\n Format: instances/{instance}",- },- ],- description: "",- },- "bytebase.v1.Plan.ExportDataConfig": {- type: "object",- properties: [- {- name: "format",- type: "bytebase.v1.ExportFormat",- description: "The format of the exported file.",- },- {- name: "password",- type: "string",- description:- "The zip password provide by users.\n Leave it empty if no needs to encrypt the zip file.",- },- {- name: "sheet",- type: "string",- description:- "The resource name of the sheet.\n Format: projects/{project}/sheets/{sheet}",- },- {- name: "targets",- type: "array<string>",- description:- "The list of targets.\n Multi-database format: [instances/{instance-id}/databases/{database-name}].\n Single database group format: [projects/{project}/databaseGroups/{databaseGroup}].",- items: {- name: "item",- type: "string",- },- },- ],- description: "",- },- "bytebase.v1.Plan.PlanCheckRunStatusCountEntry": {- type: "object",- properties: [- {- name: "key",- type: "string",- },- {- name: "value",- type: "integer",- format: "int32",- },- ],- description: "",- },- "bytebase.v1.Plan.RolloutStageSummary": {- type: "object",- properties: [- {- name: "stage",- type: "string",- description:- "The stage resource name.\n Format: projects/{project}/plans/{plan}/rollout/stages/{stage}",- },- {- name: "taskStatusCounts",- type: "array<bytebase.v1.Plan.TaskStatusCount>",- description: "Task status counts for this stage.",- items: {- name: "item",- type: "bytebase.v1.Plan.TaskStatusCount",- },- },- ],- description: "",- },- "bytebase.v1.Plan.Spec": {- type: "object",- properties: [- {- name: "changeDatabaseConfig",- type: "bytebase.v1.Plan.ChangeDatabaseConfig",- },- {- name: "createDatabaseConfig",- type: "bytebase.v1.Plan.CreateDatabaseConfig",- },- {- name: "exportDataConfig",- type: "bytebase.v1.Plan.ExportDataConfig",- },- {- name: "id",- type: "string",- description: "A UUID4 string that uniquely identifies the Spec.",- },- ],- description: "",- },- "bytebase.v1.Plan.TaskStatusCount": {- type: "object",- properties: [- {- name: "count",- type: "integer",- format: "int32",- description: "The number of tasks in the status.",- },- {- name: "status",- type: "bytebase.v1.Task.Status",- description: "The task status.",- },- ],- description: "",- },- "bytebase.v1.PlanCheckRun": {- type: "object",- properties: [- {- name: "createTime",- type: "google.protobuf.Timestamp",- },- {- name: "error",- type: "string",- description: "error is set if the Status is FAILED.",- },- {- name: "name",- type: "string",- description: "Format: projects/{project}/plans/{plan}/planCheckRun",- },- {- name: "results",- type: "array<bytebase.v1.PlanCheckRun.Result>",- items: {- name: "item",- type: "bytebase.v1.PlanCheckRun.Result",- },- },- {- name: "status",- type: "bytebase.v1.PlanCheckRun.Status",- },- ],- description: "",- },- "bytebase.v1.PlanCheckRun.Result": {- type: "object",- properties: [- {- name: "code",- type: "integer",- format: "int32",- },- {- name: "content",- type: "string",- },- {- name: "sqlReviewReport",- type: "bytebase.v1.PlanCheckRun.Result.SqlReviewReport",- },- {- name: "sqlSummaryReport",- type: "bytebase.v1.PlanCheckRun.Result.SqlSummaryReport",- },- {- name: "status",- type: "bytebase.v1.Advice.Level",- },- {- name: "target",- type: "string",- description:- "Target identification for consolidated results.\n Format: instances/{instance}/databases/{database}",- },- {- name: "title",- type: "string",- },- {- name: "type",- type: "bytebase.v1.PlanCheckRun.Result.Type",- },- ],- description: "",- },- "bytebase.v1.PlanCheckRun.Result.SqlReviewReport": {- type: "object",- properties: [- {- name: "endPosition",- type: "bytebase.v1.Position",- },- {- name: "startPosition",- type: "bytebase.v1.Position",- description: "Position of the SQL statement.",- },- ],- description: "",- },- "bytebase.v1.PlanCheckRun.Result.SqlSummaryReport": {- type: "object",- properties: [- {- name: "affectedRows",- type: "integer",- format: "int64",- },- {- name: "statementTypes",- type: "array<bytebase.v1.StatementType>",- description:- "statement_types are the types of statements that are found in the sql.",- items: {- name: "item",- type: "bytebase.v1.StatementType",- },- },- ],- description: "",- },- "bytebase.v1.PlanCheckRun.Result.Type": {- type: "enum",- values: [- "TYPE_UNSPECIFIED",- "STATEMENT_ADVISE",- "STATEMENT_SUMMARY_REPORT",- "GHOST_SYNC",- ],- description: "",- },- "bytebase.v1.PlanCheckRun.Status": {- type: "enum",- values: ["STATUS_UNSPECIFIED", "RUNNING", "DONE", "FAILED", "CANCELED"],- description: "",- },- "bytebase.v1.PlanConfig": {- type: "object",- properties: [- {- name: "instanceFeatures",- type: "array<bytebase.v1.PlanFeature>",- items: {- name: "item",- type: "bytebase.v1.PlanFeature",- },- },- {- name: "plans",- type: "array<bytebase.v1.PlanLimitConfig>",- items: {- name: "item",- type: "bytebase.v1.PlanLimitConfig",- },- },- ],- description:- "PlanConfig represents the configuration for all plans loaded from plan.yaml",- },- "bytebase.v1.PlanFeature": {- type: "enum",- values: [- "FEATURE_UNSPECIFIED",- "FEATURE_DATABASE_CHANGE",- "FEATURE_GIT_BASED_SCHEMA_VERSION_CONTROL",- "FEATURE_DECLARATIVE_SCHEMA_MIGRATION",- "FEATURE_COMPARE_AND_SYNC_SCHEMA",- "FEATURE_ONLINE_SCHEMA_CHANGE",- "FEATURE_PRE_DEPLOYMENT_SQL_REVIEW",- "FEATURE_AUTOMATIC_BACKUP_BEFORE_DATA_CHANGES",- "FEATURE_ONE_CLICK_DATA_ROLLBACK",- "FEATURE_MULTI_DATABASE_BATCH_CHANGES",- "FEATURE_PROGRESSIVE_ENVIRONMENT_DEPLOYMENT",- "FEATURE_SCHEDULED_ROLLOUT_TIME",- "FEATURE_DATABASE_CHANGELOG",- "FEATURE_SCHEMA_DRIFT_DETECTION",- "FEATURE_ROLLOUT_POLICY",- "FEATURE_WEB_BASED_SQL_EDITOR",- "FEATURE_SQL_EDITOR_ADMIN_MODE",- "FEATURE_NATURAL_LANGUAGE_TO_SQL",- "FEATURE_AI_QUERY_EXPLANATION",- "FEATURE_AI_QUERY_SUGGESTIONS",- "FEATURE_AUTO_COMPLETE",- "FEATURE_SCHEMA_DIAGRAM",- "FEATURE_SCHEMA_EDITOR",- "FEATURE_DATA_EXPORT",- "FEATURE_DATA_OFFLINE_EXPORT",- "FEATURE_QUERY_HISTORY",- "FEATURE_SAVED_AND_SHARED_SQL_SCRIPTS",- "FEATURE_BATCH_QUERY",- "FEATURE_INSTANCE_READ_ONLY_CONNECTION",- "FEATURE_QUERY_POLICY",- "FEATURE_RESTRICT_COPYING_DATA",- "FEATURE_IAM",- "FEATURE_INSTANCE_SSL_CONNECTION",- "FEATURE_INSTANCE_CONNECTION_OVER_SSH_TUNNEL",- "FEATURE_INSTANCE_CONNECTION_IAM_AUTHENTICATION",- "FEATURE_GOOGLE_AND_GITHUB_SSO",- "FEATURE_USER_GROUPS",- "FEATURE_DISALLOW_SELF_SERVICE_SIGNUP",- "FEATURE_CUSTOM_INSTANCE_SYNC_TIME",- "FEATURE_CUSTOM_INSTANCE_CONNECTION_LIMIT",- "FEATURE_RISK_ASSESSMENT",- "FEATURE_APPROVAL_WORKFLOW",- "FEATURE_AUDIT_LOG",- "FEATURE_ENTERPRISE_SSO",- "FEATURE_TWO_FA",- "FEATURE_PASSWORD_RESTRICTIONS",- "FEATURE_DISALLOW_PASSWORD_SIGNIN",- "FEATURE_CUSTOM_ROLES",- "FEATURE_REQUEST_ROLE_WORKFLOW",- "FEATURE_JIT",- "FEATURE_DATA_MASKING",- "FEATURE_DATA_CLASSIFICATION",- "FEATURE_SCIM",- "FEATURE_DIRECTORY_SYNC",- "FEATURE_TOKEN_DURATION_CONTROL",- "FEATURE_EXTERNAL_SECRET_MANAGER",- "FEATURE_USER_EMAIL_DOMAIN_RESTRICTION",- "FEATURE_PROJECT_MANAGEMENT",- "FEATURE_ENVIRONMENT_MANAGEMENT",- "FEATURE_IM_NOTIFICATIONS",- "FEATURE_TERRAFORM_PROVIDER",- "FEATURE_DATABASE_GROUPS",- "FEATURE_ENVIRONMENT_TIERS",- "FEATURE_DASHBOARD_ANNOUNCEMENT",- "FEATURE_API_INTEGRATION_GUIDANCE",- "FEATURE_CUSTOM_LOGO",- "FEATURE_WATERMARK",- "FEATURE_ROADMAP_PRIORITIZATION",- "FEATURE_CUSTOM_MSA",- "FEATURE_COMMUNITY_SUPPORT",- "FEATURE_EMAIL_SUPPORT",- "FEATURE_DEDICATED_SUPPORT_WITH_SLA",- ],- description: "PlanFeature represents the available features in Bytebase",- },- "bytebase.v1.PlanLimitConfig": {- type: "object",- properties: [- {- name: "features",- type: "array<bytebase.v1.PlanFeature>",- items: {- name: "item",- type: "bytebase.v1.PlanFeature",- },- },- {- name: "maximumInstanceCount",- type: "integer",- format: "int32",- },- {- name: "maximumSeatCount",- type: "integer",- format: "int32",- },- {- name: "type",- type: "bytebase.v1.PlanType",- },- ],- description: "PlanLimitConfig represents a single plan's configuration",- },- "bytebase.v1.PlanType": {- type: "enum",- values: ["PLAN_TYPE_UNSPECIFIED", "FREE", "TEAM", "ENTERPRISE"],- description: "",- },- "bytebase.v1.Policy": {- type: "object",- properties: [- {- name: "enforce",- type: "boolean",- description: "Whether the policy is enforced.",- },- {- name: "inheritFromParent",- type: "boolean",- description: "Whether this policy inherits from its parent resource.",- },- {- name: "maskingExemptionPolicy",- type: "bytebase.v1.MaskingExemptionPolicy",- },- {- name: "maskingRulePolicy",- type: "bytebase.v1.MaskingRulePolicy",- },- {- name: "name",- type: "string",- description:- "The name of the policy.\n Format: {resource name}/policies/{policy type}\n Workspace resource name: workspaces/{workspace-id}.\n Environment resource name: environments/environment-id.\n Instance resource name: instances/instance-id.\n Database resource name: instances/instance-id/databases/database-name.",- },- {- name: "queryDataPolicy",- type: "bytebase.v1.QueryDataPolicy",- },- {- name: "resourceType",- type: "bytebase.v1.PolicyResourceType",- description: "The resource type for the policy.",- },- {- name: "rolloutPolicy",- type: "bytebase.v1.RolloutPolicy",- },- {- name: "tagPolicy",- type: "bytebase.v1.TagPolicy",- },- {- name: "type",- type: "bytebase.v1.PolicyType",- description: "The type of policy.",- },- ],- description: "",- },- "bytebase.v1.PolicyDelta": {- type: "object",- properties: [- {- name: "bindingDeltas",- type: "array<bytebase.v1.BindingDelta>",- description: "The delta for Bindings between two policies.",- items: {- name: "item",- type: "bytebase.v1.BindingDelta",- },- },- ],- description: "Describes changes between two IAM policies.",- },- "bytebase.v1.PolicyResourceType": {- type: "enum",- values: [- "RESOURCE_TYPE_UNSPECIFIED",- "WORKSPACE",- "ENVIRONMENT",- "PROJECT",- ],- description: "The resource type that a policy can be attached to.",- },- "bytebase.v1.PolicyType": {- type: "enum",- values: [- "POLICY_TYPE_UNSPECIFIED",- "MASKING_RULE",- "MASKING_EXEMPTION",- "ROLLOUT_POLICY",- "TAG",- "DATA_QUERY",- ],- description: "The type of organizational policy.",- },- "bytebase.v1.Position": {- type: "object",- properties: [- {- name: "column",- type: "integer",- format: "int32",- description:- "Column position in a text (one-based).\n Column is measured in Unicode code points (characters/runes), not bytes or grapheme clusters.\n First character of the line is column 1.\n A value of 0 indicates the column information is unknown.\n\n Examples:\n - \"SELECT * FROM t\" - column 8 is '*'\n - \"SELECT 你好 FROM t\" - column 8 is '你' (even though it's at byte offset 7)\n - \"SELECT 😀 FROM t\" - column 8 is '😀' (even though it's 4 bytes in UTF-8)",- },- {- name: "line",- type: "integer",- format: "int32",- description:- "Line position in a text (one-based).\n First line of the text is line 1.\n A value of 0 indicates the line information is unknown.",- },- ],- description:- "Position in a text expressed as one-based line and one-based column.\n We use 1-based numbering to match the majority of industry standards:\n - Monaco Editor uses 1-based (https://microsoft.github.io/monaco-editor/typedoc/interfaces/IPosition.html)\n - GitHub Actions uses 1-based (https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-error-message)\n - Most text editors display 1-based positions to users\n Note: LSP uses 0-based (https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position),\n but we follow the canonical user-facing standards.\n\n Handling unknown positions:\n - If the entire position is unknown, leave this field as nil/undefined\n - If only line is known, set line and leave column as 0 (e.g., line=5, column=0)\n - If only column is known (rare), set column and leave line as 0\n Frontends should check for nil/undefined/zero values and handle them appropriately.",- },- "bytebase.v1.PreviewTaskRunRollbackRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}",- },- ],- description: "",- },- "bytebase.v1.PreviewTaskRunRollbackResponse": {- type: "object",- properties: [- {- name: "statement",- type: "string",- description: "The rollback SQL statement that would undo the task run.",- },- ],- description: "",- },- "bytebase.v1.ProcedureMetadata": {- type: "object",- properties: [- {- name: "characterSetClient",- type: "string",- description: "MySQL specific metadata.",- },- {- name: "collationConnection",- type: "string",- },- {- name: "comment",- type: "string",- description: "The comment is the comment of a procedure.",- },- {- name: "databaseCollation",- type: "string",- },- {- name: "definition",- type: "string",- description: "The definition is the definition of a procedure.",- },- {- name: "name",- type: "string",- description: "The name is the name of a procedure.",- },- {- name: "signature",- type: "string",- description:- "The signature is the name with the number and type of input arguments the\n procedure takes.",- },- {- name: "skipDump",- type: "boolean",- },- {- name: "sqlMode",- type: "string",- },- ],- description: "ProcedureMetadata is the metadata for procedures.",- },- "bytebase.v1.Project": {- type: "object",- properties: [- {- name: "allowJustInTimeAccess",- type: "boolean",- description:- "Once enabled, users can request and use the just-in-time access in the SQL Editor.",- },- {- name: "allowRequestRole",- type: "boolean",- },- {- name: "allowSelfApproval",- type: "boolean",- description:- "Whether to allow issue creators to self-approve their own issues.",- },- {- name: "ciSamplingSize",- type: "integer",- format: "int32",- description:- "The maximum number of database rows to sample during CI data validation.\n Without specification, sampling is disabled, resulting in full validation.",- },- {- name: "dataClassificationConfigId",- type: "string",- description:- "The data classification configuration ID for the project.",- },- {- name: "enforceIssueTitle",- type: "boolean",- description:- "Enforce issue title to be created by user instead of generated by Bytebase.",- },- {- name: "enforceSqlReview",- type: "boolean",- description:- "Whether to enforce SQL review checks to pass before issue creation.\n If enabled, issues cannot be created when SQL review finds errors.",- },- {- name: "executionRetryPolicy",- type: "bytebase.v1.Project.ExecutionRetryPolicy",- description: "Execution retry policy for task runs.",- },- {- name: "forceIssueLabels",- type: "boolean",- description: "Force issue labels to be used when creating an issue.",- },- {- name: "issueLabels",- type: "array<bytebase.v1.Label>",- description: "Labels available for tagging issues in this project.",- items: {- name: "item",- type: "bytebase.v1.Label",- },- },- {- name: "labels",- type: "object",- description:- 'Labels are key-value pairs that can be attached to the project.\n For example, { "environment": "production", "team": "backend" }',- additionalProperties: {- name: "value",- type: "string",- },- },- {- name: "name",- type: "string",- description: "The name of the project.\n Format: projects/{project}",- },- {- name: "parallelTasksPerRollout",- type: "integer",- format: "int32",- description:- "The maximum number of parallel tasks allowed during rollout execution.",- },- {- name: "postgresDatabaseTenantMode",- type: "boolean",- description:- 'Whether to enable database tenant mode for PostgreSQL.\n If enabled, issues will include "set role <db_owner>" statement.',- },- {- name: "requireIssueApproval",- type: "boolean",- description: "Whether to require issue approval before rollout.",- },- {- name: "requirePlanCheckNoError",- type: "boolean",- description:- "Whether to require plan check to have no error before rollout.",- },- {- name: "state",- type: "bytebase.v1.State",- description: "The lifecycle state of the project.",- },- {- name: "title",- type: "string",- description:- "The title or name of a project. It's not unique within the workspace.",- },- {- name: "webhooks",- type: "array<bytebase.v1.Webhook>",- description: "The list of webhooks configured for the project.",- items: {- name: "item",- type: "bytebase.v1.Webhook",- },- },- ],- description: "",- },- "bytebase.v1.Project.ExecutionRetryPolicy": {- type: "object",- properties: [- {- name: "maximumRetries",- type: "integer",- format: "int32",- description: "The maximum number of retries for lock timeout errors.",- },- ],- description: "Execution retry policy configuration.",- },- "bytebase.v1.Project.LabelsEntry": {- type: "object",- properties: [- {- name: "key",- type: "string",- },- {- name: "value",- type: "string",- },- ],- description: "",- },- "bytebase.v1.PurchaseBillingMethod": {- type: "object",- properties: [- {- name: "discount",- type: "bytebase.v1.PurchaseDiscount",- },- {- name: "interval",- type: "bytebase.v1.BillingInterval",- },- ],- description: "",- },- "bytebase.v1.PurchaseDiscount": {- type: "object",- properties: [- {- name: "type",- type: "bytebase.v1.PurchaseDiscount.Type",- },- {- name: "value",- type: "integer",- format: "int32",- },- ],- description: "",- },- "bytebase.v1.PurchaseDiscount.Type": {- type: "enum",- values: [- "TYPE_UNSPECIFIED",- "PERCENTAGE_OFF",- "FIXED_MONTH_OFF",- "FIXED_PRICE_OFF",- ],- description: "",- },- "bytebase.v1.PurchasePlan": {- type: "object",- properties: [- {- name: "additionals",- type: "array<bytebase.v1.PurchasePlanAdditional>",- items: {- name: "item",- type: "bytebase.v1.PurchasePlanAdditional",- },- },- {- name: "billingMethods",- type: "array<bytebase.v1.PurchaseBillingMethod>",- items: {- name: "item",- type: "bytebase.v1.PurchaseBillingMethod",- },- },- {- name: "selfServicePurchase",- type: "boolean",- },- {- name: "type",- type: "bytebase.v1.PlanType",- },- ],- description: "",- },- "bytebase.v1.PurchasePlanAdditional": {- type: "object",- properties: [- {- name: "freeCount",- type: "integer",- format: "int32",- },- {- name: "maximumCount",- type: "integer",- format: "int32",- description: "-1 means unlimited.",- },- {- name: "minimumCount",- type: "integer",- format: "int32",- },- {- name: "type",- type: "bytebase.v1.PurchasePlanAdditional.Type",- },- {- name: "unitPrice",- type: "integer",- format: "int32",- description: "Price in USD cents per month.",- },- ],- description: "",- },- "bytebase.v1.PurchasePlanAdditional.Type": {- type: "enum",- values: ["TYPE_UNSPECIFIED", "USER"],- description: "",- },- "bytebase.v1.PurchaseResponse": {- type: "object",- properties: [- {- name: "paymentUrl",- type: "string",- description:- "If set, redirect to this Stripe Checkout URL.\n If empty, the update was applied directly using the existing payment method.",- },- {- name: "sessionId",- type: "string",- description:- "Stripe Checkout Session ID. Used to verify the session after redirect.",- },- ],- description: "",- },- "bytebase.v1.QueryDataPolicy": {- type: "object",- properties: [- {- name: "allowAdminDataSource",- type: "boolean",- description:- "workspace-level policy\n Allow using the admin data source to query in the SQL editor.\n If true, users can select the admin data source or read-only data source\n If false,\n 1. when read-only data source is configured, users're force to use the read-only data source\n 2. otherwise fallback to use the admin data source.",- },- {- name: "disableCopyData",- type: "boolean",- description:- "workspace-level policy\n Disable copying query results in the SQL editor.",- },- {- name: "disableExport",- type: "boolean",- description:- "workspace-level policy\n Disable data export in the SQL editor.",- },- {- name: "maximumResultRows",- type: "integer",- format: "int32",- description:- "Support both project-level and workspace-level.\n The maximum number of rows to return in the SQL editor.\n The default value <= 0, means no limit.",- },- ],- description:- "QueryDataPolicy is the policy configuration for querying data in the SQL Editor.",- },- "bytebase.v1.QueryHistory": {- type: "object",- properties: [- {- name: "createTime",- type: "google.protobuf.Timestamp",- },- {- name: "creator",- type: "string",- },- {- name: "database",- type: "string",- description:- "The database name to execute the query.\n Format: instances/{instance}/databases/{databaseName}",- },- {- name: "duration",- type: "google.protobuf.Duration",- },- {- name: "error",- type: "string",- },- {- name: "name",- type: "string",- description:- "The name for the query history.\n Format: projects/{project}/queryHistories/{id}",- },- {- name: "statement",- type: "string",- },- {- name: "type",- type: "bytebase.v1.QueryHistory.Type",- },- ],- description: "",- },- "bytebase.v1.QueryHistory.Type": {- type: "enum",- values: ["TYPE_UNSPECIFIED", "QUERY", "EXPORT"],- description: "",- },- "bytebase.v1.QueryOption": {- type: "object",- properties: [- {- name: "mssqlExplainFormat",- type: "bytebase.v1.QueryOption.MSSQLExplainFormat",- },- {- name: "redisRunCommandsOn",- type: "bytebase.v1.QueryOption.RedisRunCommandsOn",- },- ],- description: "",- },- "bytebase.v1.QueryOption.MSSQLExplainFormat": {- type: "enum",- values: [- "MSSQL_EXPLAIN_FORMAT_UNSPECIFIED",- "MSSQL_EXPLAIN_FORMAT_ALL",- "MSSQL_EXPLAIN_FORMAT_XML",- ],- description: "",- },- "bytebase.v1.QueryOption.RedisRunCommandsOn": {- type: "enum",- values: ["REDIS_RUN_COMMANDS_ON_UNSPECIFIED", "SINGLE_NODE", "ALL_NODES"],- description: "",- },- "bytebase.v1.QueryRequest": {- type: "object",- properties: [- {- name: "container",- type: "string",- description:- "Container is the container name to execute the query against, used for\n CosmosDB only.",- },- {- name: "dataSourceId",- type: "string",- description:- "The id of data source.\n If omitted, Query resolves the data source server-side by using the single\n read-only data source when exactly one exists, or the admin data source\n otherwise. It can also be set explicitly to query the admin data source or\n a specific read-only data source.",- },- {- name: "explain",- type: "boolean",- description: "Explain the statement.",- },- {- name: "limit",- type: "integer",- format: "int32",- description: "The maximum number of rows to return.",- },- {- name: "name",- type: "string",- description:- "The name is the instance name to execute the query against.\n Format: instances/{instance}/databases/{databaseName}",- },- {- name: "queryOption",- type: "bytebase.v1.QueryOption",- },- {- name: "schema",- type: "string",- description:- "The default schema to search objects. Equals to the current schema in\n Oracle and search path in Postgres.",- },- {- name: "statement",- type: "string",- description: "The SQL statement to execute.",- },- ],- description: "",- },- "bytebase.v1.QueryResponse": {- type: "object",- properties: [- {- name: "appliedAccessGrant",- type: "string",- description:- "The just-in-time access grant applied to this query, if any.\n Format: projects/{project}/accessGrants/{accessGrant}.\n Empty when the user was authorized through normal ACL rather than a grant.",- },- {- name: "results",- type: "array<bytebase.v1.QueryResult>",- description: "The query results.",- items: {- name: "item",- type: "bytebase.v1.QueryResult",- },- },- ],- description: "",- },- "bytebase.v1.QueryResult": {- type: "object",- properties: [- {- name: "columnNames",- type: "array<string>",- description: "Column names of the query result.",- items: {- name: "item",- type: "string",- },- },- {- name: "columnTypeNames",- type: "array<string>",- description:- "Column types of the query result.\n The types come from the Golang SQL driver.",- items: {- name: "item",- type: "string",- },- },- {- name: "commandError",- type: "bytebase.v1.QueryResult.CommandError",- },- {- name: "error",- type: "string",- description: "The error message if the query failed.",- },- {- name: "latency",- type: "google.protobuf.Duration",- description: "The time it takes to execute the query.",- },- {- name: "masked",- type: "array<bytebase.v1.MaskingReason>",- description:- "Masking reasons for each column (empty for non-masked columns).",- items: {- name: "item",- type: "bytebase.v1.MaskingReason",- },- },- {- name: "messages",- type: "array<bytebase.v1.QueryResult.Message>",- description:- "Informational or debug messages returned by the database engine during query execution.\n Examples include PostgreSQL's RAISE NOTICE, MSSQL's PRINT, or Oracle's DBMS_OUTPUT.PUT_LINE.",- items: {- name: "item",- type: "bytebase.v1.QueryResult.Message",- },- },- {- name: "permissionDenied",- type: "bytebase.v1.PermissionDeniedDetail",- },- {- name: "postgresError",- type: "bytebase.v1.QueryResult.PostgresError",- },- {- name: "rows",- type: "array<bytebase.v1.QueryRow>",- description: "Rows of the query result.",- items: {- name: "item",- type: "bytebase.v1.QueryRow",- },- },- {- name: "rowsCount",- type: "integer",- format: "int64",- },- {- name: "statement",- type: "string",- description: "The query statement for the result.",- },- {- name: "syntaxError",- type: "bytebase.v1.QueryResult.SyntaxError",- },- ],- description: "",- },- "bytebase.v1.QueryResult.CommandError": {- type: "object",- properties: [- {- name: "commandType",- type: "bytebase.v1.QueryResult.CommandError.Type",- description: "Disallowed command_type.",- },- ],- description:- "Permission denied with resource information or disallowed command_type.\n Either resources or command_type is available.",- },- "bytebase.v1.QueryResult.CommandError.Type": {- type: "enum",- values: ["TYPE_UNSPECIFIED", "DDL", "DML", "NON_READ_ONLY"],- description: "",- },- "bytebase.v1.QueryResult.Message": {- type: "object",- properties: [- {- name: "content",- type: "string",- },- {- name: "level",- type: "bytebase.v1.QueryResult.Message.Level",- },- ],- description: "",- },- "bytebase.v1.QueryResult.Message.Level": {- type: "enum",- values: [- "LEVEL_UNSPECIFIED",- "INFO",- "WARNING",- "DEBUG",- "LOG",- "NOTICE",- "EXCEPTION",- ],- description: "",- },- "bytebase.v1.QueryResult.PostgresError": {- type: "object",- properties: [- {- name: "code",- type: "string",- },- {- name: "columnName",- type: "string",- },- {- name: "constraintName",- type: "string",- },- {- name: "dataTypeName",- type: "string",- },- {- name: "detail",- type: "string",- },- {- name: "file",- type: "string",- },- {- name: "hint",- type: "string",- },- {- name: "internalPosition",- type: "integer",- format: "int32",- },- {- name: "internalQuery",- type: "string",- },- {- name: "line",- type: "integer",- format: "int32",- },- {- name: "message",- type: "string",- },- {- name: "position",- type: "integer",- format: "int32",- },- {- name: "routine",- type: "string",- },- {- name: "schemaName",- type: "string",- },- {- name: "severity",- type: "string",- },- {- name: "tableName",- type: "string",- },- {- name: "where",- type: "string",- },- ],- description:- "refer https://www.postgresql.org/docs/11/protocol-error-fields.html\n for field description.",- },- "bytebase.v1.QueryResult.SyntaxError": {- type: "object",- properties: [- {- name: "startPosition",- type: "bytebase.v1.Position",- description: "Position information for highlighting in editor",- },- ],- description:- "Syntax error with position information for editor highlighting",- },- "bytebase.v1.QueryRow": {- type: "object",- properties: [- {- name: "values",- type: "array<bytebase.v1.RowValue>",- description: "Row values of the query result.",- items: {- name: "item",- type: "bytebase.v1.RowValue",- },- },- ],- description: "",- },- "bytebase.v1.Range": {- type: "object",- properties: [- {- name: "end",- type: "integer",- format: "int32",- description: "End index (exclusive).",- },- {- name: "start",- type: "integer",- format: "int32",- description: "Start index (inclusive).",- },- ],- description:- "Range represents a span within a text or sequence.\n Whether the indices are byte offsets or character indices depends on the context.\n Check the documentation of the field using Range for specific semantics.",- },- "bytebase.v1.RejectIssueRequest": {- type: "object",- properties: [- {- name: "comment",- type: "string",- description: "The comment explaining the rejection decision.",- },- {- name: "name",- type: "string",- description:- "The name of the issue to add a rejection.\n Format: projects/{project}/issues/{issue}",- },- ],- description: "",- },- "bytebase.v1.Release": {- type: "object",- properties: [- {- name: "category",- type: "string",- description:- 'Category extracted from release name (e.g., "webapp", "analytics").\n Set by Bytebase action during release creation.',- },- {- name: "createTime",- type: "google.protobuf.Timestamp",- },- {- name: "creator",- type: "string",- description: "Format: users/[email protected]",- },- {- name: "files",- type: "array<bytebase.v1.Release.File>",- description: "The SQL files included in the release.",- items: {- name: "item",- type: "bytebase.v1.Release.File",- },- },- {- name: "name",- type: "string",- description: "Format: projects/{project}/releases/{release}",- },- {- name: "state",- type: "bytebase.v1.State",- description: "The lifecycle state of the release.",- },- {- name: "type",- type: "bytebase.v1.Release.Type",- description: "The type of schema change for all files in this release.",- },- {- name: "vcsSource",- type: "bytebase.v1.Release.VCSSource",- description: "The version control source of the release.",- },- ],- description: "",- },- "bytebase.v1.Release.File": {- type: "object",- properties: [- {- name: "path",- type: "string",- description:- "The path of the file. e.g., `2.2/V0001_create_table.sql`.",- },- {- name: "sheet",- type: "string",- description:- "For inputs, we must either use `sheet` or `statement`.\n For outputs, we always use `sheet`. `statement` is the preview of the sheet content.\n\n The sheet that holds the content.\n Format: projects/{project}/sheets/{sheet}",- },- {- name: "sheetSha256",- type: "string",- description:- "The SHA256 hash value of the sheet content or the statement.",- },- {- name: "statement",- type: "string",- format: "byte",- description: "The raw SQL statement content.",- },- {- name: "version",- type: "string",- description: "The version identifier for the file.",- },- ],- description: "A SQL file in a release.",- },- "bytebase.v1.Release.Type": {- type: "enum",- values: ["TYPE_UNSPECIFIED", "VERSIONED", "DECLARATIVE"],- description: "The type of schema change.",- },- "bytebase.v1.Release.VCSSource": {- type: "object",- properties: [- {- name: "url",- type: "string",- description: "The url link to the e.g., GitHub commit or pull request.",- },- {- name: "vcsType",- type: "bytebase.v1.VCSType",- description: "The type of VCS.",- },- ],- description: "Version control system source information.",- },- "bytebase.v1.RemoveDataSourceRequest": {- type: "object",- properties: [- {- name: "dataSource",- type: "bytebase.v1.DataSource",- description:- "Identified by data source ID.\n Only READ_ONLY data source can be removed.",- },- {- name: "name",- type: "string",- description:- "The name of the instance to remove a data source from.\n Format: instances/{instance}",- },- ],- description: "",- },- "bytebase.v1.RemoveWebhookRequest": {- type: "object",- properties: [- {- name: "webhook",- type: "bytebase.v1.Webhook",- description: "The webhook to remove. Identified by its url.",- },- ],- description: "",- },- "bytebase.v1.RequestIssueRequest": {- type: "object",- properties: [- {- name: "comment",- type: "string",- description: "The comment explaining the request.",- },- {- name: "name",- type: "string",- description:- "The name of the issue to request a issue.\n Format: projects/{project}/issues/{issue}",- },- ],- description: "",- },- "bytebase.v1.RequestMetadata": {- type: "object",- properties: [- {- name: "callerIp",- type: "string",- description: "The IP address of the request originator.",- },- {- name: "callerSuppliedUserAgent",- type: "string",- description:- "The user agent string provided by the caller.\n This is supplied by the client and is not authenticated.",- },- ],- description: "Metadata about the incoming request.",- },- "bytebase.v1.RequestPasswordResetRequest": {- type: "object",- properties: [- {- name: "email",- type: "string",- description: "The email address of the account to reset.",- },- {- name: "workspace",- type: "string",- description:- "Optional workspace context captured at send time, used to locate the EMAIL setting,\n and later (at verify time) for signup gate checks and workspace assignment.\n Unset for SaaS brand-new signup (no workspace exists yet).\n Format: workspaces/{workspace}",- },- ],- description: "",- },- "bytebase.v1.ResetPasswordRequest": {- type: "object",- properties: [- {- name: "code",- type: "string",- description: "The 6-digit code from the reset email.",- },- {- name: "email",- type: "string",- description: "The email address of the account.",- },- {- name: "newPassword",- type: "string",- description: "The new password to set.",- },- ],- description: "",- },- "bytebase.v1.Restriction": {- type: "object",- properties: [- {- name: "allowEmailCodeSignin",- type: "boolean",- description:- "Whether email + 6-digit code signin is enabled for this workspace.",- },- {- name: "disallowPasswordSignin",- type: "boolean",- description:- "Whether password-based signin is disabled (except for workspace admins).",- },- {- name: "disallowSignup",- type: "boolean",- description: "Whether self-service user signup is disabled.",- },- {- name: "passwordResetEnabled",- type: "boolean",- description:- "Whether password reset via email is available for this workspace.\n True when the workspace (or deployment) has an email setting configured.",- },- {- name: "passwordRestriction",- type: "bytebase.v1.WorkspaceProfileSetting.PasswordRestriction",- description: "Password complexity and restriction requirements.",- },- ],- description: "",- },- "bytebase.v1.RetryIssueApprovalRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the issue whose approval-finding should be retried.\n Format: projects/{project}/issues/{issue}",- },- ],- description: "",- },- "bytebase.v1.ReviewConfig": {- type: "object",- properties: [- {- name: "enabled",- type: "boolean",- description: "Whether the review configuration is enabled.",- },- {- name: "name",- type: "string",- description:- "The name of the SQL review config.\n Format: reviewConfigs/{reviewConfig}",- },- {- name: "resources",- type: "array<string>",- description:- "Resources using the config.\n Format: {resource}/{resource id}, e.g., environments/test.",- items: {- name: "item",- type: "string",- },- },- {- name: "rules",- type: "array<bytebase.v1.SQLReviewRule>",- description: "The SQL review rules to enforce.",- items: {- name: "item",- type: "bytebase.v1.SQLReviewRule",- },- },- {- name: "title",- type: "string",- description: "The title of the review configuration.",- },- ],- description: "",- },- "bytebase.v1.Revision": {- type: "object",- properties: [- {- name: "createTime",- type: "google.protobuf.Timestamp",- },- {- name: "deleter",- type: "string",- description: "Format: users/[email protected]\n Can be empty.",- },- {- name: "deleteTime",- type: "google.protobuf.Timestamp",- description: "Can be empty.",- },- {- name: "file",- type: "string",- description:- 'Format: projects/{project}/releases/{release}/files/{file_path}\n The file_path segment is URL-encoded since file paths may contain "/".\n Can be empty.',- },- {- name: "name",- type: "string",- description:- "Format: instances/{instance}/databases/{database}/revisions/{revision}",- },- {- name: "release",- type: "string",- description:- "Format: projects/{project}/releases/{release}\n Can be empty.",- },- {- name: "sheet",- type: "string",- description:- "The sheet that holds the content.\n Format: projects/{project}/sheets/{sheet}",- },- {- name: "sheetSha256",- type: "string",- description: "The SHA256 hash value of the sheet.",- },- {- name: "taskRun",- type: "string",- description:- "The task run associated with the revision.\n Can be empty.\n Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}",- },- {- name: "type",- type: "bytebase.v1.Revision.Type",- description: "The type of the revision.",- },- {- name: "version",- type: "string",- description: "The schema version string for this revision.",- },- ],- description: "",- },- "bytebase.v1.Revision.Type": {- type: "enum",- values: ["TYPE_UNSPECIFIED", "VERSIONED", "DECLARATIVE"],- description: "The type of schema revision.",- },- "bytebase.v1.RevokeAccessGrantRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the access grant to revoke.\n Format: projects/{project}/accessGrants/{access_grant}",- },- ],- description: "",- },- "bytebase.v1.RiskLevel": {- type: "enum",- values: ["RISK_LEVEL_UNSPECIFIED", "LOW", "MODERATE", "HIGH"],- description: "RiskLevel is the risk level.",- },- "bytebase.v1.Role": {- type: "object",- properties: [- {- name: "description",- type: "string",- description: "Optional description of the role.",- },- {- name: "name",- type: "string",- description: "Resource name. Format: roles/{role}",- },- {- name: "permissions",- type: "array<string>",- description: "List of permission identifiers granted by this role.",- items: {- name: "item",- type: "string",- },- },- {- name: "title",- type: "string",- description: "Human-readable title.",- },- {- name: "type",- type: "bytebase.v1.Role.Type",- description: "Role type indicating if it's built-in or custom.",- },- ],- description:- "Role defines a set of permissions that can be assigned to users.",- },- "bytebase.v1.Role.Type": {- type: "enum",- values: ["TYPE_UNSPECIFIED", "BUILT_IN", "CUSTOM"],- description: "",- },- "bytebase.v1.RoleGrant": {- type: "object",- properties: [- {- name: "condition",- type: "google.type.Expr",- description:- "The condition for the role. Same as the condition in IAM Binding message.",- },- {- name: "expiration",- type: "google.protobuf.Duration",- description: "The duration for which the grant is valid.",- },- {- name: "role",- type: "string",- description: "The requested role.\n Format: roles/EXPORTER.",- },- {- name: "user",- type: "string",- description: "The user to be granted.\n Format: users/{email}.",- },- ],- description: "",- },- "bytebase.v1.Rollout": {- type: "object",- properties: [- {- name: "createTime",- type: "google.protobuf.Timestamp",- },- {- name: "name",- type: "string",- description:- "The resource name of the rollout.\n Format: projects/{project}/plans/{plan}/rollout",- },- {- name: "stages",- type: "array<bytebase.v1.Stage>",- description: "Stages and thus tasks of the rollout.",- items: {- name: "item",- type: "bytebase.v1.Stage",- },- },- {- name: "title",- type: "string",- description:- "The title of the rollout, inherited from the associated plan.\n This field is output only and cannot be directly set.",- },- {- name: "updateTime",- type: "google.protobuf.Timestamp",- },- ],- description: "",- },- "bytebase.v1.RolloutPolicy": {- type: "object",- properties: [- {- name: "automatic",- type: "boolean",- description: "Whether rollout is automatic without manual approval.",- },- {- name: "roles",- type: "array<string>",- description: "The roles that can approve rollout execution.",- items: {- name: "item",- type: "string",- },- },- ],- description: "Rollout policy configuration.",- },- "bytebase.v1.RowValue": {- type: "object",- properties: [- {- name: "boolValue",- type: "boolean",- },- {- name: "bytesValue",- type: "string",- format: "byte",- },- {- name: "doubleValue",- type: "number",- format: "double",- },- {- name: "floatValue",- type: "number",- format: "float",- },- {- name: "int32Value",- type: "integer",- format: "int32",- },- {- name: "int64Value",- type: "integer",- format: "int64",- },- {- name: "nullValue",- type: "google.protobuf.NullValue",- },- {- name: "stringValue",- type: "string",- },- {- name: "timestampTzValue",- type: "bytebase.v1.RowValue.TimestampTZ",- description:- "timestamp_tz_value is used for the timestamptz data type, which\n accurately represents the timestamp with location information.",- },- {- name: "timestampValue",- type: "bytebase.v1.RowValue.Timestamp",- description:- "timestamp_value is used for the timestamp without time zone data type,\n meaning it only includes the timestamp without any time zone or location\n info. Although it may be expressed as a UTC value, it should be seen as a\n timestamp missing location context.",- },- {- name: "uint32Value",- type: "integer",- },- {- name: "uint64Value",- type: "integer",- format: "int64",- },- {- name: "valueValue",- type: "google.protobuf.Value",- description:- "value_value is used for Spanner and TUPLE ARRAY MAP in Clickhouse only.",- },- ],- description: "",- },- "bytebase.v1.RowValue.Timestamp": {- type: "object",- properties: [- {- name: "accuracy",- type: "integer",- format: "int32",- description:- "The accuracy is the number of digits after the decimal point.",- },- {- name: "googleTimestamp",- type: "google.protobuf.Timestamp",- },- ],- description: "",- },- "bytebase.v1.RowValue.TimestampTZ": {- type: "object",- properties: [- {- name: "accuracy",- type: "integer",- format: "int32",- },- {- name: "googleTimestamp",- type: "google.protobuf.Timestamp",- },- {- name: "offset",- type: "integer",- format: "int32",- description: "The offset is in seconds east of UTC",- },- {- name: "zone",- type: "string",- description:- 'Zone is the time zone abbreviations in timezone database such as "PDT",\n "PST". https://en.wikipedia.org/wiki/List_of_tz_database_time_zones We\n retrieve the time zone information from the timestamptz field in the\n database. A timestamp is in UTC or epoch time, and with zone info, we can\n convert it to a local time string. Zone and offset are returned by\n time.Time.Zone()',- },- ],- description: "",- },- "bytebase.v1.RunPlanChecksRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The plan to run plan checks.\n Format: projects/{project}/plans/{plan}",- },- {- name: "specId",- type: "string",- description:- "The UUID of the specific spec to run plan checks for.\n This should match the spec.id field in Plan.Spec.\n If not set, all specs in the plan will be used.",- },- ],- description: "",- },- "bytebase.v1.SASLConfig": {- type: "object",- properties: [- {- name: "krbConfig",- type: "bytebase.v1.KerberosConfig",- description: "Kerberos authentication configuration.",- },- ],- description: "",- },- "bytebase.v1.SQLEditorThemeSetting": {- type: "object",- properties: [- {- name: "id",- type: "string",- },- {- name: "monacoBase",- type: "string",- },- {- name: "name",- type: "string",- },- {- name: "tokens",- type: "object",- description: "CSS token colors.",- additionalProperties: {- name: "value",- type: "google.type.Color",- },- },- ],- description: "",- },- "bytebase.v1.SQLEditorThemeSetting.TokensEntry": {- type: "object",- properties: [- {- name: "key",- type: "string",- },- {- name: "value",- type: "google.type.Color",- },- ],- description: "",- },- "bytebase.v1.SQLReviewRule": {- type: "object",- properties: [- {- name: "commentConventionPayload",- type: "bytebase.v1.SQLReviewRule.CommentConventionRulePayload",- },- {- name: "engine",- type: "bytebase.v1.Engine",- description: "The database engine this rule applies to.",- },- {- name: "level",- type: "bytebase.v1.SQLReviewRule.Level",- description: "The severity level of the rule.",- },- {- name: "namingCasePayload",- type: "bytebase.v1.SQLReviewRule.NamingCaseRulePayload",- },- {- name: "namingPayload",- type: "bytebase.v1.SQLReviewRule.NamingRulePayload",- },- {- name: "numberPayload",- type: "bytebase.v1.SQLReviewRule.NumberRulePayload",- },- {- name: "stringArrayPayload",- type: "bytebase.v1.SQLReviewRule.StringArrayRulePayload",- },- {- name: "stringPayload",- type: "bytebase.v1.SQLReviewRule.StringRulePayload",- },- {- name: "type",- type: "bytebase.v1.SQLReviewRule.Type",- description: "The type of SQL review rule.",- },- ],- description:- "SQL review rule configuration. Check the SQL_REVIEW_RULES_DOCUMENTATION.md for details.",- },- "bytebase.v1.SQLReviewRule.CommentConventionRulePayload": {- type: "object",- properties: [- {- name: "maxLength",- type: "integer",- format: "int32",- },- {- name: "required",- type: "boolean",- },- ],- description: "",- },- "bytebase.v1.SQLReviewRule.Level": {- type: "enum",- values: ["LEVEL_UNSPECIFIED", "ERROR", "WARNING"],- description: "The severity level for SQL review rules.",- },- "bytebase.v1.SQLReviewRule.NamingCaseRulePayload": {- type: "object",- properties: [- {- name: "upper",- type: "boolean",- },- ],- description: "",- },- "bytebase.v1.SQLReviewRule.NamingRulePayload": {- type: "object",- properties: [- {- name: "format",- type: "string",- },- {- name: "maxLength",- type: "integer",- format: "int32",- },- ],- description: "Payload message types for SQL review rules",- },- "bytebase.v1.SQLReviewRule.NumberRulePayload": {- type: "object",- properties: [- {- name: "number",- type: "integer",- format: "int32",- },- ],- description: "",- },- "bytebase.v1.SQLReviewRule.StringArrayRulePayload": {- type: "object",- properties: [- {- name: "list",- type: "array<string>",- items: {- name: "item",- type: "string",- },- },- ],- description: "",- },- "bytebase.v1.SQLReviewRule.StringRulePayload": {- type: "object",- properties: [- {- name: "value",- type: "string",- },- ],- description: "",- },- "bytebase.v1.SQLReviewRule.Type": {- type: "enum",- values: [- "TYPE_UNSPECIFIED",- "ENGINE_MYSQL_USE_INNODB",- "NAMING_FULLY_QUALIFIED",- "NAMING_TABLE",- "NAMING_COLUMN",- "NAMING_INDEX_PK",- "NAMING_INDEX_UK",- "NAMING_INDEX_FK",- "NAMING_INDEX_IDX",- "NAMING_COLUMN_AUTO_INCREMENT",- "NAMING_TABLE_NO_KEYWORD",- "NAMING_IDENTIFIER_NO_KEYWORD",- "NAMING_IDENTIFIER_CASE",- "STATEMENT_SELECT_NO_SELECT_ALL",- "STATEMENT_WHERE_REQUIRE_SELECT",- "STATEMENT_WHERE_REQUIRE_UPDATE_DELETE",- "STATEMENT_WHERE_NO_LEADING_WILDCARD_LIKE",- "STATEMENT_DISALLOW_ON_DEL_CASCADE",- "STATEMENT_DISALLOW_RM_TBL_CASCADE",- "STATEMENT_DISALLOW_COMMIT",- "STATEMENT_DISALLOW_LIMIT",- "STATEMENT_DISALLOW_ORDER_BY",- "STATEMENT_MERGE_ALTER_TABLE",- "STATEMENT_INSERT_ROW_LIMIT",- "STATEMENT_INSERT_MUST_SPECIFY_COLUMN",- "STATEMENT_INSERT_DISALLOW_ORDER_BY_RAND",- "STATEMENT_AFFECTED_ROW_LIMIT",- "STATEMENT_DML_DRY_RUN",- "STATEMENT_DISALLOW_ADD_COLUMN_WITH_DEFAULT",- "STATEMENT_ADD_CHECK_NOT_VALID",- "STATEMENT_ADD_FOREIGN_KEY_NOT_VALID",- "STATEMENT_DISALLOW_ADD_NOT_NULL",- "STATEMENT_CREATE_SPECIFY_SCHEMA",- "STATEMENT_CHECK_SET_ROLE_VARIABLE",- "STATEMENT_WHERE_NO_EQUAL_NULL",- "STATEMENT_WHERE_DISALLOW_FUNCTIONS_AND_CALCULATIONS",- "STATEMENT_WHERE_MAXIMUM_LOGICAL_OPERATOR_COUNT",- "STATEMENT_MAXIMUM_STATEMENTS_IN_TRANSACTION",- "STATEMENT_NON_TRANSACTIONAL",- "STATEMENT_ADD_COLUMN_WITHOUT_POSITION",- "STATEMENT_DISALLOW_OFFLINE_DDL",- "STATEMENT_DISALLOW_CROSS_DB_QUERIES",- "STATEMENT_MAX_EXECUTION_TIME",- "STATEMENT_REQUIRE_ALGORITHM_OPTION",- "STATEMENT_REQUIRE_LOCK_OPTION",- "STATEMENT_OBJECT_OWNER_CHECK",- "TABLE_REQUIRE_PK",- "TABLE_NO_FOREIGN_KEY",- "TABLE_DROP_NAMING_CONVENTION",- "TABLE_COMMENT",- "TABLE_DISALLOW_PARTITION",- "TABLE_DISALLOW_TRIGGER",- "TABLE_NO_DUPLICATE_INDEX",- "TABLE_TEXT_FIELDS_TOTAL_LENGTH",- "TABLE_DISALLOW_SET_CHARSET",- "TABLE_DISALLOW_DDL",- "TABLE_DISALLOW_DML",- "TABLE_LIMIT_SIZE",- "TABLE_REQUIRE_CHARSET",- "TABLE_REQUIRE_COLLATION",- "COLUMN_REQUIRED",- "COLUMN_NO_NULL",- "COLUMN_DISALLOW_CHANGE_TYPE",- "COLUMN_SET_DEFAULT_FOR_NOT_NULL",- "COLUMN_DISALLOW_CHANGE",- "COLUMN_DISALLOW_CHANGING_ORDER",- "COLUMN_DISALLOW_DROP",- "COLUMN_DISALLOW_DROP_IN_INDEX",- "COLUMN_COMMENT",- "COLUMN_AUTO_INCREMENT_MUST_INTEGER",- "COLUMN_TYPE_DISALLOW_LIST",- "COLUMN_DISALLOW_SET_CHARSET",- "COLUMN_MAXIMUM_CHARACTER_LENGTH",- "COLUMN_MAXIMUM_VARCHAR_LENGTH",- "COLUMN_AUTO_INCREMENT_INITIAL_VALUE",- "COLUMN_AUTO_INCREMENT_MUST_UNSIGNED",- "COLUMN_CURRENT_TIME_COUNT_LIMIT",- "COLUMN_REQUIRE_DEFAULT",- "COLUMN_DEFAULT_DISALLOW_VOLATILE",- "COLUMN_ADD_NOT_NULL_REQUIRE_DEFAULT",- "COLUMN_REQUIRE_CHARSET",- "COLUMN_REQUIRE_COLLATION",- "SCHEMA_BACKWARD_COMPATIBILITY",- "DATABASE_DROP_EMPTY_DATABASE",- "INDEX_NO_DUPLICATE_COLUMN",- "INDEX_KEY_NUMBER_LIMIT",- "INDEX_PK_TYPE_LIMIT",- "INDEX_TYPE_NO_BLOB",- "INDEX_TOTAL_NUMBER_LIMIT",- "INDEX_PRIMARY_KEY_TYPE_ALLOWLIST",- "INDEX_CREATE_CONCURRENTLY",- "INDEX_TYPE_ALLOW_LIST",- "INDEX_NOT_REDUNDANT",- "SYSTEM_CHARSET_ALLOWLIST",- "SYSTEM_COLLATION_ALLOWLIST",- "SYSTEM_COMMENT_LENGTH",- "SYSTEM_PROCEDURE_DISALLOW_CREATE",- "SYSTEM_EVENT_DISALLOW_CREATE",- "SYSTEM_VIEW_DISALLOW_CREATE",- "SYSTEM_FUNCTION_DISALLOW_CREATE",- "SYSTEM_FUNCTION_DISALLOWED_LIST",- "ADVICE_ONLINE_MIGRATION",- "BUILTIN_PRIOR_BACKUP_CHECK",- "BUILTIN_WALK_THROUGH_CHECK",- "STATEMENT_DISALLOW_TRUNCATE",- ],- description: "",- },- "bytebase.v1.SchemaCatalog": {- type: "object",- properties: [- {- name: "name",- type: "string",- description: "The schema name.",- },- {- name: "tables",- type: "array<bytebase.v1.TableCatalog>",- description: "The tables in the schema.",- items: {- name: "item",- type: "bytebase.v1.TableCatalog",- },- },- ],- description: "Schema metadata within a database.",- },- "bytebase.v1.SchemaMetadata": {- type: "object",- properties: [- {- name: "comment",- type: "string",- description: "The comment is the comment of a schema.",- },- {- name: "compositeTypes",- type: "array<bytebase.v1.CompositeTypeMetadata>",- description:- "The composite_types is the list of user-defined composite types in a\n schema (PostgreSQL family, CREATE TYPE ... AS). Excludes table/view row\n types and derived types.",- items: {- name: "item",- type: "bytebase.v1.CompositeTypeMetadata",- },- },- {- name: "enumTypes",- type: "array<bytebase.v1.EnumTypeMetadata>",- description:- "The enum_types is the list of user-defined enum types in a schema.",- items: {- name: "item",- type: "bytebase.v1.EnumTypeMetadata",- },- },- {- name: "events",- type: "array<bytebase.v1.EventMetadata>",- description: "The events is the list of scheduled events in a schema.",- items: {- name: "item",- type: "bytebase.v1.EventMetadata",- },- },- {- name: "externalTables",- type: "array<bytebase.v1.ExternalTableMetadata>",- description:- "The external_tables is the list of external tables in a schema.",- items: {- name: "item",- type: "bytebase.v1.ExternalTableMetadata",- },- },- {- name: "functions",- type: "array<bytebase.v1.FunctionMetadata>",- description: "The functions is the list of functions in a schema.",- items: {- name: "item",- type: "bytebase.v1.FunctionMetadata",- },- },- {- name: "materializedViews",- type: "array<bytebase.v1.MaterializedViewMetadata>",- description:- "The materialized_views is the list of materialized views in a schema.",- items: {- name: "item",- type: "bytebase.v1.MaterializedViewMetadata",- },- },- {- name: "name",- type: "string",- description:- "The name is the schema name.\n It is an empty string for databases without such concept such as MySQL.",- },- {- name: "owner",- type: "string",- description: "The owner of the schema.",- },- {- name: "packages",- type: "array<bytebase.v1.PackageMetadata>",- description: "The packages is the list of packages in a schema.",- items: {- name: "item",- type: "bytebase.v1.PackageMetadata",- },- },- {- name: "procedures",- type: "array<bytebase.v1.ProcedureMetadata>",- description: "The procedures is the list of procedures in a schema.",- items: {- name: "item",- type: "bytebase.v1.ProcedureMetadata",- },- },- {- name: "sequences",- type: "array<bytebase.v1.SequenceMetadata>",- description:- "The sequences is the list of sequences in a schema, sorted by name.",- items: {- name: "item",- type: "bytebase.v1.SequenceMetadata",- },- },- {- name: "skipDump",- type: "boolean",- description:- "Whether to skip this schema during schema dump operations.",- },- {- name: "streams",- type: "array<bytebase.v1.StreamMetadata>",- description:- "The streams is the list of streams in a schema, currently, only used for\n Snowflake.",- items: {- name: "item",- type: "bytebase.v1.StreamMetadata",- },- },- {- name: "tables",- type: "array<bytebase.v1.TableMetadata>",- description: "The tables is the list of tables in a schema.",- items: {- name: "item",- type: "bytebase.v1.TableMetadata",- },- },- {- name: "tasks",- type: "array<bytebase.v1.TaskMetadata>",- description:- "The routines is the list of routines in a schema, currently, only used for\n Snowflake.",- items: {- name: "item",- type: "bytebase.v1.TaskMetadata",- },- },- {- name: "views",- type: "array<bytebase.v1.ViewMetadata>",- description: "The views is the list of views in a schema.",- items: {- name: "item",- type: "bytebase.v1.ViewMetadata",- },- },- ],- description:- "SchemaMetadata is the metadata for schemas.\n This is the concept of schema in Postgres, but it's a no-op for MySQL.",- },- "bytebase.v1.SearchAuditLogsRequest": {- type: "object",- properties: [- {- name: "filter",- type: "string",- description:- 'The filter of the log. It should be a valid CEL expression.\n The syntax and semantics of CEL are documented at https://github.com/google/cel-spec\n\n Supported filter:\n - method: the API name, can be found in the docs, should start with "/bytebase.v1." prefix. For example "/bytebase.v1.UserService/CreateUser". Support "==" operator.\n - severity: support "==" operator, check Severity enum in AuditLog message for values.\n - user: the actor, should in "users/{email}" format, support "==" operator.\n - create_time: support ">=" and "<=" operator.\n\n For example:\n - filter = "method == \'/bytebase.v1.SQLService/Query\'"\n - filter = "method == \'/bytebase.v1.SQLService/Query\' && severity == \'ERROR\'"\n - filter = "method == \'/bytebase.v1.SQLService/Query\' && severity == \'ERROR\' && user == \'users/[email protected]\'"\n - filter = "method == \'/bytebase.v1.SQLService/Query\' && severity == \'ERROR\' && create_time <= \'2021-01-01T00:00:00Z\' && create_time >= \'2020-01-01T00:00:00Z\'"',- },- {- name: "orderBy",- type: "string",- description:- 'The order by of the log.\n Only support order by create_time. The default sorting order is ascending.\n For example:\n - order_by = "create_time asc"\n - order_by = "create_time desc"',- },- {- name: "pageSize",- type: "integer",- format: "int32",- description:- "The maximum number of logs to return.\n The service may return fewer than this value.\n If unspecified, at most 10 log entries will be returned.\n The maximum value is 5000; values above 5000 will be coerced to 5000.",- },- {- name: "pageToken",- type: "string",- description:- "A page token, received from a previous `SearchLogs` call.\n Provide this to retrieve the subsequent page.",- },- {- name: "parent",- type: "string",- },- ],- description: "Request message for searching audit logs.",- },- "bytebase.v1.SearchAuditLogsResponse": {- type: "object",- properties: [- {- name: "auditLogs",- type: "array<bytebase.v1.AuditLog>",- items: {- name: "item",- type: "bytebase.v1.AuditLog",- },- },- {- name: "nextPageToken",- type: "string",- description:- "A token to retrieve next page of log entities.\n Pass this value in the page_token field in the subsequent call\n to retrieve the next page of log entities.",- },- ],- description: "Response message for searching audit logs.",- },- "bytebase.v1.SearchIssuesRequest": {- type: "object",- properties: [- {- name: "filter",- type: "string",- description:- "Filter is used to filter issues returned in the list.\n Check the filter field in the ListIssuesRequest message.",- },- {- name: "orderBy",- type: "string",- description:- 'The order by of issues.\n Support:\n - create_time\n - update_time\n The default sorting order is ascending.\n For example:\n - order_by = "create_time desc"\n - order_by = "update_time asc"',- },- {- name: "pageSize",- type: "integer",- format: "int32",- description:- "The maximum number of issues to return. The service may return fewer than\n this value.\n If unspecified, at most 10 issues will be returned.\n The maximum value is 1000; values above 1000 will be coerced to 1000.",- },- {- name: "pageToken",- type: "string",- description:- "A page token, received from a previous `SearchIssues` call.\n Provide this to retrieve the subsequent page.\n\n When paginating, all other parameters provided to `SearchIssues` must match\n the call that provided the page token.",- },- {- name: "parent",- type: "string",- description:- 'The parent, which owns this collection of issues.\n Format: projects/{project}\n Use "projects/-" to list all issues from all projects.',- },- {- name: "query",- type: "string",- description: "Query is the query statement.",- },- ],- description: "",- },- "bytebase.v1.SearchIssuesResponse": {- type: "object",- properties: [- {- name: "issues",- type: "array<bytebase.v1.Issue>",- description: "The issues from the specified request.",- items: {- name: "item",- type: "bytebase.v1.Issue",- },- },- {- name: "nextPageToken",- type: "string",- description:- "A token, which can be sent as `page_token` to retrieve the next page.\n If this field is omitted, there are no subsequent pages.",- },- ],- description: "",- },- "bytebase.v1.SearchMyAccessGrantsRequest": {- type: "object",- properties: [- {- name: "filter",- type: "string",- description:- "Check the filter field in the ListAccessGrantsRequest message.",- },- {- name: "orderBy",- type: "string",- description:- "Check the order_by field in the ListAccessGrantsRequest message.",- },- {- name: "pageSize",- type: "integer",- format: "int32",- description: "The maximum number of access grants to return.",- },- {- name: "pageToken",- type: "string",- description: "A page token from a previous SearchMyAccessGrants call.",- },- {- name: "parent",- type: "string",- description:- "The parent project to search in.\n Format: projects/{project}",- },- ],- description: "",- },- "bytebase.v1.SearchMyAccessGrantsResponse": {- type: "object",- properties: [- {- name: "accessGrants",- type: "array<bytebase.v1.AccessGrant>",- description: "The access grants from the specified request.",- items: {- name: "item",- type: "bytebase.v1.AccessGrant",- },- },- {- name: "nextPageToken",- type: "string",- description:- "A token, which can be sent as `page_token` to retrieve the next page.\n If this field is omitted, there are no subsequent pages.",- },- ],- description: "",- },- "bytebase.v1.SearchProjectsRequest": {- type: "object",- properties: [- {- name: "filter",- type: "string",- description:- 'Filter the project.\n The syntax and semantics of CEL are documented at https://github.com/google/cel-spec\n\n Supported filters:\n - name: the project name, support "==" and ".contains()" operator.\n - resource_id: the project id, support "==" and ".contains()" operator.\n - exclude_default: if not include the default project, should be "true" or "false", support "==" operator.\n - state: check the State enum for the values, support "==" operator.\n - labels.{key}: the project label, support "==" and "in" operators.\n\n For example:\n name == "project name"\n name.contains("project name")\n resource_id == "project id"\n resource_id.contains("project id")\n exclude_default == true\n state == "DELETED"\n labels.environment == "production"\n labels.tier == "critical"\n labels.environment in ["staging", "prod"]\n You can combine filter conditions like:\n name == "project name" && resource_id.contains("project id")\n name.contains("project name") || resource_id == "project id"\n labels.environment == "production" && labels.tier == "critical"',- },- {- name: "orderBy",- type: "string",- description:- 'The order by of projects.\n Support title. The default sorting order is ascending.\n For example:\n - order_by = "title"\n - order_by = "title desc"\n - order_by = "title asc"',- },- {- name: "pageSize",- type: "integer",- format: "int32",- description:- "The maximum number of projects to return. The service may return fewer than\n this value.\n If unspecified, at most 10 projects will be returned.\n The maximum value is 1000; values above 1000 will be coerced to 1000.",- },- {- name: "pageToken",- type: "string",- description:- "A page token, received from a previous `SearchProjects` call.\n Provide this to retrieve the subsequent page.\n\n When paginating, all other parameters provided to `SearchProjects` must match\n the call that provided the page token.",- },- {- name: "showDeleted",- type: "boolean",- description: "Show deleted projects if specified.",- },- ],- description: "",- },- "bytebase.v1.SearchProjectsResponse": {- type: "object",- properties: [- {- name: "nextPageToken",- type: "string",- description:- "A token, which can be sent as `page_token` to retrieve the next page.\n If this field is omitted, there are no subsequent pages.",- },- {- name: "projects",- type: "array<bytebase.v1.Project>",- description: "The projects from the specified request.",- items: {- name: "item",- type: "bytebase.v1.Project",- },- },- ],- description: "",- },- "bytebase.v1.SearchQueryHistoriesRequest": {- type: "object",- properties: [- {- name: "filter",- type: "string",- description:- 'Filter is the filter to apply on the search query history\n The syntax and semantics of CEL are documented at https://github.com/google/cel-spec\n\n Supported filter:\n - project: the project full name in "projects/{id}" format, support "==" operator.\n - database: the database full name in "instances/{id}/databases/{name}" format, support "==" operator.\n - instance: the instance full name in "instances/{id}" format, support "==" operator.\n - type: the type, should be "QUERY" or "EXPORT", support "==" operator.\n - statement: the SQL statement, support ".contains()" operator.\n\n For example:\n project == "projects/{project}"\n database == "instances/{instance}/databases/{database}"\n instance == "instances/{instance}"\n type == "QUERY"\n type == "EXPORT"\n statement.contains("select")\n type == "QUERY" && statement.contains("select")',- },- {- name: "pageSize",- type: "integer",- format: "int32",- description:- "The maximum number of histories to return.\n The service may return fewer than this value.\n If unspecified, at most 10 history entries will be returned.\n The maximum value is 1000; values above 1000 will be coerced to 1000.",- },- {- name: "pageToken",- type: "string",- description:- "A page token, received from a previous `ListQueryHistory` call.\n Provide this to retrieve the subsequent page.",- },- ],- description: "",- },- "bytebase.v1.SearchQueryHistoriesResponse": {- type: "object",- properties: [- {- name: "nextPageToken",- type: "string",- description:- "A token to retrieve next page of history.\n Pass this value in the page_token field in the subsequent call to\n `ListQueryHistory` method to retrieve the next page of history.",- },- {- name: "queryHistories",- type: "array<bytebase.v1.QueryHistory>",- description: "The list of history.",- items: {- name: "item",- type: "bytebase.v1.QueryHistory",- },- },- ],- description: "",- },- "bytebase.v1.SearchWorksheetsRequest": {- type: "object",- properties: [- {- name: "filter",- type: "string",- description:- 'To filter the search result.\n The syntax and semantics of CEL are documented at https://github.com/google/cel-spec\n\n Supported filter:\n - creator: the worksheet creator in "users/{email}" format, support "==" and "!=" operator.\n - starred: should be "true" or "false", filter starred/unstarred sheets, support "==" operator.\n - visibility: check Visibility enum in the Worksheet message for values, support "==" and "in [xx]" operator.\n\n For example:\n creator == "users/{email}"\n creator != "users/{email}"\n starred == true\n starred == false\n visibility in ["PRIVATE", "PROJECT_READ", "PROJECT_WRITE"]\n visibility == "PRIVATE"',- },- {- name: "parent",- type: "string",- description:- "The parent resource of the worksheets.\n Format: projects/{project}",- },- ],- description: "",- },- "bytebase.v1.SearchWorksheetsResponse": {- type: "object",- properties: [- {- name: "worksheets",- type: "array<bytebase.v1.Worksheet>",- description: "The worksheets that matched the search criteria.",- items: {- name: "item",- type: "bytebase.v1.Worksheet",- },- },- ],- description: "",- },- "bytebase.v1.SemanticTypeSetting": {- type: "object",- properties: [- {- name: "types",- type: "array<bytebase.v1.SemanticTypeSetting.SemanticType>",- items: {- name: "item",- type: "bytebase.v1.SemanticTypeSetting.SemanticType",- },- },- ],- description: "",- },- "bytebase.v1.SemanticTypeSetting.SemanticType": {- type: "object",- properties: [- {- name: "algorithm",- type: "bytebase.v1.Algorithm",- },- {- name: "description",- type: "string",- description: "the description of the semantic type, it can be empty.",- },- {- name: "icon",- type: "string",- description:- "icon is the icon for semantic type, it can be emoji or base64 encoded image.",- },- {- name: "id",- type: "string",- description: "id is the uuid for semantic type.",- },- {- name: "title",- type: "string",- description: "the title of the semantic type, it should not be empty.",- },- ],- description: "",- },- "bytebase.v1.SendEmailLoginCodeRequest": {- type: "object",- properties: [- {- name: "email",- type: "string",- description: "The email address to send the code to.",- },- {- name: "workspace",- type: "string",- description:- "Optional workspace context captured at send time, used to locate the EMAIL setting,\n and later (at verify time) for signup gate checks and workspace assignment.\n Unset for SaaS brand-new signup (no workspace exists yet).\n Format: workspaces/{workspace}",- },- ],- description: "",- },- "bytebase.v1.SequenceMetadata": {- type: "object",- properties: [- {- name: "cacheSize",- type: "string",- description: "Cache size of a sequence.",- },- {- name: "comment",- type: "string",- description: "The comment describing the sequence.",- },- {- name: "cycle",- type: "boolean",- description: "Cycle is whether the sequence cycles.",- },- {- name: "dataType",- type: "string",- description: "The data type of a sequence.",- },- {- name: "increment",- type: "string",- description: "Increment value of a sequence.",- },- {- name: "lastValue",- type: "string",- description: "Last value of a sequence.",- },- {- name: "maxValue",- type: "string",- description: "The maximum value of a sequence.",- },- {- name: "minValue",- type: "string",- description: "The minimum value of a sequence.",- },- {- name: "name",- type: "string",- description: "The name of a sequence.",- },- {- name: "ownerColumn",- type: "string",- description: "The owner column of the sequence.",- },- {- name: "ownerTable",- type: "string",- description: "The owner table of the sequence.",- },- {- name: "skipDump",- type: "boolean",- description:- "Whether to skip this sequence during schema dump operations.",- },- {- name: "start",- type: "string",- description: "The start value of a sequence.",- },- ],- description: "",- },- "bytebase.v1.ServiceAccount": {- type: "object",- properties: [- {- name: "createTime",- type: "google.protobuf.Timestamp",- description: "The timestamp when the service account was created.",- },- {- name: "email",- type: "string",- description:- "The email of the service account.\n For workspace-level: {name}@service.bytebase.com\n For project-level: {name}@{project-id}.service.bytebase.com",- },- {- name: "name",- type: "string",- description:- "The name of the service account.\n Format: serviceAccounts/{email}",- },- {- name: "serviceKey",- type: "string",- description:- "The service key for authentication. Only returned on creation or key rotation.",- },- {- name: "state",- type: "bytebase.v1.State",- description: "The state of the service account.",- },- {- name: "title",- type: "string",- description: "The display title of the service account.",- },- ],- description: "ServiceAccount represents an API integration account.",- },- "bytebase.v1.SetIamPolicyRequest": {- type: "object",- properties: [- {- name: "etag",- type: "string",- description: "The current etag of the policy.",- },- {- name: "policy",- type: "bytebase.v1.IamPolicy",- },- {- name: "resource",- type: "string",- description:- "The name of the resource to set the IAM policy.\n Format: projects/{project}\n Format: workspaces/{workspace}",- },- ],- description: "Request message for setting an IAM policy.",- },- "bytebase.v1.Setting": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- 'The resource name of the setting.\n Format: settings/{setting}\n Example: "settings/SEMANTIC_TYPES"',- },- {- name: "value",- type: "bytebase.v1.SettingValue",- description: "The configuration value of the setting.",- },- ],- description: "The schema of setting.",- },- "bytebase.v1.Setting.SettingName": {- type: "enum",- values: [- "SETTING_NAME_UNSPECIFIED",- "WORKSPACE_PROFILE",- "WORKSPACE_APPROVAL",- "APP_IM",- "AI",- "DATA_CLASSIFICATION",- "SEMANTIC_TYPES",- "ENVIRONMENT",- "EMAIL",- ],- description: "",- },- "bytebase.v1.SettingValue": {- type: "object",- properties: [- {- name: "ai",- type: "bytebase.v1.AISetting",- },- {- name: "appIm",- type: "bytebase.v1.AppIMSetting",- },- {- name: "dataClassification",- type: "bytebase.v1.DataClassificationSetting",- },- {- name: "email",- type: "bytebase.v1.EmailSetting",- },- {- name: "environment",- type: "bytebase.v1.EnvironmentSetting",- },- {- name: "semanticType",- type: "bytebase.v1.SemanticTypeSetting",- },- {- name: "workspaceApproval",- type: "bytebase.v1.WorkspaceApprovalSetting",- },- {- name: "workspaceProfile",- type: "bytebase.v1.WorkspaceProfileSetting",- },- ],- description: "The data in setting value.",- },- "bytebase.v1.Sheet": {- type: "object",- properties: [- {- name: "content",- type: "string",- format: "byte",- description:- "The content of the sheet.\n By default, it will be cut off, if it doesn't match the `content_size`, you can\n set the `raw` to true in GetSheet request to retrieve the full content.",- },- {- name: "contentSize",- type: "integer",- format: "int64",- description:- "content_size is the full size of the content, may not match the size of the `content` field.",- },- {- name: "name",- type: "string",- description:- "The name of the sheet resource.\n Format: projects/{project}/sheets/{sheet}\n The sheet ID is generated by the server on creation and cannot be changed.",- },- ],- description: "",- },- "bytebase.v1.SignupRequest": {- type: "object",- properties: [- {- name: "email",- type: "string",- description: "The email for the new account.",- },- {- name: "password",- type: "string",- description: "The password for the new account.",- },- {- name: "title",- type: "string",- description: "The display name of the user.",- },- ],- description: "",- },- "bytebase.v1.SpatialIndexConfig": {- type: "object",- properties: [- {- name: "dimensional",- type: "bytebase.v1.DimensionalConfig",- description: "Dimensional configuration",- },- {- name: "method",- type: "string",- description:- 'Spatial indexing method (e.g., "SPATIAL", "R-TREE", "GIST")',- },- {- name: "storage",- type: "bytebase.v1.StorageConfig",- description: "Storage and performance configuration",- },- {- name: "tessellation",- type: "bytebase.v1.TessellationConfig",- description:- "Tessellation configuration for grid-based spatial indexes",- },- ],- description:- "SpatialIndexConfig defines the spatial index configuration for spatial databases.",- },- "bytebase.v1.Stage": {- type: "object",- properties: [- {- name: "environment",- type: "string",- description:- 'environment is the environment of the stage.\n Format: environments/{environment} for valid environments, or "environments/-" for stages without environment or with deleted environments.',- },- {- name: "id",- type: "string",- description:- 'id is the environment id of the stage.\n e.g., "prod".\n Use "-" when the stage has no environment or deleted environment.',- },- {- name: "name",- type: "string",- description:- 'Format: projects/{project}/plans/{plan}/rollout/stages/{stage}\n Use "-" for {stage} when the stage has no environment or deleted environment.',- },- {- name: "tasks",- type: "array<bytebase.v1.Task>",- description: "The tasks within this stage.",- items: {- name: "item",- type: "bytebase.v1.Task",- },- },- ],- description: "",- },- "bytebase.v1.State": {- type: "enum",- values: ["STATE_UNSPECIFIED", "ACTIVE", "DELETED"],- description: "Resource lifecycle state.",- },- "bytebase.v1.StatementType": {- type: "enum",- values: [- "STATEMENT_TYPE_UNSPECIFIED",- "CREATE_DATABASE",- "CREATE_TABLE",- "CREATE_VIEW",- "CREATE_INDEX",- "CREATE_SEQUENCE",- "CREATE_SCHEMA",- "CREATE_FUNCTION",- "CREATE_TRIGGER",- "CREATE_PROCEDURE",- "CREATE_EVENT",- "CREATE_EXTENSION",- "CREATE_TYPE",- "DROP_DATABASE",- "DROP_TABLE",- "DROP_VIEW",- "DROP_INDEX",- "DROP_SEQUENCE",- "DROP_SCHEMA",- "DROP_FUNCTION",- "DROP_TRIGGER",- "DROP_PROCEDURE",- "DROP_EVENT",- "DROP_EXTENSION",- "DROP_TYPE",- "ALTER_DATABASE",- "ALTER_TABLE",- "ALTER_VIEW",- "ALTER_SEQUENCE",- "ALTER_EVENT",- "ALTER_TYPE",- "ALTER_INDEX",- "TRUNCATE",- "RENAME",- "RENAME_INDEX",- "RENAME_SCHEMA",- "RENAME_SEQUENCE",- "COMMENT",- "INSERT",- "UPDATE",- "DELETE",- ],- description: "StatementType represents the type of SQL statement.",- },- "bytebase.v1.StorageConfig": {- type: "object",- properties: [- {- name: "allowPageLocks",- type: "boolean",- },- {- name: "allowRowLocks",- type: "boolean",- },- {- name: "buffering",- type: "string",- description: "Buffering mode for PostgreSQL (auto, on, off)",- },- {- name: "commitInterval",- type: "integer",- format: "int32",- },- {- name: "dataCompression",- type: "string",- description: "NONE, ROW, PAGE",- },- {- name: "dropExisting",- type: "boolean",- },- {- name: "fillfactor",- type: "integer",- format: "int32",- description: "Fill factor percentage (1-100)",- },- {- name: "maxdop",- type: "integer",- format: "int32",- },- {- name: "online",- type: "boolean",- },- {- name: "padIndex",- type: "boolean",- description: "SQL Server specific parameters",- },- {- name: "sdoLevel",- type: "integer",- format: "int32",- },- {- name: "sortInTempdb",- type: "string",- description: "ON, OFF",- },- {- name: "tablespace",- type: "string",- description: "Tablespace configuration for Oracle",- },- {- name: "workTablespace",- type: "string",- },- ],- description:- "StorageConfig defines storage and performance parameters for spatial indexes.",- },- "bytebase.v1.StreamMetadata": {- type: "object",- properties: [- {- name: "comment",- type: "string",- description: "The comment of the stream.",- },- {- name: "definition",- type: "string",- description: "The definition of the stream.",- },- {- name: "mode",- type: "bytebase.v1.StreamMetadata.Mode",- description: "The mode of the stream.",- },- {- name: "name",- type: "string",- description: "The name is the name of a stream.",- },- {- name: "owner",- type: "string",- description: "The owner of the stream.",- },- {- name: "stale",- type: "boolean",- description:- "Indicates whether the stream was last read before the `stale_after` time.",- },- {- name: "tableName",- type: "string",- description:- "The table_name is the name of the table/view that the stream is created on.",- },- {- name: "type",- type: "bytebase.v1.StreamMetadata.Type",- description: "The type of the stream.",- },- ],- description: "",- },- "bytebase.v1.StreamMetadata.Mode": {- type: "enum",- values: ["MODE_UNSPECIFIED", "DEFAULT", "APPEND_ONLY", "INSERT_ONLY"],- description: "",- },- "bytebase.v1.StreamMetadata.Type": {- type: "enum",- values: ["TYPE_UNSPECIFIED", "DELTA"],- description: "",- },- "bytebase.v1.Subscription": {- type: "object",- properties: [- {- name: "activeInstances",- type: "integer",- format: "int32",- },- {- name: "etag",- type: "string",- description:- "Etag for optimistic concurrency on purchase updates. Only set in SaaS mode.",- },- {- name: "expiresTime",- type: "google.protobuf.Timestamp",- },- {- name: "ha",- type: "boolean",- description:- "Whether high availability (multiple replicas) is enabled.",- },- {- name: "instances",- type: "integer",- format: "int32",- },- {- name: "orgName",- type: "string",- },- {- name: "plan",- type: "bytebase.v1.PlanType",- },- {- name: "seats",- type: "integer",- format: "int32",- },- {- name: "trialing",- type: "boolean",- },- ],- description: "",- },- "bytebase.v1.SwitchWorkspaceRequest": {- type: "object",- properties: [- {- name: "mfaTempToken",- type: "string",- description:- "Temporary MFA token from a previous SwitchWorkspace call that returned mfa_temp_token.",- },- {- name: "otpCode",- type: "string",- description:- "OTP code for MFA verification. Required if the target workspace enforces MFA.",- },- {- name: "recoveryCode",- type: "string",- description:- "Recovery code for MFA verification (alternative to otp_code).",- },- {- name: "web",- type: "boolean",- description:- "If true, sets tokens as HTTP-only cookies (browser clients).",- },- {- name: "workspace",- type: "string",- description:- "The target workspace to switch to.\n Format: workspaces/{workspace}",- },- ],- description: "",- },- "bytebase.v1.SyncDatabaseRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the database to sync.\n Format: instances/{instance}/databases/{database}",- },- ],- description: "",- },- "bytebase.v1.SyncDatabases": {- type: "object",- properties: [- {- name: "databases",- type: "array<string>",- items: {- name: "item",- type: "string",- },- },- ],- description: "",- },- "bytebase.v1.SyncInstanceRequest": {- type: "object",- properties: [- {- name: "enableFullSync",- type: "boolean",- description:- "When full sync is enabled, all databases in the instance will be synchronized. Otherwise, only\n the instance metadata (such as the database list) and any newly discovered databases will be synced.",- },- {- name: "name",- type: "string",- description: "The name of instance.\n Format: instances/{instance}",- },- ],- description: "",- },- "bytebase.v1.SyncInstanceResponse": {- type: "object",- properties: [- {- name: "databases",- type: "array<string>",- description: "All database name list in the instance.",- items: {- name: "item",- type: "string",- },- },- ],- description: "",- },- "bytebase.v1.SyncStatus": {- type: "enum",- values: ["SYNC_STATUS_UNSPECIFIED", "OK", "FAILED"],- description: "SyncStatus is the status of the database sync operation.",- },- "bytebase.v1.TableCatalog": {- type: "object",- properties: [- {- name: "classification",- type: "string",- description: "The data classification level for this table.",- },- {- name: "columns",- type: "bytebase.v1.TableCatalog.Columns",- description: "Regular table columns.",- },- {- name: "name",- type: "string",- description: "The table name.",- },- {- name: "objectSchema",- type: "bytebase.v1.ObjectSchema",- description: "Object schema for JSON/XML columns.",- },- ],- description: "Table metadata within a schema.",- },- "bytebase.v1.TableCatalog.Columns": {- type: "object",- properties: [- {- name: "columns",- type: "array<bytebase.v1.ColumnCatalog>",- description: "The columns in the table.",- items: {- name: "item",- type: "bytebase.v1.ColumnCatalog",- },- },- ],- description: "Column list for regular tables.",- },- "bytebase.v1.TableMetadata": {- type: "object",- properties: [- {- name: "charset",- type: "string",- description: "The character set of table.",- },- {- name: "checkConstraints",- type: "array<bytebase.v1.CheckConstraintMetadata>",- description:- "The check_constraints is the list of check constraints in a table.",- items: {- name: "item",- type: "bytebase.v1.CheckConstraintMetadata",- },- },- {- name: "collation",- type: "string",- description: "The collation is the collation of a table.",- },- {- name: "columns",- type: "array<bytebase.v1.ColumnMetadata>",- description: "The columns is the ordered list of columns in a table.",- items: {- name: "item",- type: "bytebase.v1.ColumnMetadata",- },- },- {- name: "comment",- type: "string",- description: "The comment is the comment of a table.",- },- {- name: "createOptions",- type: "string",- description: "The create_options is the create option of a table.",- },- {- name: "dataFree",- type: "integer",- format: "int64",- description:- "The data_free is the estimated free data size of a table.",- },- {- name: "dataSize",- type: "integer",- format: "int64",- description: "The data_size is the estimated data size of a table.",- },- {- name: "engine",- type: "string",- description: "The engine is the engine of a table.",- },- {- name: "foreignKeys",- type: "array<bytebase.v1.ForeignKeyMetadata>",- description: "The foreign_keys is the list of foreign keys in a table.",- items: {- name: "item",- type: "bytebase.v1.ForeignKeyMetadata",- },- },- {- name: "indexes",- type: "array<bytebase.v1.IndexMetadata>",- description: "The indexes is the list of indexes in a table.",- items: {- name: "item",- type: "bytebase.v1.IndexMetadata",- },- },- {- name: "indexSize",- type: "integer",- format: "int64",- description: "The index_size is the estimated index size of a table.",- },- {- name: "name",- type: "string",- description: "The name is the name of a table.",- },- {- name: "owner",- type: "string",- description: "The owner of the table.",- },- {- name: "partitions",- type: "array<bytebase.v1.TablePartitionMetadata>",- description: "The partitions is the list of partitions in a table.",- items: {- name: "item",- type: "bytebase.v1.TablePartitionMetadata",- },- },- {- name: "primaryKeyType",- type: "string",- description:- "https://docs.pingcap.com/tidb/stable/clustered-indexes/#clustered-indexes\n CLUSTERED or NONCLUSTERED.",- },- {- name: "rowCount",- type: "integer",- format: "int64",- description:- "The row_count is the estimated number of rows of a table.",- },- {- name: "shardingInfo",- type: "string",- description:- "https://docs.pingcap.com/tidb/stable/information-schema-tables/",- },- {- name: "skipDump",- type: "boolean",- description:- "Whether to skip this table during schema dump operations.",- },- {- name: "sortingKeys",- type: "array<string>",- description:- "The sorting_keys is a tuple of column names or arbitrary expressions. ClickHouse specific field.\n Reference: https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree#order_by",- items: {- name: "item",- type: "string",- },- },- {- name: "triggers",- type: "array<bytebase.v1.TriggerMetadata>",- description:- "The triggers is the list of triggers associated with the table.",- items: {- name: "item",- type: "bytebase.v1.TriggerMetadata",- },- },- ],- description: "TableMetadata is the metadata for tables.",- },- "bytebase.v1.TablePartitionMetadata": {- type: "object",- properties: [- {- name: "checkConstraints",- type: "array<bytebase.v1.CheckConstraintMetadata>",- items: {- name: "item",- type: "bytebase.v1.CheckConstraintMetadata",- },- },- {- name: "expression",- type: "string",- description:- "The expression is the expression of a table partition.\n For PostgreSQL, the expression is the text of {FOR VALUES\n partition_bound_spec}, see\n https://www.postgresql.org/docs/current/sql-createtable.html. For MySQL,\n the expression is the `expr` or `column_list` of the following syntax.\n PARTITION BY\n { [LINEAR] HASH(expr)\n | [LINEAR] KEY [ALGORITHM={1 | 2}] (column_list)\n | RANGE{(expr) | COLUMNS(column_list)}\n | LIST{(expr) | COLUMNS(column_list)} }.",- },- {- name: "indexes",- type: "array<bytebase.v1.IndexMetadata>",- items: {- name: "item",- type: "bytebase.v1.IndexMetadata",- },- },- {- name: "name",- type: "string",- description: "The name is the name of a table partition.",- },- {- name: "subpartitions",- type: "array<bytebase.v1.TablePartitionMetadata>",- description:- "The subpartitions is the list of subpartitions in a table partition.",- items: {- name: "item",- type: "bytebase.v1.TablePartitionMetadata",- },- },- {- name: "type",- type: "bytebase.v1.TablePartitionMetadata.Type",- description: "The type of a table partition.",- },- {- name: "useDefault",- type: "string",- description:- "The use_default is whether the users use the default partition, it stores\n the different value for different database engines. For MySQL, it's [INT]\n type, 0 means not use default partition, otherwise, it's equals to number\n in syntax [SUB]PARTITION {number}.",- },- {- name: "value",- type: "string",- description:- "The value is the value of a table partition.\n For MySQL, the value is for RANGE and LIST partition types,\n - For a RANGE partition, it contains the value set in the partition's\n VALUES LESS THAN clause, which can be either an integer or MAXVALUE.\n - For a LIST partition, this column contains the values defined in the\n partition's VALUES IN clause, which is a list of comma-separated integer\n values.\n - For others, it's an empty string.",- },- ],- description: "TablePartitionMetadata is the metadata for table partitions.",- },- "bytebase.v1.TablePartitionMetadata.Type": {- type: "enum",- values: [- "TYPE_UNSPECIFIED",- "RANGE",- "RANGE_COLUMNS",- "LIST",- "LIST_COLUMNS",- "HASH",- "LINEAR_HASH",- "KEY",- "LINEAR_KEY",- ],- description:- "Type is the type of a table partition, some database engines may not\n support all types. Only avilable for the following database engines now:\n MySQL: RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, LINEAR HASH, KEY,\n LINEAR_KEY\n (https://dev.mysql.com/doc/refman/8.0/en/partitioning-types.html) TiDB:\n RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, KEY PostgreSQL: RANGE,\n LIST, HASH (https://www.postgresql.org/docs/current/ddl-partitioning.html)",- },- "bytebase.v1.TagPolicy": {- type: "object",- properties: [- {- name: "tags",- type: "object",- description:- 'tags is the key - value map for resources.\n for example, the environment resource can have the sql review config tag, like "bb.tag.review_config": "reviewConfigs/{review config resource id}"',- additionalProperties: {- name: "value",- type: "string",- },- },- ],- description: "Policy for tagging resources with metadata.",- },- "bytebase.v1.TagPolicy.TagsEntry": {- type: "object",- properties: [- {- name: "key",- type: "string",- },- {- name: "value",- type: "string",- },- ],- description: "",- },- "bytebase.v1.Task": {- type: "object",- properties: [- {- name: "databaseCreate",- type: "bytebase.v1.Task.DatabaseCreate",- },- {- name: "databaseDataExport",- type: "bytebase.v1.Task.DatabaseDataExport",- },- {- name: "databaseUpdate",- type: "bytebase.v1.Task.DatabaseUpdate",- },- {- name: "name",- type: "string",- description:- "Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}",- },- {- name: "runTime",- type: "google.protobuf.Timestamp",- description:- "The run_time is the scheduled run time of latest task run.\n If there are no task runs or the task run is not scheduled, it will be empty.",- },- {- name: "skippedReason",- type: "string",- description: "The reason why the task was skipped.",- },- {- name: "specId",- type: "string",- description: "A UUID4 string that uniquely identifies the Spec.",- },- {- name: "status",- type: "bytebase.v1.Task.Status",- description: "Status is the status of the task.",- },- {- name: "target",- type: "string",- description:- "Format: instances/{instance} if the task is DatabaseCreate.\n Format: instances/{instance}/databases/{database}",- },- {- name: "type",- type: "bytebase.v1.Task.Type",- },- {- name: "updateTime",- type: "google.protobuf.Timestamp",- description:- "The update_time is the update time of latest task run.\n If there are no task runs, it will be empty.",- },- ],- description: "",- },- "bytebase.v1.Task.DatabaseCreate": {- type: "object",- properties: [- {- name: "sheet",- type: "string",- description: "Format: projects/{project}/sheets/{sheet}",- },- ],- description: "Payload for creating a new database.",- },- "bytebase.v1.Task.DatabaseDataExport": {- type: "object",- properties: [- {- name: "sheet",- type: "string",- description:- "The resource name of the sheet.\n Format: projects/{project}/sheets/{sheet}",- },- ],- description: "Payload for exporting database data.",- },- "bytebase.v1.Task.DatabaseUpdate": {- type: "object",- properties: [- {- name: "release",- type: "string",- description: "Format: projects/{project}/releases/{release}",- },- {- name: "sheet",- type: "string",- description: "Format: projects/{project}/sheets/{sheet}",- },- ],- description: "Payload for updating a database schema.",- },- "bytebase.v1.Task.Status": {- type: "enum",- values: [- "STATUS_UNSPECIFIED",- "NOT_STARTED",- "PENDING",- "RUNNING",- "DONE",- "FAILED",- "CANCELED",- "SKIPPED",- ],- description: "",- },- "bytebase.v1.Task.Type": {- type: "enum",- values: [- "TYPE_UNSPECIFIED",- "GENERAL",- "DATABASE_CREATE",- "DATABASE_MIGRATE",- "DATABASE_EXPORT",- ],- description: "",- },- "bytebase.v1.TaskMetadata": {- type: "object",- properties: [- {- name: "comment",- type: "string",- description: "The comment of the task.",- },- {- name: "condition",- type: "string",- description: "The condition of the task.",- },- {- name: "definition",- type: "string",- description: "The definition of the task.",- },- {- name: "id",- type: "string",- description:- "The id is the snowflake-generated id of a task.\n Example: 01ad32a0-1bb6-5e93-0000-000000000001",- },- {- name: "name",- type: "string",- description: "The name is the name of a task.",- },- {- name: "owner",- type: "string",- description: "The owner of the task.",- },- {- name: "predecessors",- type: "array<string>",- description: "The predecessor tasks of the task.",- items: {- name: "item",- type: "string",- },- },- {- name: "schedule",- type: "string",- description: "The schedule interval of the task.",- },- {- name: "state",- type: "bytebase.v1.TaskMetadata.State",- description: "The state of the task.",- },- {- name: "warehouse",- type: "string",- description: "The warehouse of the task.",- },- ],- description: "",- },- "bytebase.v1.TaskMetadata.State": {- type: "enum",- values: ["STATE_UNSPECIFIED", "STARTED", "SUSPENDED"],- description: "",- },- "bytebase.v1.TaskRun": {- type: "object",- properties: [- {- name: "createTime",- type: "google.protobuf.Timestamp",- },- {- name: "creator",- type: "string",- description: "Format: users/[email protected]",- },- {- name: "detail",- type: "string",- description:- "Below are the results of a task run.\n Detailed information about the task run result.",- },- {- name: "exportArchiveStatus",- type: "bytebase.v1.TaskRun.ExportArchiveStatus",- description: "The export archive status for data export tasks.",- },- {- name: "hasPriorBackup",- type: "boolean",- description:- "Indicates whether a prior backup was created for this task run.\n When true, rollback SQL can be generated via PreviewTaskRunRollback.\n Backup details are available in the task run logs.",- },- {- name: "name",- type: "string",- description:- "Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}",- },- {- name: "runTime",- type: "google.protobuf.Timestamp",- description:- "The task run should run after run_time.\n This can only be set when creating the task run calling BatchRunTasks.",- },- {- name: "schedulerInfo",- type: "bytebase.v1.TaskRun.SchedulerInfo",- description: "Scheduling information about the task run.",- },- {- name: "startTime",- type: "google.protobuf.Timestamp",- description: "The time when the task run started execution.",- },- {- name: "status",- type: "bytebase.v1.TaskRun.Status",- description: "The current execution status of the task run.",- },- {- name: "updateTime",- type: "google.protobuf.Timestamp",- },- ],- description: "",- },- "bytebase.v1.TaskRun.ExportArchiveStatus": {- type: "enum",- values: ["EXPORT_ARCHIVE_STATUS_UNSPECIFIED", "READY", "EXPORTED"],- description: "",- },- "bytebase.v1.TaskRun.SchedulerInfo": {- type: "object",- properties: [- {- name: "reportTime",- type: "google.protobuf.Timestamp",- description: "The time when the scheduling info was reported.",- },- {- name: "waitingCause",- type: "bytebase.v1.TaskRun.SchedulerInfo.WaitingCause",- description: "The cause for the task run waiting.",- },- ],- description: "Information about task run scheduling.",- },- "bytebase.v1.TaskRun.SchedulerInfo.WaitingCause": {- type: "object",- properties: [- {- name: "parallelTasksLimit",- type: "boolean",- description: "Waiting due to parallel tasks limit.",- },- ],- description: "Information about why a task run is waiting.",- },- "bytebase.v1.TaskRun.Status": {- type: "enum",- values: [- "STATUS_UNSPECIFIED",- "PENDING",- "RUNNING",- "DONE",- "FAILED",- "CANCELED",- "AVAILABLE",- ],- description: "",- },- "bytebase.v1.TaskRunLog": {- type: "object",- properties: [- {- name: "entries",- type: "array<bytebase.v1.TaskRunLogEntry>",- description: "The log entries for this task run.",- items: {- name: "item",- type: "bytebase.v1.TaskRunLogEntry",- },- },- {- name: "name",- type: "string",- description:- "Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/log",- },- ],- description: "",- },- "bytebase.v1.TaskRunLogEntry": {- type: "object",- properties: [- {- name: "commandExecute",- type: "bytebase.v1.TaskRunLogEntry.CommandExecute",- description: "Command execution details (if type is COMMAND_EXECUTE).",- },- {- name: "computeDiff",- type: "bytebase.v1.TaskRunLogEntry.ComputeDiff",- description: "Compute diff details (if type is COMPUTE_DIFF).",- },- {- name: "databaseSync",- type: "bytebase.v1.TaskRunLogEntry.DatabaseSync",- description: "Database sync details (if type is DATABASE_SYNC).",- },- {- name: "ghostMigration",- type: "bytebase.v1.TaskRunLogEntry.GhostMigration",- description: "gh-ost migration details (if type is GHOST_MIGRATION).",- },- {- name: "logTime",- type: "google.protobuf.Timestamp",- description: "The time when the log was recorded.",- },- {- name: "priorBackup",- type: "bytebase.v1.TaskRunLogEntry.PriorBackup",- description: "Prior backup details (if type is PRIOR_BACKUP).",- },- {- name: "releaseFileExecute",- type: "bytebase.v1.TaskRunLogEntry.ReleaseFileExecute",- description:- "Release file execution details (if type is RELEASE_FILE_EXECUTE).",- },- {- name: "replicaId",- type: "string",- description: "The replica ID for this log entry.",- },- {- name: "retryInfo",- type: "bytebase.v1.TaskRunLogEntry.RetryInfo",- description: "Retry information details (if type is RETRY_INFO).",- },- {- name: "schemaDump",- type: "bytebase.v1.TaskRunLogEntry.SchemaDump",- description: "Schema dump details (if type is SCHEMA_DUMP).",- },- {- name: "transactionControl",- type: "bytebase.v1.TaskRunLogEntry.TransactionControl",- description:- "Transaction control details (if type is TRANSACTION_CONTROL).",- },- {- name: "type",- type: "bytebase.v1.TaskRunLogEntry.Type",- description: "The type of this log entry.",- },- ],- description: "",- },- "bytebase.v1.TaskRunLogEntry.CommandExecute": {- type: "object",- properties: [- {- name: "logTime",- type: "google.protobuf.Timestamp",- description: "When the command was logged.",- },- {- name: "range",- type: "bytebase.v1.Range",- description:- 'The byte offset range of the executed command in the sheet.\n Uses byte offsets (not character indices) for efficient slicing of sheet content bytes.\n Example: For "SELECT 你好;" in a UTF-8 sheet, range [0, 13) represents all 13 bytes.',- },- {- name: "response",- type: "bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse",- description: "The response from executing the command.",- },- {- name: "statement",- type: "string",- description: "The executed statement.",- },- ],- description: "Command execution details.",- },- "bytebase.v1.TaskRunLogEntry.CommandExecute.CommandResponse": {- type: "object",- properties: [- {- name: "affectedRows",- type: "integer",- format: "int64",- description: "Total affected rows.",- },- {- name: "allAffectedRows",- type: "array<integer>",- description:- "`all_affected_rows` is the affected rows of each command.\n `all_affected_rows` may be unavailable if the database driver doesn't support it. Caller should fallback to `affected_rows` in that case.",- items: {- name: "item",- type: "integer",- format: "int64",- },- },- {- name: "error",- type: "string",- description: "Error message if command execution failed.",- },- {- name: "logTime",- type: "google.protobuf.Timestamp",- description: "When the response was logged.",- },- ],- description: "Command execution response.",- },- "bytebase.v1.TaskRunLogEntry.ComputeDiff": {- type: "object",- properties: [- {- name: "endTime",- type: "google.protobuf.Timestamp",- description: "When diff computation ended.",- },- {- name: "error",- type: "string",- description: "Error message if computation failed.",- },- {- name: "startTime",- type: "google.protobuf.Timestamp",- description: "When diff computation started.",- },- ],- description: "Schema diff computation details.",- },- "bytebase.v1.TaskRunLogEntry.DatabaseSync": {- type: "object",- properties: [- {- name: "endTime",- type: "google.protobuf.Timestamp",- description: "When the database sync ended.",- },- {- name: "error",- type: "string",- description: "Error message if sync failed.",- },- {- name: "startTime",- type: "google.protobuf.Timestamp",- description: "When the database sync started.",- },- ],- description: "Database synchronization details.",- },- "bytebase.v1.TaskRunLogEntry.GhostMigration": {- type: "object",- properties: [- {- name: "endTime",- type: "google.protobuf.Timestamp",- description: "When the gh-ost migration ended.",- },- {- name: "error",- type: "string",- description: "Error message if the gh-ost migration failed.",- },- {- name: "startTime",- type: "google.protobuf.Timestamp",- description: "When the gh-ost migration started.",- },- ],- description: "gh-ost migration details.",- },- "bytebase.v1.TaskRunLogEntry.PriorBackup": {- type: "object",- properties: [- {- name: "endTime",- type: "google.protobuf.Timestamp",- description: "When the backup ended.",- },- {- name: "error",- type: "string",- description: "Error message if the backup failed.",- },- {- name: "priorBackupDetail",- type: "bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail",- description: "The backup details.",- },- {- name: "startTime",- type: "google.protobuf.Timestamp",- description: "When the backup started.",- },- ],- description: "Prior backup operation details.",- },- "bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail": {- type: "object",- properties: [- {- name: "items",- type: "array<bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item>",- description: "The list of backed up tables.",- items: {- name: "item",- type: "bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item",- },- },- ],- description: "Prior backup detail for rollback purposes.",- },- "bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item": {- type: "object",- properties: [- {- name: "endPosition",- type: "bytebase.v1.Position",- description: "The end position in the SQL statement.",- },- {- name: "sourceTable",- type: "bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table",- description: "The original table information.",- },- {- name: "startPosition",- type: "bytebase.v1.Position",- description: "The start position in the SQL statement.",- },- {- name: "targetTable",- type: "bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table",- description: "The target backup table information.",- },- ],- description: "A single backup table mapping.",- },- "bytebase.v1.TaskRunLogEntry.PriorBackup.PriorBackupDetail.Item.Table": {- type: "object",- properties: [- {- name: "database",- type: "string",- description:- "The database information.\n Format: instances/{instance}/databases/{database}",- },- {- name: "schema",- type: "string",- description: "The schema name.",- },- {- name: "table",- type: "string",- description: "The table name.",- },- ],- description: "Table information.",- },- "bytebase.v1.TaskRunLogEntry.ReleaseFileExecute": {- type: "object",- properties: [- {- name: "filePath",- type: "string",- description:- 'The file path within the release (e.g., "2.2/V0001_create_table.sql").',- },- {- name: "version",- type: "string",- description: 'The version of the file being executed (e.g., "0001").',- },- ],- description: "Release file execution details.",- },- "bytebase.v1.TaskRunLogEntry.RetryInfo": {- type: "object",- properties: [- {- name: "error",- type: "string",- description: "The error that triggered the retry.",- },- {- name: "maximumRetries",- type: "integer",- format: "int32",- description: "Maximum number of retries allowed.",- },- {- name: "retryCount",- type: "integer",- format: "int32",- description: "Current retry attempt number.",- },- ],- description: "Retry information for failed operations.",- },- "bytebase.v1.TaskRunLogEntry.SchemaDump": {- type: "object",- properties: [- {- name: "endTime",- type: "google.protobuf.Timestamp",- description: "When the schema dump ended.",- },- {- name: "error",- type: "string",- description: "Error message if the schema dump failed.",- },- {- name: "startTime",- type: "google.protobuf.Timestamp",- description: "When the schema dump started.",- },- ],- description: "Schema dump operation details.",- },- "bytebase.v1.TaskRunLogEntry.TransactionControl": {- type: "object",- properties: [- {- name: "error",- type: "string",- description: "Error message if the operation failed.",- },- {- name: "type",- type: "bytebase.v1.TaskRunLogEntry.TransactionControl.Type",- description: "The type of transaction control.",- },- ],- description: "Transaction control operation details.",- },- "bytebase.v1.TaskRunLogEntry.TransactionControl.Type": {- type: "enum",- values: ["TYPE_UNSPECIFIED", "BEGIN", "COMMIT", "ROLLBACK"],- description: "Transaction control type.",- },- "bytebase.v1.TaskRunLogEntry.Type": {- type: "enum",- values: [- "TYPE_UNSPECIFIED",- "SCHEMA_DUMP",- "COMMAND_EXECUTE",- "DATABASE_SYNC",- "TRANSACTION_CONTROL",- "PRIOR_BACKUP",- "RETRY_INFO",- "COMPUTE_DIFF",- "RELEASE_FILE_EXECUTE",- "GHOST_MIGRATION",- ],- description: "The type of log entry.",- },- "bytebase.v1.TaskRunSession": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "Format: projects/{project}/plans/{plan}/rollout/stages/{stage}/tasks/{task}/taskRuns/{taskRun}/session",- },- {- name: "postgres",- type: "bytebase.v1.TaskRunSession.Postgres",- description: "PostgreSQL session information.",- },- ],- description: "",- },- "bytebase.v1.TaskRunSession.Postgres": {- type: "object",- properties: [- {- name: "blockedSessions",- type: "array<bytebase.v1.TaskRunSession.Postgres.Session>",- description: "`blocked_sessions` are blocked by `session`.",- items: {- name: "item",- type: "bytebase.v1.TaskRunSession.Postgres.Session",- },- },- {- name: "blockingSessions",- type: "array<bytebase.v1.TaskRunSession.Postgres.Session>",- description: "`blocking_sessions` block `session`.",- items: {- name: "item",- type: "bytebase.v1.TaskRunSession.Postgres.Session",- },- },- {- name: "session",- type: "bytebase.v1.TaskRunSession.Postgres.Session",- description:- "`session` is the session of the task run executing commands.",- },- ],- description: "PostgreSQL session information.",- },- "bytebase.v1.TaskRunSession.Postgres.Session": {- type: "object",- properties: [- {- name: "applicationName",- type: "string",- description: "Application name.",- },- {- name: "backendStart",- type: "google.protobuf.Timestamp",- description: "When the backend process started.",- },- {- name: "blockedByPids",- type: "array<string>",- description: "PIDs of sessions blocking this session.",- items: {- name: "item",- type: "string",- },- },- {- name: "clientAddr",- type: "string",- description: "Client IP address.",- },- {- name: "clientPort",- type: "string",- description: "Client port number.",- },- {- name: "datname",- type: "string",- description: "Database name.",- },- {- name: "pid",- type: "string",- description: "Process ID of the session.",- },- {- name: "query",- type: "string",- description: "Current query being executed.",- },- {- name: "queryStart",- type: "google.protobuf.Timestamp",- description: "When the current query started.",- },- {- name: "state",- type: "string",- description: "Session state (active, idle, etc.).",- },- {- name: "usename",- type: "string",- description: "User name.",- },- {- name: "waitEvent",- type: "string",- description: "Specific wait event if session is waiting.",- },- {- name: "waitEventType",- type: "string",- description: "Wait event type if session is waiting.",- },- {- name: "xactStart",- type: "google.protobuf.Timestamp",- description: "When the current transaction started.",- },- ],- description: "PostgreSQL session information read from `pg_stat_activity`.",- },- "bytebase.v1.TessellationConfig": {- type: "object",- properties: [- {- name: "boundingBox",- type: "bytebase.v1.BoundingBox",- description:- "Bounding box for GEOMETRY tessellation (not used for GEOGRAPHY)",- },- {- name: "cellsPerObject",- type: "integer",- format: "int32",- description: "Number of cells per object (1-8192 for SQL Server)",- },- {- name: "gridLevels",- type: "array<bytebase.v1.GridLevel>",- description: "Grid levels and densities for multi-level tessellation",- items: {- name: "item",- type: "bytebase.v1.GridLevel",- },- },- {- name: "scheme",- type: "string",- description:- 'Tessellation scheme (e.g., "GEOMETRY_GRID", "GEOGRAPHY_GRID", "GEOMETRY_AUTO_GRID")',- },- ],- description:- "TessellationConfig defines tessellation parameters for spatial indexes.",- },- "bytebase.v1.TestEmailSettingRequest": {- type: "object",- properties: [- {- name: "emailSetting",- type: "bytebase.v1.EmailSetting",- },- {- name: "parent",- type: "string",- },- {- name: "to",- type: "string",- },- ],- description: "",- },- "bytebase.v1.TestEmailSettingResponse": {- type: "object",- properties: [- {- name: "error",- type: "string",- },- {- name: "success",- type: "boolean",- },- ],- description: "",- },- "bytebase.v1.TestIdentityProviderRequest": {- type: "object",- properties: [- {- name: "identityProvider",- type: "bytebase.v1.IdentityProvider",- description:- "The identity provider to test connection including uncreated.",- },- {- name: "oauth2Context",- type: "bytebase.v1.OAuth2IdentityProviderTestRequestContext",- },- {- name: "oidcContext",- type: "bytebase.v1.OIDCIdentityProviderTestRequestContext",- description: "OIDC authentication context for test connection.",- },- ],- description: "",- },- "bytebase.v1.TestIdentityProviderResponse": {- type: "object",- properties: [- {- name: "claims",- type: "object",- description: "The map of claims returned by the identity provider.",- additionalProperties: {- name: "value",- type: "string",- },- },- {- name: "userInfo",- type: "object",- description: "The matched user info from the claims.",- additionalProperties: {- name: "value",- type: "string",- },- },- ],- description: "",- },- "bytebase.v1.TestIdentityProviderResponse.ClaimsEntry": {- type: "object",- properties: [- {- name: "key",- type: "string",- },- {- name: "value",- type: "string",- },- ],- description: "",- },- "bytebase.v1.TestIdentityProviderResponse.UserInfoEntry": {- type: "object",- properties: [- {- name: "key",- type: "string",- },- {- name: "value",- type: "string",- },- ],- description: "",- },- "bytebase.v1.TestWebhookRequest": {- type: "object",- properties: [- {- name: "project",- type: "string",- description:- "The name of the project which owns the webhook to test.\n Format: projects/{project}",- },- {- name: "webhook",- type: "bytebase.v1.Webhook",- description: "The webhook to test. Identified by its url.",- },- ],- description: "",- },- "bytebase.v1.TestWebhookResponse": {- type: "object",- properties: [- {- name: "error",- type: "string",- description: "The result of the test, empty if the test is successful.",- },- ],- description: "",- },- "bytebase.v1.TriggerMetadata": {- type: "object",- properties: [- {- name: "body",- type: "string",- description: "The body is the body of the trigger.",- },- {- name: "characterSetClient",- type: "string",- description:- "The character set used by the client creating the trigger.",- },- {- name: "collationConnection",- type: "string",- description:- "The collation used for the connection when creating the trigger.",- },- {- name: "comment",- type: "string",- description: "The comment describing the trigger.",- },- {- name: "event",- type: "string",- description:- "The event is the event of the trigger, such as INSERT, UPDATE, DELETE,\n TRUNCATE.",- },- {- name: "name",- type: "string",- description: "The name is the name of the trigger.",- },- {- name: "skipDump",- type: "boolean",- description:- "Whether to skip this trigger during schema dump operations.",- },- {- name: "sqlMode",- type: "string",- description: "The SQL mode setting for the trigger.",- },- {- name: "timing",- type: "string",- description:- "The timing is the timing of the trigger, such as BEFORE, AFTER.",- },- ],- description: "",- },- "bytebase.v1.UndeleteInstanceRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the deleted instance.\n Format: instances/{instance}",- },- ],- description: "",- },- "bytebase.v1.UndeleteProjectRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the deleted project.\n Format: projects/{project}",- },- ],- description: "",- },- "bytebase.v1.UndeleteReleaseRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the deleted release.\n Format: projects/{project}/releases/{release}",- },- ],- description: "",- },- "bytebase.v1.UndeleteServiceAccountRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the deleted service account.\n Format: serviceAccounts/{email}",- },- ],- description: "Request message for restoring a deleted service account.",- },- "bytebase.v1.UndeleteUserRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description: "The name of the deleted user.\n Format: users/{email}",- },- ],- description: "",- },- "bytebase.v1.UndeleteWorkloadIdentityRequest": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "The name of the deleted workload identity.\n Format: workloadIdentities/{email}",- },- ],- description: "Request message for restoring a deleted workload identity.",- },- "bytebase.v1.UpdateDataSourceRequest": {- type: "object",- properties: [- {- name: "allowMissing",- type: "boolean",- description:- "If set to true, and the data source is not found, a new data source will be created.\n In this situation, `update_mask` is ignored.",- },- {- name: "dataSource",- type: "bytebase.v1.DataSource",- description: "Identified by data source ID.",- },- {- name: "name",- type: "string",- description:- "The name of the instance to update a data source.\n Format: instances/{instance}",- },- {- name: "updateMask",- type: "google.protobuf.FieldMask",- description: "The list of fields to update.",- },- {- name: "validateOnly",- type: "boolean",- description: "Validate only also tests the data source connection.",- },- ],- description: "",- },- "bytebase.v1.UpdateDatabaseCatalogRequest": {- type: "object",- properties: [- {- name: "allowMissing",- type: "boolean",- description:- "If set to true, and the database catalog is not found, a new database catalog will be created.\n In this situation, `update_mask` is ignored.",- },- {- name: "catalog",- type: "bytebase.v1.DatabaseCatalog",- description:- "The database catalog to update.\n\n The catalog's `name` field is used to identify the database catalog to update.\n Format: instances/{instance}/databases/{database}/catalog",- },- ],- description: "Request message for updating a database catalog.",- },- "bytebase.v1.UpdateDatabaseGroupRequest": {- type: "object",- properties: [- {- name: "allowMissing",- type: "boolean",- description:- "If set to true, and the database group is not found, a new database group will be created.\n In this situation, `update_mask` is ignored.",- },- {- name: "databaseGroup",- type: "bytebase.v1.DatabaseGroup",- description:- "The database group to update.\n\n The database group's `name` field is used to identify the database group to update.\n Format: projects/{project}/databaseGroups/{databaseGroup}",- },- {- name: "updateMask",- type: "google.protobuf.FieldMask",- description: "The list of fields to update.",- },- ],- description: "Request message for updating a database group.",- },- "bytebase.v1.UpdateDatabaseRequest": {- type: "object",- properties: [- {- name: "allowMissing",- type: "boolean",- description:- "If set to true, and the database is not found, a new database will be created.\n In this situation, `update_mask` is ignored.",- },- {- name: "database",- type: "bytebase.v1.Database",- description:- "The database to update.\n\n The database's `name` field is used to identify the database to update.\n Format: instances/{instance}/databases/{database}",- },- {- name: "updateMask",- type: "google.protobuf.FieldMask",- description: "The list of fields to update.",- },- ],- description: "",- },- "bytebase.v1.UpdateEmailRequest": {- type: "object",- properties: [- {- name: "email",- type: "string",- description: "The new email address.",- },- {- name: "name",- type: "string",- description:- "The name of the user whose email to update.\n Format: users/{email}\n Note: This is the current (old) email address. The new email is specified in the 'email' field.",- },- ],- description: "",- },- "bytebase.v1.UpdateGroupRequest": {- type: "object",- properties: [- {- name: "allowMissing",- type: "boolean",- description:- "If set to true, and the group is not found, a new group will be created.\n In this situation, `update_mask` is ignored.",- },- {- name: "group",- type: "bytebase.v1.Group",- description:- "The group to update.\n\n The group's `name` field is used to identify the group to update.\n Format: groups/{email}",- },- {- name: "updateMask",- type: "google.protobuf.FieldMask",- description: "The list of fields to update.",- },- ],- description: "Request message for updating a group.",- },- "bytebase.v1.UpdateIdentityProviderRequest": {- type: "object",- properties: [- {- name: "allowMissing",- type: "boolean",- description:- "If set to true, and the identity provider is not found, a new identity provider will be created.\n In this situation, `update_mask` is ignored.",- },- {- name: "identityProvider",- type: "bytebase.v1.IdentityProvider",- description:- "The identity provider to update.\n\n The identity provider's `name` field is used to identify the identity provider to update.\n Format: idps/{identity_provider}",- },- {- name: "updateMask",- type: "google.protobuf.FieldMask",- description: "The list of fields to update.",- },- ],- description: "",- },- "bytebase.v1.UpdateInstanceRequest": {- type: "object",- properties: [- {- name: "allowMissing",- type: "boolean",- description:- "If set to true, and the instance is not found, a new instance will be created.\n In this situation, `update_mask` is ignored.",- },- {- name: "instance",- type: "bytebase.v1.Instance",- description:- "The instance to update.\n\n The instance's `name` field is used to identify the instance to update.\n Format: instances/{instance}",- },- {- name: "updateMask",- type: "google.protobuf.FieldMask",- description: "The list of fields to update.",- },- ],- description: "",- },- "bytebase.v1.UpdateIssueCommentRequest": {- type: "object",- properties: [- {- name: "allowMissing",- type: "boolean",- description:- "If set to true, and the issue comment is not found, a new issue comment will be created.\n In this situation, `update_mask` is ignored.",- },- {- name: "issueComment",- type: "bytebase.v1.IssueComment",- description: "The comment to update.",- },- {- name: "parent",- type: "string",- description:- "The issue name\n Format: projects/{project}/issues/{issue}",- },- {- name: "updateMask",- type: "google.protobuf.FieldMask",- description: "The list of fields to update.",- },- ],- description: "",- },- "bytebase.v1.UpdateIssueRequest": {- type: "object",- properties: [- {- name: "allowMissing",- type: "boolean",- description:- "If set to true, and the issue is not found, a new issue will be created.\n In this situation, `update_mask` is ignored.",- },- {- name: "issue",- type: "bytebase.v1.Issue",- description:- "The issue to update.\n\n The issue's `name` field is used to identify the issue to update.\n Format: projects/{project}/issues/{issue}",- },- {- name: "updateMask",- type: "google.protobuf.FieldMask",- description: "The list of fields to update.",- },- ],- description: "",- },- "bytebase.v1.UpdatePlanRequest": {- type: "object",- properties: [- {- name: "allowMissing",- type: "boolean",- description:- "If set to true, and the plan is not found, a new plan will be created.\n In this situation, `update_mask` is ignored.",- },- {- name: "plan",- type: "bytebase.v1.Plan",- description:- "The plan to update.\n\n The plan's `name` field is used to identify the plan to update.\n Format: projects/{project}/plans/{plan}",- },- {- name: "updateMask",- type: "google.protobuf.FieldMask",- description: "The list of fields to update.",- },- ],- description: "",- },- "bytebase.v1.UpdatePolicyRequest": {- type: "object",- properties: [- {- name: "allowMissing",- type: "boolean",- description:- "If set to true, and the policy is not found, a new policy will be created.\n In this situation, `update_mask` is ignored.",- },- {- name: "policy",- type: "bytebase.v1.Policy",- description:- "The policy to update.\n\n The policy's `name` field is used to identify the instance to update.\n Format: {resource name}/policies/{policy type}\n Workspace resource name: workspaces/{workspace-id}.\n Environment resource name: environments/environment-id.\n Instance resource name: instances/instance-id.\n Database resource name: instances/instance-id/databases/database-name.",- },- {- name: "updateMask",- type: "google.protobuf.FieldMask",- description: "The list of fields to update.",- },- ],- description: "",- },- "bytebase.v1.UpdateProjectRequest": {- type: "object",- properties: [- {- name: "allowMissing",- type: "boolean",- description:- "If set to true, and the project is not found, a new project will be created.\n In this situation, `update_mask` is ignored.",- },- {- name: "project",- type: "bytebase.v1.Project",- description:- "The project to update.\n\n The project's `name` field is used to identify the project to update.\n Format: projects/{project}",- },- {- name: "updateMask",- type: "google.protobuf.FieldMask",- description: "The list of fields to update.",- },- ],- description: "",- },- "bytebase.v1.UpdatePurchaseRequest": {- type: "object",- properties: [- {- name: "etag",- type: "string",- },- {- name: "interval",- type: "bytebase.v1.BillingInterval",- },- {- name: "plan",- type: "bytebase.v1.PlanType",- },- {- name: "seats",- type: "integer",- format: "int32",- },- ],- description: "",- },- "bytebase.v1.UpdateReleaseRequest": {- type: "object",- properties: [- {- name: "release",- type: "bytebase.v1.Release",- description: "The release to update.",- },- {- name: "updateMask",- type: "google.protobuf.FieldMask",- description: "The list of fields to be updated.",- },- ],- description: "",- },- "bytebase.v1.UpdateReviewConfigRequest": {- type: "object",- properties: [- {- name: "allowMissing",- type: "boolean",- description:- "If set to true, and the config is not found, a new config will be created.\n In this situation, `update_mask` is ignored.",- },- {- name: "reviewConfig",- type: "bytebase.v1.ReviewConfig",- description:- "The SQL review config to update.\n\n The name field is used to identify the SQL review config to update.",- },- {- name: "updateMask",- type: "google.protobuf.FieldMask",- description: "The list of fields to update.",- },- ],- description: "",- },- "bytebase.v1.UpdateRoleRequest": {- type: "object",- properties: [- {- name: "allowMissing",- type: "boolean",- description:- "If set to true, and the role is not found, a new role will be created.\n In this situation, `update_mask` is ignored.",- },- {- name: "role",- type: "bytebase.v1.Role",- description: "The role to update.",- },- {- name: "updateMask",- type: "google.protobuf.FieldMask",- description: "The list of fields to update.",- },- ],- description: "",- },- "bytebase.v1.UpdateServiceAccountRequest": {- type: "object",- properties: [- {- name: "serviceAccount",- type: "bytebase.v1.ServiceAccount",- description:- "The service account to update.\n\n The service account's `name` field is used to identify the service account to update.\n Format: serviceAccounts/{email}",- },- {- name: "updateMask",- type: "google.protobuf.FieldMask",- description:- "The list of fields to update.\n Supported fields: title, service_key (triggers key rotation)",- },- ],- description: "Request message for updating a service account.",- },- "bytebase.v1.UpdateSettingRequest": {- type: "object",- properties: [- {- name: "allowMissing",- type: "boolean",- },- {- name: "setting",- type: "bytebase.v1.Setting",- description: "The setting to update.",- },- {- name: "updateMask",- type: "google.protobuf.FieldMask",- },- {- name: "validateOnly",- type: "boolean",- description:- "validate_only is a flag to indicate whether to validate the setting value,\n server would not persist the setting value if it is true.",- },- ],- description: "The request message for updating or creating a setting.",- },- "bytebase.v1.UpdateUserRequest": {- type: "object",- properties: [- {- name: "allowMissing",- type: "boolean",- description:- "If set to true, and the user is not found, a new user will be created.\n In this situation, `update_mask` is ignored.",- },- {- name: "otpCode",- type: "string",- description:- "The otp_code is used to verify the user's identity by MFA.",- },- {- name: "regenerateRecoveryCodes",- type: "boolean",- description:- "The regenerate_recovery_codes flag means to regenerate recovery codes for user.",- },- {- name: "regenerateTempMfaSecret",- type: "boolean",- description:- "The regenerate_temp_mfa_secret flag means to regenerate temporary MFA secret for user.\n This is used for MFA setup. The temporary MFA secret and recovery codes will be returned in the response.",- },- {- name: "updateMask",- type: "google.protobuf.FieldMask",- description: "The list of fields to update.",- },- {- name: "user",- type: "bytebase.v1.User",- description:- "The user to update.\n\n The user's `name` field is used to identify the user to update.\n Format: users/{email}",- },- ],- description: "",- },- "bytebase.v1.UpdateWebhookRequest": {- type: "object",- properties: [- {- name: "allowMissing",- type: "boolean",- description:- "If set to true, and the webhook is not found, a new webhook will be created.\n In this situation, `update_mask` is ignored.",- },- {- name: "updateMask",- type: "google.protobuf.FieldMask",- description: "The list of fields to update.",- },- {- name: "webhook",- type: "bytebase.v1.Webhook",- description: "The webhook to modify.",- },- ],- description: "",- },- "bytebase.v1.UpdateWorkloadIdentityRequest": {- type: "object",- properties: [- {- name: "updateMask",- type: "google.protobuf.FieldMask",- description:- "The list of fields to update.\n Supported fields: title, workload_identity_config",- },- {- name: "workloadIdentity",- type: "bytebase.v1.WorkloadIdentity",- description:- "The workload identity to update.\n\n The workload identity's `name` field is used to identify the workload identity to update.\n Format: workloadIdentities/{email}",- },- ],- description: "Request message for updating a workload identity.",- },- "bytebase.v1.UpdateWorksheetOrganizerRequest": {- type: "object",- properties: [- {- name: "allowMissing",- type: "boolean",- description:- "If set to true, and the worksheet organizer is not found, a new worksheet organizer will be created.\n In this situation, `update_mask` is ignored.",- },- {- name: "organizer",- type: "bytebase.v1.WorksheetOrganizer",- description:- "The organizer to update.\n\n The organizer's `worksheet` field is used to identify the worksheet.\n Format: projects/{project}/worksheets/{worksheet}",- },- {- name: "updateMask",- type: "google.protobuf.FieldMask",- description:- "The list of fields to be updated.\n Fields are specified relative to the worksheet organizer.\n Only support update the following fields for now:\n - `starred`",- },- ],- description: "",- },- "bytebase.v1.UpdateWorksheetRequest": {- type: "object",- properties: [- {- name: "updateMask",- type: "google.protobuf.FieldMask",- description:- "The list of fields to be updated.\n Fields are specified relative to the worksheet.\n (e.g., `title`, `statement`; *not* `worksheet.title` or `worksheet.statement`)\n Only support update the following fields for now:\n - `title`\n - `statement`\n - `starred`\n - `visibility`",- },- {- name: "worksheet",- type: "bytebase.v1.Worksheet",- description:- "The worksheet to update.\n\n The worksheet's `name` field is used to identify the worksheet to update.\n Format: projects/{project}/worksheets/{worksheet}",- },- ],- description: "",- },- "bytebase.v1.UpdateWorkspaceRequest": {- type: "object",- properties: [- {- name: "updateMask",- type: "google.protobuf.FieldMask",- },- {- name: "workspace",- type: "bytebase.v1.Workspace",- },- ],- description: "",- },- "bytebase.v1.UploadLicenseRequest": {- type: "object",- properties: [- {- name: "license",- type: "string",- },- ],- description: "",- },- "bytebase.v1.User": {- type: "object",- properties: [- {- name: "email",- type: "string",- description:- "The email address of the user, used for login and notifications.",- },- {- name: "groups",- type: "array<string>",- description: "The groups for the user.\n Format: groups/{email}",- items: {- name: "item",- type: "string",- },- },- {- name: "mfaEnabled",- type: "boolean",- description: "The mfa_enabled flag means if the user has enabled MFA.",- },- {- name: "name",- type: "string",- description: "The name of the user.\n Format: users/{email}",- },- {- name: "password",- type: "string",- description:- "The password for authentication. Only used during user creation or password updates.",- },- {- name: "phone",- type: "string",- description:- "Should be a valid E.164 compliant phone number.\n Could be empty.",- },- {- name: "profile",- type: "bytebase.v1.User.Profile",- description: "User profile metadata.",- },- {- name: "serviceKey",- type: "string",- description: "The service key for service account authentication.",- },- {- name: "state",- type: "bytebase.v1.State",- description: "The lifecycle state of the user account.",- },- {- name: "tempOtpSecret",- type: "string",- description:- "Temporary OTP secret used during MFA setup and regeneration.",- },- {- name: "tempOtpSecretCreatedTime",- type: "google.protobuf.Timestamp",- description:- "Timestamp when temp_otp_secret was created. Used by frontend to show countdown timer.",- },- {- name: "tempRecoveryCodes",- type: "array<string>",- description:- "Temporary recovery codes used during MFA setup and regeneration.",- items: {- name: "item",- type: "string",- },- },- {- name: "title",- type: "string",- description: "The display title or full name of the user.",- },- {- name: "workspace",- type: "string",- description: "The current workspace.\n Format: workspaces/{id}",- },- ],- description: "",- },- "bytebase.v1.User.Profile": {- type: "object",- properties: [- {- name: "lastChangePasswordTime",- type: "google.protobuf.Timestamp",- description: "The last time the user changed their password.",- },- {- name: "lastLoginTime",- type: "google.protobuf.Timestamp",- description: "The last time the user successfully logged in.",- },- {- name: "source",- type: "string",- description:- "source means where the user comes from. For now we support Entra ID SCIM sync, so the source could be Entra ID.",- },- ],- description: "",- },- "bytebase.v1.VCSType": {- type: "enum",- values: [- "VCS_TYPE_UNSPECIFIED",- "GITHUB",- "GITLAB",- "BITBUCKET",- "AZURE_DEVOPS",- ],- description: "Version control system type.",- },- "bytebase.v1.VCSUser": {- type: "object",- properties: [- {- name: "displayName",- type: "string",- },- {- name: "userId",- type: "string",- },- {- name: "userName",- type: "string",- },- {- name: "vcsType",- type: "bytebase.v1.VCSType",- },- ],- description: "",- },- "bytebase.v1.VerifyCheckoutSessionRequest": {- type: "object",- properties: [- {- name: "sessionId",- type: "string",- },- ],- description: "",- },- "bytebase.v1.VerifyCheckoutSessionResponse": {- type: "object",- properties: [- {- name: "status",- type: "string",- description:- 'Stripe Checkout Session status: "complete", "expired", or "open".',- },- ],- description: "",- },- "bytebase.v1.ViewMetadata": {- type: "object",- properties: [- {- name: "columns",- type: "array<bytebase.v1.ColumnMetadata>",- description: "The columns is the ordered list of columns in a table.",- items: {- name: "item",- type: "bytebase.v1.ColumnMetadata",- },- },- {- name: "comment",- type: "string",- description: "The comment is the comment of a view.",- },- {- name: "definition",- type: "string",- description: "The definition is the definition of a view.",- },- {- name: "dependencyColumns",- type: "array<bytebase.v1.DependencyColumn>",- description:- "The dependency_columns is the list of dependency columns of a view.",- items: {- name: "item",- type: "bytebase.v1.DependencyColumn",- },- },- {- name: "name",- type: "string",- description: "The name is the name of a view.",- },- {- name: "skipDump",- type: "boolean",- },- {- name: "triggers",- type: "array<bytebase.v1.TriggerMetadata>",- description: "The triggers is the list of triggers in a view.",- items: {- name: "item",- type: "bytebase.v1.TriggerMetadata",- },- },- ],- description: "ViewMetadata is the metadata for views.",- },- "bytebase.v1.Webhook": {- type: "object",- properties: [- {- name: "directMessage",- type: "boolean",- description:- "if direct_message is set, the notification is sent directly\n to the persons and url will be ignored.\n IM integration setting should be set for this function to work.",- },- {- name: "name",- type: "string",- description:- "name is the name of the webhook, generated by the server.\n format: projects/{project}/webhooks/{webhook}",- },- {- name: "notificationTypes",- type: "array<bytebase.v1.Activity.Type>",- description:- "notification_types is the list of activities types that the webhook is interested in.\n Bytebase will only send notifications to the webhook if the activity type is in the list.\n It should not be empty, and should be a subset of the following:\n - ISSUE_CREATED\n - ISSUE_APPROVAL_REQUESTED\n - ISSUE_SENT_BACK\n - ISSUE_APPROVED\n - PIPELINE_FAILED\n - PIPELINE_COMPLETED",- items: {- name: "item",- type: "bytebase.v1.Activity.Type",- },- },- {- name: "title",- type: "string",- description: "title is the title of the webhook.",- },- {- name: "type",- type: "bytebase.v1.WebhookType",- description:- "Webhook integration type.\n type is the type of the webhook.",- },- {- name: "url",- type: "string",- description:- "url is the url of the webhook, should be unique within the project.",- },- ],- description: "",- },- "bytebase.v1.WebhookType": {- type: "enum",- values: [- "WEBHOOK_TYPE_UNSPECIFIED",- "SLACK",- "DISCORD",- "TEAMS",- "DINGTALK",- "FEISHU",- "WECOM",- "LARK",- "GOOGLE_CHAT",- ],- description: "Webhook integration type.",- },- "bytebase.v1.WorkloadIdentity": {- type: "object",- properties: [- {- name: "createTime",- type: "google.protobuf.Timestamp",- description: "The timestamp when the workload identity was created.",- },- {- name: "email",- type: "string",- description:- "The email of the workload identity.\n For workspace-level: {name}@workload.bytebase.com\n For project-level: {name}@{project-id}.workload.bytebase.com",- },- {- name: "name",- type: "string",- description:- "The name of the workload identity.\n Format: workloadIdentities/{email}",- },- {- name: "state",- type: "bytebase.v1.State",- description: "The state of the workload identity.",- },- {- name: "title",- type: "string",- description: "The display title of the workload identity.",- },- {- name: "workloadIdentityConfig",- type: "bytebase.v1.WorkloadIdentityConfig",- description:- "The workload identity configuration for OIDC token validation.",- },- ],- description:- "WorkloadIdentity represents an external CI/CD workload identity.",- },- "bytebase.v1.WorkloadIdentityConfig": {- type: "object",- properties: [- {- name: "allowedAudiences",- type: "array<string>",- description: "Allowed audiences for token validation",- items: {- name: "item",- type: "string",- },- },- {- name: "issuerUrl",- type: "string",- description:- "OIDC Issuer URL (auto-filled based on provider_type, can be overridden)",- },- {- name: "providerType",- type: "bytebase.v1.WorkloadIdentityConfig.ProviderType",- description: "Platform type (currently only GITHUB is supported)",- },- {- name: "subjectPattern",- type: "string",- description:- 'Subject pattern to match (e.g., "repo:owner/repo:ref:refs/heads/main")',- },- ],- description: "WorkloadIdentityConfig for API layer",- },- "bytebase.v1.WorkloadIdentityConfig.ProviderType": {- type: "enum",- values: ["PROVIDER_TYPE_UNSPECIFIED", "GITHUB", "GITLAB"],- description: "ProviderType identifies the CI/CD platform.",- },- "bytebase.v1.Worksheet": {- type: "object",- properties: [- {- name: "content",- type: "string",- format: "byte",- description:- "The content of the worksheet.\n By default, it will be cut off in SearchWorksheet() method. If it doesn't match the `content_size`, you can\n use GetWorksheet() request to retrieve the full content.",- },- {- name: "contentSize",- type: "integer",- format: "int64",- description:- "content_size is the full size of the content, may not match the size of the `content` field.",- },- {- name: "createTime",- type: "google.protobuf.Timestamp",- description: "The create time of the worksheet.",- },- {- name: "creator",- type: "string",- description: "The creator of the Worksheet.\n Format: users/{email}",- },- {- name: "database",- type: "string",- description:- "The database resource name.\n Format: instances/{instance}/databases/{database}\n If the database parent doesn't exist, the database field is empty.",- },- {- name: "folders",- type: "array<string>",- items: {- name: "item",- type: "string",- },- },- {- name: "name",- type: "string",- description:- "The name of the worksheet resource, generated by the server.\n Canonical parent is project.\n Format: projects/{project}/worksheets/{worksheet}",- },- {- name: "project",- type: "string",- description: "The project resource name.\n Format: projects/{project}",- },- {- name: "starred",- type: "boolean",- description:- "starred indicates whether the worksheet is starred by the current authenticated user.",- },- {- name: "title",- type: "string",- description: "The title of the worksheet.",- },- {- name: "updateTime",- type: "google.protobuf.Timestamp",- description: "The last update time of the worksheet.",- },- {- name: "visibility",- type: "bytebase.v1.Worksheet.Visibility",- },- ],- description: "",- },- "bytebase.v1.Worksheet.Visibility": {- type: "enum",- values: [- "VISIBILITY_UNSPECIFIED",- "PROJECT_READ",- "PROJECT_WRITE",- "PRIVATE",- ],- description: "",- },- "bytebase.v1.WorksheetOrganizer": {- type: "object",- properties: [- {- name: "folders",- type: "array<string>",- items: {- name: "item",- type: "string",- },- },- {- name: "starred",- type: "boolean",- description: "starred means if the worksheet is starred.",- },- {- name: "worksheet",- type: "string",- description:- "The name of the worksheet.\n Format: projects/{project}/worksheets/{worksheet}",- },- ],- description: "",- },- "bytebase.v1.Workspace": {- type: "object",- properties: [- {- name: "logo",- type: "string",- description: "The branding logo.",- },- {- name: "name",- type: "string",- description: "Format: workspaces/{workspace}",- },- {- name: "title",- type: "string",- },- ],- description: "",- },- "bytebase.v1.WorkspaceApprovalSetting": {- type: "object",- properties: [- {- name: "rules",- type: "array<bytebase.v1.WorkspaceApprovalSetting.Rule>",- items: {- name: "item",- type: "bytebase.v1.WorkspaceApprovalSetting.Rule",- },- },- ],- description: "",- },- "bytebase.v1.WorkspaceApprovalSetting.Rule": {- type: "object",- properties: [- {- name: "condition",- type: "google.type.Expr",- description:- 'The condition that is associated with the rule.\n The syntax and semantics of CEL are documented at https://github.com/google/cel-spec\n\n The `source` field filters which rules apply. The `condition` field then evaluates with full context.\n\n All supported variables:\n statement.affected_rows: affected row count in the DDL/DML, support "==", "!=", "<", "<=", ">", ">=" operations.\n statement.table_rows: table row count number, support "==", "!=", "<", "<=", ">", ">=" operations.\n resource.environment_id: the environment resource id, support "==", "!=", "in [xx]", "!(in [xx])" operations.\n resource.project_id: the project resource id, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.\n resource.db_engine: the database engine type, support "==", "!=", "in [xx]", "!(in [xx])" operations. Check the Engine enum for values.\n statement.sql_type: the SQL type, support "==", "!=", "in [xx]", "!(in [xx])" operations.\n resource.database_name: the database name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.\n resource.schema_name: the schema name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.\n resource.table_name: the table name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.\n statement.text: the SQL statement, support "contains()", "matches()", "startsWith()", "endsWith()" operations.\n request.expiration_days: the role expiration days for the request, support "==", "!=", "<", "<=", ">", ">=" operations.\n request.role: the request role full name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.\n\n When source is CHANGE_DATABASE, support: statement.*, resource.* (excluding request.*)\n When source is CREATE_DATABASE, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name\n When source is REQUEST_ROLE, support: resource.project_id, request.expiration_days, request.role\n When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name, resource.schema_name, resource.table_name, request.unmask, request.data_export\n\n For examples:\n resource.environment_id == "prod" && statement.affected_rows >= 100\n resource.table_name.matches("sensitive_.*") && resource.db_engine == "MYSQL"',- },- {- name: "source",- type: "bytebase.v1.WorkspaceApprovalSetting.Rule.Source",- },- {- name: "template",- type: "bytebase.v1.ApprovalTemplate",- },- ],- description: "",- },- "bytebase.v1.WorkspaceApprovalSetting.Rule.Source": {- type: "enum",- values: [- "SOURCE_UNSPECIFIED",- "CHANGE_DATABASE",- "CREATE_DATABASE",- "REQUEST_ROLE",- "REQUEST_ACCESS",- ],- description: "",- },- "bytebase.v1.WorkspaceProfileSetting": {- type: "object",- properties: [- {- name: "accessTokenDuration",- type: "google.protobuf.Duration",- description: "The duration for access token. Default is 1 hour.",- },- {- name: "allowEmailCodeSignin",- type: "boolean",- description:- "Allow signin/signup using email + a 6-digit one-time verification code.\n Requires the EMAIL setting to be configured on the workspace.",- },- {- name: "announcement",- type: "bytebase.v1.Announcement",- description: "The setting of custom announcement",- },- {- name: "databaseChangeMode",- type: "bytebase.v1.DatabaseChangeMode",- description: "The workspace database change mode.",- },- {- name: "directorySyncToken",- type: "string",- description: "The token for directory sync authentication.",- },- {- name: "disallowPasswordSignin",- type: "boolean",- description:- "Whether to disallow password signin. (Except workspace admins)",- },- {- name: "disallowSignup",- type: "boolean",- description:- "Disallow self-service signup, users can only be invited by the owner.",- },- {- name: "domains",- type: "array<string>",- description: "The workspace domain, e.g., bytebase.com.",- items: {- name: "item",- type: "string",- },- },- {- name: "enableAuditLogStdout",- type: "boolean",- description:- "Whether to enable audit logging to stdout in structured JSON format.\n Requires TEAM or ENTERPRISE license.",- },- {- name: "enableDebug",- type: "boolean",- description: "Whether debug mode is enabled.",- },- {- name: "enableMetricCollection",- type: "boolean",- description: "Whether to enable metric collection for the workspace.",- },- {- name: "enforceIdentityDomain",- type: "boolean",- description:- "Only user and group from the domains can be created and login.",- },- {- name: "externalUrl",- type: "string",- description:- "The external URL is used for sso authentication callback.",- },- {- name: "inactiveSessionTimeout",- type: "google.protobuf.Duration",- description:- "The session expiration time if not activity detected for the user. Value <= 0 means no limit.",- },- {- name: "maximumRequestExpiration",- type: "google.protobuf.Duration",- description: "The max expiration duration for data access requests.",- },- {- name: "maximumRoleExpiration",- type: "google.protobuf.Duration",- description:- "The max expiration duration for request role.\n Deprecated: use just-in-time access request flows instead.",- },- {- name: "passwordRestriction",- type: "bytebase.v1.WorkspaceProfileSetting.PasswordRestriction",- description: "Password restriction settings.",- },- {- name: "queryTimeout",- type: "google.protobuf.Duration",- description:- "The query timeout duration for query and export, works for the SQL Editor and Export Center.",- },- {- name: "refreshTokenDuration",- type: "google.protobuf.Duration",- description: "The duration for refresh token. Default is 7 days.",- },- {- name: "requireMfa",- type: "boolean",- description: "Require MFA for all users.",- },- {- name: "sqlEditorCustomTheme",- type: "bytebase.v1.SQLEditorThemeSetting",- description:- "The enforced CUSTOM theme's full definition — present ONLY when\n sql_editor_theme_id is a custom uuid. tokens is always complete.",- },- {- name: "sqlEditorThemeId",- type: "string",- description:- "Enforced SQL Editor theme id: OPAQUE — a frontend-resolved built-in preset id\n OR a custom theme's uuid. Empty ⇒ default light.",- },- {- name: "sqlResultSize",- type: "integer",- format: "int64",- description:- "The maximum result size limit in bytes for query and export, works for the SQL Editor and Export Center.\n The default value is 100MB, we will use the default value if the setting not exists, or the limit <= 0.",- },- {- name: "watermark",- type: "boolean",- description:- "Whether to display watermark on pages.\n Requires ENTERPRISE license.",- },- ],- description: "",- },- "bytebase.v1.WorkspaceProfileSetting.PasswordRestriction": {- type: "object",- properties: [- {- name: "minLength",- type: "integer",- format: "int32",- description:- "min_length is the minimum length for password, should no less than 8.",- },- {- name: "passwordRotation",- type: "google.protobuf.Duration",- description:- "password_rotation requires users to reset their password after the duration.",- },- {- name: "requireLetter",- type: "boolean",- description:- "require_letter requires the password must contains at least one letter, regardless of upper case or lower case",- },- {- name: "requireNumber",- type: "boolean",- description:- "require_number requires the password must contains at least one number.",- },- {- name: "requireResetPasswordForFirstLogin",- type: "boolean",- description:- "require_reset_password_for_first_login requires users to reset their password after the 1st login.",- },- {- name: "requireSpecialCharacter",- type: "boolean",- description:- "require_special_character requires the password must contains at least one special character.",- },- {- name: "requireUppercaseLetter",- type: "boolean",- description:- "require_uppercase_letter requires the password must contains at least one upper case letter.",- },- ],- description: "",- },- "connect-protocol-version": {- type: "enum",- values: [1],- description: "Define the version of the Connect protocol",- },- "connect.error": {- type: "object",- properties: [- {- name: "code",- type: "string",- description:- "The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].",- },- {- name: "details",- type: "array<connect.error_details.Any>",- description:- "A list of messages that carry the error details. There is no limit on the number of messages.",- items: {- name: "item",- type: "connect.error_details.Any",- },- },- {- name: "message",- type: "string",- description:- "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.",- },- ],- description:- "Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation",- },- "connect.error_details.Any": {- type: "object",- properties: [- {- name: "debug",- type: "object",- description: "Detailed error information.",- },- {- name: "type",- type: "string",- description:- "A URL that acts as a globally unique identifier for the type of the serialized message. For example: `type.googleapis.com/google.rpc.ErrorInfo`. This is used to determine the schema of the data in the `value` field and is the discriminator for the `debug` field.",- },- {- name: "value",- type: "string",- format: "binary",- description:- "The Protobuf message, serialized as bytes and base64-encoded. The specific message type is identified by the `type` field.",- },- ],- description:- "Contains an arbitrary serialized message along with a @type that describes the type of the serialized message, with an additional debug field for ConnectRPC error details.",- },- "google.api.HttpBody": {- type: "object",- properties: [- {- name: "contentType",- type: "string",- description:- "The HTTP Content-Type header value specifying the content type of the body.",- },- {- name: "data",- type: "string",- format: "byte",- description: "The HTTP request/response body as raw binary.",- },- {- name: "extensions",- type: "array<google.protobuf.Any>",- description:- "Application specific response metadata. Must be set in the first response\n for streaming APIs.",- items: {- name: "item",- type: "google.protobuf.Any",- },- },- ],- description:- "Message that represents an arbitrary HTTP body. It should only be used for\n payload formats that can't be represented as JSON, such as raw binary or\n an HTML page.\n\n\n This message can be used both in streaming and non-streaming API methods in\n the request as well as the response.\n\n It can be used as a top-level request field, which is convenient if one\n wants to extract parameters from either the URL or HTTP template into the\n request fields and also want access to the raw HTTP body.\n\n Example:\n\n message GetResourceRequest {\n // A unique request id.\n string request_id = 1;\n\n // The raw HTTP body is bound to this field.\n google.api.HttpBody http_body = 2;\n\n }\n\n service ResourceService {\n rpc GetResource(GetResourceRequest)\n returns (google.api.HttpBody);\n rpc UpdateResource(google.api.HttpBody)\n returns (google.protobuf.Empty);\n\n }\n\n Example with streaming methods:\n\n service CaldavService {\n rpc GetCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n rpc UpdateCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n\n }\n\n Use of this type only changes how the request and response bodies are\n handled, all other features will continue to work unchanged.",- },- "google.api.expr.v1alpha1.Constant": {- type: "object",- properties: [- {- name: "boolValue",- type: "boolean",- description: "boolean value.",- },- {- name: "bytesValue",- type: "string",- format: "byte",- description: "bytes value.",- },- {- name: "doubleValue",- type: "number",- format: "double",- description: "double value.",- },- {- name: "durationValue",- type: "google.protobuf.Duration",- description:- "protobuf.Duration value.\n\n Deprecated: duration is no longer considered a builtin cel type.",- },- {- name: "int64Value",- type: "integer",- format: "int64",- description: "int64 value.",- },- {- name: "nullValue",- type: "google.protobuf.NullValue",- description: "null value.",- },- {- name: "stringValue",- type: "string",- description: "string value.",- },- {- name: "timestampValue",- type: "google.protobuf.Timestamp",- description:- "protobuf.Timestamp value.\n\n Deprecated: timestamp is no longer considered a builtin cel type.",- },- {- name: "uint64Value",- type: "integer",- format: "int64",- description: "uint64 value.",- },- ],- description:- "Represents a primitive literal.\n\n Named 'Constant' here for backwards compatibility.\n\n This is similar as the primitives supported in the well-known type\n `google.protobuf.Value`, but richer so it can represent CEL's full range of\n primitives.\n\n Lists and structs are not included as constants as these aggregate types may\n contain [Expr][google.api.expr.v1alpha1.Expr] elements which require\n evaluation and are thus not constant.\n\n Examples of literals include: `\"hello\"`, `b'bytes'`, `1u`, `4.2`, `-2`,\n `true`, `null`.",- },- "google.api.expr.v1alpha1.Expr": {- type: "object",- properties: [- {- name: "callExpr",- type: "google.api.expr.v1alpha1.Expr.Call",- description:- "A call expression, including calls to predefined functions and operators.",- },- {- name: "comprehensionExpr",- type: "google.api.expr.v1alpha1.Expr.Comprehension",- description: "A comprehension expression.",- },- {- name: "constExpr",- type: "google.api.expr.v1alpha1.Constant",- description: "A literal expression.",- },- {- name: "id",- type: "integer",- format: "int64",- description:- "Required. An id assigned to this node by the parser which is unique in a\n given expression tree. This is used to associate type information and other\n attributes to a node in the parse tree.",- },- {- name: "identExpr",- type: "google.api.expr.v1alpha1.Expr.Ident",- description: "An identifier expression.",- },- {- name: "listExpr",- type: "google.api.expr.v1alpha1.Expr.CreateList",- description: "A list creation expression.",- },- {- name: "selectExpr",- type: "google.api.expr.v1alpha1.Expr.Select",- description: "A field selection expression, e.g. `request.auth`.",- },- {- name: "structExpr",- type: "google.api.expr.v1alpha1.Expr.CreateStruct",- description: "A map or message creation expression.",- },- ],- description:- "An abstract representation of a common expression.\n\n Expressions are abstractly represented as a collection of identifiers,\n select statements, function calls, literals, and comprehensions. All\n operators with the exception of the '.' operator are modelled as function\n calls. This makes it easy to represent new operators into the existing AST.\n\n All references within expressions must resolve to a\n [Decl][google.api.expr.v1alpha1.Decl] provided at type-check for an\n expression to be valid. A reference may either be a bare identifier `name` or\n a qualified identifier `google.api.name`. References may either refer to a\n value or a function declaration.\n\n For example, the expression `google.api.name.startsWith('expr')` references\n the declaration `google.api.name` within a\n [Expr.Select][google.api.expr.v1alpha1.Expr.Select] expression, and the\n function declaration `startsWith`.",- },- "google.api.expr.v1alpha1.Expr.Call": {- type: "object",- properties: [- {- name: "args",- type: "array<google.api.expr.v1alpha1.Expr>",- description: "The arguments.",- items: {- name: "item",- type: "google.api.expr.v1alpha1.Expr",- },- },- {- name: "function",- type: "string",- description:- "Required. The name of the function or method being called.",- },- {- name: "target",- type: "google.api.expr.v1alpha1.Expr",- description:- "The target of an method call-style expression. For example, `x` in\n `x.f()`.",- },- ],- description:- "A call expression, including calls to predefined functions and operators.\n\n For example, `value == 10`, `size(map_value)`.",- },- "google.api.expr.v1alpha1.Expr.Comprehension": {- type: "object",- properties: [- {- name: "accuInit",- type: "google.api.expr.v1alpha1.Expr",- description: "The initial value of the accumulator.",- },- {- name: "accuVar",- type: "string",- description:- "The name of the variable used for accumulation of the result.",- },- {- name: "iterRange",- type: "google.api.expr.v1alpha1.Expr",- description: "The range over which the comprehension iterates.",- },- {- name: "iterVar",- type: "string",- description:- "The name of the first iteration variable.\n When the iter_range is a list, this variable is the list element.\n When the iter_range is a map, this variable is the map entry key.",- },- {- name: "iterVar2",- type: "string",- description:- "The name of the second iteration variable, empty if not set.\n When the iter_range is a list, this variable is the integer index.\n When the iter_range is a map, this variable is the map entry value.\n This field is only set for comprehension v2 macros.",- },- {- name: "loopCondition",- type: "google.api.expr.v1alpha1.Expr",- description:- "An expression which can contain iter_var, iter_var2, and accu_var.\n\n Returns false when the result has been computed and may be used as\n a hint to short-circuit the remainder of the comprehension.",- },- {- name: "loopStep",- type: "google.api.expr.v1alpha1.Expr",- description:- "An expression which can contain iter_var, iter_var2, and accu_var.\n\n Computes the next value of accu_var.",- },- {- name: "result",- type: "google.api.expr.v1alpha1.Expr",- description:- "An expression which can contain accu_var.\n\n Computes the result.",- },- ],- description:- "A comprehension expression applied to a list or map.\n\n Comprehensions are not part of the core syntax, but enabled with macros.\n A macro matches a specific call signature within a parsed AST and replaces\n the call with an alternate AST block. Macro expansion happens at parse\n time.\n\n The following macros are supported within CEL:\n\n Aggregate type macros may be applied to all elements in a list or all keys\n in a map:\n\n * `all`, `exists`, `exists_one` - test a predicate expression against\n the inputs and return `true` if the predicate is satisfied for all,\n any, or only one value `list.all(x, x < 10)`.\n * `filter` - test a predicate expression against the inputs and return\n the subset of elements which satisfy the predicate:\n `payments.filter(p, p > 1000)`.\n * `map` - apply an expression to all elements in the input and return the\n output aggregate type: `[1, 2, 3].map(i, i * i)`.\n\n The `has(m.x)` macro tests whether the property `x` is present in struct\n `m`. The semantics of this macro depend on the type of `m`. For proto2\n messages `has(m.x)` is defined as 'defined, but not set`. For proto3, the\n macro tests whether the property is set to its default. For map and struct\n types, the macro tests whether the property `x` is defined on `m`.\n\n Comprehensions for the standard environment macros evaluation can be best\n visualized as the following pseudocode:\n\n ```\n let `accu_var` = `accu_init`\n for (let `iter_var` in `iter_range`) {\n if (!`loop_condition`) {\n break\n }\n `accu_var` = `loop_step`\n }\n return `result`\n ```\n\n Comprehensions for the optional V2 macros which support map-to-map\n translation differ slightly from the standard environment macros in that\n they expose both the key or index in addition to the value for each list\n or map entry:\n\n ```\n let `accu_var` = `accu_init`\n for (let `iter_var`, `iter_var2` in `iter_range`) {\n if (!`loop_condition`) {\n break\n }\n `accu_var` = `loop_step`\n }\n return `result`\n ```",- },- "google.api.expr.v1alpha1.Expr.CreateList": {- type: "object",- properties: [- {- name: "elements",- type: "array<google.api.expr.v1alpha1.Expr>",- description: "The elements part of the list.",- items: {- name: "item",- type: "google.api.expr.v1alpha1.Expr",- },- },- {- name: "optionalIndices",- type: "array<integer>",- description:- "The indices within the elements list which are marked as optional\n elements.\n\n When an optional-typed value is present, the value it contains\n is included in the list. If the optional-typed value is absent, the list\n element is omitted from the CreateList result.",- items: {- name: "item",- type: "integer",- format: "int32",- },- },- ],- description:- "A list creation expression.\n\n Lists may either be homogenous, e.g. `[1, 2, 3]`, or heterogeneous, e.g.\n `dyn([1, 'hello', 2.0])`",- },- "google.api.expr.v1alpha1.Expr.CreateStruct": {- type: "object",- properties: [- {- name: "entries",- type: "array<google.api.expr.v1alpha1.Expr.CreateStruct.Entry>",- description: "The entries in the creation expression.",- items: {- name: "item",- type: "google.api.expr.v1alpha1.Expr.CreateStruct.Entry",- },- },- {- name: "messageName",- type: "string",- description:- "The type name of the message to be created, empty when creating map\n literals.",- },- ],- description:- "A map or message creation expression.\n\n Maps are constructed as `{'key_name': 'value'}`. Message construction is\n similar, but prefixed with a type name and composed of field ids:\n `types.MyType{field_id: 'value'}`.",- },- "google.api.expr.v1alpha1.Expr.CreateStruct.Entry": {- type: "object",- properties: [- {- name: "fieldKey",- type: "string",- description: "The field key for a message creator statement.",- },- {- name: "id",- type: "integer",- format: "int64",- description:- "Required. An id assigned to this node by the parser which is unique\n in a given expression tree. This is used to associate type\n information and other attributes to the node.",- },- {- name: "mapKey",- type: "google.api.expr.v1alpha1.Expr",- description: "The key expression for a map creation statement.",- },- {- name: "optionalEntry",- type: "boolean",- description: "Whether the key-value pair is optional.",- },- {- name: "value",- type: "google.api.expr.v1alpha1.Expr",- description:- "Required. The value assigned to the key.\n\n If the optional_entry field is true, the expression must resolve to an\n optional-typed value. If the optional value is present, the key will be\n set; however, if the optional value is absent, the key will be unset.",- },- ],- description: "Represents an entry.",- },- "google.api.expr.v1alpha1.Expr.Ident": {- type: "object",- properties: [- {- name: "name",- type: "string",- description:- "Required. Holds a single, unqualified identifier, possibly preceded by a\n '.'.\n\n Qualified names are represented by the\n [Expr.Select][google.api.expr.v1alpha1.Expr.Select] expression.",- },- ],- description: "An identifier expression. e.g. `request`.",- },- "google.api.expr.v1alpha1.Expr.Select": {- type: "object",- properties: [- {- name: "field",- type: "string",- description:- "Required. The name of the field to select.\n\n For example, in the select expression `request.auth`, the `auth` portion\n of the expression would be the `field`.",- },- {- name: "operand",- type: "google.api.expr.v1alpha1.Expr",- description:- "Required. The target of the selection expression.\n\n For example, in the select expression `request.auth`, the `request`\n portion of the expression is the `operand`.",- },- {- name: "testOnly",- type: "boolean",- description:- "Whether the select is to be interpreted as a field presence test.\n\n This results from the macro `has(request.auth)`.",- },- ],- description: "A field selection expression. e.g. `request.auth`.",- },- "google.protobuf.Any": {- type: "object",- properties: [- {- name: "type",- type: "string",- },- {- name: "value",- type: "string",- format: "binary",- },- ],- description:- "Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.",- },- "google.protobuf.ListValue": {- type: "object",- properties: [- {- name: "values",- type: "array<google.protobuf.Value>",- description: "Repeated field of dynamically typed values.",- items: {- name: "item",- type: "google.protobuf.Value",- },- },- ],- description:- "`ListValue` is a wrapper around a repeated field of values.\n\n The JSON representation for `ListValue` is JSON array.",- },- "google.protobuf.NullValue": {- type: "enum",- values: ["NULL_VALUE"],- description:- "`NullValue` is a singleton enumeration to represent the null value for the\n `Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.",- },- "google.protobuf.Struct.FieldsEntry": {- type: "object",- properties: [- {- name: "key",- type: "string",- },- {- name: "value",- type: "google.protobuf.Value",- },- ],- description: "",- },- "google.rpc.Status": {- type: "object",- properties: [- {- name: "code",- type: "integer",- format: "int32",- description:- "The status code, which should be an enum value of\n [google.rpc.Code][google.rpc.Code].",- },- {- name: "details",- type: "array<google.protobuf.Any>",- description:- "A list of messages that carry the error details. There is a common set of\n message types for APIs to use.",- items: {- name: "item",- type: "google.protobuf.Any",- },- },- {- name: "message",- type: "string",- description:- "A developer-facing error message, which should be in English. Any\n user-facing error message should be localized and sent in the\n [google.rpc.Status.details][google.rpc.Status.details] field, or localized\n by the client.",- },- ],- description:- "The `Status` type defines a logical error model that is suitable for\n different programming environments, including REST APIs and RPC APIs. It is\n used by [gRPC](https://github.com/grpc). Each `Status` message contains\n three pieces of data: error code, error message, and error details.\n\n You can find out more about this error model and how to work with it in the\n [API Design Guide](https://cloud.google.com/apis/design/errors).",- },- "google.type.Color": {- type: "object",- properties: [- {- name: "alpha",- type: "google.protobuf.FloatValue",- description:- "The fraction of this color that should be applied to the pixel. That is,\n the final pixel color is defined by the equation:\n\n `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)`\n\n This means that a value of 1.0 corresponds to a solid color, whereas\n a value of 0.0 corresponds to a completely transparent color. This\n uses a wrapper message rather than a simple float scalar so that it is\n possible to distinguish between a default value and the value being unset.\n If omitted, this color object is rendered as a solid color\n (as if the alpha value had been explicitly given a value of 1.0).",- },- {- name: "blue",- type: "number",- format: "float",- description:- "The amount of blue in the color as a value in the interval [0, 1].",- },- {- name: "green",- type: "number",- format: "float",- description:- "The amount of green in the color as a value in the interval [0, 1].",- },- {- name: "red",- type: "number",- format: "float",- description:- "The amount of red in the color as a value in the interval [0, 1].",- },- ],- description:- "Represents a color in the RGBA color space. This representation is designed\n for simplicity of conversion to/from color representations in various\n languages over compactness. For example, the fields of this representation\n can be trivially provided to the constructor of `java.awt.Color` in Java; it\n can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`\n method in iOS; and, with just a little work, it can be easily formatted into\n a CSS `rgba()` string in JavaScript.\n\n This reference page doesn't carry information about the absolute color\n space\n that should be used to interpret the RGB value (e.g. sRGB, Adobe RGB,\n DCI-P3, BT.2020, etc.). By default, applications should assume the sRGB color\n space.\n\n When color equality needs to be decided, implementations, unless\n documented otherwise, treat two colors as equal if all their red,\n green, blue, and alpha values each differ by at most 1e-5.\n\n Example (Java):\n\n import com.google.type.Color;\n\n // ...\n public static java.awt.Color fromProto(Color protocolor) {\n float alpha = protocolor.hasAlpha()\n ? protocolor.getAlpha().getValue()\n : 1.0;\n\n return new java.awt.Color(\n protocolor.getRed(),\n protocolor.getGreen(),\n protocolor.getBlue(),\n alpha);\n }\n\n public static Color toProto(java.awt.Color color) {\n float red = (float) color.getRed();\n float green = (float) color.getGreen();\n float blue = (float) color.getBlue();\n float denominator = 255.0;\n Color.Builder resultBuilder =\n Color\n .newBuilder()\n .setRed(red / denominator)\n .setGreen(green / denominator)\n .setBlue(blue / denominator);\n int alpha = color.getAlpha();\n if (alpha != 255) {\n result.setAlpha(\n FloatValue\n .newBuilder()\n .setValue(((float) alpha) / denominator)\n .build());\n }\n return resultBuilder.build();\n }\n // ...\n\n Example (iOS / Obj-C):\n\n // ...\n static UIColor* fromProto(Color* protocolor) {\n float red = [protocolor red];\n float green = [protocolor green];\n float blue = [protocolor blue];\n FloatValue* alpha_wrapper = [protocolor alpha];\n float alpha = 1.0;\n if (alpha_wrapper != nil) {\n alpha = [alpha_wrapper value];\n }\n return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];\n }\n\n static Color* toProto(UIColor* color) {\n CGFloat red, green, blue, alpha;\n if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {\n return nil;\n }\n Color* result = [[Color alloc] init];\n [result setRed:red];\n [result setGreen:green];\n [result setBlue:blue];\n if (alpha <= 0.9999) {\n [result setAlpha:floatWrapperWithValue(alpha)];\n }\n [result autorelease];\n return result;\n }\n // ...\n\n Example (JavaScript):\n\n // ...\n\n var protoToCssColor = function(rgb_color) {\n var redFrac = rgb_color.red || 0.0;\n var greenFrac = rgb_color.green || 0.0;\n var blueFrac = rgb_color.blue || 0.0;\n var red = Math.floor(redFrac * 255);\n var green = Math.floor(greenFrac * 255);\n var blue = Math.floor(blueFrac * 255);\n\n if (!('alpha' in rgb_color)) {\n return rgbToCssColor(red, green, blue);\n }\n\n var alphaFrac = rgb_color.alpha.value || 0.0;\n var rgbParams = [red, green, blue].join(',');\n return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');\n };\n\n var rgbToCssColor = function(red, green, blue) {\n var rgbNumber = new Number((red << 16) | (green << 8) | blue);\n var hexString = rgbNumber.toString(16);\n var missingZeros = 6 - hexString.length;\n var resultBuilder = ['#'];\n for (var i = 0; i < missingZeros; i++) {\n resultBuilder.push('0');\n }\n resultBuilder.push(hexString);\n return resultBuilder.join('');\n };\n\n // ...",- },- "google.type.Expr": {- type: "object",- properties: [- {- name: "description",- type: "string",- description:- "Optional. Description of the expression. This is a longer text which\n describes the expression, e.g. when hovered over it in a UI.",- },- {- name: "expression",- type: "string",- description:- "Textual representation of an expression in Common Expression Language\n syntax.",- },- {- name: "location",- type: "string",- description:- "Optional. String indicating the location of the expression for error\n reporting, e.g. a file name and a position in the file.",- },- {- name: "title",- type: "string",- description:- "Optional. Title for the expression, i.e. a short string describing\n its purpose. This can be used e.g. in UIs which allow to enter the\n expression.",- },- ],- description:- 'Represents a textual expression in the Common Expression Language (CEL)\n syntax. CEL is a C-like expression language. The syntax and semantics of CEL\n are documented at https://github.com/google/cel-spec.\n\n Example (Comparison):\n\n title: "Summary size limit"\n description: "Determines if a summary is less than 100 chars"\n expression: "document.summary.size() < 100"\n\n Example (Equality):\n\n title: "Requestor is owner"\n description: "Determines if requestor is the document owner"\n expression: "document.owner == request.auth.claims.email"\n\n Example (Logic):\n\n title: "Public documents"\n description: "Determine whether the document should be publicly visible"\n expression: "document.type != \'private\' && document.type != \'internal\'"\n\n Example (Data Manipulation):\n\n title: "Notification string"\n description: "Create a notification string with a timestamp."\n expression: "\'New message received at \' + string(document.create_time)"\n\n The exact variables and functions that may be referenced within an expression\n are determined by the service that evaluates it. See the service\n documentation for additional information.',- },-};diff --git a/frontend/src/react/app/ReactApp.tsx b/frontend/src/react/app/ReactApp.tsxdeleted file mode 100644index f1be4f0272..0000000000--- a/frontend/src/react/app/ReactApp.tsx+++ /dev/null@@ -1,15 +0,0 @@-import { Toaster } from "@/react/components/ui/toaster";-import { Watermark } from "@/react/components/Watermark";-import { AgentWindow } from "@/react/plugins/agent/components/AgentWindow";-import { SessionExpiredSurfaceGate } from "./SessionExpiredSurfaceGate";--export function ReactApp() {- return (- <>- <Watermark />- <Toaster />- <AgentWindow />- <SessionExpiredSurfaceGate />- </>- );-}diff --git a/frontend/src/react/app/mount.ts b/frontend/src/react/app/mount.tsdeleted file mode 100644index 3e46f05798..0000000000--- a/frontend/src/react/app/mount.ts+++ /dev/null@@ -1,29 +0,0 @@-import { buildTree, loadCoreDeps, type ReactComponent } from "@/react/mount";--// Vite resolves the glob at build time and produces a lazy chunk.-const reactAppLoaders = import.meta.glob("./ReactApp.tsx");--async function loadReactApp(): Promise<ReactComponent> {- const loader = reactAppLoaders["./ReactApp.tsx"] as- | (() => Promise<Record<string, unknown>>)- | undefined;- if (!loader) {- throw new Error("mountReactApp: ReactApp loader not registered");- }- const mod = await loader();- return mod.ReactApp as ReactComponent;-}--export async function mountReactApp(selector: string) {- const container = document.querySelector(selector);- if (!container) {- throw new Error(`mountReactApp: missing container ${selector}`);- }-- const [deps, ReactApp] = await Promise.all([loadCoreDeps(), loadReactApp()]);-- const root = deps.createRoot(container);- root.render(buildTree(deps, ReactApp));-- return root;-}diff --git a/frontend/src/react/components/sql-editor/SchemaPane.tsx b/frontend/src/react/components/sql-editor/SchemaPane.tsxdeleted file mode 100644index 5af30868d3..0000000000--- a/frontend/src/react/components/sql-editor/SchemaPane.tsx+++ /dev/null@@ -1,10 +0,0 @@-/**- * Top-level mount-shim for the SchemaPane subtree. The mount registry- * (`src/react/mount.ts`) discovers React pages via a non-recursive glob- * (`./components/sql-editor/*.tsx`); the subtree itself lives one level- * deeper at `./SchemaPane/SchemaPane.tsx` so its helpers (TreeNode/,- * HoverPanel/, schemaTree.ts, …) co-locate. Re-exporting here keeps the- * file structure clean and lets `<ReactPageMount page="SchemaPane" />`- * find the component.- */-export { SchemaPane } from "./SchemaPane/SchemaPane";diff --git a/frontend/src/react/pages/project/plan-detail/components/PlanTargetDisplay.tsx b/frontend/src/react/pages/project/plan-detail/components/PlanTargetDisplay.tsxdeleted file mode 100644index 161f78dd55..0000000000--- a/frontend/src/react/pages/project/plan-detail/components/PlanTargetDisplay.tsx+++ /dev/null@@ -1 +0,0 @@-export { DatabaseTargetDisplay as PlanTargetDisplay } from "@/react/components/DatabaseTargetDisplay";diff --git a/frontend/src/react/plugins/agent/AGENT.md b/frontend/src/react/plugins/agent/AGENT.mddeleted file mode 100644index 2d00b10f5e..0000000000--- a/frontend/src/react/plugins/agent/AGENT.md+++ /dev/null@@ -1,112 +0,0 @@-# Page Agent — Maintenance Guide--This document explains how the page agent works and how to maintain it. It is intended for both humans and LLMs.--## Architecture--```-frontend/src/plugins/agent/-├── components/ # Vue UI (AgentWindow, message rendering)-├── dom/ # DOM interaction layer-│ ├── actions.ts # Execute DOM actions (click, input, select, scroll)-│ └── domTree.ts # Extract interactive DOM elements and snapshot-local eN refs-├── logic/-│ ├── agentLoop.ts # Main agent loop: tool calls, retries, message history-│ ├── context.ts # Extract page context from Pinia stores-│ ├── prompt.ts # System prompt construction-│ ├── types.ts # Shared types-│ ├── skills/ # On-demand workflow guides-│ │ ├── index.ts # Skill registry and get_skill handler-│ │ ├── query.ts-│ │ ├── databaseChange.ts-│ │ └── grantPermission.ts-│ └── tools/ # Tool implementations-│ ├── index.ts # Tool definitions and executor dispatcher-│ ├── callApi.ts # Execute API endpoints-│ ├── searchApi.ts # API discovery with search + alias map-│ ├── navigate.ts # Router navigation + route listing-│ ├── pageState.ts # Page context (semantic or DOM)-│ ├── domAction.ts # DOM action wrapper-│ └── gen/ # Generated API discovery artifacts-│ └── openapi-index.ts # Generated API endpoint and schema index-└── store/ # Pinia store for agent state-```--## Tools Available to the Agent--| Tool | Purpose |-|------|---------|-| `search_api` | Discover API endpoints, browse services, get request/response schemas |-| `call_api` | Execute a Bytebase API endpoint |-| `navigate` | Navigate to a page or list available routes |-| `get_page_state` | Get current page context (route, stores, or DOM tree) |-| `dom_action` | Interact with DOM elements (click, input, select, read, scroll) |-| `get_skill` | Load step-by-step workflow guides for multi-step tasks |--## Tool Selection Philosophy--The agent chooses between DOM and API based on page context:-- **DOM-first** on form/preview/editor/creation pages — these have unsaved state that only exists in the UI-- **API-first** for data queries, bulk operations, or when the relevant page is not open-- **Either** for mutations on persisted resources — DOM if the user benefits from seeing it, API for speed--## Maintaining DOM Snapshot Refs--When updating prompt text, examples, or maintenance docs for the page agent DOM tools:--- Describe DOM elements with snapshot-local refs such as `[e1]`, not numeric indices.-- Use `dom_action(ref="e1", ...)` in examples.-- State clearly that refs come from the current `get_page_state(mode="dom")` snapshot and must be refreshed after the DOM changes or the page is re-read.-- Do not describe refs as durable IDs across snapshots, rerenders, or navigation.--## Maintaining the Service Directory--**What:** A compact, feature-grouped summary of API services. It is embedded directly in `logic/prompt.ts` so the agent can choose the right service quickly before using `search_api` for exact endpoint details.--**Where:** `logic/prompt.ts` (`serviceDirectory` constant)--**Source of truth:**-- The `serviceDirectory` string in `logic/prompt.ts` is a **checked-in, manually maintained** prompt aid.-- `openapi-index.ts` and `search_api` remain the actual API discovery source of truth.--**When to update:**-- After adding or removing an API service-- After major endpoint additions that materially change what a service covers-- When `pnpm --dir frontend run generate:openapi-index` warns about uncovered services-- When the page agent consistently picks the wrong service because the descriptions are stale or missing key synonyms--**How to update:**-1. Run `pnpm --dir frontend run generate:openapi-index`.-2. If the script warns about missing services, edit the `serviceDirectory` block in `logic/prompt.ts` manually.-3. Keep each service description to one line.-4. Use user-facing feature names and useful synonyms, not raw method lists.-5. Keep the category structure compact and stable; do not try to enumerate every endpoint.-6. Preserve the surrounding prompt structure and the `serviceDirectory` constant name.-7. Review the resulting prompt text and commit the file.--## Maintaining Search Hints--When users repeatedly search for a feature using terms that do not map cleanly to the right service, update the search heuristics in `logic/tools/searchApi.ts` so the agent can discover the relevant APIs more reliably.--## Maintaining Skills--**What:** Step-by-step workflow guides for multi-step tasks (e.g., running a query, creating a schema change).--**Where:** `logic/skills/`--**How to add a new skill:**-1. Create `logic/skills/mySkill.ts` exporting `{ name, description, content }`-2. Register it in `logic/skills/index.ts`-3. Update the `get_skill` tool description in `logic/tools/index.ts` to list the new skill--## Maintaining Route List--**What:** The `navigate` tool supports `list=true` which returns all valid route patterns from Vue Router at runtime. No maintenance needed — it reads directly from the router instance.--## Regenerating the OpenAPI Index--```bash-pnpm --dir frontend run generate:openapi-index-```--This reads `backend/api/mcp/gen/openapi.yaml` and produces `gen/openapi-index.ts` with all endpoint definitions and schemas. Run after proto changes that affect the API.diff --git a/frontend/src/react/react-env.d.ts b/frontend/src/react/react-env.d.tsdeleted file mode 100644index 051689e8f7..0000000000--- a/frontend/src/react/react-env.d.ts+++ /dev/null@@ -1,7 +0,0 @@-/// <reference types="vite/client" />--// Allow .yaml imports used by @/types-declare module "*.yaml" {- const content: unknown;- export default content;-}diff --git a/frontend/src/react/router/layoutPlaceholders.tsx b/frontend/src/react/router/layoutPlaceholders.tsxdeleted file mode 100644index 963cadd1a2..0000000000--- a/frontend/src/react/router/layoutPlaceholders.tsx+++ /dev/null@@ -1,15 +0,0 @@-// Route-shell placeholder for the react-router route table.-//-// The Vue route-shell components (`SettingRouteShell`, `ProjectRouteShell`,-// `InstanceRouteShell`, `IssuesRouteShell`) render an empty teleport target for-// the Vue ReactRouteShellBridge and require props supplied by that bridge; they-// do not render an `<Outlet/>` and so cannot host react-router children yet.-// Each shell-parent route uses this placeholder so its child leaf routes still-// render. A later phase replaces these with `<Outlet/>`-aware React shells that-// own breadcrumbs / permission guards / document title.-//-// (The Splash / Body / Dashboard layout placeholders that previously lived here-// have been replaced by the real layouts in `@/react/app/layouts/*`.)-import { Outlet } from "react-router";--export const RouteShellOutletPlaceholder = () => <Outlet />;diff --git a/frontend/src/react/shell-bridge.ts b/frontend/src/react/shell-bridge.tsdeleted file mode 100644index e32d0bf958..0000000000--- a/frontend/src/react/shell-bridge.ts+++ /dev/null@@ -1,27 +0,0 @@-export const ReactShellBridgeEvent = {- localeChange: "bb.react-locale-change",- quickstartReset: "bb.react-quickstart-reset",-} as const;--export const VueShellBridgeEvent = {- notification: "bb.vue-notification",-} as const;--export type ReactShellBridgeEventName =- (typeof ReactShellBridgeEvent)[keyof typeof ReactShellBridgeEvent];--export type ReactQuickstartResetDetail = {- keys: string[];-};--export function emitReactLocaleChange(lang: string) {- window.dispatchEvent(- new CustomEvent(ReactShellBridgeEvent.localeChange, { detail: lang })- );-}--export function emitReactQuickstartReset(detail: ReactQuickstartResetDetail) {- window.dispatchEvent(- new CustomEvent(ReactShellBridgeEvent.quickstartReset, { detail })- );-}diff --git a/frontend/src/react/pages/auth/MultiFactorPage.test.tsx b/frontend/src/routes/auth/MultiFactorPage.test.tsxsimilarity index 97%rename from frontend/src/react/pages/auth/MultiFactorPage.test.tsxrename to frontend/src/routes/auth/MultiFactorPage.test.tsxindex 71a9f4a0db..d3b8d15f37 100644--- a/frontend/src/react/pages/auth/MultiFactorPage.test.tsx+++ b/frontend/src/routes/auth/MultiFactorPage.test.tsx@@ -17,18 +17,18 @@ const mocks = vi.hoisted(() => ({}));mocks.useAuthStore.mockImplementation(() => ({ login: mocks.login }));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({useAuthStore: mocks.useAuthStore,}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: Object.assign(() => ({}), {getState: () => ({ login: mocks.login, workspaceResourceName: () => "" }),}),}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {currentRoute: mocks.currentRoute,},diff --git a/frontend/src/react/pages/auth/MultiFactorPage.tsx b/frontend/src/routes/auth/MultiFactorPage.tsxsimilarity index 92%rename from frontend/src/react/pages/auth/MultiFactorPage.tsxrename to frontend/src/routes/auth/MultiFactorPage.tsxindex d8989e078a..960bc4da1b 100644--- a/frontend/src/react/pages/auth/MultiFactorPage.tsx+++ b/frontend/src/routes/auth/MultiFactorPage.tsx@@ -2,13 +2,13 @@ import { create } from "@bufbuild/protobuf";import { KeyRound, Smartphone } from "lucide-react";import { useMemo, useState } from "react";import { useTranslation } from "react-i18next";+import { useCurrentRoute } from "@/app/router";import logoFull from "@/assets/logo-full.svg";-import { Button } from "@/react/components/ui/button";-import { Input } from "@/react/components/ui/input";-import { OtpInput } from "@/react/components/ui/otp-input";-import { resolveWorkspaceName } from "@/react/lib/workspace";-import { useCurrentRoute } from "@/react/router";-import { useAppStore } from "@/react/stores/app";+import { Button } from "@/components/ui/button";+import { Input } from "@/components/ui/input";+import { OtpInput } from "@/components/ui/otp-input";+import { resolveWorkspaceName } from "@/lib/workspace";+import { useAppStore } from "@/stores/app";import { LoginRequestSchema } from "@/types/proto-es/v1/auth_service_pb";type MFAType = "OTP" | "RECOVERY_CODE";diff --git a/frontend/src/react/pages/auth/OAuth2ConsentPage.test.tsx b/frontend/src/routes/auth/OAuth2ConsentPage.test.tsxsimilarity index 97%rename from frontend/src/react/pages/auth/OAuth2ConsentPage.test.tsxrename to frontend/src/routes/auth/OAuth2ConsentPage.test.tsxindex 5cfb2aa04f..ff26146b79 100644--- a/frontend/src/react/pages/auth/OAuth2ConsentPage.test.tsx+++ b/frontend/src/routes/auth/OAuth2ConsentPage.test.tsx@@ -63,15 +63,15 @@ mocks.useAppStore.mockImplementation((selector: (state: unknown) => unknown) =>loadServerInfo: vi.fn().mockResolvedValue(undefined),});-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useWorkspace: mocks.useWorkspace,}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: mocks.useAppStore,}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({useAuthStore: mocks.useAuthStore,}));@@ -79,7 +79,7 @@ vi.mock("@/store", () => ({// which makes click-through-portal flows fragile in jsdom. We swap in a native// <select> here so we can exercise the consent page's switch wiring directly.// The real Select component is covered by its own tests.-vi.mock("@/react/components/ui/select", () => ({+vi.mock("@/components/ui/select", () => ({Select: ({value,onValueChange,@@ -112,8 +112,8 @@ vi.mock("@/react/components/ui/select", () => ({),}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {replace: mocks.routerReplace,back: mocks.routerBack,@@ -121,7 +121,7 @@ vi.mock("@/react/router", async (importOriginal) => ({},}));-vi.mock("@/react/components/BytebaseLogo", () => ({+vi.mock("@/components/BytebaseLogo", () => ({BytebaseLogo: () => null,}));diff --git a/frontend/src/react/pages/auth/OAuth2ConsentPage.tsx b/frontend/src/routes/auth/OAuth2ConsentPage.tsxsimilarity index 96%rename from frontend/src/react/pages/auth/OAuth2ConsentPage.tsxrename to frontend/src/routes/auth/OAuth2ConsentPage.tsxindex 165b8d4d8b..79910efdce 100644--- a/frontend/src/react/pages/auth/OAuth2ConsentPage.tsx+++ b/frontend/src/routes/auth/OAuth2ConsentPage.tsx@@ -1,19 +1,19 @@import { Building2, Check, Loader2 } from "lucide-react";import { useEffect, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { BytebaseLogo } from "@/react/components/BytebaseLogo";-import { Button } from "@/react/components/ui/button";+import { router } from "@/app/router";+import { AUTH_SIGNIN_MODULE } from "@/app/router/handles";+import { BytebaseLogo } from "@/components/BytebaseLogo";+import { Button } from "@/components/ui/button";import {Select,SelectContent,SelectItem,SelectTrigger,SelectValue,-} from "@/react/components/ui/select";-import { useWorkspace } from "@/react/hooks/useAppState";-import { router } from "@/react/router";-import { AUTH_SIGNIN_MODULE } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";+} from "@/components/ui/select";+import { useWorkspace } from "@/hooks/useAppState";+import { useAppStore } from "@/stores/app";const AUTHORIZE_URL = "/api/oauth2/authorize";diff --git a/frontend/src/react/pages/auth/OAuthCallbackPage.test.tsx b/frontend/src/routes/auth/OAuthCallbackPage.test.tsxsimilarity index 98%rename from frontend/src/react/pages/auth/OAuthCallbackPage.test.tsxrename to frontend/src/routes/auth/OAuthCallbackPage.test.tsxindex 0bde80b12b..848863e707 100644--- a/frontend/src/react/pages/auth/OAuthCallbackPage.test.tsx+++ b/frontend/src/routes/auth/OAuthCallbackPage.test.tsx@@ -21,18 +21,18 @@ const mocks = vi.hoisted(() => ({}));mocks.useAuthStore.mockImplementation(() => ({ login: mocks.login }));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({useAuthStore: mocks.useAuthStore,}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: Object.assign(() => ({}), {getState: () => ({ login: mocks.login, workspaceResourceName: () => "" }),}),}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {push: mocks.routerPush,currentRoute: mocks.currentRoute,diff --git a/frontend/src/react/pages/auth/OAuthCallbackPage.tsx b/frontend/src/routes/auth/OAuthCallbackPage.tsxsimilarity index 95%rename from frontend/src/react/pages/auth/OAuthCallbackPage.tsxrename to frontend/src/routes/auth/OAuthCallbackPage.tsxindex cfa48d7073..d2cb6aeb56 100644--- a/frontend/src/react/pages/auth/OAuthCallbackPage.tsx+++ b/frontend/src/routes/auth/OAuthCallbackPage.tsx@@ -2,11 +2,11 @@ import { create } from "@bufbuild/protobuf";import { Loader2 } from "lucide-react";import { useEffect, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { resolveWorkspaceName } from "@/react/lib/workspace";-import { router } from "@/react/router";-import { AUTH_SIGNIN_MODULE } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";+import { router } from "@/app/router";+import { AUTH_SIGNIN_MODULE } from "@/app/router/handles";+import { Button } from "@/components/ui/button";+import { resolveWorkspaceName } from "@/lib/workspace";+import { useAppStore } from "@/stores/app";import type { OAuthState, OAuthWindowEventPayload } from "@/types/oauth";import { LoginRequestSchema } from "@/types/proto-es/v1/auth_service_pb";import { IdentityProviderType } from "@/types/proto-es/v1/idp_service_pb";diff --git a/frontend/src/react/pages/auth/PasswordForgotPage.test.tsx b/frontend/src/routes/auth/PasswordForgotPage.test.tsxsimilarity index 96%rename from frontend/src/react/pages/auth/PasswordForgotPage.test.tsxrename to frontend/src/routes/auth/PasswordForgotPage.test.tsxindex 80f5451634..51954742ec 100644--- a/frontend/src/react/pages/auth/PasswordForgotPage.test.tsx+++ b/frontend/src/routes/auth/PasswordForgotPage.test.tsx@@ -37,16 +37,16 @@ const mocks = vi.hoisted(() => {};});-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: mocks.useAppStore,}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: mocks.pushNotification,}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {push: mocks.routerPush,replace: mocks.routerReplace,@@ -55,7 +55,7 @@ vi.mock("@/react/router", async (importOriginal) => ({},}));-vi.mock("@/connect", () => ({+vi.mock("@/api", () => ({authServiceClientConnect: {requestPasswordReset: mocks.requestPasswordReset,},@@ -67,7 +67,7 @@ vi.mock("@/utils", () => {};});-vi.mock("@/react/lib/workspace", () => ({+vi.mock("@/lib/workspace", () => ({resolveWorkspaceName: mocks.resolveWorkspaceName,}));diff --git a/frontend/src/react/pages/auth/PasswordForgotPage.tsx b/frontend/src/routes/auth/PasswordForgotPage.tsxsimilarity index 86%rename from frontend/src/react/pages/auth/PasswordForgotPage.tsxrename to frontend/src/routes/auth/PasswordForgotPage.tsxindex 091bb478b5..1602b993d6 100644--- a/frontend/src/react/pages/auth/PasswordForgotPage.tsx+++ b/frontend/src/routes/auth/PasswordForgotPage.tsx@@ -1,20 +1,20 @@import { useEffect, useState } from "react";import { useTranslation } from "react-i18next";-import logoFull from "@/assets/logo-full.svg";-import { authServiceClientConnect } from "@/connect";-import { AuthDivider } from "@/react/components/auth/AuthDivider";-import { RouterLink } from "@/react/components/RouterLink";-import { Alert } from "@/react/components/ui/alert";-import { Button } from "@/react/components/ui/button";-import { Input } from "@/react/components/ui/input";-import { resolveWorkspaceName } from "@/react/lib/workspace";-import { router } from "@/react/router";+import { authServiceClientConnect } from "@/api";+import { router } from "@/app/router";import {AUTH_PASSWORD_RESET_MODULE,AUTH_SIGNIN_MODULE,-} from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/app/router/handles";+import logoFull from "@/assets/logo-full.svg";+import { AuthDivider } from "@/components/auth/AuthDivider";+import { RouterLink } from "@/components/RouterLink";+import { Alert } from "@/components/ui/alert";+import { Button } from "@/components/ui/button";+import { Input } from "@/components/ui/input";+import { resolveWorkspaceName } from "@/lib/workspace";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import { isValidEmail } from "@/utils";export function PasswordForgotPage() {diff --git a/frontend/src/react/pages/auth/PasswordResetPage.test.tsx b/frontend/src/routes/auth/PasswordResetPage.test.tsxsimilarity index 96%rename from frontend/src/react/pages/auth/PasswordResetPage.test.tsxrename to frontend/src/routes/auth/PasswordResetPage.test.tsxindex a57c7b6e15..797f2d3d79 100644--- a/frontend/src/react/pages/auth/PasswordResetPage.test.tsx+++ b/frontend/src/routes/auth/PasswordResetPage.test.tsx@@ -35,16 +35,16 @@ const mocks = vi.hoisted(() => ({setRequireResetPassword: vi.fn(),}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useCurrentUser: () => ({ name: "users/1", email: "u@e" }),}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({useAuthStore: mocks.useAuthStore,pushNotification: mocks.pushNotification,}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const getState = () => ({...mocks.appStoreState,updateUser: mocks.updateUser,@@ -62,8 +62,8 @@ vi.mock("@/react/stores/app", () => {};});-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {replace: mocks.routerReplace,push: mocks.routerPush,@@ -72,14 +72,14 @@ vi.mock("@/react/router", async (importOriginal) => ({},}));-vi.mock("@/connect", () => ({+vi.mock("@/api", () => ({authServiceClientConnect: {resetPassword: mocks.resetPassword,requestPasswordReset: mocks.requestPasswordReset,},}));-vi.mock("@/react/lib/workspace", () => ({+vi.mock("@/lib/workspace", () => ({resolveWorkspaceName: mocks.resolveWorkspaceName,}));diff --git a/frontend/src/react/pages/auth/PasswordResetPage.tsx b/frontend/src/routes/auth/PasswordResetPage.tsxsimilarity index 90%rename from frontend/src/react/pages/auth/PasswordResetPage.tsxrename to frontend/src/routes/auth/PasswordResetPage.tsxindex 3fa40bc2a7..43cd48ca5f 100644--- a/frontend/src/react/pages/auth/PasswordResetPage.tsx+++ b/frontend/src/routes/auth/PasswordResetPage.tsx@@ -2,21 +2,21 @@ import { create } from "@bufbuild/protobuf";import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { useEffect, useRef, useState } from "react";import { useTranslation } from "react-i18next";+import { authServiceClientConnect } from "@/api";+import { router } from "@/app/router";+import { AUTH_SIGNIN_MODULE } from "@/app/router/handles";import logoFull from "@/assets/logo-full.svg";-import { authServiceClientConnect } from "@/connect";-import { AuthDivider } from "@/react/components/auth/AuthDivider";-import { UserPasswordFields } from "@/react/components/auth/UserPasswordFields";-import { computePasswordValidation } from "@/react/components/auth/userPasswordValidation";-import { RouterLink } from "@/react/components/RouterLink";-import { Button } from "@/react/components/ui/button";-import { Input } from "@/react/components/ui/input";-import { OtpInput } from "@/react/components/ui/otp-input";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { resolveWorkspaceName } from "@/react/lib/workspace";-import { router } from "@/react/router";-import { AUTH_SIGNIN_MODULE } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+import { AuthDivider } from "@/components/auth/AuthDivider";+import { UserPasswordFields } from "@/components/auth/UserPasswordFields";+import { computePasswordValidation } from "@/components/auth/userPasswordValidation";+import { RouterLink } from "@/components/RouterLink";+import { Button } from "@/components/ui/button";+import { Input } from "@/components/ui/input";+import { OtpInput } from "@/components/ui/otp-input";+import { useCurrentUser } from "@/hooks/useAppState";+import { resolveWorkspaceName } from "@/lib/workspace";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import {LoginRequestSchema,ResetPasswordRequestSchema,diff --git a/frontend/src/react/pages/auth/ProfileSetupPage.test.tsx b/frontend/src/routes/auth/ProfileSetupPage.test.tsxsimilarity index 96%rename from frontend/src/react/pages/auth/ProfileSetupPage.test.tsxrename to frontend/src/routes/auth/ProfileSetupPage.test.tsxindex c9ff698bb1..83b60d1edb 100644--- a/frontend/src/react/pages/auth/ProfileSetupPage.test.tsx+++ b/frontend/src/routes/auth/ProfileSetupPage.test.tsx@@ -40,7 +40,7 @@ const mocks = vi.hoisted(() => ({canCreateProject: true,}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useCurrentUser: () => mocks.currentUser,useWorkspace: () => mocks.workspace,useWorkspacePermission: (permission: string) =>@@ -53,7 +53,7 @@ vi.mock("@/react/hooks/useAppState", () => ({}),}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: (selector: (state: {workspacePolicy: IamPolicy;@@ -68,14 +68,14 @@ vi.mock("@/react/stores/app", () => ({}),}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {replace: mocks.routerReplace,},}));-vi.mock("@/react/components/ResourceIdField", async () => {+vi.mock("@/components/ResourceIdField", async () => {const React = await import("react");return {ResourceIdField: ({@@ -99,7 +99,7 @@ vi.mock("@/react/components/ResourceIdField", async () => {};});-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: mocks.pushNotification,}));@@ -108,7 +108,7 @@ vi.mock("@/utils", () => ({hasWorkspacePermissionV2: mocks.hasWorkspacePermissionV2,}));-vi.mock("@/react/components/UserAvatar", () => ({+vi.mock("@/components/UserAvatar", () => ({UserAvatar: () => null,}));diff --git a/frontend/src/react/pages/auth/ProfileSetupPage.tsx b/frontend/src/routes/auth/ProfileSetupPage.tsxsimilarity index 92%rename from frontend/src/react/pages/auth/ProfileSetupPage.tsxrename to frontend/src/routes/auth/ProfileSetupPage.tsxindex 4bc84ae925..c67a38e8b2 100644--- a/frontend/src/react/pages/auth/ProfileSetupPage.tsx+++ b/frontend/src/routes/auth/ProfileSetupPage.tsx@@ -2,23 +2,23 @@ import { create } from "@bufbuild/protobuf";import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { useCallback, useEffect, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { ResourceIdField } from "@/react/components/ResourceIdField";-import { UserAvatar } from "@/react/components/UserAvatar";-import { Button } from "@/react/components/ui/button";-import { FormField } from "@/react/components/ui/form";-import { Input } from "@/react/components/ui/input";+import { router } from "@/app/router";+import { PROJECT_V1_ROUTE_DATABASES } from "@/app/router/handles";+import { ResourceIdField } from "@/components/ResourceIdField";+import { UserAvatar } from "@/components/UserAvatar";+import { Button } from "@/components/ui/button";+import { FormField } from "@/components/ui/form";+import { Input } from "@/components/ui/input";import {useCreateProject,useCurrentUser,useWorkspace,useWorkspacePermission,-} from "@/react/hooks/useAppState";-import { CONNECT_DATABASE_PRODUCT_INTRO } from "@/react/lib/productIntro";-import { router } from "@/react/router";-import { PROJECT_V1_ROUTE_DATABASES } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";-import { projectNamePrefix } from "@/store/modules/v1/common";+} from "@/hooks/useAppState";+import { CONNECT_DATABASE_PRODUCT_INTRO } from "@/lib/productIntro";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";import type { ValidatedMessage } from "@/types";import { UpdateUserRequestSchema } from "@/types/proto-es/v1/user_service_pb";import { WorkspaceSchema } from "@/types/proto-es/v1/workspace_service_pb";diff --git a/frontend/src/react/pages/auth/SetupPage.test.tsx b/frontend/src/routes/auth/SetupPage.test.tsxsimilarity index 96%rename from frontend/src/react/pages/auth/SetupPage.test.tsxrename to frontend/src/routes/auth/SetupPage.test.tsxindex 7a46eca7e6..c565e41127 100644--- a/frontend/src/react/pages/auth/SetupPage.test.tsx+++ b/frontend/src/routes/auth/SetupPage.test.tsx@@ -23,15 +23,15 @@ const mocks = vi.hoisted(() => ({resetQuickstartProgress: vi.fn(),}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {isReady: mocks.routerIsReady,push: mocks.routerPush,},}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const state = {enableOnboarding: () => true,appFeatures: { "bb.feature.database-change-mode": 0 },@@ -54,16 +54,16 @@ vi.mock("@/react/stores/app", () => {};});-vi.mock("@/react/components/auth/AuthFooter", () => ({+vi.mock("@/components/auth/AuthFooter", () => ({AuthFooter: () => null,}));-vi.mock("@/react/components/ComponentPermissionGuard", () => ({+vi.mock("@/components/ComponentPermissionGuard", () => ({ComponentPermissionGuard: ({ children }: { children: React.ReactNode }) =>children,}));-vi.mock("@/react/components/ResourceIdField", async () => {+vi.mock("@/components/ResourceIdField", async () => {const React = await import("react");return {ResourceIdField: ({diff --git a/frontend/src/react/pages/auth/SetupPage.tsx b/frontend/src/routes/auth/SetupPage.tsxsimilarity index 94%rename from frontend/src/react/pages/auth/SetupPage.tsxrename to frontend/src/routes/auth/SetupPage.tsxindex b446f2043f..b392fa4973 100644--- a/frontend/src/react/pages/auth/SetupPage.tsx+++ b/frontend/src/routes/auth/SetupPage.tsx@@ -4,23 +4,23 @@ import { Code } from "@connectrpc/connect";import { Loader2 } from "lucide-react";import { useCallback, useEffect, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { AuthFooter } from "@/react/components/auth/AuthFooter";-import { ComponentPermissionGuard } from "@/react/components/ComponentPermissionGuard";-import {- ResourceIdField,- type ResourceIdFieldRef,-} from "@/react/components/ResourceIdField";-import { Button } from "@/react/components/ui/button";-import { Input } from "@/react/components/ui/input";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";-import { useAppFeature } from "@/react/hooks/useAppState";-import { router } from "@/react/router";+import { router } from "@/app/router";import {SQL_EDITOR_HOME_MODULE,WORKSPACE_ROUTE_LANDING,-} from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { projectNamePrefix } from "@/store/modules/v1/common";+} from "@/app/router/handles";+import { AuthFooter } from "@/components/auth/AuthFooter";+import { ComponentPermissionGuard } from "@/components/ComponentPermissionGuard";+import {+ ResourceIdField,+ type ResourceIdFieldRef,+} from "@/components/ResourceIdField";+import { Button } from "@/components/ui/button";+import { Input } from "@/components/ui/input";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";+import { useAppFeature } from "@/hooks/useAppState";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";import { isValidProjectName } from "@/types";import { DatabaseChangeMode } from "@/types/proto-es/v1/setting_service_pb";import { extractGrpcErrorMessage, getErrorCode } from "@/utils/connect";diff --git a/frontend/src/react/pages/auth/SigninAdminPage.tsx b/frontend/src/routes/auth/SigninAdminPage.tsxsimilarity index 80%rename from frontend/src/react/pages/auth/SigninAdminPage.tsxrename to frontend/src/routes/auth/SigninAdminPage.tsxindex e01c9f909d..4bd28dfb40 100644--- a/frontend/src/react/pages/auth/SigninAdminPage.tsx+++ b/frontend/src/routes/auth/SigninAdminPage.tsx@@ -1,9 +1,9 @@import { useState } from "react";import { useTranslation } from "react-i18next";-import { AuthFooter } from "@/react/components/auth/AuthFooter";-import { PasswordSigninForm } from "@/react/components/auth/PasswordSigninForm";-import { BytebaseLogo } from "@/react/components/BytebaseLogo";-import { useAppStore } from "@/react/stores/app";+import { AuthFooter } from "@/components/auth/AuthFooter";+import { PasswordSigninForm } from "@/components/auth/PasswordSigninForm";+import { BytebaseLogo } from "@/components/BytebaseLogo";+import { useAppStore } from "@/stores/app";import type { LoginRequest } from "@/types/proto-es/v1/auth_service_pb";export function SigninAdminPage() {diff --git a/frontend/src/react/pages/auth/SigninPage.test.tsx b/frontend/src/routes/auth/SigninPage.test.tsxsimilarity index 96%rename from frontend/src/react/pages/auth/SigninPage.test.tsxrename to frontend/src/routes/auth/SigninPage.test.tsxindex 564900c394..928fc795b2 100644--- a/frontend/src/react/pages/auth/SigninPage.test.tsx+++ b/frontend/src/routes/auth/SigninPage.test.tsx@@ -21,20 +21,20 @@ const mocks = vi.hoisted(() => ({authStore: null as unknown,}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {push: mocks.routerPush,currentRoute: mocks.currentRoute,},}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: mocks.pushNotification,useAuthStore: () => mocks.authStore,}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const getState = () => ({...(mocks.actuatorStore as Record<string, unknown>),identityProviderList: () => mocks.identityProviderList,@@ -55,7 +55,7 @@ vi.mock("@/utils", () => ({isValidEmail: (value: string) => /\S+@\S+\.\S+/.test(value),}));-vi.mock("@/react/lib/workspace", () => ({+vi.mock("@/lib/workspace", () => ({resolveWorkspaceName: () => undefined,}));@@ -65,16 +65,16 @@ vi.mock("react-i18next", () => ({vars ? `${key}:${JSON.stringify(vars)}` : key,}),Trans: ({ i18nKey }: { i18nKey: string }) => i18nKey,- // Completes the mock for the react-i18next migration: `@/react/i18n`+ // Completes the mock for the react-i18next migration: `@/lib/i18n`// registers this plugin via `i18next.use(...)`.initReactI18next: { type: "3rdParty", init: () => {} },}));-vi.mock("@/react/components/BytebaseLogo", () => ({+vi.mock("@/components/BytebaseLogo", () => ({BytebaseLogo: () => null,}));-vi.mock("@/react/components/auth/AuthFooter", () => ({+vi.mock("@/components/auth/AuthFooter", () => ({AuthFooter: () => null,}));diff --git a/frontend/src/react/pages/auth/SigninPage.tsx b/frontend/src/routes/auth/SigninPage.tsxsimilarity index 90%rename from frontend/src/react/pages/auth/SigninPage.tsxrename to frontend/src/routes/auth/SigninPage.tsxindex 2a6c800b37..11eabe560c 100644--- a/frontend/src/react/pages/auth/SigninPage.tsx+++ b/frontend/src/routes/auth/SigninPage.tsx@@ -1,27 +1,22 @@import { useEffect, useRef, useState } from "react";import { Trans, useTranslation } from "react-i18next";-import { AuthDivider } from "@/react/components/auth/AuthDivider";-import { AuthFooter } from "@/react/components/auth/AuthFooter";-import { EmailCodeSigninForm } from "@/react/components/auth/EmailCodeSigninForm";-import { IdpBrandIcon } from "@/react/components/auth/IdpBrandIcon";-import { PasswordSigninForm } from "@/react/components/auth/PasswordSigninForm";-import { BytebaseLogo } from "@/react/components/BytebaseLogo";-import { RouterLink } from "@/react/components/RouterLink";-import { Alert } from "@/react/components/ui/alert";-import { Button } from "@/react/components/ui/button";-import {- Tabs,- TabsList,- TabsPanel,- TabsTrigger,-} from "@/react/components/ui/tabs";-import { useIdentityProviderList } from "@/react/hooks/useAppState";-import { resolveWorkspaceName } from "@/react/lib/workspace";-import { router } from "@/react/router";-import { AUTH_SIGNUP_MODULE } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";-import { idpNamePrefix } from "@/store/modules/v1/common";+import { router } from "@/app/router";+import { AUTH_SIGNUP_MODULE } from "@/app/router/handles";+import { AuthDivider } from "@/components/auth/AuthDivider";+import { AuthFooter } from "@/components/auth/AuthFooter";+import { EmailCodeSigninForm } from "@/components/auth/EmailCodeSigninForm";+import { IdpBrandIcon } from "@/components/auth/IdpBrandIcon";+import { PasswordSigninForm } from "@/components/auth/PasswordSigninForm";+import { BytebaseLogo } from "@/components/BytebaseLogo";+import { RouterLink } from "@/components/RouterLink";+import { Alert } from "@/components/ui/alert";+import { Button } from "@/components/ui/button";+import { Tabs, TabsList, TabsPanel, TabsTrigger } from "@/components/ui/tabs";+import { useIdentityProviderList } from "@/hooks/useAppState";+import { resolveWorkspaceName } from "@/lib/workspace";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import { idpNamePrefix } from "@/stores/modules/v1/common";import type { LoginRequest } from "@/types/proto-es/v1/auth_service_pb";import type { IdentityProvider } from "@/types/proto-es/v1/idp_service_pb";import { IdentityProviderType } from "@/types/proto-es/v1/idp_service_pb";diff --git a/frontend/src/react/pages/auth/SignupPage.tsx b/frontend/src/routes/auth/SignupPage.tsxsimilarity index 90%rename from frontend/src/react/pages/auth/SignupPage.tsxrename to frontend/src/routes/auth/SignupPage.tsxindex 623fa4b64e..6c60340412 100644--- a/frontend/src/react/pages/auth/SignupPage.tsx+++ b/frontend/src/routes/auth/SignupPage.tsx@@ -1,17 +1,17 @@import { useEffect, useState } from "react";import { Trans, useTranslation } from "react-i18next";-import { AuthDivider } from "@/react/components/auth/AuthDivider";-import { AuthFooter } from "@/react/components/auth/AuthFooter";-import { UserPasswordFields } from "@/react/components/auth/UserPasswordFields";-import { computePasswordValidation } from "@/react/components/auth/userPasswordValidation";-import { BytebaseLogo } from "@/react/components/BytebaseLogo";-import { RouterLink } from "@/react/components/RouterLink";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";-import { Input } from "@/react/components/ui/input";-import { router } from "@/react/router";-import { AUTH_SIGNIN_MODULE } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";+import { router } from "@/app/router";+import { AUTH_SIGNIN_MODULE } from "@/app/router/handles";+import { AuthDivider } from "@/components/auth/AuthDivider";+import { AuthFooter } from "@/components/auth/AuthFooter";+import { UserPasswordFields } from "@/components/auth/UserPasswordFields";+import { computePasswordValidation } from "@/components/auth/userPasswordValidation";+import { BytebaseLogo } from "@/components/BytebaseLogo";+import { RouterLink } from "@/components/RouterLink";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";+import { Input } from "@/components/ui/input";+import { useAppStore } from "@/stores/app";import { isValidEmail } from "@/utils";export function SignupPage() {diff --git a/frontend/src/react/pages/auth/TwoFactorRequiredPage.tsx b/frontend/src/routes/auth/TwoFactorRequiredPage.tsxsimilarity index 70%rename from frontend/src/react/pages/auth/TwoFactorRequiredPage.tsxrename to frontend/src/routes/auth/TwoFactorRequiredPage.tsxindex 6fef121241..623c6e94b5 100644--- a/frontend/src/react/pages/auth/TwoFactorRequiredPage.tsx+++ b/frontend/src/routes/auth/TwoFactorRequiredPage.tsx@@ -1,7 +1,7 @@import { useTranslation } from "react-i18next";-import { Alert } from "@/react/components/ui/alert";-import { TwoFactorSetupPage } from "@/react/pages/settings/two-factor/TwoFactorSetupPage";-import { useAppStore } from "@/react/stores/app";+import { Alert } from "@/components/ui/alert";+import { TwoFactorSetupPage } from "@/routes/workspace/two-factor/TwoFactorSetupPage";+import { useAppStore } from "@/stores/app";export function TwoFactorRequiredPage() {const { t } = useTranslation();diff --git a/frontend/src/react/pages/project/DatabaseChangelogDetailPage.test.tsx b/frontend/src/routes/project/DatabaseChangelogDetailPage.test.tsxsimilarity index 98%rename from frontend/src/react/pages/project/DatabaseChangelogDetailPage.test.tsxrename to frontend/src/routes/project/DatabaseChangelogDetailPage.test.tsxindex 7c46931452..eda2025681 100644--- a/frontend/src/react/pages/project/DatabaseChangelogDetailPage.test.tsx+++ b/frontend/src/routes/project/DatabaseChangelogDetailPage.test.tsx@@ -144,42 +144,42 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {push: mocks.routerPush,resolve: mocks.routerResolve,},}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: (props: React.ButtonHTMLAttributes<HTMLButtonElement>) => (<button {...props} />),}));-vi.mock("@/react/components/ui/switch", () => ({+vi.mock("@/components/ui/switch", () => ({Switch: mocks.Switch,}));-vi.mock("@/react/components/monaco", () => ({+vi.mock("@/components/monaco", () => ({ReadonlyMonaco: mocks.ReadonlyMonaco,ReadonlyDiffMonaco: mocks.ReadonlyDiffMonaco,}));-vi.mock("@/react/components/task-run-log", () => ({+vi.mock("@/components/task-run-log", () => ({TaskRunLogViewer: mocks.TaskRunLogViewer,}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: mocks.useAppStore,}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: mocks.pushNotification,}));-vi.mock("@/connect", () => ({+vi.mock("@/api", () => ({rolloutServiceClientConnect: {getTaskRunLog: mocks.getTaskRunLog,},diff --git a/frontend/src/react/pages/project/DatabaseChangelogDetailPage.tsx b/frontend/src/routes/project/DatabaseChangelogDetailPage.tsxsimilarity index 96%rename from frontend/src/react/pages/project/DatabaseChangelogDetailPage.tsxrename to frontend/src/routes/project/DatabaseChangelogDetailPage.tsxindex a352226634..497fe4450a 100644--- a/frontend/src/react/pages/project/DatabaseChangelogDetailPage.tsx+++ b/frontend/src/routes/project/DatabaseChangelogDetailPage.tsx@@ -2,21 +2,21 @@ import { create } from "@bufbuild/protobuf";import { ArrowUpRight, Check, LoaderCircle } from "lucide-react";import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { rolloutServiceClientConnect } from "@/connect";-import { ReadonlyDiffMonaco, ReadonlyMonaco } from "@/react/components/monaco";-import { RouterLink } from "@/react/components/RouterLink";-import { TaskRunLogViewer } from "@/react/components/task-run-log";-import { Button } from "@/react/components/ui/button";-import { CopyButton } from "@/react/components/ui/copy-button";-import { Switch } from "@/react/components/ui/switch";-import { router } from "@/react/router";+import { rolloutServiceClientConnect } from "@/api";+import { router } from "@/app/router";import {PROJECT_V1_ROUTE_DATABASE_CHANGELOG_DETAIL,PROJECT_V1_ROUTE_DATABASE_DETAIL,PROJECT_V1_ROUTE_DATABASES,PROJECT_V1_ROUTE_SYNC_SCHEMA,-} from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";+} from "@/app/router/handles";+import { ReadonlyDiffMonaco, ReadonlyMonaco } from "@/components/monaco";+import { RouterLink } from "@/components/RouterLink";+import { TaskRunLogViewer } from "@/components/task-run-log";+import { Button } from "@/components/ui/button";+import { CopyButton } from "@/components/ui/copy-button";+import { Switch } from "@/components/ui/switch";+import { useAppStore } from "@/stores/app";import { getTimeForPbTimestampProtoEs } from "@/types";import type { Changelog } from "@/types/proto-es/v1/database_service_pb";import {diff --git a/frontend/src/react/pages/project/DatabaseRevisionDetailPage.test.tsx b/frontend/src/routes/project/DatabaseRevisionDetailPage.test.tsxsimilarity index 97%rename from frontend/src/react/pages/project/DatabaseRevisionDetailPage.test.tsxrename to frontend/src/routes/project/DatabaseRevisionDetailPage.test.tsxindex f93f2b7aa1..b0f3895a31 100644--- a/frontend/src/react/pages/project/DatabaseRevisionDetailPage.test.tsx+++ b/frontend/src/routes/project/DatabaseRevisionDetailPage.test.tsx@@ -58,12 +58,12 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/react/components/revision", () => ({+vi.mock("@/components/revision", () => ({RevisionDetailPanel: mocks.RevisionDetailPanel,}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {push: mocks.routerPush,resolve: (to: unknown) => ({ href: String(to), fullPath: String(to) }),diff --git a/frontend/src/react/pages/project/DatabaseRevisionDetailPage.tsx b/frontend/src/routes/project/DatabaseRevisionDetailPage.tsxsimilarity index 94%rename from frontend/src/react/pages/project/DatabaseRevisionDetailPage.tsxrename to frontend/src/routes/project/DatabaseRevisionDetailPage.tsxindex f3deedb872..0c493d594a 100644--- a/frontend/src/react/pages/project/DatabaseRevisionDetailPage.tsx+++ b/frontend/src/routes/project/DatabaseRevisionDetailPage.tsx@@ -1,12 +1,12 @@import { LoaderCircle } from "lucide-react";import { useTranslation } from "react-i18next";-import { RouterLink } from "@/react/components/RouterLink";-import { RevisionDetailPanel } from "@/react/components/revision";import {PROJECT_V1_ROUTE_DATABASE_DETAIL,PROJECT_V1_ROUTE_DATABASE_REVISION_DETAIL,PROJECT_V1_ROUTE_DATABASES,-} from "@/react/router/handles";+} from "@/app/router/handles";+import { RouterLink } from "@/components/RouterLink";+import { RevisionDetailPanel } from "@/components/revision";import { useProjectDatabaseDetail } from "./database-detail/useProjectDatabaseDetail";export function DatabaseRevisionDetailPage({diff --git a/frontend/src/react/pages/project/ProjectAccessGrantsPage.tsx b/frontend/src/routes/project/ProjectAccessGrantsPage.tsxsimilarity index 95%rename from frontend/src/react/pages/project/ProjectAccessGrantsPage.tsxrename to frontend/src/routes/project/ProjectAccessGrantsPage.tsxindex 2d528ae725..db6105e13a 100644--- a/frontend/src/react/pages/project/ProjectAccessGrantsPage.tsx+++ b/frontend/src/routes/project/ProjectAccessGrantsPage.tsx@@ -7,27 +7,23 @@ import {type ScopeOption,type SearchParams,type ValueOption,-} from "@/react/components/AdvancedSearch";-import { ComponentPermissionGuard } from "@/react/components/ComponentPermissionGuard";-import { EngineIcon } from "@/react/components/EngineIcon";-import { FeatureAttention } from "@/react/components/FeatureAttention";+} from "@/components/AdvancedSearch";+import { ComponentPermissionGuard } from "@/components/ComponentPermissionGuard";+import { EngineIcon } from "@/components/EngineIcon";+import { FeatureAttention } from "@/components/FeatureAttention";import {ProjectPageContent,ProjectPageFooter,ProjectPageLayout,ProjectPageToolbar,-} from "@/react/components/ProjectPageLayout";-import { RouterLink } from "@/react/components/RouterLink";-import { TimeRangePicker } from "@/react/components/TimeRangePicker";-import { Badge } from "@/react/components/ui/badge";-import { Button } from "@/react/components/ui/button";-import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";-import { EllipsisText } from "@/react/components/ui/ellipsis-text";-import { getLayerRoot, LAYER_SURFACE_CLASS } from "@/react/components/ui/layer";+} from "@/components/ProjectPageLayout";+import { RouterLink } from "@/components/RouterLink";+import { TimeRangePicker } from "@/components/TimeRangePicker";+import { Badge } from "@/components/ui/badge";+import { Button } from "@/components/ui/button";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";+import { EllipsisText } from "@/components/ui/ellipsis-text";+import { getLayerRoot, LAYER_SURFACE_CLASS } from "@/components/ui/layer";import {Table,TableBody,@@ -35,19 +31,22 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { Tooltip } from "@/react/components/ui/tooltip";-import { useCurrentUser } from "@/react/hooks/useAppState";+} from "@/components/ui/table";+import { Tooltip } from "@/components/ui/tooltip";+import { useCurrentUser } from "@/hooks/useAppState";import {distributeColumnWidths,useColumnWidths,-} from "@/react/hooks/useColumnWidths";-import { PagedTableFooter, usePagedData } from "@/react/hooks/usePagedData";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { useAppStore } from "@/react/stores/app";-import type { AccessGrantFilter as AccessFilter } from "@/react/stores/app/types";-import { pushNotification } from "@/store";-import { extractUserEmail, projectNamePrefix } from "@/store/modules/v1/common";+} from "@/hooks/useColumnWidths";+import { PagedTableFooter, usePagedData } from "@/hooks/usePagedData";+import { useProjectByName } from "@/hooks/useProjectByName";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import type { AccessGrantFilter as AccessFilter } from "@/stores/app/types";+import {+ extractUserEmail,+ projectNamePrefix,+} from "@/stores/modules/v1/common";import { getTimeForPbTimestampProtoEs } from "@/types";import type { AccessGrant } from "@/types/proto-es/v1/access_grant_service_pb";import { AccessGrant_Status } from "@/types/proto-es/v1/access_grant_service_pb";diff --git a/frontend/src/react/pages/project/ProjectAuditLogPage.tsx b/frontend/src/routes/project/ProjectAuditLogPage.tsxsimilarity index 75%rename from frontend/src/react/pages/project/ProjectAuditLogPage.tsxrename to frontend/src/routes/project/ProjectAuditLogPage.tsxindex 8848a083e0..f6562581c1 100644--- a/frontend/src/react/pages/project/ProjectAuditLogPage.tsx+++ b/frontend/src/routes/project/ProjectAuditLogPage.tsx@@ -1,13 +1,13 @@import { useMemo } from "react";-import { AuditLogTable } from "@/react/components/AuditLogTable";-import { FeatureAttention } from "@/react/components/FeatureAttention";+import { AuditLogTable } from "@/components/AuditLogTable";+import { FeatureAttention } from "@/components/FeatureAttention";import {ProjectPageContent,ProjectPageLayout,-} from "@/react/components/ProjectPageLayout";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { useAppStore } from "@/react/stores/app";-import { projectNamePrefix } from "@/store/modules/v1/common";+} from "@/components/ProjectPageLayout";+import { useProjectByName } from "@/hooks/useProjectByName";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { hasProjectPermissionV2 } from "@/utils";diff --git a/frontend/src/react/pages/project/ProjectDatabaseDetailPage.test.tsx b/frontend/src/routes/project/ProjectDatabaseDetailPage.test.tsxsimilarity index 97%rename from frontend/src/react/pages/project/ProjectDatabaseDetailPage.test.tsxrename to frontend/src/routes/project/ProjectDatabaseDetailPage.test.tsxindex 290bee587c..ea2048aac1 100644--- a/frontend/src/react/pages/project/ProjectDatabaseDetailPage.test.tsx+++ b/frontend/src/routes/project/ProjectDatabaseDetailPage.test.tsx@@ -198,8 +198,8 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {replace: mocks.routerReplace,push: mocks.routerPush,@@ -208,7 +208,7 @@ vi.mock("@/react/router", async (importOriginal) => ({},}));-vi.mock("@/react/components/ui/tabs", () => ({+vi.mock("@/components/ui/tabs", () => ({Tabs: ({value,children,@@ -229,7 +229,7 @@ vi.mock("@/react/components/ui/tabs", () => ({TabsTrigger: mocks.TabsTrigger,}));-vi.mock("@/react/components/EnvironmentSelect", () => ({+vi.mock("@/components/EnvironmentSelect", () => ({EnvironmentSelect: mocks.EnvironmentSelect,}));@@ -253,7 +253,7 @@ vi.mock("./database-detail/panels/DatabaseCatalogPanel", () => ({DatabaseCatalogPanel: mocks.DatabaseCatalogPanel,}));-vi.mock("@/react/components/ComponentPermissionGuard", () => ({+vi.mock("@/components/ComponentPermissionGuard", () => ({ComponentPermissionGuard: mocks.ComponentPermissionGuard,}));@@ -267,7 +267,7 @@ vi.mock("@/utils", async (importOriginal) => {};});-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pinia: mocks.pinia,pushNotification: mocks.pushNotification,useProjectV1Store: mocks.useProjectV1Store,@@ -278,7 +278,7 @@ vi.mock("@/store", () => ({// store. Route the existing `mocks.dbSchemaStore` shape through// `useAppStore` so the per-scenario `.mockReturnValue({...})` calls keep// working unchanged.-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: Object.assign((selector: (s: unknown) => unknown) => selector(mocks.dbSchemaStore()),{@@ -290,34 +290,34 @@ vi.mock("@/react/stores/app", () => ({),}));-vi.mock("@/react/hooks/useAppDatabaseMetadata", () => ({+vi.mock("@/hooks/useAppDatabaseMetadata", () => ({useAppDatabaseMetadata: (name: string) =>mocks.dbSchemaStore().getDatabaseMetadata?.(name) ?? { schemas: [] },}));-vi.mock("@/react/components/database", () => ({+vi.mock("@/components/database", () => ({TransferProjectSheet: mocks.transferProjectSheet,}));-vi.mock("@/connect", () => ({+vi.mock("@/api", () => ({databaseServiceClientConnect: {getDatabaseSDLSchema: mocks.getDatabaseSDLSchema,},}));-vi.mock("@/plugins/highlight", () => ({+vi.mock("@/lib/highlight", () => ({default: mocks.highlightPlugin,}));-vi.mock("@/react/i18n", () => ({+vi.mock("@/lib/i18n", () => ({default: mocks.i18nPlugin,}));-vi.mock("@/store/modules/v1/actuator", () => ({+vi.mock("@/stores/modules/v1/actuator", () => ({useActuatorV1Store: mocks.useActuatorV1Store,}));-vi.mock("@/react/lib/plan/issue", () => ({+vi.mock("@/lib/plan/issue", () => ({preCreateIssue: mocks.preCreateIssue,}));@@ -345,7 +345,7 @@ vi.mock("./database-detail/panels/DatabaseSettingsPanel", () => ({)),}));-vi.mock("@/react/components/ui/alert", () => ({+vi.mock("@/components/ui/alert", () => ({Alert: vi.fn(({children,@@ -365,7 +365,7 @@ vi.mock("@/react/components/ui/alert", () => ({),}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: vi.fn(({children,@@ -382,7 +382,7 @@ vi.mock("@/react/components/ui/button", () => ({),}));-vi.mock("@/react/components/ui/dialog", () => ({+vi.mock("@/components/ui/dialog", () => ({Dialog: vi.fn(({ children }: { children: ReactNode }) => (<div data-testid="dialog">{children}</div>)),@@ -394,13 +394,13 @@ vi.mock("@/react/components/ui/dialog", () => ({)),}));-vi.mock("@/react/components/monaco/core", () => ({+vi.mock("@/components/monaco/core", () => ({createMonacoDiffEditor: vi.fn(),createMonacoEditor: vi.fn(),initializeMonacoServices: vi.fn(),}));-vi.mock("@/react/components/monaco", () => ({+vi.mock("@/components/monaco", () => ({ReadonlyMonaco: vi.fn(() => null),}));diff --git a/frontend/src/react/pages/project/ProjectDatabaseDetailPage.tsx b/frontend/src/routes/project/ProjectDatabaseDetailPage.tsxsimilarity index 93%rename from frontend/src/react/pages/project/ProjectDatabaseDetailPage.tsxrename to frontend/src/routes/project/ProjectDatabaseDetailPage.tsxindex 91389bf7f3..ffdc064cd8 100644--- a/frontend/src/react/pages/project/ProjectDatabaseDetailPage.tsx+++ b/frontend/src/routes/project/ProjectDatabaseDetailPage.tsx@@ -3,20 +3,16 @@ import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { LoaderCircle } from "lucide-react";import { useCallback, useEffect, useState } from "react";import { useTranslation } from "react-i18next";-import { ComponentPermissionGuard } from "@/react/components/ComponentPermissionGuard";-import { TransferProjectSheet } from "@/react/components/database";-import { Alert } from "@/react/components/ui/alert";-import { Button } from "@/react/components/ui/button";-import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";-import { Tabs, TabsList, TabsTrigger } from "@/react/components/ui/tabs";-import { router } from "@/react/router";-import { PROJECT_V1_ROUTE_DATABASE_DETAIL } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+import { router } from "@/app/router";+import { PROJECT_V1_ROUTE_DATABASE_DETAIL } from "@/app/router/handles";+import { ComponentPermissionGuard } from "@/components/ComponentPermissionGuard";+import { TransferProjectSheet } from "@/components/database";+import { Alert } from "@/components/ui/alert";+import { Button } from "@/components/ui/button";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";+import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import {BatchUpdateDatabasesRequestSchema,DatabaseSchema$,diff --git a/frontend/src/react/pages/project/ProjectDatabaseGroupCreatePage.tsx b/frontend/src/routes/project/ProjectDatabaseGroupCreatePage.tsxsimilarity index 65%rename from frontend/src/react/pages/project/ProjectDatabaseGroupCreatePage.tsxrename to frontend/src/routes/project/ProjectDatabaseGroupCreatePage.tsxindex 08feb5c81a..9c93d5a3fd 100644--- a/frontend/src/react/pages/project/ProjectDatabaseGroupCreatePage.tsx+++ b/frontend/src/routes/project/ProjectDatabaseGroupCreatePage.tsx@@ -1,9 +1,9 @@-import { DatabaseGroupForm } from "@/react/components/DatabaseGroupForm";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { router } from "@/react/router";-import { PROJECT_V1_ROUTE_DATABASE_GROUP_DETAIL } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { projectNamePrefix } from "@/store/modules/v1/common";+import { router } from "@/app/router";+import { PROJECT_V1_ROUTE_DATABASE_GROUP_DETAIL } from "@/app/router/handles";+import { DatabaseGroupForm } from "@/components/DatabaseGroupForm";+import { useProjectByName } from "@/hooks/useProjectByName";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";export function ProjectDatabaseGroupCreatePage({projectId,diff --git a/frontend/src/react/pages/project/ProjectDatabaseGroupDetailPage.tsx b/frontend/src/routes/project/ProjectDatabaseGroupDetailPage.tsxsimilarity index 89%rename from frontend/src/react/pages/project/ProjectDatabaseGroupDetailPage.tsxrename to frontend/src/routes/project/ProjectDatabaseGroupDetailPage.tsxindex 8ff113c7a0..4bb7b4c68d 100644--- a/frontend/src/react/pages/project/ProjectDatabaseGroupDetailPage.tsx+++ b/frontend/src/routes/project/ProjectDatabaseGroupDetailPage.tsx@@ -1,32 +1,32 @@import { Edit, EllipsisVertical } from "lucide-react";import { useCallback, useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { DatabaseGroupForm } from "@/react/components/DatabaseGroupForm";-import { FeatureAttention } from "@/react/components/FeatureAttention";-import { PermissionGuard } from "@/react/components/PermissionGuard";+import { router } from "@/app/router";+import { PROJECT_V1_ROUTE_DATABASE_GROUPS } from "@/app/router/handles";+import { DatabaseGroupForm } from "@/components/DatabaseGroupForm";+import { FeatureAttention } from "@/components/FeatureAttention";+import { PermissionGuard } from "@/components/PermissionGuard";import {AlertDialog,AlertDialogContent,AlertDialogDescription,AlertDialogFooter,AlertDialogTitle,-} from "@/react/components/ui/alert-dialog";-import { Button } from "@/react/components/ui/button";+} from "@/components/ui/alert-dialog";+import { Button } from "@/components/ui/button";import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { preCreateIssue } from "@/react/lib/plan/issue";-import { router } from "@/react/router";-import { PROJECT_V1_ROUTE_DATABASE_GROUPS } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";+} from "@/components/ui/dropdown-menu";+import { useProjectByName } from "@/hooks/useProjectByName";+import { preCreateIssue } from "@/lib/plan/issue";+import { useAppStore } from "@/stores/app";import {databaseGroupNamePrefix,projectNamePrefix,-} from "@/store/modules/v1/common";+} from "@/stores/modules/v1/common";import { isValidDatabaseGroupName, unknownDatabaseGroup } from "@/types";import { DatabaseGroupView } from "@/types/proto-es/v1/database_group_service_pb";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";diff --git a/frontend/src/react/pages/project/ProjectDatabaseGroupsPage.tsx b/frontend/src/routes/project/ProjectDatabaseGroupsPage.tsxsimilarity index 88%rename from frontend/src/react/pages/project/ProjectDatabaseGroupsPage.tsxrename to frontend/src/routes/project/ProjectDatabaseGroupsPage.tsxindex b82f326c69..9db056d613 100644--- a/frontend/src/react/pages/project/ProjectDatabaseGroupsPage.tsx+++ b/frontend/src/routes/project/ProjectDatabaseGroupsPage.tsx@@ -1,32 +1,32 @@import { Plus } from "lucide-react";import { useCallback, useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { DatabaseGroupTable } from "@/react/components/DatabaseGroupTable";-import { FeatureAttention } from "@/react/components/FeatureAttention";-import { FeatureBadge } from "@/react/components/FeatureBadge";+import { router } from "@/app/router";+import {+ PROJECT_V1_ROUTE_DATABASE_GROUP_DETAIL,+ PROJECT_V1_ROUTE_DATABASE_GROUPS_CREATE,+} from "@/app/router/handles";+import { DatabaseGroupTable } from "@/components/DatabaseGroupTable";+import { FeatureAttention } from "@/components/FeatureAttention";+import { FeatureBadge } from "@/components/FeatureBadge";import {ProjectPageContent,ProjectPageLayout,-} from "@/react/components/ProjectPageLayout";+} from "@/components/ProjectPageLayout";import {AlertDialog,AlertDialogContent,AlertDialogDescription,AlertDialogFooter,AlertDialogTitle,-} from "@/react/components/ui/alert-dialog";-import { Button } from "@/react/components/ui/button";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { router } from "@/react/router";-import {- PROJECT_V1_ROUTE_DATABASE_GROUP_DETAIL,- PROJECT_V1_ROUTE_DATABASE_GROUPS_CREATE,-} from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";+} from "@/components/ui/alert-dialog";+import { Button } from "@/components/ui/button";+import { useProjectByName } from "@/hooks/useProjectByName";+import { useAppStore } from "@/stores/app";import {getProjectNameAndDatabaseGroupName,projectNamePrefix,-} from "@/store/modules/v1/common";+} from "@/stores/modules/v1/common";import type { DatabaseGroup } from "@/types/proto-es/v1/database_group_service_pb";import { DatabaseGroupView } from "@/types/proto-es/v1/database_group_service_pb";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";diff --git a/frontend/src/react/pages/project/ProjectDatabasesPage.test.tsx b/frontend/src/routes/project/ProjectDatabasesPage.test.tsxsimilarity index 95%rename from frontend/src/react/pages/project/ProjectDatabasesPage.test.tsxrename to frontend/src/routes/project/ProjectDatabasesPage.test.tsxindex 2dfc77e57e..8c47929a7d 100644--- a/frontend/src/react/pages/project/ProjectDatabasesPage.test.tsx+++ b/frontend/src/routes/project/ProjectDatabasesPage.test.tsx@@ -1,7 +1,7 @@import { act } from "react";import { createRoot } from "react-dom/client";import { beforeEach, describe, expect, test, vi } from "vitest";-import { preCreateIssue } from "@/react/lib/plan/issue";+import { preCreateIssue } from "@/lib/plan/issue";(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }@@ -29,7 +29,7 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({router: {push: mocks.routerPush,currentRoute: {@@ -40,22 +40,22 @@ vi.mock("@/react/router", () => ({},}));-vi.mock("@/react/components/AdvancedSearch", () => ({+vi.mock("@/components/AdvancedSearch", () => ({AdvancedSearch: () => <div data-testid="advanced-search" />,getValueFromScopes: () => undefined,}));-vi.mock("@/react/components/EditEnvironmentSheet", () => ({+vi.mock("@/components/EditEnvironmentSheet", () => ({EditEnvironmentSheet: () => null,}));-vi.mock("@/react/components/PermissionGuard", () => ({+vi.mock("@/components/PermissionGuard", () => ({PermissionGuard: ({ children }: { children: React.ReactNode }) => (<>{children}</>),}));-vi.mock("@/react/components/database", async () => {+vi.mock("@/components/database", async () => {const React = await import("react");return {CreateDatabaseSheet: ({ open }: { open: boolean }) =>@@ -83,21 +83,21 @@ vi.mock("@/react/components/database", async () => {};});-vi.mock("@/react/hooks/useProjectByName", () => ({+vi.mock("@/hooks/useProjectByName", () => ({useProjectByName: (name: string) => ({ name, title: "Demo Project" }),}));-vi.mock("@/react/lib/plan/issue", () => ({+vi.mock("@/lib/plan/issue", () => ({preCreateIssue: vi.fn(),}));-vi.mock("@/react/lib/productIntro", () => ({+vi.mock("@/lib/productIntro", () => ({CONNECT_DATABASE_PRODUCT_INTRO: "connect-database",PRODUCT_INTRO_QUERY_KEY: "intro",useProductIntro: mocks.useProductIntro,}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const appState = {removeDatabaseMetadataCache: mocks.removeDatabaseMetadataCache,databasesByName: {},@@ -115,7 +115,7 @@ vi.mock("@/react/stores/app", () => {return { useAppStore };});-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: vi.fn(),}));diff --git a/frontend/src/react/pages/project/ProjectDatabasesPage.tsx b/frontend/src/routes/project/ProjectDatabasesPage.tsxsimilarity index 96%rename from frontend/src/react/pages/project/ProjectDatabasesPage.tsxrename to frontend/src/routes/project/ProjectDatabasesPage.tsxindex 0bd58e6bad..00ebd3965b 100644--- a/frontend/src/react/pages/project/ProjectDatabasesPage.tsx+++ b/frontend/src/routes/project/ProjectDatabasesPage.tsx@@ -3,52 +3,52 @@ import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { Plus, SquareTerminal } from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";+import { router } from "@/app/router";+import {+ INSTANCE_ROUTE_CREATE,+ SQL_EDITOR_DATABASE_MODULE,+} from "@/app/router/handles";import {AdvancedSearch,getValueFromScopes,type ScopeOption,type SearchParams,type ValueOption,-} from "@/react/components/AdvancedSearch";+} from "@/components/AdvancedSearch";import {CreateDatabaseSheet,DatabaseBatchOperationsBar,DatabaseTable,LabelEditorSheet,-} from "@/react/components/database";-import { EditEnvironmentSheet } from "@/react/components/EditEnvironmentSheet";-import { PermissionGuard } from "@/react/components/PermissionGuard";+} from "@/components/database";+import { EditEnvironmentSheet } from "@/components/EditEnvironmentSheet";+import { PermissionGuard } from "@/components/PermissionGuard";import {ProjectPageLayout,ProjectPageToolbar,-} from "@/react/components/ProjectPageLayout";-import { Alert } from "@/react/components/ui/alert";+} from "@/components/ProjectPageLayout";+import { Alert } from "@/components/ui/alert";import {AlertDialog,AlertDialogContent,AlertDialogDescription,AlertDialogTitle,-} from "@/react/components/ui/alert-dialog";-import { Button } from "@/react/components/ui/button";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import type { DatabaseFilter } from "@/react/lib/databaseFilter";-import { preCreateIssue } from "@/react/lib/plan/issue";+} from "@/components/ui/alert-dialog";+import { Button } from "@/components/ui/button";+import { useProjectByName } from "@/hooks/useProjectByName";+import type { DatabaseFilter } from "@/lib/databaseFilter";+import { preCreateIssue } from "@/lib/plan/issue";import {CONNECT_DATABASE_PRODUCT_INTRO,useProductIntro,-} from "@/react/lib/productIntro";-import { router } from "@/react/router";-import {- INSTANCE_ROUTE_CREATE,- SQL_EDITOR_DATABASE_MODULE,-} from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/lib/productIntro";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import {environmentNamePrefix,instanceNamePrefix,projectNamePrefix,-} from "@/store/modules/v1/common";+} from "@/stores/modules/v1/common";import type { Permission } from "@/types";import {isDefaultProject,diff --git a/frontend/src/react/pages/project/ProjectGitOpsPage.tsx b/frontend/src/routes/project/ProjectGitOpsPage.tsxsimilarity index 96%rename from frontend/src/react/pages/project/ProjectGitOpsPage.tsxrename to frontend/src/routes/project/ProjectGitOpsPage.tsxindex 86184d3bf0..9f586415c2 100644--- a/frontend/src/react/pages/project/ProjectGitOpsPage.tsx+++ b/frontend/src/routes/project/ProjectGitOpsPage.tsx@@ -2,26 +2,21 @@ import { Check, ChevronDown, ChevronRight, XCircle } from "lucide-react";import { useCallback, useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";import gitopsWorkflowImage from "@/assets/gitops-workflow.svg";-import { CreateWorkloadIdentitySheet } from "@/react/components/CreateWorkloadIdentitySheet";-import { ExternalUrlAlert } from "@/react/components/ExternalUrlAlert";-import { PermissionGuard } from "@/react/components/PermissionGuard";-import { ProjectPageLayout } from "@/react/components/ProjectPageLayout";-import { Alert } from "@/react/components/ui/alert";-import { Button } from "@/react/components/ui/button";-import { Combobox, type ComboboxOption } from "@/react/components/ui/combobox";-import { CopyButton } from "@/react/components/ui/copy-button";-import { Switch } from "@/react/components/ui/switch";-import {- Tabs,- TabsList,- TabsPanel,- TabsTrigger,-} from "@/react/components/ui/tabs";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";-import { extractWorkloadIdentityId } from "@/react/stores/app/workloadIdentity";-import { projectNamePrefix } from "@/store/modules/v1/common";+import { CreateWorkloadIdentitySheet } from "@/components/CreateWorkloadIdentitySheet";+import { ExternalUrlAlert } from "@/components/ExternalUrlAlert";+import { PermissionGuard } from "@/components/PermissionGuard";+import { ProjectPageLayout } from "@/components/ProjectPageLayout";+import { Alert } from "@/components/ui/alert";+import { Button } from "@/components/ui/button";+import { Combobox, type ComboboxOption } from "@/components/ui/combobox";+import { CopyButton } from "@/components/ui/copy-button";+import { Switch } from "@/components/ui/switch";+import { Tabs, TabsList, TabsPanel, TabsTrigger } from "@/components/ui/tabs";+import { useProjectByName } from "@/hooks/useProjectByName";+import { cn } from "@/lib/utils";+import { useAppStore } from "@/stores/app";+import { extractWorkloadIdentityId } from "@/stores/app/workloadIdentity";+import { projectNamePrefix } from "@/stores/modules/v1/common";import { DatabaseGroupView } from "@/types/proto-es/v1/database_group_service_pb";import type { WorkloadIdentity } from "@/types/proto-es/v1/workload_identity_service_pb";import { WorkloadIdentityConfig_ProviderType } from "@/types/proto-es/v1/workload_identity_service_pb";diff --git a/frontend/src/react/pages/project/ProjectIssueDashboardPage.creators.test.ts b/frontend/src/routes/project/ProjectIssueDashboardPage.creators.test.tssimilarity index 100%rename from frontend/src/react/pages/project/ProjectIssueDashboardPage.creators.test.tsrename to frontend/src/routes/project/ProjectIssueDashboardPage.creators.test.tsdiff --git a/frontend/src/react/pages/project/ProjectIssueDashboardPage.tsx b/frontend/src/routes/project/ProjectIssueDashboardPage.tsxsimilarity index 92%rename from frontend/src/react/pages/project/ProjectIssueDashboardPage.tsxrename to frontend/src/routes/project/ProjectIssueDashboardPage.tsxindex d85e386d18..59bc9e3231 100644--- a/frontend/src/react/pages/project/ProjectIssueDashboardPage.tsx+++ b/frontend/src/routes/project/ProjectIssueDashboardPage.tsx@@ -1,31 +1,31 @@import { useCallback, useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";import { useLocation } from "react-router";-import type { SearchParams } from "@/react/components/AdvancedSearch";+import {+ markScrollRestorationEntry,+ useScrollRestorationKey,+ useScrollRestorationLoadMore,+} from "@/app/router/NavigationScrollRestoration";+import type { SearchParams } from "@/components/AdvancedSearch";import {BatchActionBar,BatchIssueStatusActionDrawer,IssueListPanel,IssueSearchBar,useIssueSearchScopeOptions,-} from "@/react/components/IssueTable";+} from "@/components/IssueTable";import {ProjectPageContent,ProjectPageFooter,ProjectPageInfo,ProjectPageLayout,-} from "@/react/components/ProjectPageLayout";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { PagedTableFooter, usePagedData } from "@/react/hooks/usePagedData";-import { useURLSearchParam } from "@/react/hooks/useURLSearchParam";-import { refreshIssueList } from "@/react/lib/issue/issueListRefresh";-import {- markScrollRestorationEntry,- useScrollRestorationKey,- useScrollRestorationLoadMore,-} from "@/react/router/NavigationScrollRestoration";-import { useAppStore } from "@/react/stores/app";-import { projectNamePrefix } from "@/store/modules/v1/common";+} from "@/components/ProjectPageLayout";+import { useCurrentUser } from "@/hooks/useAppState";+import { PagedTableFooter, usePagedData } from "@/hooks/usePagedData";+import { useURLSearchParam } from "@/hooks/useURLSearchParam";+import { refreshIssueList } from "@/lib/issue/issueListRefresh";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";import { ApprovalStatus } from "@/types/proto-es/v1/common_pb";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";import { IssueStatus } from "@/types/proto-es/v1/issue_service_pb";diff --git a/frontend/src/react/pages/project/ProjectIssueDetailPage.test.tsx b/frontend/src/routes/project/ProjectIssueDetailPage.test.tsxsimilarity index 94%rename from frontend/src/react/pages/project/ProjectIssueDetailPage.test.tsxrename to frontend/src/routes/project/ProjectIssueDetailPage.test.tsxindex 11088a1771..3545ed0025 100644--- a/frontend/src/react/pages/project/ProjectIssueDetailPage.test.tsx+++ b/frontend/src/routes/project/ProjectIssueDetailPage.test.tsx@@ -4,7 +4,7 @@ import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";import {LAYER_ROOT_ID,LAYER_SURFACE_CLASS,-} from "@/react/components/ui/layer";+} from "@/components/ui/layer";import { ProjectIssueDetailPage } from "./ProjectIssueDetailPage";(@@ -28,8 +28,8 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {currentRoute: { value: { query: {} } },replace: vi.fn(),diff --git a/frontend/src/react/pages/project/ProjectIssueDetailPage.tsx b/frontend/src/routes/project/ProjectIssueDetailPage.tsxsimilarity index 96%rename from frontend/src/react/pages/project/ProjectIssueDetailPage.tsxrename to frontend/src/routes/project/ProjectIssueDetailPage.tsxindex 5e36eca11a..2c196f5ec9 100644--- a/frontend/src/react/pages/project/ProjectIssueDetailPage.tsx+++ b/frontend/src/routes/project/ProjectIssueDetailPage.tsx@@ -2,14 +2,14 @@ import { X } from "lucide-react";import { useCallback, useMemo, useState } from "react";import { createPortal } from "react-dom";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";+import { router, useCurrentRoute } from "@/app/router";+import { Button } from "@/components/ui/button";import {getLayerRoot,LAYER_BACKDROP_CLASS,LAYER_SURFACE_CLASS,-} from "@/react/components/ui/layer";-import { cn } from "@/react/lib/utils";-import { router, useCurrentRoute } from "@/react/router";+} from "@/components/ui/layer";+import { cn } from "@/lib/utils";import { IssueDetailActivity } from "./issue-detail/components/IssueDetailActivity";import { IssueDetailBranchContent } from "./issue-detail/components/IssueDetailBranchContent";import { IssueDetailHeader } from "./issue-detail/components/IssueDetailHeader";diff --git a/frontend/src/react/pages/project/ProjectMaskingExemptionCreatePage.test.tsx b/frontend/src/routes/project/ProjectMaskingExemptionCreatePage.test.tsxsimilarity index 91%rename from frontend/src/react/pages/project/ProjectMaskingExemptionCreatePage.test.tsxrename to frontend/src/routes/project/ProjectMaskingExemptionCreatePage.test.tsxindex 96905c22f9..9a22240b00 100644--- a/frontend/src/react/pages/project/ProjectMaskingExemptionCreatePage.test.tsx+++ b/frontend/src/routes/project/ProjectMaskingExemptionCreatePage.test.tsx@@ -41,14 +41,14 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/plugins/cel", () => ({+vi.mock("@/modules/cel", () => ({buildCELExpr: mocks.buildCELExpr,emptySimpleExpr: vi.fn(() => ({ type: "ConditionGroup", args: [] })),validateSimpleExpr: vi.fn(() => true),wrapAsGroup: vi.fn((expr) => expr),}));-vi.mock("@/react/components/AccountMultiSelect", () => ({+vi.mock("@/components/AccountMultiSelect", () => ({AccountMultiSelect: ({value,onChange,@@ -64,7 +64,7 @@ vi.mock("@/react/components/AccountMultiSelect", () => ({),}));-vi.mock("@/react/components/DatabaseResourceSelector", () => ({+vi.mock("@/components/DatabaseResourceSelector", () => ({DatabaseResourceSelector: ({onChange,}: {@@ -91,7 +91,7 @@ vi.mock("@/react/components/DatabaseResourceSelector", () => ({),}));-vi.mock("@/react/components/ExprEditor", () => ({+vi.mock("@/components/ExprEditor", () => ({ExprEditor: ({ onUpdate }: { onUpdate: (expr: unknown) => void }) => (<buttondata-testid="set-expr"@@ -101,26 +101,26 @@ vi.mock("@/react/components/ExprEditor", () => ({),}));-vi.mock("@/react/components/FeatureAttention", () => ({+vi.mock("@/components/FeatureAttention", () => ({FeatureAttention: () => <div data-testid="feature-attention" />,}));-vi.mock("@/react/components/FeatureBadge", () => ({+vi.mock("@/components/FeatureBadge", () => ({FeatureBadge: () => <div data-testid="feature-badge" />,}));-vi.mock("@/react/components/ui/feature-modal", () => ({+vi.mock("@/components/ui/feature-modal", () => ({FeatureModal: ({ open }: { open: boolean }) =>open ? <div data-testid="feature-modal" /> : null,}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: (props: ButtonHTMLAttributes<HTMLButtonElement>) => (<button {...props} />),}));-vi.mock("@/react/components/ui/expiration-picker", () => ({+vi.mock("@/components/ui/expiration-picker", () => ({ExpirationPicker: ({ onChange }: { onChange?: (value: string) => void }) => (<buttondata-testid="set-expiration"@@ -130,43 +130,43 @@ vi.mock("@/react/components/ui/expiration-picker", () => ({),}));-vi.mock("@/react/components/ui/input", () => ({+vi.mock("@/components/ui/input", () => ({Input: (props: InputHTMLAttributes<HTMLInputElement>) => <input {...props} />,}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: ({ children }: { children: ReactNode }) => <>{children}</>,}));-vi.mock("@/react/hooks/useProjectByName", () => ({+vi.mock("@/hooks/useProjectByName", () => ({useProjectByName: () => ({ name: "projects/proj1" }),}));-vi.mock("@/react/lib/sensitive-data/components-utils", () => ({+vi.mock("@/lib/sensitive-data/components-utils", () => ({getClassificationLevelOptions: () => [],}));-vi.mock("@/react/lib/sensitive-data/exemptionDataUtils", () => ({+vi.mock("@/lib/sensitive-data/exemptionDataUtils", () => ({rewriteResourceDatabase: vi.fn((expression: string) => expression),}));-vi.mock("@/react/lib/sensitive-data/utils", () => ({+vi.mock("@/lib/sensitive-data/utils", () => ({getExpressionsForDatabaseResource: mocks.getExpressionsForDatabaseResource,}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({router: { back: mocks.routerBack },}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: vi.fn(),}));-vi.mock("@/store/modules/v1/common", () => ({+vi.mock("@/stores/modules/v1/common", () => ({projectNamePrefix: "projects/",}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: Object.assign((selector: (state: {diff --git a/frontend/src/react/pages/project/ProjectMaskingExemptionCreatePage.tsx b/frontend/src/routes/project/ProjectMaskingExemptionCreatePage.tsxsimilarity index 88%rename from frontend/src/react/pages/project/ProjectMaskingExemptionCreatePage.tsxrename to frontend/src/routes/project/ProjectMaskingExemptionCreatePage.tsxindex 1cdb42da7c..ba9c0f6597 100644--- a/frontend/src/react/pages/project/ProjectMaskingExemptionCreatePage.tsx+++ b/frontend/src/routes/project/ProjectMaskingExemptionCreatePage.tsx@@ -3,33 +3,33 @@ import dayjs from "dayjs";import { CircleHelp } from "lucide-react";import { useCallback, useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import type { ConditionGroupExpr } from "@/plugins/cel";+import { router } from "@/app/router";+import { AccountMultiSelect } from "@/components/AccountMultiSelect";+import { DatabaseResourceSelector } from "@/components/DatabaseResourceSelector";+import { ExprEditor } from "@/components/ExprEditor";+import { FeatureAttention } from "@/components/FeatureAttention";+import { FeatureBadge } from "@/components/FeatureBadge";+import { Button } from "@/components/ui/button";+import { ExpirationPicker } from "@/components/ui/expiration-picker";+import { FeatureModal } from "@/components/ui/feature-modal";+import { Input } from "@/components/ui/input";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";+import { StickyActionFooter } from "@/components/ui/sticky-action-footer";+import { Tooltip } from "@/components/ui/tooltip";+import { useProjectByName } from "@/hooks/useProjectByName";+import {+ buildMaskingExemption,+ useMaskingExemptionExprConfig,+} from "@/lib/sensitive-data/maskingExemption";+import type { ConditionGroupExpr } from "@/modules/cel";import {emptySimpleExpr,validateSimpleExpr,wrapAsGroup,-} from "@/plugins/cel";-import { AccountMultiSelect } from "@/react/components/AccountMultiSelect";-import { DatabaseResourceSelector } from "@/react/components/DatabaseResourceSelector";-import { ExprEditor } from "@/react/components/ExprEditor";-import { FeatureAttention } from "@/react/components/FeatureAttention";-import { FeatureBadge } from "@/react/components/FeatureBadge";-import { Button } from "@/react/components/ui/button";-import { ExpirationPicker } from "@/react/components/ui/expiration-picker";-import { FeatureModal } from "@/react/components/ui/feature-modal";-import { Input } from "@/react/components/ui/input";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";-import { StickyActionFooter } from "@/react/components/ui/sticky-action-footer";-import { Tooltip } from "@/react/components/ui/tooltip";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import {- buildMaskingExemption,- useMaskingExemptionExprConfig,-} from "@/react/lib/sensitive-data/maskingExemption";-import { router } from "@/react/router";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";-import { projectNamePrefix } from "@/store/modules/v1/common";+} from "@/modules/cel";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";import type { DatabaseResource } from "@/types";import {MaskingExemptionPolicySchema,diff --git a/frontend/src/react/pages/project/ProjectMaskingExemptionPage.tsx b/frontend/src/routes/project/ProjectMaskingExemptionPage.tsxsimilarity index 97%rename from frontend/src/react/pages/project/ProjectMaskingExemptionPage.tsxrename to frontend/src/routes/project/ProjectMaskingExemptionPage.tsxindex 75c0d56b03..e9cfbec1f1 100644--- a/frontend/src/react/pages/project/ProjectMaskingExemptionPage.tsx+++ b/frontend/src/routes/project/ProjectMaskingExemptionPage.tsx@@ -3,24 +3,21 @@ import dayjs from "dayjs";import { ChevronRight, ShieldCheck } from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { operatorDisplayLabel } from "@/plugins/cel/types/operator";+import { router } from "@/app/router";+import { PROJECT_V1_ROUTE_MASKING_EXEMPTION_CREATE } from "@/app/router/handles";import {AdvancedSearch,getValueFromScopes,type ScopeOption,type SearchParams,type ValueOption,-} from "@/react/components/AdvancedSearch";-import { FeatureAttention } from "@/react/components/FeatureAttention";-import { FeatureBadge } from "@/react/components/FeatureBadge";-import { RouterLink } from "@/react/components/RouterLink";-import { Button } from "@/react/components/ui/button";-import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";-import { FeatureModal } from "@/react/components/ui/feature-modal";+} from "@/components/AdvancedSearch";+import { FeatureAttention } from "@/components/FeatureAttention";+import { FeatureBadge } from "@/components/FeatureBadge";+import { RouterLink } from "@/components/RouterLink";+import { Button } from "@/components/ui/button";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";+import { FeatureModal } from "@/components/ui/feature-modal";import {Table,TableBody,@@ -28,29 +25,28 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { Tabs, TabsList, TabsTrigger } from "@/react/components/ui/tabs";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { useProjectByName } from "@/react/hooks/useProjectByName";+} from "@/components/ui/table";+import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";+import { useCurrentUser } from "@/hooks/useAppState";+import { useProjectByName } from "@/hooks/useProjectByName";import {buildMemberSummary,generateGrantTitle,getConditionExpression,groupByMember,parseExpirationTimestamp,-} from "@/react/lib/sensitive-data/exemptionDataUtils";+} from "@/lib/sensitive-data/exemptionDataUtils";import type {AccessUser,ClassificationLevel,ExemptionGrant,ExemptionMember,-} from "@/react/lib/sensitive-data/types";-import { cn } from "@/react/lib/utils";-import { router } from "@/react/router";-import { PROJECT_V1_ROUTE_MASKING_EXEMPTION_CREATE } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { extractUserEmail, pushNotification } from "@/store";-import { projectNamePrefix } from "@/store/modules/v1/common";+} from "@/lib/sensitive-data/types";+import { cn } from "@/lib/utils";+import { operatorDisplayLabel } from "@/modules/cel/types/operator";+import { extractUserEmail, pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";import type { DatabaseResource } from "@/types";import {groupBindingPrefix,diff --git a/frontend/src/react/pages/project/ProjectPageLayout.test.ts b/frontend/src/routes/project/ProjectPageLayout.test.tssimilarity index 98%rename from frontend/src/react/pages/project/ProjectPageLayout.test.tsrename to frontend/src/routes/project/ProjectPageLayout.test.tsindex e0545e5066..468ed36b0b 100644--- a/frontend/src/react/pages/project/ProjectPageLayout.test.ts+++ b/frontend/src/routes/project/ProjectPageLayout.test.ts@@ -3,7 +3,7 @@ import { join } from "node:path";import { describe, expect, test } from "vitest";const projectDir = import.meta.dirname;-const settingsDir = join(projectDir, "../settings");+const settingsDir = join(projectDir, "../workspace");const componentsDir = join(projectDir, "../../components");const projectListPages = [@@ -63,7 +63,7 @@ describe("project page layout", () => {for (const file of projectListPages) {const source = readProjectPage(file);- expect(source, file).toContain("@/react/components/ProjectPageLayout");+ expect(source, file).toContain("@/components/ProjectPageLayout");expect(source, file).toContain("<ProjectPageLayout");expect(source, file).not.toContain('className="py-4 flex flex-col"');expect(source, file).not.toContain(diff --git a/frontend/src/react/pages/project/ProjectPlanDashboardPage.columns.test.ts b/frontend/src/routes/project/ProjectPlanDashboardPage.columns.test.tssimilarity index 100%rename from frontend/src/react/pages/project/ProjectPlanDashboardPage.columns.test.tsrename to frontend/src/routes/project/ProjectPlanDashboardPage.columns.test.tsdiff --git a/frontend/src/react/pages/project/ProjectPlanDashboardPage.test.tsx b/frontend/src/routes/project/ProjectPlanDashboardPage.test.tsxsimilarity index 88%rename from frontend/src/react/pages/project/ProjectPlanDashboardPage.test.tsxrename to frontend/src/routes/project/ProjectPlanDashboardPage.test.tsxindex 0c28b8dd87..6e844d7324 100644--- a/frontend/src/react/pages/project/ProjectPlanDashboardPage.test.tsx+++ b/frontend/src/routes/project/ProjectPlanDashboardPage.test.tsx@@ -35,28 +35,28 @@ vi.mock("react-i18next", async (importOriginal) => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/components/AdvancedSearch", () => ({+vi.mock("@/components/AdvancedSearch", () => ({AdvancedSearch: () => createElement("div"),}));-vi.mock("@/react/components/DatabaseGroupTable", () => ({+vi.mock("@/components/DatabaseGroupTable", () => ({DatabaseGroupTable: () => null,}));-vi.mock("@/react/components/database", () => ({+vi.mock("@/components/database", () => ({DatabaseTable: () => null,}));-vi.mock("@/react/components/HumanizeTs", () => ({+vi.mock("@/components/HumanizeTs", () => ({HumanizeTs: () => createElement("span"),}));-vi.mock("@/react/components/PermissionGuard", () => ({+vi.mock("@/components/PermissionGuard", () => ({PermissionGuard: ({ children }: { children: ReactNode }) => children,usePermissionCheck: () => [true, false],}));-vi.mock("@/react/components/ProjectPageLayout", () => ({+vi.mock("@/components/ProjectPageLayout", () => ({ProjectPageContent: ({ children }: { children: ReactNode }) =>createElement("div", {}, children),ProjectPageFooter: ({ children }: { children: ReactNode }) =>@@ -66,25 +66,25 @@ vi.mock("@/react/components/ProjectPageLayout", () => ({createElement("div", {}, children),}));-vi.mock("@/react/components/TaskStatusIcon", () => ({+vi.mock("@/components/TaskStatusIcon", () => ({TaskStatusIcon: () => null,}));-vi.mock("@/react/components/ui/badge", () => ({+vi.mock("@/components/ui/badge", () => ({Badge: ({ children }: { children: ReactNode }) =>createElement("span", {}, children),}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({ children, ...props }: { children: ReactNode }) =>createElement("button", props, children),}));-vi.mock("@/react/components/ui/search-input", () => ({+vi.mock("@/components/ui/search-input", () => ({SearchInput: () => createElement("input"),}));-vi.mock("@/react/components/ui/sheet", () => ({+vi.mock("@/components/ui/sheet", () => ({Sheet: ({ children }: { children: ReactNode }) =>createElement("div", {}, children),SheetBody: ({ children }: { children: ReactNode }) =>@@ -99,7 +99,7 @@ vi.mock("@/react/components/ui/sheet", () => ({createElement("h2", {}, children),}));-vi.mock("@/react/components/ui/table", () => ({+vi.mock("@/components/ui/table", () => ({Table: ({ children, ...props }: { children: ReactNode }) =>createElement("table", props, children),TableBody: ({ children }: { children: ReactNode }) =>@@ -114,14 +114,14 @@ vi.mock("@/react/components/ui/table", () => ({createElement("tr", props, children),}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useCurrentUser: () => ({email: "[email protected]",name: "users/[email protected]",}),}));-vi.mock("@/react/hooks/useColumnWidths", () => ({+vi.mock("@/hooks/useColumnWidths", () => ({useColumnWidths: (columns: { defaultWidth: number }[]) => ({widths: columns.map((column) => column.defaultWidth),totalWidth: columns.reduce((sum, column) => sum + column.defaultWidth, 0),@@ -130,33 +130,33 @@ vi.mock("@/react/hooks/useColumnWidths", () => ({}),}));-vi.mock("@/react/hooks/useMediaQuery", () => ({+vi.mock("@/hooks/useMediaQuery", () => ({useMediaQuery: () => false,}));-vi.mock("@/react/hooks/usePagedData", () => ({+vi.mock("@/hooks/usePagedData", () => ({PagedTableFooter: () => null,usePagedData: mocks.usePagedData,}));-vi.mock("@/react/hooks/useProjectByName", () => ({+vi.mock("@/hooks/useProjectByName", () => ({useProjectByName: (name: string) => ({ name }),}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({router: {push: mocks.routerPush,resolve: () => ({ fullPath: "/projects/foo/plans/1" }),},}));-vi.mock("@/react/router/NavigationScrollRestoration", () => ({+vi.mock("@/app/router/NavigationScrollRestoration", () => ({markScrollRestorationEntry: mocks.markScrollRestorationEntry,useScrollRestorationKey: () => mocks.scrollRestorationKey,useScrollRestorationLoadMore: () => undefined,}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const storeState = {projectsByName: {},listUsers: mocks.listUsers,diff --git a/frontend/src/react/pages/project/ProjectPlanDashboardPage.tsx b/frontend/src/routes/project/ProjectPlanDashboardPage.tsxsimilarity index 94%rename from frontend/src/react/pages/project/ProjectPlanDashboardPage.tsxrename to frontend/src/routes/project/ProjectPlanDashboardPage.tsxindex 507bc93c4a..58c67c691e 100644--- a/frontend/src/react/pages/project/ProjectPlanDashboardPage.tsx+++ b/frontend/src/routes/project/ProjectPlanDashboardPage.tsx@@ -9,29 +9,39 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";import { useLocation } from "react-router";import { v4 as uuidv4 } from "uuid";+import { router } from "@/app/router";+import {+ PROJECT_V1_ROUTE_PLAN_DETAIL,+ PROJECT_V1_ROUTE_PLAN_DETAIL_SPEC_DETAIL,+} from "@/app/router/handles";+import {+ markScrollRestorationEntry,+ useScrollRestorationKey,+ useScrollRestorationLoadMore,+} from "@/app/router/NavigationScrollRestoration";import {AdvancedSearch,type ScopeOption,type SearchParams,type ValueOption,-} from "@/react/components/AdvancedSearch";-import { DatabaseGroupTable } from "@/react/components/DatabaseGroupTable";-import { DatabaseTable } from "@/react/components/database";-import { HumanizeTs } from "@/react/components/HumanizeTs";+} from "@/components/AdvancedSearch";+import { DatabaseGroupTable } from "@/components/DatabaseGroupTable";+import { DatabaseTable } from "@/components/database";+import { HumanizeTs } from "@/components/HumanizeTs";import {PermissionGuard,usePermissionCheck,-} from "@/react/components/PermissionGuard";+} from "@/components/PermissionGuard";import {ProjectPageContent,ProjectPageFooter,ProjectPageInfo,ProjectPageLayout,-} from "@/react/components/ProjectPageLayout";-import { TaskStatusIcon } from "@/react/components/TaskStatusIcon";-import { Badge } from "@/react/components/ui/badge";-import { Button } from "@/react/components/ui/button";-import { SearchInput } from "@/react/components/ui/search-input";+} from "@/components/ProjectPageLayout";+import { TaskStatusIcon } from "@/components/TaskStatusIcon";+import { Badge } from "@/components/ui/badge";+import { Button } from "@/components/ui/button";+import { SearchInput } from "@/components/ui/search-input";import {Sheet,SheetBody,@@ -39,7 +49,7 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";+} from "@/components/ui/sheet";import {Table,TableBody,@@ -47,34 +57,24 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { useColumnWidths } from "@/react/hooks/useColumnWidths";-import { useEscapeKey } from "@/react/hooks/useEscapeKey";-import { useMediaQuery } from "@/react/hooks/useMediaQuery";-import { PagedTableFooter, usePagedData } from "@/react/hooks/usePagedData";-import { useProjectByName } from "@/react/hooks/useProjectByName";+} from "@/components/ui/table";+import { useCurrentUser } from "@/hooks/useAppState";+import { useColumnWidths } from "@/hooks/useColumnWidths";+import { useEscapeKey } from "@/hooks/useEscapeKey";+import { useMediaQuery } from "@/hooks/useMediaQuery";+import { PagedTableFooter, usePagedData } from "@/hooks/usePagedData";+import { useProjectByName } from "@/hooks/useProjectByName";import {createAdvancedSearchParser,serializeAdvancedSearch,useURLSearchParam,-} from "@/react/hooks/useURLSearchParam";-import { applyPlanTitleToQuery } from "@/react/lib/plan/title";-import { cn } from "@/react/lib/utils";-import { router } from "@/react/router";-import {- PROJECT_V1_ROUTE_PLAN_DETAIL,- PROJECT_V1_ROUTE_PLAN_DETAIL_SPEC_DETAIL,-} from "@/react/router/handles";-import {- markScrollRestorationEntry,- useScrollRestorationKey,- useScrollRestorationLoadMore,-} from "@/react/router/NavigationScrollRestoration";-import { useAppStore } from "@/react/stores/app";-import { buildPlanFindBySearchParams } from "@/react/stores/app/plan";-import { pushNotification } from "@/store";-import { projectNamePrefix } from "@/store/modules/v1/common";+} from "@/hooks/useURLSearchParam";+import { applyPlanTitleToQuery } from "@/lib/plan/title";+import { cn } from "@/lib/utils";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import { buildPlanFindBySearchParams } from "@/stores/app/plan";+import { projectNamePrefix } from "@/stores/modules/v1/common";import {formatEnvironmentName,getTimeForPbTimestampProtoEs,diff --git a/frontend/src/react/pages/project/ProjectReleaseDashboardPage.tsx b/frontend/src/routes/project/ProjectReleaseDashboardPage.tsxsimilarity index 91%rename from frontend/src/react/pages/project/ProjectReleaseDashboardPage.tsxrename to frontend/src/routes/project/ProjectReleaseDashboardPage.tsxindex 80063ad8ff..41d479c3a6 100644--- a/frontend/src/react/pages/project/ProjectReleaseDashboardPage.tsx+++ b/frontend/src/routes/project/ProjectReleaseDashboardPage.tsx@@ -2,16 +2,18 @@ import { create } from "@bufbuild/protobuf";import { Loader2 } from "lucide-react";import { useCallback, useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { releaseServiceClientConnect } from "@/connect";-import { HumanizeTs } from "@/react/components/HumanizeTs";-import { LearnMoreLink } from "@/react/components/LearnMoreLink";+import { releaseServiceClientConnect } from "@/api";+import { router } from "@/app/router";+import { useScrollRestorationLoadMore } from "@/app/router/NavigationScrollRestoration";+import { HumanizeTs } from "@/components/HumanizeTs";+import { LearnMoreLink } from "@/components/LearnMoreLink";import {ProjectPageContent,ProjectPageFooter,ProjectPageInfo,ProjectPageLayout,-} from "@/react/components/ProjectPageLayout";-import { Button } from "@/react/components/ui/button";+} from "@/components/ProjectPageLayout";+import { Button } from "@/components/ui/button";import {Table,TableBody,@@ -19,14 +21,12 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { PagedTableFooter, usePagedData } from "@/react/hooks/usePagedData";-import { useURLSearchParam } from "@/react/hooks/useURLSearchParam";-import { cn } from "@/react/lib/utils";-import { router } from "@/react/router";-import { useScrollRestorationLoadMore } from "@/react/router/NavigationScrollRestoration";-import { useAppStore } from "@/react/stores/app";-import { projectNamePrefix } from "@/store/modules/v1/common";+} from "@/components/ui/table";+import { PagedTableFooter, usePagedData } from "@/hooks/usePagedData";+import { useURLSearchParam } from "@/hooks/useURLSearchParam";+import { cn } from "@/lib/utils";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";import { getTimeForPbTimestampProtoEs } from "@/types";import { State } from "@/types/proto-es/v1/common_pb";import type { Release } from "@/types/proto-es/v1/release_service_pb";diff --git a/frontend/src/react/pages/project/ProjectReleaseDetailPage.tsx b/frontend/src/routes/project/ProjectReleaseDetailPage.tsxsimilarity index 92%rename from frontend/src/react/pages/project/ProjectReleaseDetailPage.tsxrename to frontend/src/routes/project/ProjectReleaseDetailPage.tsxindex c042704054..b1199d9930 100644--- a/frontend/src/react/pages/project/ProjectReleaseDetailPage.tsx+++ b/frontend/src/routes/project/ProjectReleaseDetailPage.tsx@@ -1,34 +1,34 @@import { Clock4, EllipsisVertical, Link2, LoaderCircle } from "lucide-react";import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { HumanizeTs } from "@/react/components/HumanizeTs";-import { ReleaseFileDetailPanel } from "@/react/components/release/ReleaseFileDetailPanel";-import { ReleaseFileTable } from "@/react/components/release/ReleaseFileTable";+import { HumanizeTs } from "@/components/HumanizeTs";+import { ReleaseFileDetailPanel } from "@/components/release/ReleaseFileDetailPanel";+import { ReleaseFileTable } from "@/components/release/ReleaseFileTable";import {AlertDialog,AlertDialogContent,AlertDialogDescription,AlertDialogFooter,AlertDialogTitle,-} from "@/react/components/ui/alert-dialog";-import { Button } from "@/react/components/ui/button";+} from "@/components/ui/alert-dialog";+import { Button } from "@/components/ui/button";import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";+} from "@/components/ui/dropdown-menu";import {Sheet,SheetBody,SheetContent,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";-import { projectNamePrefix } from "@/store/modules/v1/common";+} from "@/components/ui/sheet";+import { useProjectByName } from "@/hooks/useProjectByName";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";import { getTimeForPbTimestampProtoEs } from "@/types";import { State, VCSType } from "@/types/proto-es/v1/common_pb";import type { Release_File } from "@/types/proto-es/v1/release_service_pb";diff --git a/frontend/src/react/pages/project/ProjectSettingsPage.tsx b/frontend/src/routes/project/ProjectSettingsPage.tsxsimilarity index 97%rename from frontend/src/react/pages/project/ProjectSettingsPage.tsxrename to frontend/src/routes/project/ProjectSettingsPage.tsxindex 51d1411b71..9927833aaf 100644--- a/frontend/src/react/pages/project/ProjectSettingsPage.tsx+++ b/frontend/src/routes/project/ProjectSettingsPage.tsx@@ -10,41 +10,37 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";-import { FeatureBadge } from "@/react/components/FeatureBadge";-import { LabelListEditor } from "@/react/components/LabelListEditor";-import { PermissionGuard } from "@/react/components/PermissionGuard";-import { ResourceIdField } from "@/react/components/ResourceIdField";-import { RouterLink } from "@/react/components/RouterLink";-import { Button } from "@/react/components/ui/button";+import { router, useCurrentRoute } from "@/app/router";import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";+ PROJECT_V1_ROUTE_DASHBOARD,+ WORKSPACE_ROUTE_CUSTOM_APPROVAL,+ WORKSPACE_ROUTE_SQL_REVIEW_CREATE,+ WORKSPACE_ROUTE_SQL_REVIEW_DETAIL,+} from "@/app/router/handles";+import { FeatureBadge } from "@/components/FeatureBadge";+import { LabelListEditor } from "@/components/LabelListEditor";+import { PermissionGuard } from "@/components/PermissionGuard";+import { ResourceIdField } from "@/components/ResourceIdField";+import { RouterLink } from "@/components/RouterLink";+import { Button } from "@/components/ui/button";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";import {FormControlRow,FormField,FormFieldGroup,FormSection,-} from "@/react/components/ui/form";-import { Input } from "@/react/components/ui/input";-import { NumberInput } from "@/react/components/ui/number-input";-import { StickyActionFooter } from "@/react/components/ui/sticky-action-footer";-import { Switch } from "@/react/components/ui/switch";-import { Tooltip } from "@/react/components/ui/tooltip";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { router, useCurrentRoute } from "@/react/router";-import {- PROJECT_V1_ROUTE_DASHBOARD,- WORKSPACE_ROUTE_CUSTOM_APPROVAL,- WORKSPACE_ROUTE_SQL_REVIEW_CREATE,- WORKSPACE_ROUTE_SQL_REVIEW_DETAIL,-} from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { useSQLReviewStore } from "@/react/stores/sqlReview";-import { useWorkspaceApprovalSettingStore } from "@/react/stores/workspaceApprovalSetting";-import { pushNotification } from "@/store";-import { projectNamePrefix } from "@/store/modules/v1/common";+} from "@/components/ui/form";+import { Input } from "@/components/ui/input";+import { NumberInput } from "@/components/ui/number-input";+import { StickyActionFooter } from "@/components/ui/sticky-action-footer";+import { Switch } from "@/components/ui/switch";+import { Tooltip } from "@/components/ui/tooltip";+import { useProjectByName } from "@/hooks/useProjectByName";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";+import { useSQLReviewStore } from "@/stores/sqlReview";+import { useWorkspaceApprovalSettingStore } from "@/stores/workspaceApprovalSetting";import type { Permission, SQLReviewPolicy } from "@/types";import { isDefaultProject } from "@/types";import { State } from "@/types/proto-es/v1/common_pb";diff --git a/frontend/src/react/pages/project/ProjectSettingsPageLayout.test.ts b/frontend/src/routes/project/ProjectSettingsPageLayout.test.tssimilarity index 93%rename from frontend/src/react/pages/project/ProjectSettingsPageLayout.test.tsrename to frontend/src/routes/project/ProjectSettingsPageLayout.test.tsindex e01a256bcc..3e4e44eda4 100644--- a/frontend/src/react/pages/project/ProjectSettingsPageLayout.test.ts+++ b/frontend/src/routes/project/ProjectSettingsPageLayout.test.ts@@ -9,7 +9,7 @@ const pageSource = readFileSync(describe("ProjectSettingsPage layout", () => {test("uses shared form primitives for settings sections and fields", () => {- expect(pageSource).toContain("@/react/components/ui/form");+ expect(pageSource).toContain("@/components/ui/form");expect(pageSource).toContain("FormSection");expect(pageSource).toContain("FormFieldGroup");expect(pageSource).toContain("<FormField");diff --git a/frontend/src/react/pages/project/ProjectSyncSchemaPage.tsx b/frontend/src/routes/project/ProjectSyncSchemaPage.tsxsimilarity index 97%rename from frontend/src/react/pages/project/ProjectSyncSchemaPage.tsxrename to frontend/src/routes/project/ProjectSyncSchemaPage.tsxindex c6beb8f7a3..06515896bb 100644--- a/frontend/src/react/pages/project/ProjectSyncSchemaPage.tsx+++ b/frontend/src/routes/project/ProjectSyncSchemaPage.tsx@@ -12,34 +12,32 @@ import {import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";import { v4 as uuidv4 } from "uuid";-import { DatabaseSelect } from "@/react/components/DatabaseSelect";-import { EngineIcon } from "@/react/components/EngineIcon";-import { EnvironmentSelect } from "@/react/components/EnvironmentSelect";-import { HumanizeTs } from "@/react/components/HumanizeTs";-import { LearnMoreLink } from "@/react/components/LearnMoreLink";+import { router } from "@/app/router";+import { PROJECT_V1_ROUTE_PLAN_DETAIL_SPEC_DETAIL } from "@/app/router/handles";+import { DatabaseSelect } from "@/components/DatabaseSelect";+import { EngineIcon } from "@/components/EngineIcon";+import { EnvironmentSelect } from "@/components/EnvironmentSelect";+import { HumanizeTs } from "@/components/HumanizeTs";+import { LearnMoreLink } from "@/components/LearnMoreLink";import {createMonacoDiffEditor,createMonacoEditor,loadMonacoEditor,setMonacoModelLanguage,-} from "@/react/components/monaco/core";+} from "@/components/monaco/core";import {ProjectPageContent,ProjectPageInfo,ProjectPageLayout,-} from "@/react/components/ProjectPageLayout";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";-import { Combobox, type ComboboxOption } from "@/react/components/ui/combobox";-import { CopyButton } from "@/react/components/ui/copy-button";-import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";-import { LAYER_SURFACE_CLASS } from "@/react/components/ui/layer";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";-import { SearchInput } from "@/react/components/ui/search-input";+} from "@/components/ProjectPageLayout";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";+import { Combobox, type ComboboxOption } from "@/components/ui/combobox";+import { CopyButton } from "@/components/ui/copy-button";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";+import { LAYER_SURFACE_CLASS } from "@/components/ui/layer";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";+import { SearchInput } from "@/components/ui/search-input";import {Sheet,SheetBody,@@ -47,17 +45,15 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { useClickOutside } from "@/react/hooks/useClickOutside";-import { useEscapeKey } from "@/react/hooks/useEscapeKey";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { keyValueStorage } from "@/react/lib/keyValueStorage";-import { applyPlanTitleToQuery } from "@/react/lib/plan/title";-import { cn } from "@/react/lib/utils";-import { router } from "@/react/router";-import { PROJECT_V1_ROUTE_PLAN_DETAIL_SPEC_DETAIL } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { projectNamePrefix } from "@/store/modules/v1/common";+} from "@/components/ui/sheet";+import { useClickOutside } from "@/hooks/useClickOutside";+import { useEscapeKey } from "@/hooks/useEscapeKey";+import { useProjectByName } from "@/hooks/useProjectByName";+import { keyValueStorage } from "@/lib/keyValueStorage";+import { applyPlanTitleToQuery } from "@/lib/plan/title";+import { cn } from "@/lib/utils";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";import {getDateForPbTimestampProtoEs,isValidDatabaseName,diff --git a/frontend/src/react/pages/project/ProjectWebhookCreatePage.tsx b/frontend/src/routes/project/ProjectWebhookCreatePage.tsxsimilarity index 87%rename from frontend/src/react/pages/project/ProjectWebhookCreatePage.tsxrename to frontend/src/routes/project/ProjectWebhookCreatePage.tsxindex 90637960d3..0c58b389db 100644--- a/frontend/src/react/pages/project/ProjectWebhookCreatePage.tsx+++ b/frontend/src/routes/project/ProjectWebhookCreatePage.tsx@@ -1,8 +1,8 @@import { create as createProto } from "@bufbuild/protobuf";import { useMemo } from "react";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { useAppStore } from "@/react/stores/app";-import { projectNamePrefix } from "@/store/modules/v1/common";+import { useProjectByName } from "@/hooks/useProjectByName";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";import { State, WebhookType } from "@/types/proto-es/v1/common_pb";import {Activity_Type,diff --git a/frontend/src/react/pages/project/ProjectWebhookDetailPage.tsx b/frontend/src/routes/project/ProjectWebhookDetailPage.tsxsimilarity index 89%rename from frontend/src/react/pages/project/ProjectWebhookDetailPage.tsxrename to frontend/src/routes/project/ProjectWebhookDetailPage.tsxindex eb2285df87..9457a311e8 100644--- a/frontend/src/react/pages/project/ProjectWebhookDetailPage.tsx+++ b/frontend/src/routes/project/ProjectWebhookDetailPage.tsx@@ -1,8 +1,8 @@import { create as createProto } from "@bufbuild/protobuf";import { useMemo } from "react";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { useAppStore } from "@/react/stores/app";-import { projectNamePrefix } from "@/store/modules/v1/common";+import { useProjectByName } from "@/hooks/useProjectByName";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";import { State } from "@/types/proto-es/v1/common_pb";import { WebhookSchema } from "@/types/proto-es/v1/project_service_pb";import { hasProjectPermissionV2 } from "@/utils";diff --git a/frontend/src/react/pages/project/ProjectWebhookForm.tsx b/frontend/src/routes/project/ProjectWebhookForm.tsxsimilarity index 95%rename from frontend/src/react/pages/project/ProjectWebhookForm.tsxrename to frontend/src/routes/project/ProjectWebhookForm.tsxindex 8bc4b93cd0..cb10a46fd5 100644--- a/frontend/src/react/pages/project/ProjectWebhookForm.tsx+++ b/frontend/src/routes/project/ProjectWebhookForm.tsx@@ -3,36 +3,36 @@ import { isEqual } from "lodash-es";import { EllipsisVertical, Info } from "lucide-react";import { useCallback, useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { ExternalUrlAlert } from "@/react/components/ExternalUrlAlert";-import { RouterLink } from "@/react/components/RouterLink";+import { router } from "@/app/router";+import {+ PROJECT_V1_ROUTE_WEBHOOK_DETAIL,+ PROJECT_V1_ROUTE_WEBHOOKS,+ WORKSPACE_ROUTE_IM,+} from "@/app/router/handles";+import { ExternalUrlAlert } from "@/components/ExternalUrlAlert";+import { RouterLink } from "@/components/RouterLink";import {AlertDialog,AlertDialogContent,AlertDialogDescription,AlertDialogFooter,AlertDialogTitle,-} from "@/react/components/ui/alert-dialog";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";+} from "@/components/ui/alert-dialog";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";-import { Input } from "@/react/components/ui/input";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";-import { StickyActionFooter } from "@/react/components/ui/sticky-action-footer";-import { Tooltip } from "@/react/components/ui/tooltip";-import { WebhookTypeIcon } from "@/react/components/WebhookTypeIcon";-import { router } from "@/react/router";-import {- PROJECT_V1_ROUTE_WEBHOOK_DETAIL,- PROJECT_V1_ROUTE_WEBHOOKS,- WORKSPACE_ROUTE_IM,-} from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/components/ui/dropdown-menu";+import { Input } from "@/components/ui/input";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";+import { StickyActionFooter } from "@/components/ui/sticky-action-footer";+import { Tooltip } from "@/components/ui/tooltip";+import { WebhookTypeIcon } from "@/components/WebhookTypeIcon";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import {projectWebhookV1ActivityItemList,projectWebhookV1TypeItemList,diff --git a/frontend/src/react/pages/project/ProjectWebhooksPage.tsx b/frontend/src/routes/project/ProjectWebhooksPage.tsxsimilarity index 92%rename from frontend/src/react/pages/project/ProjectWebhooksPage.tsxrename to frontend/src/routes/project/ProjectWebhooksPage.tsxindex d5ca680181..3a77117035 100644--- a/frontend/src/react/pages/project/ProjectWebhooksPage.tsx+++ b/frontend/src/routes/project/ProjectWebhooksPage.tsx@@ -1,26 +1,31 @@import { EllipsisVertical, Plus } from "lucide-react";import { useCallback, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { PermissionGuard } from "@/react/components/PermissionGuard";+import { router } from "@/app/router";+import {+ PROJECT_V1_ROUTE_WEBHOOK_CREATE,+ PROJECT_V1_ROUTE_WEBHOOK_DETAIL,+} from "@/app/router/handles";+import { PermissionGuard } from "@/components/PermissionGuard";import {ProjectPageContent,ProjectPageLayout,ProjectPageToolbar,-} from "@/react/components/ProjectPageLayout";+} from "@/components/ProjectPageLayout";import {AlertDialog,AlertDialogContent,AlertDialogDescription,AlertDialogFooter,AlertDialogTitle,-} from "@/react/components/ui/alert-dialog";-import { Button } from "@/react/components/ui/button";+} from "@/components/ui/alert-dialog";+import { Button } from "@/components/ui/button";import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";+} from "@/components/ui/dropdown-menu";import {Table,TableBody,@@ -28,17 +33,12 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { WebhookTypeIcon } from "@/react/components/WebhookTypeIcon";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { router } from "@/react/router";-import {- PROJECT_V1_ROUTE_WEBHOOK_CREATE,- PROJECT_V1_ROUTE_WEBHOOK_DETAIL,-} from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";-import { projectNamePrefix } from "@/store/modules/v1/common";+} from "@/components/ui/table";+import { WebhookTypeIcon } from "@/components/WebhookTypeIcon";+import { useProjectByName } from "@/hooks/useProjectByName";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";import { projectWebhookV1ActivityItemList } from "@/types";import { State } from "@/types/proto-es/v1/common_pb";import type { Webhook } from "@/types/proto-es/v1/project_service_pb";diff --git a/frontend/src/react/pages/project/database-detail/DatabaseDetailActions.tsx b/frontend/src/routes/project/database-detail/DatabaseDetailActions.tsxsimilarity index 92%rename from frontend/src/react/pages/project/database-detail/DatabaseDetailActions.tsxrename to frontend/src/routes/project/database-detail/DatabaseDetailActions.tsxindex ce7d75fa17..3386faed9b 100644--- a/frontend/src/react/pages/project/database-detail/DatabaseDetailActions.tsx+++ b/frontend/src/routes/project/database-detail/DatabaseDetailActions.tsx@@ -1,11 +1,11 @@import { ArrowRightLeft, Pencil } from "lucide-react";import { useMemo } from "react";import { useTranslation } from "react-i18next";-import { PermissionGuard } from "@/react/components/PermissionGuard";-import { Button } from "@/react/components/ui/button";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { preCreateIssue } from "@/react/lib/plan/issue";-import { useAppStore } from "@/react/stores/app";+import { PermissionGuard } from "@/components/PermissionGuard";+import { Button } from "@/components/ui/button";+import { useProjectByName } from "@/hooks/useProjectByName";+import { preCreateIssue } from "@/lib/plan/issue";+import { useAppStore } from "@/stores/app";import type { Permission } from "@/types";import type { Database } from "@/types/proto-es/v1/database_service_pb";import { DatabaseExportSchemaButton } from "./DatabaseExportSchemaButton";diff --git a/frontend/src/react/pages/project/database-detail/DatabaseDetailHeader.tsx b/frontend/src/routes/project/database-detail/DatabaseDetailHeader.tsxsimilarity index 95%rename from frontend/src/react/pages/project/database-detail/DatabaseDetailHeader.tsxrename to frontend/src/routes/project/database-detail/DatabaseDetailHeader.tsxindex 7793b22acc..7bce9177c4 100644--- a/frontend/src/react/pages/project/database-detail/DatabaseDetailHeader.tsx+++ b/frontend/src/routes/project/database-detail/DatabaseDetailHeader.tsx@@ -1,11 +1,11 @@import { Check, Copy, ShieldAlert } from "lucide-react";import { useCallback, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { EngineIcon } from "@/react/components/EngineIcon";-import { RouterLink } from "@/react/components/RouterLink";-import { useEnvironment, usePlanFeature } from "@/react/hooks/useAppState";-import { writeTextToClipboard } from "@/react/lib/clipboard";-import { INSTANCE_ROUTE_DETAIL } from "@/react/router/handles";+import { INSTANCE_ROUTE_DETAIL } from "@/app/router/handles";+import { EngineIcon } from "@/components/EngineIcon";+import { RouterLink } from "@/components/RouterLink";+import { useEnvironment, usePlanFeature } from "@/hooks/useAppState";+import { writeTextToClipboard } from "@/lib/clipboard";import type { Database } from "@/types/proto-es/v1/database_service_pb";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import {diff --git a/frontend/src/react/pages/project/database-detail/DatabaseExportSchemaButton.tsx b/frontend/src/routes/project/database-detail/DatabaseExportSchemaButton.tsxsimilarity index 96%rename from frontend/src/react/pages/project/database-detail/DatabaseExportSchemaButton.tsxrename to frontend/src/routes/project/database-detail/DatabaseExportSchemaButton.tsxindex 7e041b6371..a33c2c63db 100644--- a/frontend/src/react/pages/project/database-detail/DatabaseExportSchemaButton.tsx+++ b/frontend/src/routes/project/database-detail/DatabaseExportSchemaButton.tsx@@ -3,14 +3,14 @@ import { ConnectError } from "@connectrpc/connect";import { ChevronDown, Download } from "lucide-react";import { useCallback, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { databaseServiceClientConnect } from "@/connect";+import { databaseServiceClientConnect } from "@/api";import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";-import { pushNotification } from "@/store";+} from "@/components/ui/dropdown-menu";+import { pushNotification } from "@/stores";import type { Database } from "@/types/proto-es/v1/database_service_pb";import {GetDatabaseSDLSchemaRequest_SDLFormat,diff --git a/frontend/src/react/pages/project/database-detail/DatabaseSQLEditorButton.tsx b/frontend/src/routes/project/database-detail/DatabaseSQLEditorButton.tsxsimilarity index 93%rename from frontend/src/react/pages/project/database-detail/DatabaseSQLEditorButton.tsxrename to frontend/src/routes/project/database-detail/DatabaseSQLEditorButton.tsxindex 66743704af..889a791630 100644--- a/frontend/src/react/pages/project/database-detail/DatabaseSQLEditorButton.tsx+++ b/frontend/src/routes/project/database-detail/DatabaseSQLEditorButton.tsx@@ -1,9 +1,9 @@import { SquareTerminal } from "lucide-react";import { useCallback } from "react";import { useTranslation } from "react-i18next";-import { router } from "@/react/router";-import { SQL_EDITOR_DATABASE_MODULE } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";+import { router } from "@/app/router";+import { SQL_EDITOR_DATABASE_MODULE } from "@/app/router/handles";+import { useAppStore } from "@/stores/app";import type { Database } from "@/types/proto-es/v1/database_service_pb";import { defaultProject, isDefaultProject } from "@/types/v1/project";diff --git a/frontend/src/react/pages/project/database-detail/DatabaseSyncButton.tsx b/frontend/src/routes/project/database-detail/DatabaseSyncButton.tsxsimilarity index 92%rename from frontend/src/react/pages/project/database-detail/DatabaseSyncButton.tsxrename to frontend/src/routes/project/database-detail/DatabaseSyncButton.tsxindex 637345b863..bb6985715f 100644--- a/frontend/src/react/pages/project/database-detail/DatabaseSyncButton.tsx+++ b/frontend/src/routes/project/database-detail/DatabaseSyncButton.tsx@@ -2,9 +2,9 @@ import { ConnectError } from "@connectrpc/connect";import { RefreshCw } from "lucide-react";import { useCallback, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+import { Button } from "@/components/ui/button";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import type { Database } from "@/types/proto-es/v1/database_service_pb";const extractDatabaseName = (resource: string) => {diff --git a/frontend/src/react/pages/project/database-detail/catalog/GrantAccessDialog.test.tsx b/frontend/src/routes/project/database-detail/catalog/GrantAccessDialog.test.tsxsimilarity index 94%rename from frontend/src/react/pages/project/database-detail/catalog/GrantAccessDialog.test.tsxrename to frontend/src/routes/project/database-detail/catalog/GrantAccessDialog.test.tsxindex 766791f93e..a0be5087c0 100644--- a/frontend/src/react/pages/project/database-detail/catalog/GrantAccessDialog.test.tsx+++ b/frontend/src/routes/project/database-detail/catalog/GrantAccessDialog.test.tsx@@ -6,7 +6,7 @@ import type {import { act } from "react";import { createRoot } from "react-dom/client";import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";-import type { SensitiveColumn } from "@/react/lib/sensitive-data/types";+import type { SensitiveColumn } from "@/lib/sensitive-data/types";(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }@@ -42,15 +42,15 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/lib/sensitive-data/components-utils", () => ({+vi.mock("@/lib/sensitive-data/components-utils", () => ({getClassificationLevelOptions: () => [],}));-vi.mock("@/react/lib/sensitive-data/exemptionDataUtils", () => ({+vi.mock("@/lib/sensitive-data/exemptionDataUtils", () => ({rewriteResourceDatabase: vi.fn((expression: string) => expression),}));-vi.mock("@/react/lib/sensitive-data/utils", () => ({+vi.mock("@/lib/sensitive-data/utils", () => ({convertSensitiveColumnToDatabaseResource: vi.fn((column) => ({databaseFullName: column.database.name,schema: column.maskData.schema,@@ -60,7 +60,7 @@ vi.mock("@/react/lib/sensitive-data/utils", () => ({getExpressionsForDatabaseResource: vi.fn(() => []),}));-vi.mock("@/plugins/cel", () => ({+vi.mock("@/modules/cel", () => ({ExprType: {Condition: "Condition",ConditionGroup: "ConditionGroup",@@ -80,7 +80,7 @@ vi.mock("@/plugins/cel", () => ({wrapAsGroup: vi.fn((expr) => expr),}));-vi.mock("@/react/components/AccountMultiSelect", () => ({+vi.mock("@/components/AccountMultiSelect", () => ({AccountMultiSelect: ({value,onChange,@@ -96,7 +96,7 @@ vi.mock("@/react/components/AccountMultiSelect", () => ({),}));-vi.mock("@/react/components/DatabaseResourceSelector", () => ({+vi.mock("@/components/DatabaseResourceSelector", () => ({DatabaseResourceSelector: ({value,includeColumns,@@ -133,7 +133,7 @@ vi.mock("@/react/components/DatabaseResourceSelector", () => ({),}));-vi.mock("@/react/components/ExprEditor", () => ({+vi.mock("@/components/ExprEditor", () => ({ExprEditor: ({expr,onUpdate,@@ -164,26 +164,26 @@ vi.mock("@/react/components/ExprEditor", () => ({),}));-vi.mock("@/react/components/FeatureAttention", () => ({+vi.mock("@/components/FeatureAttention", () => ({FeatureAttention: () => <div data-testid="feature-attention" />,}));-vi.mock("@/react/components/FeatureBadge", () => ({+vi.mock("@/components/FeatureBadge", () => ({FeatureBadge: () => <div data-testid="feature-badge" />,}));-vi.mock("@/react/components/ui/feature-modal", () => ({+vi.mock("@/components/ui/feature-modal", () => ({FeatureModal: ({ open }: { open: boolean }) =>open ? <div data-testid="feature-modal" /> : null,}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: (props: ButtonHTMLAttributes<HTMLButtonElement>) => (<button {...props} />),}));-vi.mock("@/react/components/ui/dialog", () => ({+vi.mock("@/components/ui/dialog", () => ({Dialog: ({ children, open }: { children: ReactNode; open: boolean }) =>open ? <div>{children}</div> : null,DialogContent: ({ children }: { children: ReactNode }) => (@@ -192,7 +192,7 @@ vi.mock("@/react/components/ui/dialog", () => ({DialogTitle: ({ children }: { children: ReactNode }) => <div>{children}</div>,}));-vi.mock("@/react/components/ui/expiration-picker", () => ({+vi.mock("@/components/ui/expiration-picker", () => ({ExpirationPicker: ({minDate,onChange,@@ -210,20 +210,20 @@ vi.mock("@/react/components/ui/expiration-picker", () => ({),}));-vi.mock("@/react/components/ui/input", () => ({+vi.mock("@/components/ui/input", () => ({Input: (props: InputHTMLAttributes<HTMLInputElement>) => <input {...props} />,}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: ({ children }: { children: ReactNode }) => <>{children}</>,}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({featureToRef: mocks.featureToRef,pushNotification: vi.fn(),}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: Object.assign((selector: (state: {@@ -262,7 +262,7 @@ vi.mock("@/utils/v1/cel", () => ({batchConvertCELStringToParsedExpr: mocks.batchConvertCELStringToParsedExpr,}));-import { getExpressionsForDatabaseResource } from "@/react/lib/sensitive-data/utils";+import { getExpressionsForDatabaseResource } from "@/lib/sensitive-data/utils";import { GrantAccessDialog } from "./GrantAccessDialog";const flush = async () => {diff --git a/frontend/src/react/pages/project/database-detail/catalog/GrantAccessDialog.tsx b/frontend/src/routes/project/database-detail/catalog/GrantAccessDialog.tsxsimilarity index 92%rename from frontend/src/react/pages/project/database-detail/catalog/GrantAccessDialog.tsxrename to frontend/src/routes/project/database-detail/catalog/GrantAccessDialog.tsxindex 1531713134..79ce07c652 100644--- a/frontend/src/react/pages/project/database-detail/catalog/GrantAccessDialog.tsx+++ b/frontend/src/routes/project/database-detail/catalog/GrantAccessDialog.tsx@@ -3,7 +3,25 @@ import dayjs from "dayjs";import { CircleHelp } from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import type { ConditionGroupExpr } from "@/plugins/cel";+import { AccountMultiSelect } from "@/components/AccountMultiSelect";+import { DatabaseResourceSelector } from "@/components/DatabaseResourceSelector";+import { ExprEditor } from "@/components/ExprEditor";+import { FeatureAttention } from "@/components/FeatureAttention";+import { FeatureBadge } from "@/components/FeatureBadge";+import { Button } from "@/components/ui/button";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";+import { ExpirationPicker } from "@/components/ui/expiration-picker";+import { FeatureModal } from "@/components/ui/feature-modal";+import { Input } from "@/components/ui/input";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";+import { Tooltip } from "@/components/ui/tooltip";+import {+ buildMaskingExemption,+ useMaskingExemptionExprConfig,+} from "@/lib/sensitive-data/maskingExemption";+import type { SensitiveColumn } from "@/lib/sensitive-data/types";+import { convertSensitiveColumnToDatabaseResource } from "@/lib/sensitive-data/utils";+import type { ConditionGroupExpr } from "@/modules/cel";import {buildCELExpr,ExprType,@@ -11,31 +29,9 @@ import {resolveCELExpr,validateSimpleExpr,wrapAsGroup,-} from "@/plugins/cel";-import { AccountMultiSelect } from "@/react/components/AccountMultiSelect";-import { DatabaseResourceSelector } from "@/react/components/DatabaseResourceSelector";-import { ExprEditor } from "@/react/components/ExprEditor";-import { FeatureAttention } from "@/react/components/FeatureAttention";-import { FeatureBadge } from "@/react/components/FeatureBadge";-import { Button } from "@/react/components/ui/button";-import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";-import { ExpirationPicker } from "@/react/components/ui/expiration-picker";-import { FeatureModal } from "@/react/components/ui/feature-modal";-import { Input } from "@/react/components/ui/input";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";-import { Tooltip } from "@/react/components/ui/tooltip";-import {- buildMaskingExemption,- useMaskingExemptionExprConfig,-} from "@/react/lib/sensitive-data/maskingExemption";-import type { SensitiveColumn } from "@/react/lib/sensitive-data/types";-import { convertSensitiveColumnToDatabaseResource } from "@/react/lib/sensitive-data/utils";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/modules/cel";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import type { DatabaseResource } from "@/types";import type {Instance,diff --git a/frontend/src/react/pages/project/database-detail/catalog/SensitiveColumnTable.tsx b/frontend/src/routes/project/database-detail/catalog/SensitiveColumnTable.tsxsimilarity index 96%rename from frontend/src/react/pages/project/database-detail/catalog/SensitiveColumnTable.tsxrename to frontend/src/routes/project/database-detail/catalog/SensitiveColumnTable.tsxindex c275d1d4b4..a15dbd8d7a 100644--- a/frontend/src/react/pages/project/database-detail/catalog/SensitiveColumnTable.tsx+++ b/frontend/src/routes/project/database-detail/catalog/SensitiveColumnTable.tsx@@ -1,16 +1,16 @@import { Trash2 } from "lucide-react";import { useMemo } from "react";import { useTranslation } from "react-i18next";-import { RouterLink } from "@/react/components/RouterLink";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";+import { RouterLink } from "@/components/RouterLink";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";import {Select,SelectContent,SelectItem,SelectTrigger,SelectValue,-} from "@/react/components/ui/select";+} from "@/components/ui/select";import {Table,TableBody,@@ -18,8 +18,8 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import type { MaskData } from "@/react/lib/sensitive-data/types";+} from "@/components/ui/table";+import type { MaskData } from "@/lib/sensitive-data/types";import type { Database } from "@/types/proto-es/v1/database_service_pb";import { autoDatabaseRoute } from "@/utils";diff --git a/frontend/src/react/pages/project/database-detail/changelog/DatabaseChangelogTable.test.tsx b/frontend/src/routes/project/database-detail/changelog/DatabaseChangelogTable.test.tsxsimilarity index 91%rename from frontend/src/react/pages/project/database-detail/changelog/DatabaseChangelogTable.test.tsxrename to frontend/src/routes/project/database-detail/changelog/DatabaseChangelogTable.test.tsxindex dba3260ebc..1bba9ffa34 100644--- a/frontend/src/react/pages/project/database-detail/changelog/DatabaseChangelogTable.test.tsx+++ b/frontend/src/routes/project/database-detail/changelog/DatabaseChangelogTable.test.tsx@@ -15,8 +15,8 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {push: vi.fn(),},@@ -30,7 +30,7 @@ vi.mock("@/types", () => ({getDateForPbTimestampProtoEs: () => new Date("2026-04-15T00:00:00Z"),}));-vi.mock("@/react/components/HumanizeTs", () => ({+vi.mock("@/components/HumanizeTs", () => ({HumanizeTs: () => null,}));diff --git a/frontend/src/react/pages/project/database-detail/changelog/DatabaseChangelogTable.tsx b/frontend/src/routes/project/database-detail/changelog/DatabaseChangelogTable.tsxsimilarity index 96%rename from frontend/src/react/pages/project/database-detail/changelog/DatabaseChangelogTable.tsxrename to frontend/src/routes/project/database-detail/changelog/DatabaseChangelogTable.tsxindex 63eb0adcbf..6554f4e3e7 100644--- a/frontend/src/react/pages/project/database-detail/changelog/DatabaseChangelogTable.tsx+++ b/frontend/src/routes/project/database-detail/changelog/DatabaseChangelogTable.tsx@@ -1,7 +1,8 @@import { Check } from "lucide-react";import { useCallback } from "react";import { useTranslation } from "react-i18next";-import { HumanizeTs } from "@/react/components/HumanizeTs";+import { router } from "@/app/router";+import { HumanizeTs } from "@/components/HumanizeTs";import {Table,TableBody,@@ -9,8 +10,7 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { router } from "@/react/router";+} from "@/components/ui/table";import { getDateForPbTimestampProtoEs } from "@/types";import {type Changelog,diff --git a/frontend/src/react/pages/project/database-detail/overview/DatabaseObjectExplorer.test.tsx b/frontend/src/routes/project/database-detail/overview/DatabaseObjectExplorer.test.tsxsimilarity index 96%rename from frontend/src/react/pages/project/database-detail/overview/DatabaseObjectExplorer.test.tsxrename to frontend/src/routes/project/database-detail/overview/DatabaseObjectExplorer.test.tsxindex d53242838a..d9688aabf0 100644--- a/frontend/src/react/pages/project/database-detail/overview/DatabaseObjectExplorer.test.tsx+++ b/frontend/src/routes/project/database-detail/overview/DatabaseObjectExplorer.test.tsx@@ -58,8 +58,8 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {replace: mocks.routerReplace,currentRoute: mocks.currentRoute,@@ -81,7 +81,7 @@ vi.mock("@/react/router", async (importOriginal) => ({// store. Merge the setting mocks into the `mocks.dbSchemaStore` shape so the// test bodies' per-scenario `.mockReturnValue({ getSchemaList, ... })` calls// keep working without further changes.-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const getState = () => ({getOrFetchSettingByName: mocks.getOrFetchSettingByName,getProjectClassification: mocks.getProjectClassification,@@ -97,20 +97,20 @@ vi.mock("@/react/stores/app", () => {};});-vi.mock("@/react/hooks/useAppDatabaseMetadata", () => ({+vi.mock("@/hooks/useAppDatabaseMetadata", () => ({useAppDatabaseMetadata: (name: string) =>mocks.dbSchemaStore().getDatabaseMetadata?.(name) ?? { schemas: [] },}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({featureToRef: mocks.featureToRef,}));-vi.mock("@/react/hooks/useDatabaseCatalog", () => ({+vi.mock("@/hooks/useDatabaseCatalog", () => ({useDatabaseCatalog: () => mocks.useDatabaseCatalog(),}));-vi.mock("@/react/stores/app/databaseCatalog", () => ({+vi.mock("@/stores/app/databaseCatalog", () => ({getColumnCatalog: mocks.getColumnCatalog,getTableCatalog: mocks.getTableCatalog,}));@@ -132,7 +132,7 @@ vi.mock("@/utils", () => ({instanceV1SupportsTrigger: mocks.instanceV1SupportsTrigger,}));-vi.mock("@/react/components/ui/input", () => ({+vi.mock("@/components/ui/input", () => ({Input: (props: React.InputHTMLAttributes<HTMLInputElement>) => (<input {...props} />),diff --git a/frontend/src/react/pages/project/database-detail/overview/DatabaseObjectExplorer.tsx b/frontend/src/routes/project/database-detail/overview/DatabaseObjectExplorer.tsxsimilarity index 97%rename from frontend/src/react/pages/project/database-detail/overview/DatabaseObjectExplorer.tsxrename to frontend/src/routes/project/database-detail/overview/DatabaseObjectExplorer.tsxindex bc91846486..fc559c4ff0 100644--- a/frontend/src/react/pages/project/database-detail/overview/DatabaseObjectExplorer.tsx+++ b/frontend/src/routes/project/database-detail/overview/DatabaseObjectExplorer.tsx@@ -1,22 +1,22 @@import { useEffect, useState } from "react";import { useTranslation } from "react-i18next";-import { getColumnDefaultValuePlaceholder } from "@/react/components/SchemaEditorLite/core/columnDefaultValue";-import { Input } from "@/react/components/ui/input";+import { router, useCurrentRoute } from "@/app/router";+import { Input } from "@/components/ui/input";import {Select,SelectContent,SelectItem,SelectTrigger,SelectValue,-} from "@/react/components/ui/select";-import { useAppDatabaseMetadata } from "@/react/hooks/useAppDatabaseMetadata";-import { useDatabaseCatalog } from "@/react/hooks/useDatabaseCatalog";-import { router, useCurrentRoute } from "@/react/router";-import { useAppStore } from "@/react/stores/app";+} from "@/components/ui/select";+import { useAppDatabaseMetadata } from "@/hooks/useAppDatabaseMetadata";+import { useDatabaseCatalog } from "@/hooks/useDatabaseCatalog";+import { getColumnDefaultValuePlaceholder } from "@/modules/schema-editor/core/columnDefaultValue";+import { useAppStore } from "@/stores/app";import {getColumnCatalog,getTableCatalog,-} from "@/react/stores/app/databaseCatalog";+} from "@/stores/app/databaseCatalog";import { Engine } from "@/types/proto-es/v1/common_pb";import type {Database,diff --git a/frontend/src/react/pages/project/database-detail/overview/ObjectSectionTable.tsx b/frontend/src/routes/project/database-detail/overview/ObjectSectionTable.tsxsimilarity index 100%rename from frontend/src/react/pages/project/database-detail/overview/ObjectSectionTable.tsxrename to frontend/src/routes/project/database-detail/overview/ObjectSectionTable.tsxdiff --git a/frontend/src/react/pages/project/database-detail/overview/TableDetailDialog.test.tsx b/frontend/src/routes/project/database-detail/overview/TableDetailDialog.test.tsxsimilarity index 97%rename from frontend/src/react/pages/project/database-detail/overview/TableDetailDialog.test.tsxrename to frontend/src/routes/project/database-detail/overview/TableDetailDialog.test.tsxindex f4b38eb6a0..3d5dd8d7b9 100644--- a/frontend/src/react/pages/project/database-detail/overview/TableDetailDialog.test.tsx+++ b/frontend/src/routes/project/database-detail/overview/TableDetailDialog.test.tsx@@ -47,7 +47,7 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/react/components/ui/dialog", () => ({+vi.mock("@/components/ui/dialog", () => ({Dialog: ({ open, children }: { open: boolean; children: ReactNode }) =>open ? <div data-testid="dialog-root">{children}</div> : null,DialogContent: ({ children }: { children: ReactNode }) => (@@ -56,17 +56,17 @@ vi.mock("@/react/components/ui/dialog", () => ({DialogTitle: ({ children }: { children: ReactNode }) => <h1>{children}</h1>,}));-vi.mock("@/react/components/ui/input", () => ({+vi.mock("@/components/ui/input", () => ({Input: (props: InputHTMLAttributes<HTMLInputElement>) => <input {...props} />,}));-vi.mock("@/react/components/ui/search-input", () => ({+vi.mock("@/components/ui/search-input", () => ({SearchInput: (props: InputHTMLAttributes<HTMLInputElement>) => (<input {...props} />),}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({ children, ...props }: ButtonHTMLAttributes<HTMLButtonElement>) => (<button type="button" {...props}>{children}@@ -74,7 +74,7 @@ vi.mock("@/react/components/ui/button", () => ({),}));-vi.mock("@/react/components/ui/table", () => ({+vi.mock("@/components/ui/table", () => ({Table: ({children,...props@@ -113,25 +113,25 @@ vi.mock("@/react/components/ui/table", () => ({),}));-vi.mock("@/react/components/FeatureAttention", () => ({+vi.mock("@/components/FeatureAttention", () => ({FeatureAttention: ({ feature }: { feature: PlanFeature }) => (<div>{PlanFeature[feature]}</div>),}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: mocks.pushNotification,}));-vi.mock("@/react/hooks/useDatabaseCatalog", () => ({+vi.mock("@/hooks/useDatabaseCatalog", () => ({useDatabaseCatalog: () => mocks.useDatabaseCatalog(),}));-vi.mock("@/react/stores/app/databaseCatalog", () => ({+vi.mock("@/stores/app/databaseCatalog", () => ({getTableCatalog: mocks.getTableCatalog,}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const getState = () => ({updateDatabaseCatalog: mocks.updateDatabaseCatalog,getOrFetchSettingByName: mocks.getOrFetchSettingByName,@@ -157,7 +157,7 @@ vi.mock("@/utils", () => ({hasWorkspacePermissionV2: mocks.hasWorkspacePermissionV2,}));-vi.mock("@/react/lib/column-data-table/utils", () => ({+vi.mock("@/lib/column-data-table/utils", () => ({updateColumnCatalog: mocks.updateColumnCatalog,updateTableCatalog: mocks.updateTableCatalog,}));diff --git a/frontend/src/react/pages/project/database-detail/overview/TableDetailDialog.tsx b/frontend/src/routes/project/database-detail/overview/TableDetailDialog.tsxsimilarity index 98%rename from frontend/src/react/pages/project/database-detail/overview/TableDetailDialog.tsxrename to frontend/src/routes/project/database-detail/overview/TableDetailDialog.tsxindex fd97e4c7de..2252389d3c 100644--- a/frontend/src/react/pages/project/database-detail/overview/TableDetailDialog.tsx+++ b/frontend/src/routes/project/database-detail/overview/TableDetailDialog.tsx@@ -4,16 +4,12 @@ import { Pencil, X } from "lucide-react";import type { MouseEvent, ReactNode } from "react";import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { FeatureAttention } from "@/react/components/FeatureAttention";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";-import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";-import { Input } from "@/react/components/ui/input";-import { SearchInput } from "@/react/components/ui/search-input";+import { FeatureAttention } from "@/components/FeatureAttention";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";+import { Input } from "@/components/ui/input";+import { SearchInput } from "@/components/ui/search-input";import {Table,TableBody,@@ -21,16 +17,16 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { Textarea } from "@/react/components/ui/textarea";-import { useDatabaseCatalog } from "@/react/hooks/useDatabaseCatalog";+} from "@/components/ui/table";+import { Textarea } from "@/components/ui/textarea";+import { useDatabaseCatalog } from "@/hooks/useDatabaseCatalog";import {updateColumnCatalog,updateTableCatalog,-} from "@/react/lib/column-data-table/utils";-import { useAppStore } from "@/react/stores/app";-import { getTableCatalog } from "@/react/stores/app/databaseCatalog";-import { pushNotification } from "@/store";+} from "@/lib/column-data-table/utils";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import { getTableCatalog } from "@/stores/app/databaseCatalog";import {SchemaCatalogSchema,TableCatalogSchema,diff --git a/frontend/src/react/pages/project/database-detail/overview/TableMetadataTable.test.tsx b/frontend/src/routes/project/database-detail/overview/TableMetadataTable.test.tsxsimilarity index 95%rename from frontend/src/react/pages/project/database-detail/overview/TableMetadataTable.test.tsxrename to frontend/src/routes/project/database-detail/overview/TableMetadataTable.test.tsxindex 73b7ca36fb..bbccaa17dc 100644--- a/frontend/src/react/pages/project/database-detail/overview/TableMetadataTable.test.tsx+++ b/frontend/src/routes/project/database-detail/overview/TableMetadataTable.test.tsx@@ -52,11 +52,11 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({featureToRef: mocks.featureToRef,}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const getState = () => ({getOrFetchSettingByName: mocks.getOrFetchSettingByName,getSettingByName: mocks.getSettingByName,@@ -75,13 +75,13 @@ vi.mock("@/react/stores/app", () => {};});-vi.mock("@/react/hooks/useDatabaseCatalog", () => ({+vi.mock("@/hooks/useDatabaseCatalog", () => ({useDatabaseCatalog: () => mocks.useDatabaseCatalog(),}));-vi.mock("@/react/stores/app/databaseCatalog", async (importOriginal) => ({+vi.mock("@/stores/app/databaseCatalog", async (importOriginal) => ({...(await importOriginal<- typeof import("@/react/stores/app/databaseCatalog")+ typeof import("@/stores/app/databaseCatalog")>()),getTableCatalog: mocks.getTableCatalog,}));@@ -97,11 +97,11 @@ vi.mock("@/utils", () => ({hasWorkspacePermissionV2: mocks.hasWorkspacePermissionV2,}));-vi.mock("@/react/lib/column-data-table/utils", () => ({+vi.mock("@/lib/column-data-table/utils", () => ({updateTableCatalog: mocks.updateTableCatalog,}));-vi.mock("@/react/components/ui/dialog", () => ({+vi.mock("@/components/ui/dialog", () => ({Dialog: ({ open, children }: { open: boolean; children: ReactNode }) =>open ? (<div@@ -122,13 +122,13 @@ vi.mock("@/react/components/ui/dialog", () => ({DialogTitle: ({ children }: { children: ReactNode }) => <h1>{children}</h1>,}));-vi.mock("@/react/components/ui/search-input", () => ({+vi.mock("@/components/ui/search-input", () => ({SearchInput: (props: InputHTMLAttributes<HTMLInputElement>) => (<input {...props} />),}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({ children, ...props }: ButtonHTMLAttributes<HTMLButtonElement>) => (<button type="button" {...props}>{children}@@ -136,7 +136,7 @@ vi.mock("@/react/components/ui/button", () => ({),}));-vi.mock("@/react/components/ui/table", () => ({+vi.mock("@/components/ui/table", () => ({Table: ({children,...props@@ -175,7 +175,7 @@ vi.mock("@/react/components/ui/table", () => ({),}));-vi.mock("@/react/components/FeatureAttention", () => ({+vi.mock("@/components/FeatureAttention", () => ({FeatureAttention: ({ feature }: { feature: PlanFeature }) => (<div>{PlanFeature[feature]}</div>),diff --git a/frontend/src/react/pages/project/database-detail/overview/TableMetadataTable.tsx b/frontend/src/routes/project/database-detail/overview/TableMetadataTable.tsxsimilarity index 95%rename from frontend/src/react/pages/project/database-detail/overview/TableMetadataTable.tsxrename to frontend/src/routes/project/database-detail/overview/TableMetadataTable.tsxindex 4cb98d6391..0d96c47c5a 100644--- a/frontend/src/react/pages/project/database-detail/overview/TableMetadataTable.tsx+++ b/frontend/src/routes/project/database-detail/overview/TableMetadataTable.tsx@@ -7,11 +7,11 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { useDatabaseCatalog } from "@/react/hooks/useDatabaseCatalog";-import { updateTableCatalog } from "@/react/lib/column-data-table/utils";-import { useAppStore } from "@/react/stores/app";-import { getTableCatalog } from "@/react/stores/app/databaseCatalog";+} from "@/components/ui/table";+import { useDatabaseCatalog } from "@/hooks/useDatabaseCatalog";+import { updateTableCatalog } from "@/lib/column-data-table/utils";+import { useAppStore } from "@/stores/app";+import { getTableCatalog } from "@/stores/app/databaseCatalog";import { Engine } from "@/types/proto-es/v1/common_pb";import type {Database,diff --git a/frontend/src/react/pages/project/database-detail/panels/DatabaseCatalogPanel.test.tsx b/frontend/src/routes/project/database-detail/panels/DatabaseCatalogPanel.test.tsxsimilarity index 97%rename from frontend/src/react/pages/project/database-detail/panels/DatabaseCatalogPanel.test.tsxrename to frontend/src/routes/project/database-detail/panels/DatabaseCatalogPanel.test.tsxindex 38240c4c62..4d8796b31a 100644--- a/frontend/src/react/pages/project/database-detail/panels/DatabaseCatalogPanel.test.tsx+++ b/frontend/src/routes/project/database-detail/panels/DatabaseCatalogPanel.test.tsx@@ -360,16 +360,16 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({featureToRef: mocks.featureToRef,pushNotification: mocks.pushNotification,}));-vi.mock("@/react/hooks/useDatabaseCatalog", () => ({+vi.mock("@/hooks/useDatabaseCatalog", () => ({useDatabaseCatalog: () => mocks.useDatabaseCatalog(),}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const getState = () => ({updateDatabaseCatalog: mocks.updateDatabaseCatalog,getOrFetchPolicyByParentAndType: mocks.getOrFetchPolicyByParentAndType,@@ -396,26 +396,26 @@ vi.mock("@/utils", () => ({instanceV1MaskingForNoSQL: mocks.instanceV1MaskingForNoSQL,}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {resolve: mocks.routerResolve,},}));-vi.mock("@/react/components/FeatureAttention", () => ({+vi.mock("@/components/FeatureAttention", () => ({FeatureAttention: mocks.FeatureAttention,}));-vi.mock("@/react/components/FeatureBadge", () => ({+vi.mock("@/components/FeatureBadge", () => ({FeatureBadge: mocks.FeatureBadge,}));-vi.mock("@/react/components/PermissionGuard", () => ({+vi.mock("@/components/PermissionGuard", () => ({PermissionGuard: mocks.PermissionGuard,}));-vi.mock("@/react/components/ui/alert-dialog", () => ({+vi.mock("@/components/ui/alert-dialog", () => ({AlertDialog: mocks.AlertDialog,AlertDialogClose: mocks.AlertDialogClose,AlertDialogContent: mocks.AlertDialogContent,@@ -424,21 +424,21 @@ vi.mock("@/react/components/ui/alert-dialog", () => ({AlertDialogTitle: mocks.AlertDialogTitle,}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: mocks.Button,}));-vi.mock("@/react/components/ui/dialog", () => ({+vi.mock("@/components/ui/dialog", () => ({Dialog: mocks.Dialog,DialogContent: mocks.DialogContent,DialogTitle: mocks.DialogTitle,}));-vi.mock("@/react/components/ui/input", () => ({+vi.mock("@/components/ui/input", () => ({Input: mocks.Input,}));-vi.mock("@/react/components/ui/select", () => ({+vi.mock("@/components/ui/select", () => ({Select: mocks.Select,SelectContent: mocks.SelectContent,SelectItem: mocks.SelectItem,@@ -446,7 +446,7 @@ vi.mock("@/react/components/ui/select", () => ({SelectValue: mocks.SelectValue,}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: mocks.Tooltip,}));diff --git a/frontend/src/react/pages/project/database-detail/panels/DatabaseCatalogPanel.tsx b/frontend/src/routes/project/database-detail/panels/DatabaseCatalogPanel.tsxsimilarity index 95%rename from frontend/src/react/pages/project/database-detail/panels/DatabaseCatalogPanel.tsxrename to frontend/src/routes/project/database-detail/panels/DatabaseCatalogPanel.tsxindex 52213d4612..18daa980bb 100644--- a/frontend/src/react/pages/project/database-detail/panels/DatabaseCatalogPanel.tsx+++ b/frontend/src/routes/project/database-detail/panels/DatabaseCatalogPanel.tsx@@ -2,34 +2,27 @@ import { create } from "@bufbuild/protobuf";import { ShieldCheck } from "lucide-react";import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { FeatureAttention } from "@/react/components/FeatureAttention";-import { FeatureBadge } from "@/react/components/FeatureBadge";-import { PermissionGuard } from "@/react/components/PermissionGuard";+import { FeatureAttention } from "@/components/FeatureAttention";+import { FeatureBadge } from "@/components/FeatureBadge";+import { PermissionGuard } from "@/components/PermissionGuard";import {AlertDialog,AlertDialogContent,AlertDialogDescription,AlertDialogFooter,AlertDialogTitle,-} from "@/react/components/ui/alert-dialog";-import { Button } from "@/react/components/ui/button";-import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";-import { Input } from "@/react/components/ui/input";-import { useDatabaseCatalog } from "@/react/hooks/useDatabaseCatalog";-import type {- MaskData,- MaskDataTarget,-} from "@/react/lib/sensitive-data/types";+} from "@/components/ui/alert-dialog";+import { Button } from "@/components/ui/button";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";+import { Input } from "@/components/ui/input";+import { useDatabaseCatalog } from "@/hooks/useDatabaseCatalog";+import type { MaskData, MaskDataTarget } from "@/lib/sensitive-data/types";import {getMaskDataIdentifier,isCurrentColumnException,-} from "@/react/lib/sensitive-data/utils";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/lib/sensitive-data/utils";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import type { Permission } from "@/types";import type {ColumnCatalog,diff --git a/frontend/src/react/pages/project/database-detail/panels/DatabaseChangelogPanel.tsx b/frontend/src/routes/project/database-detail/panels/DatabaseChangelogPanel.tsxsimilarity index 91%rename from frontend/src/react/pages/project/database-detail/panels/DatabaseChangelogPanel.tsxrename to frontend/src/routes/project/database-detail/panels/DatabaseChangelogPanel.tsxindex cce28c7ebe..39337c8083 100644--- a/frontend/src/react/pages/project/database-detail/panels/DatabaseChangelogPanel.tsx+++ b/frontend/src/routes/project/database-detail/panels/DatabaseChangelogPanel.tsx@@ -1,6 +1,6 @@import { useCallback } from "react";-import { PagedTableFooter, usePagedData } from "@/react/hooks/usePagedData";-import { useAppStore } from "@/react/stores/app";+import { PagedTableFooter, usePagedData } from "@/hooks/usePagedData";+import { useAppStore } from "@/stores/app";import type {Changelog,Database,diff --git a/frontend/src/react/pages/project/database-detail/panels/DatabaseOverviewPanel.test.tsx b/frontend/src/routes/project/database-detail/panels/DatabaseOverviewPanel.test.tsxsimilarity index 97%rename from frontend/src/react/pages/project/database-detail/panels/DatabaseOverviewPanel.test.tsxrename to frontend/src/routes/project/database-detail/panels/DatabaseOverviewPanel.test.tsxindex fca164cc44..ecc38362d1 100644--- a/frontend/src/react/pages/project/database-detail/panels/DatabaseOverviewPanel.test.tsx+++ b/frontend/src/routes/project/database-detail/panels/DatabaseOverviewPanel.test.tsx@@ -82,8 +82,8 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {replace: mocks.routerReplace,currentRoute: mocks.currentRoute,@@ -105,7 +105,7 @@ vi.mock("@/react/router", async (importOriginal) => ({// setting/subscription store methods via the app store. Merge the// setting/subscription mocks into the `mocks.dbSchemaStore` shape so the// per-scenario `.mockReturnValue({...})` calls in test bodies keep working.-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const getState = () => ({updateDatabaseCatalog: mocks.updateDatabaseCatalog,getOrFetchSettingByName: mocks.getOrFetchSettingByName,@@ -125,20 +125,20 @@ vi.mock("@/react/stores/app", () => {};});-vi.mock("@/react/hooks/useAppDatabaseMetadata", () => ({+vi.mock("@/hooks/useAppDatabaseMetadata", () => ({useAppDatabaseMetadata: (name: string) =>mocks.dbSchemaStore().getDatabaseMetadata?.(name) ?? { schemas: [] },}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({featureToRef: mocks.featureToRef,}));-vi.mock("@/react/hooks/useDatabaseCatalog", () => ({+vi.mock("@/hooks/useDatabaseCatalog", () => ({useDatabaseCatalog: () => mocks.useDatabaseCatalog(),}));-vi.mock("@/react/stores/app/databaseCatalog", () => ({+vi.mock("@/stores/app/databaseCatalog", () => ({getColumnCatalog: mocks.getColumnCatalog,getTableCatalog: mocks.getTableCatalog,}));@@ -165,13 +165,13 @@ vi.mock("@/utils", () => ({instanceV1SupportsTrigger: mocks.instanceV1SupportsTrigger,}));-vi.mock("@/react/components/ui/input", () => ({+vi.mock("@/components/ui/input", () => ({Input: (props: React.InputHTMLAttributes<HTMLInputElement>) => (<input {...props} />),}));-vi.mock("@/react/components/ui/select", () => ({+vi.mock("@/components/ui/select", () => ({Select: ({children,disabled,@@ -205,7 +205,7 @@ vi.mock("@/react/components/ui/select", () => ({SelectValue: () => null,}));-vi.mock("@/react/components/ui/dialog", () => ({+vi.mock("@/components/ui/dialog", () => ({Dialog: ({open,onOpenChange,@@ -597,7 +597,7 @@ describe("DatabaseOverviewPanel", () => {});test("syncs selected table to the route query and restores it from the route", async () => {- const { router } = await import("@/react/router");+ const { router } = await import("@/app/router");router.currentRoute.value.query = { schema: "public", table: "orders" };const { container, render, unmount } = renderIntoContainer(@@ -707,7 +707,7 @@ describe("DatabaseOverviewPanel", () => {});test("clears a stale table query when the table does not exist", async () => {- const { router } = await import("@/react/router");+ const { router } = await import("@/app/router");router.currentRoute.value.query = { schema: "public", table: "missing" };const { render, unmount } = renderIntoContainer(@@ -734,7 +734,7 @@ describe("DatabaseOverviewPanel", () => {});test("keeps an existing schema query instead of clearing it during initialization", async () => {- const { router } = await import("@/react/router");+ const { router } = await import("@/app/router");router.currentRoute.value.query = { schema: "sales" };const { container, render, unmount } = renderIntoContainer(@@ -890,7 +890,7 @@ describe("DatabaseOverviewPanel", () => {});test("does not fall back to the first schema for schema-scoped sequences", async () => {- const { router } = await import("@/react/router");+ const { router } = await import("@/app/router");router.currentRoute.value.query = { schema: "sales" };mocks.instanceV1SupportsSequence.mockReturnValue(true);@@ -979,7 +979,7 @@ describe("DatabaseOverviewPanel", () => {});test("does not fall back to the first schema for schema-scoped streams and tasks", async () => {- const { router } = await import("@/react/router");+ const { router } = await import("@/app/router");router.currentRoute.value.query = { schema: "sales" };mocks.getDatabaseEngine.mockReturnValue(Engine.SNOWFLAKE);@@ -1024,7 +1024,7 @@ describe("DatabaseOverviewPanel", () => {});test("does not fall back to the first schema for schema-scoped package objects", async () => {- const { router } = await import("@/react/router");+ const { router } = await import("@/app/router");router.currentRoute.value.query = { schema: "sales" };mocks.getDatabaseEngine.mockReturnValue(Engine.ORACLE);diff --git a/frontend/src/react/pages/project/database-detail/panels/DatabaseOverviewPanel.tsx b/frontend/src/routes/project/database-detail/panels/DatabaseOverviewPanel.tsxsimilarity index 94%rename from frontend/src/react/pages/project/database-detail/panels/DatabaseOverviewPanel.tsxrename to frontend/src/routes/project/database-detail/panels/DatabaseOverviewPanel.tsxindex 2466f8b65d..95aca0389e 100644--- a/frontend/src/react/pages/project/database-detail/panels/DatabaseOverviewPanel.tsx+++ b/frontend/src/routes/project/database-detail/panels/DatabaseOverviewPanel.tsx@@ -1,10 +1,10 @@import { useEffect, useMemo, useState } from "react";-import { router, useCurrentRoute } from "@/react/router";-import { useAppStore } from "@/react/stores/app";+import { router, useCurrentRoute } from "@/app/router";+import { DatabaseOverviewInfo } from "@/components/database/DatabaseOverviewInfo";+import { useAppStore } from "@/stores/app";import type { Database } from "@/types/proto-es/v1/database_service_pb";import { getDatabaseProject, hasProjectPermissionV2 } from "@/utils";import { DatabaseObjectExplorer } from "../overview/DatabaseObjectExplorer";-import { DatabaseOverviewInfo } from "../overview/DatabaseOverviewInfo";export function DatabaseOverviewPanel({database,diff --git a/frontend/src/react/pages/project/database-detail/panels/DatabaseRevisionPanel.tsx b/frontend/src/routes/project/database-detail/panels/DatabaseRevisionPanel.tsxsimilarity index 95%rename from frontend/src/react/pages/project/database-detail/panels/DatabaseRevisionPanel.tsxrename to frontend/src/routes/project/database-detail/panels/DatabaseRevisionPanel.tsxindex b939334b5f..42532c6eb2 100644--- a/frontend/src/react/pages/project/database-detail/panels/DatabaseRevisionPanel.tsx+++ b/frontend/src/routes/project/database-detail/panels/DatabaseRevisionPanel.tsx@@ -6,10 +6,10 @@ import {AlertDialogDescription,AlertDialogFooter,AlertDialogTitle,-} from "@/react/components/ui/alert-dialog";-import { Button } from "@/react/components/ui/button";-import { PagedTableFooter, usePagedData } from "@/react/hooks/usePagedData";-import { useAppStore } from "@/react/stores/app";+} from "@/components/ui/alert-dialog";+import { Button } from "@/components/ui/button";+import { PagedTableFooter, usePagedData } from "@/hooks/usePagedData";+import { useAppStore } from "@/stores/app";import type { Database } from "@/types/proto-es/v1/database_service_pb";import type { Revision } from "@/types/proto-es/v1/revision_service_pb";import { DatabaseRevisionTable } from "../revision/DatabaseRevisionTable";diff --git a/frontend/src/react/pages/project/database-detail/panels/DatabaseSettingsPanel.tsx b/frontend/src/routes/project/database-detail/panels/DatabaseSettingsPanel.tsxsimilarity index 93%rename from frontend/src/react/pages/project/database-detail/panels/DatabaseSettingsPanel.tsxrename to frontend/src/routes/project/database-detail/panels/DatabaseSettingsPanel.tsxindex 817e5b2d56..cfce041a55 100644--- a/frontend/src/react/pages/project/database-detail/panels/DatabaseSettingsPanel.tsx+++ b/frontend/src/routes/project/database-detail/panels/DatabaseSettingsPanel.tsx@@ -3,12 +3,12 @@ import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { cloneDeep, isEqual } from "lodash-es";import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { EnvironmentSelect } from "@/react/components/EnvironmentSelect";-import { LabelListEditor } from "@/react/components/LabelListEditor";-import { PermissionGuard } from "@/react/components/PermissionGuard";-import { Button } from "@/react/components/ui/button";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+import { EnvironmentSelect } from "@/components/EnvironmentSelect";+import { LabelListEditor } from "@/components/LabelListEditor";+import { PermissionGuard } from "@/components/PermissionGuard";+import { Button } from "@/components/ui/button";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import type { Database } from "@/types/proto-es/v1/database_service_pb";import { UpdateDatabaseRequestSchema } from "@/types/proto-es/v1/database_service_pb";import {diff --git a/frontend/src/react/pages/project/database-detail/revision/DatabaseRevisionTable.tsx b/frontend/src/routes/project/database-detail/revision/DatabaseRevisionTable.tsxsimilarity index 94%rename from frontend/src/react/pages/project/database-detail/revision/DatabaseRevisionTable.tsxrename to frontend/src/routes/project/database-detail/revision/DatabaseRevisionTable.tsxindex 67d6f5ec16..4fee5d8ae8 100644--- a/frontend/src/react/pages/project/database-detail/revision/DatabaseRevisionTable.tsx+++ b/frontend/src/routes/project/database-detail/revision/DatabaseRevisionTable.tsx@@ -1,6 +1,7 @@import { useTranslation } from "react-i18next";-import { HumanizeTs } from "@/react/components/HumanizeTs";-import { Checkbox } from "@/react/components/ui/checkbox";+import { router } from "@/app/router";+import { HumanizeTs } from "@/components/HumanizeTs";+import { Checkbox } from "@/components/ui/checkbox";import {Table,TableBody,@@ -8,8 +9,7 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { router } from "@/react/router";+} from "@/components/ui/table";import { getDateForPbTimestampProtoEs } from "@/types";import type { Revision } from "@/types/proto-es/v1/revision_service_pb";import { getRevisionType, revisionLink } from "@/utils/v1/revision";diff --git a/frontend/src/react/pages/project/database-detail/revision/ImportRevisionSheet.tsx b/frontend/src/routes/project/database-detail/revision/ImportRevisionSheet.tsxsimilarity index 98%rename from frontend/src/react/pages/project/database-detail/revision/ImportRevisionSheet.tsxrename to frontend/src/routes/project/database-detail/revision/ImportRevisionSheet.tsxindex dd4bfad820..dfb9439afa 100644--- a/frontend/src/react/pages/project/database-detail/revision/ImportRevisionSheet.tsx+++ b/frontend/src/routes/project/database-detail/revision/ImportRevisionSheet.tsx@@ -10,11 +10,11 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";-import { revisionServiceClientConnect } from "@/connect";-import { ReleaseFileTable } from "@/react/components/release/ReleaseFileTable";-import { Button } from "@/react/components/ui/button";-import { Input } from "@/react/components/ui/input";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";+import { revisionServiceClientConnect } from "@/api";+import { ReleaseFileTable } from "@/components/release/ReleaseFileTable";+import { Button } from "@/components/ui/button";+import { Input } from "@/components/ui/input";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";import {Sheet,SheetBody,@@ -22,10 +22,10 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/components/ui/sheet";+import { cn } from "@/lib/utils";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import type {Release,Release_File,diff --git a/frontend/src/react/pages/project/database-detail/tabs.ts b/frontend/src/routes/project/database-detail/tabs.tssimilarity index 100%rename from frontend/src/react/pages/project/database-detail/tabs.tsrename to frontend/src/routes/project/database-detail/tabs.tsdiff --git a/frontend/src/react/pages/project/database-detail/useProjectDatabaseDetail.test.tsx b/frontend/src/routes/project/database-detail/useProjectDatabaseDetail.test.tsxsimilarity index 98%rename from frontend/src/react/pages/project/database-detail/useProjectDatabaseDetail.test.tsxrename to frontend/src/routes/project/database-detail/useProjectDatabaseDetail.test.tsxindex 7e2a5aa00a..02fca75c23 100644--- a/frontend/src/react/pages/project/database-detail/useProjectDatabaseDetail.test.tsx+++ b/frontend/src/routes/project/database-detail/useProjectDatabaseDetail.test.tsx@@ -48,12 +48,12 @@ const mocks = vi.hoisted(() => {};});-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: { replace: mocks.replace },}));-vi.mock("@/store", () => ({}));+vi.mock("@/stores", () => ({}));// Build the `databasesByName` cache the hook subscribes to from the mocked// `getDatabaseByName` return value, keyed by its `name`.@@ -65,7 +65,7 @@ const buildDatabasesByName = (): Record<string, unknown> => {return {};};-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const appState = () => ({getOrFetchDatabaseMetadata: mocks.dbSchemaStore.getOrFetchDatabaseMetadata,getOrFetchDatabaseByName: mocks.databaseStore.getOrFetchDatabaseByName,diff --git a/frontend/src/react/pages/project/database-detail/useProjectDatabaseDetail.ts b/frontend/src/routes/project/database-detail/useProjectDatabaseDetail.tssimilarity index 96%rename from frontend/src/react/pages/project/database-detail/useProjectDatabaseDetail.tsrename to frontend/src/routes/project/database-detail/useProjectDatabaseDetail.tsindex a05562e239..52a6ae4c7a 100644--- a/frontend/src/react/pages/project/database-detail/useProjectDatabaseDetail.ts+++ b/frontend/src/routes/project/database-detail/useProjectDatabaseDetail.ts@@ -1,11 +1,11 @@import { useEffect, useMemo, useState } from "react";-import { router } from "@/react/router";+import { router } from "@/app/router";import {PROJECT_V1_ROUTE_DATABASE_CHANGELOG_DETAIL,PROJECT_V1_ROUTE_DATABASE_DETAIL,PROJECT_V1_ROUTE_DATABASE_REVISION_DETAIL,-} from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";+} from "@/app/router/handles";+import { useAppStore } from "@/stores/app";import { unknownDatabase } from "@/types/v1/database";import { isDefaultProject } from "@/types/v1/project";import { getInstanceResource, instanceV1HasAlterSchema } from "@/utils";diff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailAccessGrantDetails.tsx b/frontend/src/routes/project/issue-detail/components/IssueDetailAccessGrantDetails.tsxsimilarity index 97%rename from frontend/src/react/pages/project/issue-detail/components/IssueDetailAccessGrantDetails.tsxrename to frontend/src/routes/project/issue-detail/components/IssueDetailAccessGrantDetails.tsxindex 98ad7fc227..047ebc3d54 100644--- a/frontend/src/react/pages/project/issue-detail/components/IssueDetailAccessGrantDetails.tsx+++ b/frontend/src/routes/project/issue-detail/components/IssueDetailAccessGrantDetails.tsx@@ -1,10 +1,10 @@import { Download, EyeOff, Loader2, Shield } from "lucide-react";import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { EngineIcon } from "@/react/components/EngineIcon";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { useAppStore } from "@/react/stores/app";-import { projectNamePrefix } from "@/store/modules/v1/common";+import { EngineIcon } from "@/components/EngineIcon";+import { useProjectByName } from "@/hooks/useProjectByName";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";import { isValidDatabaseName } from "@/types";import type { AccessGrant } from "@/types/proto-es/v1/access_grant_service_pb";import { unknownDatabase } from "@/types/v1/database";diff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailAccessGrantView.tsx b/frontend/src/routes/project/issue-detail/components/IssueDetailAccessGrantView.tsxsimilarity index 100%rename from frontend/src/react/pages/project/issue-detail/components/IssueDetailAccessGrantView.tsxrename to frontend/src/routes/project/issue-detail/components/IssueDetailAccessGrantView.tsxdiff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailActionBar.tsx b/frontend/src/routes/project/issue-detail/components/IssueDetailActionBar.tsxsimilarity index 95%rename from frontend/src/react/pages/project/issue-detail/components/IssueDetailActionBar.tsxrename to frontend/src/routes/project/issue-detail/components/IssueDetailActionBar.tsxindex 75a4392fa4..b782f8a9ed 100644--- a/frontend/src/react/pages/project/issue-detail/components/IssueDetailActionBar.tsx+++ b/frontend/src/routes/project/issue-detail/components/IssueDetailActionBar.tsx@@ -20,50 +20,43 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";+import { issueServiceClientConnect, rolloutServiceClientConnect } from "@/api";+import { router } from "@/app/router";import {- issueServiceClientConnect,- rolloutServiceClientConnect,-} from "@/connect";-import { MarkdownEditor } from "@/react/components/MarkdownEditor";-import { RouterLink } from "@/react/components/RouterLink";-import { Button, buttonVariants } from "@/react/components/ui/button";+ PROJECT_V1_ROUTE_ISSUE_DETAIL,+ PROJECT_V1_ROUTE_PLAN_DETAIL,+} from "@/app/router/handles";import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";+ buildPlanDeployRouteFromPlanName,+ buildPlanDeployRouteFromRolloutName,+} from "@/app/router/routeHelpers";+import { MarkdownEditor } from "@/components/MarkdownEditor";+import { RouterLink } from "@/components/RouterLink";+import { Button, buttonVariants } from "@/components/ui/button";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";-import { LAYER_SURFACE_CLASS } from "@/react/components/ui/layer";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";+} from "@/components/ui/dropdown-menu";+import { LAYER_SURFACE_CLASS } from "@/components/ui/layer";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";import {Sheet,SheetBody,SheetContent,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { Tooltip } from "@/react/components/ui/tooltip";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { useClickOutside } from "@/react/hooks/useClickOutside";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { cn } from "@/react/lib/utils";-import { router } from "@/react/router";-import {- PROJECT_V1_ROUTE_ISSUE_DETAIL,- PROJECT_V1_ROUTE_PLAN_DETAIL,-} from "@/react/router/handles";-import {- buildPlanDeployRouteFromPlanName,- buildPlanDeployRouteFromRolloutName,-} from "@/react/router/routeHelpers";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";-import { projectNamePrefix } from "@/store/modules/v1/common";+} from "@/components/ui/sheet";+import { Tooltip } from "@/components/ui/tooltip";+import { useCurrentUser } from "@/hooks/useAppState";+import { useClickOutside } from "@/hooks/useClickOutside";+import { useProjectByName } from "@/hooks/useProjectByName";+import { cn } from "@/lib/utils";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";import {ApproveIssueRequestSchema,BatchUpdateIssuesStatusRequestSchema,diff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailActivity.tsx b/frontend/src/routes/project/issue-detail/components/IssueDetailActivity.tsxsimilarity index 100%rename from frontend/src/react/pages/project/issue-detail/components/IssueDetailActivity.tsxrename to frontend/src/routes/project/issue-detail/components/IssueDetailActivity.tsxdiff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailApprovalFlow.tsx b/frontend/src/routes/project/issue-detail/components/IssueDetailApprovalFlow.tsxsimilarity index 96%rename from frontend/src/react/pages/project/issue-detail/components/IssueDetailApprovalFlow.tsxrename to frontend/src/routes/project/issue-detail/components/IssueDetailApprovalFlow.tsxindex b94c3d292d..0a2d97fbfa 100644--- a/frontend/src/react/pages/project/issue-detail/components/IssueDetailApprovalFlow.tsx+++ b/frontend/src/routes/project/issue-detail/components/IssueDetailApprovalFlow.tsx@@ -9,19 +9,19 @@ import {} from "lucide-react";import { useCallback, useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { issueServiceClientConnect } from "@/connect";-import { FeatureBadge } from "@/react/components/FeatureBadge";-import { getAvatarColor, getInitials } from "@/react/components/UserAvatar";-import { Button } from "@/react/components/ui/button";-import { Tooltip } from "@/react/components/ui/tooltip";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { displayRoleTitleFromList } from "@/react/lib/role";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";-import { ensureGroupIdentifier } from "@/react/stores/app/group";-import { pushNotification } from "@/store";-import { projectNamePrefix, userNamePrefix } from "@/store/modules/v1/common";+import { issueServiceClientConnect } from "@/api";+import { FeatureBadge } from "@/components/FeatureBadge";+import { getAvatarColor, getInitials } from "@/components/UserAvatar";+import { Button } from "@/components/ui/button";+import { Tooltip } from "@/components/ui/tooltip";+import { useCurrentUser } from "@/hooks/useAppState";+import { useProjectByName } from "@/hooks/useProjectByName";+import { displayRoleTitleFromList } from "@/lib/role";+import { cn } from "@/lib/utils";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import { ensureGroupIdentifier } from "@/stores/app/group";+import { projectNamePrefix, userNamePrefix } from "@/stores/modules/v1/common";import {ApprovalStatus,RiskLevel,diff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailBranchContent.tsx b/frontend/src/routes/project/issue-detail/components/IssueDetailBranchContent.tsxsimilarity index 100%rename from frontend/src/react/pages/project/issue-detail/components/IssueDetailBranchContent.tsxrename to frontend/src/routes/project/issue-detail/components/IssueDetailBranchContent.tsxdiff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailChecks.tsx b/frontend/src/routes/project/issue-detail/components/IssueDetailChecks.tsxsimilarity index 87%rename from frontend/src/react/pages/project/issue-detail/components/IssueDetailChecks.tsxrename to frontend/src/routes/project/issue-detail/components/IssueDetailChecks.tsxindex f78185ec12..ea592d4bba 100644--- a/frontend/src/react/pages/project/issue-detail/components/IssueDetailChecks.tsx+++ b/frontend/src/routes/project/issue-detail/components/IssueDetailChecks.tsx@@ -1,13 +1,17 @@import { create } from "@bufbuild/protobuf";import { useCallback, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { planServiceClientConnect } from "@/connect";-import { PlanCheckSection } from "@/react/components/plan-check/PlanCheckSection";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";-import { extractUserEmail, projectNamePrefix } from "@/store/modules/v1/common";+import { planServiceClientConnect } from "@/api";+import { PlanCheckSection } from "@/components/plan-check/PlanCheckSection";+import { useCurrentUser } from "@/hooks/useAppState";+import { useProjectByName } from "@/hooks/useProjectByName";+import { getPlanCheckSummaryWithFallback } from "@/lib/plan/check";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import {+ extractUserEmail,+ projectNamePrefix,+} from "@/stores/modules/v1/common";import {GetPlanCheckRunRequestSchema,GetPlanRequestSchema,@@ -15,7 +19,6 @@ import {RunPlanChecksRequestSchema,} from "@/types/proto-es/v1/plan_service_pb";import { hasProjectPermissionV2 } from "@/utils";-import { getPlanCheckSummaryWithFallback } from "../../plan-detail/utils/planCheck";import { useIssueDetailContext } from "../context/IssueDetailContext";export function IssueDetailChecks() {diff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailCommentList.tsx b/frontend/src/routes/project/issue-detail/components/IssueDetailCommentList.tsxsimilarity index 95%rename from frontend/src/react/pages/project/issue-detail/components/IssueDetailCommentList.tsxrename to frontend/src/routes/project/issue-detail/components/IssueDetailCommentList.tsxindex 4519bcf7d9..2240257749 100644--- a/frontend/src/react/pages/project/issue-detail/components/IssueDetailCommentList.tsx+++ b/frontend/src/routes/project/issue-detail/components/IssueDetailCommentList.tsx@@ -2,22 +2,22 @@ import { create } from "@bufbuild/protobuf";import { Loader2, Pencil, Plus } from "lucide-react";import { useCallback, useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { issueServiceClientConnect } from "@/connect";-import { HumanizeTs } from "@/react/components/HumanizeTs";+import { issueServiceClientConnect } from "@/api";+import { useCurrentRoute } from "@/app/router";+import { HumanizeTs } from "@/components/HumanizeTs";import {CommentCreator,canEditIssueComment,IssueCommentRow,-} from "@/react/components/issue-activity/IssueCommentActivity";-import { MarkdownEditor } from "@/react/components/MarkdownEditor";-import { UserAvatar } from "@/react/components/UserAvatar";-import { Button } from "@/react/components/ui/button";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { useCurrentRoute } from "@/react/router";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";-import { projectNamePrefix } from "@/store/modules/v1/common";+} from "@/components/issue-activity/IssueCommentActivity";+import { MarkdownEditor } from "@/components/MarkdownEditor";+import { UserAvatar } from "@/components/UserAvatar";+import { Button } from "@/components/ui/button";+import { useCurrentUser } from "@/hooks/useAppState";+import { useProjectByName } from "@/hooks/useProjectByName";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";import { getTimeForPbTimestampProtoEs, unknownUser } from "@/types";import {type IssueComment,diff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailDatabaseChangeView.test.tsx b/frontend/src/routes/project/issue-detail/components/IssueDetailDatabaseChangeView.test.tsxsimilarity index 95%rename from frontend/src/react/pages/project/issue-detail/components/IssueDetailDatabaseChangeView.test.tsxrename to frontend/src/routes/project/issue-detail/components/IssueDetailDatabaseChangeView.test.tsxindex 0e72d5ffa3..ff7f644c74 100644--- a/frontend/src/react/pages/project/issue-detail/components/IssueDetailDatabaseChangeView.test.tsx+++ b/frontend/src/routes/project/issue-detail/components/IssueDetailDatabaseChangeView.test.tsx@@ -162,17 +162,17 @@ vi.mock("react-i18next", () => ({useTranslation: mocks.useTranslation,}));-vi.mock("@/connect", () => ({+vi.mock("@/api", () => ({instanceRoleServiceClientConnect: {listInstanceRoles: mocks.listInstanceRoles,},}));-vi.mock("@/react/components/instance/constants", () => ({+vi.mock("@/components/instance/constants", () => ({EngineIconPath: {},}));-vi.mock("@/react/components/ui/sheet", () => ({+vi.mock("@/components/ui/sheet", () => ({Sheet: mocks.Sheet,SheetBody: mocks.SheetBody,SheetContent: mocks.SheetContent,@@ -180,11 +180,11 @@ vi.mock("@/react/components/ui/sheet", () => ({SheetTitle: mocks.SheetTitle,}));-vi.mock("@/react/components/ui/search-input", () => ({+vi.mock("@/components/ui/search-input", () => ({SearchInput: mocks.SearchInput,}));-vi.mock("@/react/components/ui/select", () => ({+vi.mock("@/components/ui/select", () => ({Select: mocks.Select,SelectContent: mocks.SelectContent,SelectItem: mocks.SelectItem,@@ -192,31 +192,31 @@ vi.mock("@/react/components/ui/select", () => ({SelectValue: mocks.SelectValue,}));-vi.mock("@/react/components/ui/switch", () => ({+vi.mock("@/components/ui/switch", () => ({Switch: mocks.Switch,}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: mocks.Tooltip,}));-vi.mock("@/react/lib/utils", () => ({+vi.mock("@/lib/utils", () => ({cn: mocks.cn,}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {resolve: mocks.routerResolve,},}));-vi.mock("@/react/router/routeHelpers", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router/routeHelpers")>()),+vi.mock("@/app/router/routeHelpers", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router/routeHelpers")>()),buildPlanDeployRouteFromPlanName: mocks.buildPlanDeployRouteFromPlanName,}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({getProjectNameAndDatabaseGroupName: mocks.getProjectNameAndDatabaseGroupName,}));@@ -230,7 +230,7 @@ vi.mock("@/types/v1/database", () => ({unknownDatabase: () => ({ name: "instances/-/databases/-" }),}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {// The migrated component reads cache state two ways: imperative// `useAppStore.getState().<method>()` and reactive selectors// `useAppStore((s) => s.dbGroupsByName[name])` / `s.databasesByName[name]`.diff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailDatabaseChangeView.tsx b/frontend/src/routes/project/issue-detail/components/IssueDetailDatabaseChangeView.tsxsimilarity index 97%rename from frontend/src/react/pages/project/issue-detail/components/IssueDetailDatabaseChangeView.tsxrename to frontend/src/routes/project/issue-detail/components/IssueDetailDatabaseChangeView.tsxindex 4df54f9937..1f36643e2e 100644--- a/frontend/src/react/pages/project/issue-detail/components/IssueDetailDatabaseChangeView.tsx+++ b/frontend/src/routes/project/issue-detail/components/IssueDetailDatabaseChangeView.tsx@@ -2,36 +2,36 @@ import { create } from "@bufbuild/protobuf";import { ChevronRight, ExternalLink, FolderTree } from "lucide-react";import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { instanceRoleServiceClientConnect } from "@/connect";-import { EngineIcon } from "@/react/components/EngineIcon";-import { RouterLink } from "@/react/components/RouterLink";-import { SearchInput } from "@/react/components/ui/search-input";+import { instanceRoleServiceClientConnect } from "@/api";+import { router } from "@/app/router";+import {+ PROJECT_V1_ROUTE_DATABASE_GROUP_DETAIL,+ PROJECT_V1_ROUTE_PLAN_DETAIL_SPECS,+} from "@/app/router/handles";+import { buildPlanDeployRouteFromPlanName } from "@/app/router/routeHelpers";+import { EngineIcon } from "@/components/EngineIcon";+import { RouterLink } from "@/components/RouterLink";+import { SearchInput } from "@/components/ui/search-input";import {Select,SelectContent,SelectItem,SelectTrigger,SelectValue,-} from "@/react/components/ui/select";+} from "@/components/ui/select";import {Sheet,SheetBody,SheetContent,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { Switch } from "@/react/components/ui/switch";-import { Tooltip } from "@/react/components/ui/tooltip";-import { useSheetStatement } from "@/react/hooks/useSheetStatement";-import { cn } from "@/react/lib/utils";-import { router } from "@/react/router";-import {- PROJECT_V1_ROUTE_DATABASE_GROUP_DETAIL,- PROJECT_V1_ROUTE_PLAN_DETAIL_SPECS,-} from "@/react/router/handles";-import { buildPlanDeployRouteFromPlanName } from "@/react/router/routeHelpers";-import { useAppStore } from "@/react/stores/app";-import { getProjectNameAndDatabaseGroupName } from "@/store";+} from "@/components/ui/sheet";+import { Switch } from "@/components/ui/switch";+import { Tooltip } from "@/components/ui/tooltip";+import { useSheetStatement } from "@/hooks/useSheetStatement";+import { cn } from "@/lib/utils";+import { getProjectNameAndDatabaseGroupName } from "@/stores";+import { useAppStore } from "@/stores/app";import {isValidDatabaseGroupName,isValidDatabaseName,diff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailDatabaseCreateView.tsx b/frontend/src/routes/project/issue-detail/components/IssueDetailDatabaseCreateView.tsxsimilarity index 94%rename from frontend/src/react/pages/project/issue-detail/components/IssueDetailDatabaseCreateView.tsxrename to frontend/src/routes/project/issue-detail/components/IssueDetailDatabaseCreateView.tsxindex 6d2d00c376..e2f4590739 100644--- a/frontend/src/react/pages/project/issue-detail/components/IssueDetailDatabaseCreateView.tsx+++ b/frontend/src/routes/project/issue-detail/components/IssueDetailDatabaseCreateView.tsx@@ -1,13 +1,13 @@import { useEffect, useMemo } from "react";import { useTranslation } from "react-i18next";-import { EngineIcon } from "@/react/components/EngineIcon";-import { RouterLink } from "@/react/components/RouterLink";-import { TaskStatusIcon } from "@/react/components/TaskStatusIcon";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { router } from "@/react/router";-import { INSTANCE_ROUTE_DETAIL } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { projectNamePrefix } from "@/store/modules/v1/common";+import { router } from "@/app/router";+import { INSTANCE_ROUTE_DETAIL } from "@/app/router/handles";+import { EngineIcon } from "@/components/EngineIcon";+import { RouterLink } from "@/components/RouterLink";+import { TaskStatusIcon } from "@/components/TaskStatusIcon";+import { useProjectByName } from "@/hooks/useProjectByName";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";import {formatEnvironmentName,isValidEnvironmentName,diff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailDatabaseExportView.tsx b/frontend/src/routes/project/issue-detail/components/IssueDetailDatabaseExportView.tsxsimilarity index 97%rename from frontend/src/react/pages/project/issue-detail/components/IssueDetailDatabaseExportView.tsxrename to frontend/src/routes/project/issue-detail/components/IssueDetailDatabaseExportView.tsxindex 9a70e39697..7f3cfba8e4 100644--- a/frontend/src/react/pages/project/issue-detail/components/IssueDetailDatabaseExportView.tsx+++ b/frontend/src/routes/project/issue-detail/components/IssueDetailDatabaseExportView.tsx@@ -7,29 +7,29 @@ import {} from "lucide-react";import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { planServiceClientConnect } from "@/connect";-import { EngineIcon } from "@/react/components/EngineIcon";-import { TaskStatusIcon } from "@/react/components/TaskStatusIcon";-import { Button } from "@/react/components/ui/button";+import { planServiceClientConnect } from "@/api";+import { router } from "@/app/router";+import { PROJECT_V1_ROUTE_DATABASE_GROUP_DETAIL } from "@/app/router/handles";+import { EngineIcon } from "@/components/EngineIcon";+import { TaskStatusIcon } from "@/components/TaskStatusIcon";+import { Button } from "@/components/ui/button";import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";-import { Input } from "@/react/components/ui/input";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";-import { Switch } from "@/react/components/ui/switch";-import { Tooltip } from "@/react/components/ui/tooltip";-import { cn } from "@/react/lib/utils";-import { router } from "@/react/router";-import { PROJECT_V1_ROUTE_DATABASE_GROUP_DETAIL } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";+} from "@/components/ui/dropdown-menu";+import { Input } from "@/components/ui/input";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";+import { Switch } from "@/components/ui/switch";+import { Tooltip } from "@/components/ui/tooltip";+import { cn } from "@/lib/utils";import {DEFAULT_MAX_RESULT_SIZE_IN_MB,getProjectNameAndDatabaseGroupName,pushNotification,-} from "@/store";+} from "@/stores";+import { useAppStore } from "@/stores/app";import {isValidDatabaseGroupName,isValidDatabaseName,diff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailHeader.tsx b/frontend/src/routes/project/issue-detail/components/IssueDetailHeader.tsxsimilarity index 95%rename from frontend/src/react/pages/project/issue-detail/components/IssueDetailHeader.tsxrename to frontend/src/routes/project/issue-detail/components/IssueDetailHeader.tsxindex f84c363ebb..ae5fade298 100644--- a/frontend/src/react/pages/project/issue-detail/components/IssueDetailHeader.tsx+++ b/frontend/src/routes/project/issue-detail/components/IssueDetailHeader.tsx@@ -1,7 +1,7 @@import { Ban, CheckCircle2, Menu } from "lucide-react";import { useTranslation } from "react-i18next";-import { Badge } from "@/react/components/ui/badge";-import { Button } from "@/react/components/ui/button";+import { Badge } from "@/components/ui/badge";+import { Button } from "@/components/ui/button";import { ApprovalStatus } from "@/types/proto-es/v1/common_pb";import { IssueStatus } from "@/types/proto-es/v1/issue_service_pb";import { useIssueDetailContext } from "../context/IssueDetailContext";diff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailLabels.tsx b/frontend/src/routes/project/issue-detail/components/IssueDetailLabels.tsxsimilarity index 92%rename from frontend/src/react/pages/project/issue-detail/components/IssueDetailLabels.tsxrename to frontend/src/routes/project/issue-detail/components/IssueDetailLabels.tsxindex 0663475296..7250bb65ad 100644--- a/frontend/src/react/pages/project/issue-detail/components/IssueDetailLabels.tsx+++ b/frontend/src/routes/project/issue-detail/components/IssueDetailLabels.tsx@@ -8,18 +8,18 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";-import { issueServiceClientConnect } from "@/connect";-import { RouterLink } from "@/react/components/RouterLink";-import { Checkbox } from "@/react/components/ui/checkbox";-import { LAYER_SURFACE_CLASS } from "@/react/components/ui/layer";-import { useClickOutside } from "@/react/hooks/useClickOutside";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { cn } from "@/react/lib/utils";-import { router } from "@/react/router";-import { PROJECT_V1_ROUTE_SETTINGS } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";-import { getProjectName, projectNamePrefix } from "@/store/modules/v1/common";+import { issueServiceClientConnect } from "@/api";+import { router } from "@/app/router";+import { PROJECT_V1_ROUTE_SETTINGS } from "@/app/router/handles";+import { RouterLink } from "@/components/RouterLink";+import { Checkbox } from "@/components/ui/checkbox";+import { LAYER_SURFACE_CLASS } from "@/components/ui/layer";+import { useClickOutside } from "@/hooks/useClickOutside";+import { useProjectByName } from "@/hooks/useProjectByName";+import { cn } from "@/lib/utils";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import { getProjectName, projectNamePrefix } from "@/stores/modules/v1/common";import {IssueSchema,IssueStatus,diff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailRoleGrantDetails.test.tsx b/frontend/src/routes/project/issue-detail/components/IssueDetailRoleGrantDetails.test.tsxsimilarity index 97%rename from frontend/src/react/pages/project/issue-detail/components/IssueDetailRoleGrantDetails.test.tsxrename to frontend/src/routes/project/issue-detail/components/IssueDetailRoleGrantDetails.test.tsxindex 2cf11195e4..cfc0b71538 100644--- a/frontend/src/react/pages/project/issue-detail/components/IssueDetailRoleGrantDetails.test.tsx+++ b/frontend/src/routes/project/issue-detail/components/IssueDetailRoleGrantDetails.test.tsx@@ -25,12 +25,12 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/lib/project-member/utils", () => ({+vi.mock("@/lib/project-member/utils", () => ({getRoleEnvironmentLimitationKind: (role: string) =>role === "roles/sqlEditorUser" ? "DDL/DML" : undefined,}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useEnvironmentList: () => [{ name: "environments/prod", title: "Prod" },{ name: "environments/test", title: "Test" },@@ -38,7 +38,7 @@ vi.mock("@/react/hooks/useAppState", () => ({}));// Stub EnvironmentLabel — the real component pulls in Pinia stores + theme tokens.-vi.mock("@/react/components/EnvironmentLabel", () => ({+vi.mock("@/components/EnvironmentLabel", () => ({EnvironmentLabel: ({environmentName,className,@@ -61,7 +61,7 @@ vi.mock("@/types/v1/database", () => ({}),}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const appState = () => ({roleList: [{diff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailRoleGrantDetails.tsx b/frontend/src/routes/project/issue-detail/components/IssueDetailRoleGrantDetails.tsxsimilarity index 96%rename from frontend/src/react/pages/project/issue-detail/components/IssueDetailRoleGrantDetails.tsxrename to frontend/src/routes/project/issue-detail/components/IssueDetailRoleGrantDetails.tsxindex 61ff0cff94..59e43df160 100644--- a/frontend/src/react/pages/project/issue-detail/components/IssueDetailRoleGrantDetails.tsx+++ b/frontend/src/routes/project/issue-detail/components/IssueDetailRoleGrantDetails.tsx@@ -1,7 +1,7 @@import dayjs from "dayjs";import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { DDLWarningCallout } from "@/react/components/role-grant/DDLWarningCallout";+import { DDLWarningCallout } from "@/components/role-grant/DDLWarningCallout";import {Table,TableBody,@@ -9,11 +9,11 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { useEnvironmentList } from "@/react/hooks/useAppState";-import { getRoleEnvironmentLimitationKind } from "@/react/lib/project-member/utils";-import { displayRoleTitleFromList } from "@/react/lib/role";-import { useAppStore } from "@/react/stores/app";+} from "@/components/ui/table";+import { useEnvironmentList } from "@/hooks/useAppState";+import { getRoleEnvironmentLimitationKind } from "@/lib/project-member/utils";+import { displayRoleTitleFromList } from "@/lib/role";+import { useAppStore } from "@/stores/app";import type { DatabaseResource } from "@/types";import { unknownDatabase } from "@/types/v1/database";import {diff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailRoleGrantView.tsx b/frontend/src/routes/project/issue-detail/components/IssueDetailRoleGrantView.tsxsimilarity index 100%rename from frontend/src/react/pages/project/issue-detail/components/IssueDetailRoleGrantView.tsxrename to frontend/src/routes/project/issue-detail/components/IssueDetailRoleGrantView.tsxdiff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailSidebar.tsx b/frontend/src/routes/project/issue-detail/components/IssueDetailSidebar.tsxsimilarity index 97%rename from frontend/src/react/pages/project/issue-detail/components/IssueDetailSidebar.tsxrename to frontend/src/routes/project/issue-detail/components/IssueDetailSidebar.tsxindex 9c079a20d7..e398da8be8 100644--- a/frontend/src/react/pages/project/issue-detail/components/IssueDetailSidebar.tsx+++ b/frontend/src/routes/project/issue-detail/components/IssueDetailSidebar.tsx@@ -1,6 +1,6 @@import { useMemo } from "react";import { useTranslation } from "react-i18next";-import { Alert } from "@/react/components/ui/alert";+import { Alert } from "@/components/ui/alert";import { PlanCheckRun_Status } from "@/types/proto-es/v1/plan_service_pb";import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";import { useIssueDetailContext } from "../context/IssueDetailContext";diff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailStatementSection.tsx b/frontend/src/routes/project/issue-detail/components/IssueDetailStatementSection.tsxsimilarity index 95%rename from frontend/src/react/pages/project/issue-detail/components/IssueDetailStatementSection.tsxrename to frontend/src/routes/project/issue-detail/components/IssueDetailStatementSection.tsxindex 3b305f9590..c7d636c5e1 100644--- a/frontend/src/react/pages/project/issue-detail/components/IssueDetailStatementSection.tsx+++ b/frontend/src/routes/project/issue-detail/components/IssueDetailStatementSection.tsx@@ -2,18 +2,18 @@ import { clone, create } from "@bufbuild/protobuf";import { Loader2, Upload } from "lucide-react";import { type ChangeEvent, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { planServiceClientConnect, sheetServiceClientConnect } from "@/connect";-import { MonacoEditor, ReadonlyMonaco } from "@/react/components/monaco";-import { ReleaseInfoCard } from "@/react/components/release/ReleaseInfoCard";-import { Alert } from "@/react/components/ui/alert";-import { Button } from "@/react/components/ui/button";-import { useCurrentUser, useReleaseByName } from "@/react/hooks/useAppState";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { seedSheetStatement } from "@/react/hooks/useSheetStatement";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";-import { projectNamePrefix, pushNotification } from "@/store";-import { extractUserEmail } from "@/store/modules/v1/common";+import { planServiceClientConnect, sheetServiceClientConnect } from "@/api";+import { MonacoEditor, ReadonlyMonaco } from "@/components/monaco";+import { ReleaseInfoCard } from "@/components/release/ReleaseInfoCard";+import { Alert } from "@/components/ui/alert";+import { Button } from "@/components/ui/button";+import { useCurrentUser, useReleaseByName } from "@/hooks/useAppState";+import { useProjectByName } from "@/hooks/useProjectByName";+import { seedSheetStatement } from "@/hooks/useSheetStatement";+import { cn } from "@/lib/utils";+import { projectNamePrefix, pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import { extractUserEmail } from "@/stores/modules/v1/common";import {isValidDatabaseName,isValidReleaseName,diff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailTaskRolloutActionPanel.tsx b/frontend/src/routes/project/issue-detail/components/IssueDetailTaskRolloutActionPanel.tsxsimilarity index 95%rename from frontend/src/react/pages/project/issue-detail/components/IssueDetailTaskRolloutActionPanel.tsxrename to frontend/src/routes/project/issue-detail/components/IssueDetailTaskRolloutActionPanel.tsxindex c4c7ac882c..e51be722c2 100644--- a/frontend/src/react/pages/project/issue-detail/components/IssueDetailTaskRolloutActionPanel.tsx+++ b/frontend/src/routes/project/issue-detail/components/IssueDetailTaskRolloutActionPanel.tsx@@ -3,12 +3,12 @@ import { TimestampSchema } from "@bufbuild/protobuf/wkt";import { Loader2 } from "lucide-react";import { useCallback, useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { rolloutServiceClientConnect } from "@/connect";-import { EngineIcon } from "@/react/components/EngineIcon";-import { TaskStatusIcon } from "@/react/components/TaskStatusIcon";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";+import { rolloutServiceClientConnect } from "@/api";+import { EngineIcon } from "@/components/EngineIcon";+import { TaskStatusIcon } from "@/components/TaskStatusIcon";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";import {Sheet,SheetBody,@@ -16,17 +16,17 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { Textarea } from "@/react/components/ui/textarea";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { useProjectByName } from "@/react/hooks/useProjectByName";+} from "@/components/ui/sheet";+import { Textarea } from "@/components/ui/textarea";+import { useCurrentUser } from "@/hooks/useAppState";+import { useProjectByName } from "@/hooks/useProjectByName";import {ScheduledRunTimeInput,TASK_ROLLOUT_ACTION_SHEET_WIDTH,-} from "@/react/pages/project/utils/taskRolloutActionPanel";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";-import { projectNamePrefix } from "@/store/modules/v1/common";+} from "@/routes/project/utils/taskRolloutActionPanel";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";import { Issue_Type } from "@/types/proto-es/v1/issue_service_pb";import {BatchCancelTaskRunsRequestSchema,diff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailTaskRunTable.tsx b/frontend/src/routes/project/issue-detail/components/IssueDetailTaskRunTable.tsxsimilarity index 93%rename from frontend/src/react/pages/project/issue-detail/components/IssueDetailTaskRunTable.tsxrename to frontend/src/routes/project/issue-detail/components/IssueDetailTaskRunTable.tsxindex c366b189f3..f79847907f 100644--- a/frontend/src/react/pages/project/issue-detail/components/IssueDetailTaskRunTable.tsx+++ b/frontend/src/routes/project/issue-detail/components/IssueDetailTaskRunTable.tsx@@ -1,9 +1,9 @@import { useEffect, useMemo } from "react";import { useTranslation } from "react-i18next";-import { EngineIcon } from "@/react/components/EngineIcon";-import { HumanizeTs } from "@/react/components/HumanizeTs";-import { TaskRunStatusIcon } from "@/react/components/TaskRunStatusIcon";-import { EllipsisText } from "@/react/components/ui/ellipsis-text";+import { EngineIcon } from "@/components/EngineIcon";+import { HumanizeTs } from "@/components/HumanizeTs";+import { TaskRunStatusIcon } from "@/components/TaskRunStatusIcon";+import { EllipsisText } from "@/components/ui/ellipsis-text";import {Table,TableBody,@@ -11,15 +11,15 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { useProjectByName } from "@/react/hooks/useProjectByName";+} from "@/components/ui/table";+import { useProjectByName } from "@/hooks/useProjectByName";import {executionDurationOfTaskRun,getTaskRunComment,sortTaskRunsNewestFirst,-} from "@/react/lib/taskRun";-import { useAppStore } from "@/react/stores/app";-import { projectNamePrefix } from "@/store/modules/v1/common";+} from "@/lib/taskRun";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";import { getDateForPbTimestampProtoEs } from "@/types";import type { Database } from "@/types/proto-es/v1/database_service_pb";import type { Task, TaskRun } from "@/types/proto-es/v1/rollout_service_pb";diff --git a/frontend/src/react/pages/project/issue-detail/components/IssueDetailTitleInput.tsx b/frontend/src/routes/project/issue-detail/components/IssueDetailTitleInput.tsxsimilarity index 93%rename from frontend/src/react/pages/project/issue-detail/components/IssueDetailTitleInput.tsxrename to frontend/src/routes/project/issue-detail/components/IssueDetailTitleInput.tsxindex 4d343c9821..2b81203aa2 100644--- a/frontend/src/react/pages/project/issue-detail/components/IssueDetailTitleInput.tsx+++ b/frontend/src/routes/project/issue-detail/components/IssueDetailTitleInput.tsx@@ -2,11 +2,11 @@ import { create } from "@bufbuild/protobuf";import { Loader2 } from "lucide-react";import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { issueServiceClientConnect } from "@/connect";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";-import { projectNamePrefix } from "@/store/modules/v1/common";+import { issueServiceClientConnect } from "@/api";+import { useProjectByName } from "@/hooks/useProjectByName";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";import {IssueSchema,UpdateIssueRequestSchema,diff --git a/frontend/src/react/pages/project/issue-detail/context/IssueDetailContext.tsx b/frontend/src/routes/project/issue-detail/context/IssueDetailContext.tsxsimilarity index 100%rename from frontend/src/react/pages/project/issue-detail/context/IssueDetailContext.tsxrename to frontend/src/routes/project/issue-detail/context/IssueDetailContext.tsxdiff --git a/frontend/src/react/pages/project/issue-detail/hooks/useIssueDetailPage.test.tsx b/frontend/src/routes/project/issue-detail/hooks/useIssueDetailPage.test.tsxsimilarity index 96%rename from frontend/src/react/pages/project/issue-detail/hooks/useIssueDetailPage.test.tsxrename to frontend/src/routes/project/issue-detail/hooks/useIssueDetailPage.test.tsxindex d26efb8cfe..6ee82fc81f 100644--- a/frontend/src/react/pages/project/issue-detail/hooks/useIssueDetailPage.test.tsx+++ b/frontend/src/routes/project/issue-detail/hooks/useIssueDetailPage.test.tsx@@ -27,7 +27,7 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/connect", () => ({+vi.mock("@/api", () => ({issueServiceClientConnect: {getIssue: mocks.getIssue,},@@ -41,7 +41,7 @@ vi.mock("@/connect", () => ({},}));-vi.mock("@/react/hooks/useProjectByName", () => ({+vi.mock("@/hooks/useProjectByName", () => ({useProjectByName: () =>create(ProjectSchema, {name: "projects/foo",@@ -50,7 +50,7 @@ vi.mock("@/react/hooks/useProjectByName", () => ({}),}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({router: {beforeEach: vi.fn(() => vi.fn()),currentRoute: { value: {} },@@ -58,7 +58,7 @@ vi.mock("@/react/router", () => ({},}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: (selector: (state: { projectsByName: Map<string, never> }) => unknown) => selector({ projectsByName: new Map<string, never>() }),diff --git a/frontend/src/react/pages/project/issue-detail/hooks/useIssueDetailPage.ts b/frontend/src/routes/project/issue-detail/hooks/useIssueDetailPage.tssimilarity index 97%rename from frontend/src/react/pages/project/issue-detail/hooks/useIssueDetailPage.tsrename to frontend/src/routes/project/issue-detail/hooks/useIssueDetailPage.tsindex 8fa00a9e6b..f9833e75d8 100644--- a/frontend/src/react/pages/project/issue-detail/hooks/useIssueDetailPage.ts+++ b/frontend/src/routes/project/issue-detail/hooks/useIssueDetailPage.ts@@ -6,16 +6,13 @@ import {issueServiceClientConnect,planServiceClientConnect,rolloutServiceClientConnect,-} from "@/connect";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { router } from "@/react/router";-import {- WORKSPACE_ROUTE_403,- WORKSPACE_ROUTE_404,-} from "@/react/router/handles";-import { buildPermissionDeniedRouteQuery } from "@/react/router/permissionDenied";-import { useAppStore } from "@/react/stores/app";-import { projectNamePrefix } from "@/store";+} from "@/api";+import { router } from "@/app/router";+import { WORKSPACE_ROUTE_403, WORKSPACE_ROUTE_404 } from "@/app/router/handles";+import { buildPermissionDeniedRouteQuery } from "@/app/router/permissionDenied";+import { useProjectByName } from "@/hooks/useProjectByName";+import { projectNamePrefix } from "@/stores";+import { useAppStore } from "@/stores/app";import { State } from "@/types/proto-es/v1/common_pb";import {GetIssueRequestSchema,diff --git a/frontend/src/react/pages/project/issue-detail/hooks/useIssueDetailSpecValidation.ts b/frontend/src/routes/project/issue-detail/hooks/useIssueDetailSpecValidation.tssimilarity index 97%rename from frontend/src/react/pages/project/issue-detail/hooks/useIssueDetailSpecValidation.tsrename to frontend/src/routes/project/issue-detail/hooks/useIssueDetailSpecValidation.tsindex fb6fc57044..b21dd65f51 100644--- a/frontend/src/react/pages/project/issue-detail/hooks/useIssueDetailSpecValidation.ts+++ b/frontend/src/routes/project/issue-detail/hooks/useIssueDetailSpecValidation.ts@@ -1,5 +1,5 @@import { useEffect, useState } from "react";-import { useAppStore } from "@/react/stores/app";+import { useAppStore } from "@/stores/app";import type { Plan_Spec } from "@/types/proto-es/v1/plan_service_pb";import { sheetNameOfSpec } from "@/utils/v1/issue/plan";import { extractSheetUID, getSheetStatement } from "@/utils/v1/sheet";diff --git a/frontend/src/react/pages/project/issue-detail/hooks/useIssueDetailType.ts b/frontend/src/routes/project/issue-detail/hooks/useIssueDetailType.tssimilarity index 100%rename from frontend/src/react/pages/project/issue-detail/hooks/useIssueDetailType.tsrename to frontend/src/routes/project/issue-detail/hooks/useIssueDetailType.tsdiff --git a/frontend/src/react/pages/project/issue-detail/types.ts b/frontend/src/routes/project/issue-detail/types.tssimilarity index 100%rename from frontend/src/react/pages/project/issue-detail/types.tsrename to frontend/src/routes/project/issue-detail/types.tsdiff --git a/frontend/src/react/pages/project/issue-detail/utils/actionRegistry.ts b/frontend/src/routes/project/issue-detail/utils/actionRegistry.tssimilarity index 99%rename from frontend/src/react/pages/project/issue-detail/utils/actionRegistry.tsrename to frontend/src/routes/project/issue-detail/utils/actionRegistry.tsindex 68e87b7b23..b4ffa45446 100644--- a/frontend/src/react/pages/project/issue-detail/utils/actionRegistry.ts+++ b/frontend/src/routes/project/issue-detail/utils/actionRegistry.ts@@ -1,6 +1,6 @@import type { TFunction } from "i18next";import { first, orderBy } from "lodash-es";-import { extractUserEmail } from "@/store";+import { extractUserEmail } from "@/stores";import { ApprovalStatus, State } from "@/types/proto-es/v1/common_pb";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";import {diff --git a/frontend/src/react/pages/project/issue-detail/utils/approval.ts b/frontend/src/routes/project/issue-detail/utils/approval.tssimilarity index 100%rename from frontend/src/react/pages/project/issue-detail/utils/approval.tsrename to frontend/src/routes/project/issue-detail/utils/approval.tsdiff --git a/frontend/src/react/pages/project/issue-detail/utils/approvalCandidates.ts b/frontend/src/routes/project/issue-detail/utils/approvalCandidates.tssimilarity index 90%rename from frontend/src/react/pages/project/issue-detail/utils/approvalCandidates.tsrename to frontend/src/routes/project/issue-detail/utils/approvalCandidates.tsindex 479c5a03a7..583726c2d7 100644--- a/frontend/src/react/pages/project/issue-detail/utils/approvalCandidates.ts+++ b/frontend/src/routes/project/issue-detail/utils/approvalCandidates.ts@@ -1,6 +1,6 @@import { uniq } from "lodash-es";-import { useAppStore } from "@/react/stores/app";-import { projectNamePrefix, userNamePrefix } from "@/store/modules/v1/common";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix, userNamePrefix } from "@/stores/modules/v1/common";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";import {extractProjectResourceName,diff --git a/frontend/src/react/pages/project/issue-detail/utils/databaseChange.test.ts b/frontend/src/routes/project/issue-detail/utils/databaseChange.test.tssimilarity index 100%rename from frontend/src/react/pages/project/issue-detail/utils/databaseChange.test.tsrename to frontend/src/routes/project/issue-detail/utils/databaseChange.test.tsdiff --git a/frontend/src/react/pages/project/issue-detail/utils/databaseChange.ts b/frontend/src/routes/project/issue-detail/utils/databaseChange.tssimilarity index 100%rename from frontend/src/react/pages/project/issue-detail/utils/databaseChange.tsrename to frontend/src/routes/project/issue-detail/utils/databaseChange.tsdiff --git a/frontend/src/react/pages/project/issue-detail/utils/localSheet.ts b/frontend/src/routes/project/issue-detail/utils/localSheet.tssimilarity index 100%rename from frontend/src/react/pages/project/issue-detail/utils/localSheet.tsrename to frontend/src/routes/project/issue-detail/utils/localSheet.tsdiff --git a/frontend/src/react/pages/project/issue-detail/utils/refreshIssueDetailState.ts b/frontend/src/routes/project/issue-detail/utils/refreshIssueDetailState.tssimilarity index 99%rename from frontend/src/react/pages/project/issue-detail/utils/refreshIssueDetailState.tsrename to frontend/src/routes/project/issue-detail/utils/refreshIssueDetailState.tsindex ac875c8fa5..2a77f85bb8 100644--- a/frontend/src/react/pages/project/issue-detail/utils/refreshIssueDetailState.ts+++ b/frontend/src/routes/project/issue-detail/utils/refreshIssueDetailState.ts@@ -3,7 +3,7 @@ import {issueServiceClientConnect,planServiceClientConnect,rolloutServiceClientConnect,-} from "@/connect";+} from "@/api";import { GetIssueRequestSchema } from "@/types/proto-es/v1/issue_service_pb";import {GetPlanCheckRunRequestSchema,diff --git a/frontend/src/react/pages/project/issue-detail/utils/rollout.ts b/frontend/src/routes/project/issue-detail/utils/rollout.tssimilarity index 96%rename from frontend/src/react/pages/project/issue-detail/utils/rollout.tsrename to frontend/src/routes/project/issue-detail/utils/rollout.tsindex 58b5adc226..99ee270e65 100644--- a/frontend/src/react/pages/project/issue-detail/utils/rollout.ts+++ b/frontend/src/routes/project/issue-detail/utils/rollout.ts@@ -1,5 +1,5 @@-import { useAppStore } from "@/react/stores/app";-import { roleNamePrefix } from "@/store/modules/v1/common";+import { useAppStore } from "@/stores/app";+import { roleNamePrefix } from "@/stores/modules/v1/common";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";import { Issue_Type } from "@/types/proto-es/v1/issue_service_pb";import { PolicyType } from "@/types/proto-es/v1/org_policy_service_pb";diff --git a/frontend/src/react/pages/project/pagedDataCacheScope.test.ts b/frontend/src/routes/project/pagedDataCacheScope.test.tssimilarity index 98%rename from frontend/src/react/pages/project/pagedDataCacheScope.test.tsrename to frontend/src/routes/project/pagedDataCacheScope.test.tsindex ea3403f139..15de7cc6fe 100644--- a/frontend/src/react/pages/project/pagedDataCacheScope.test.ts+++ b/frontend/src/routes/project/pagedDataCacheScope.test.ts@@ -3,7 +3,7 @@ import {clearPagedDataCache,readPagedDataCache,writePagedDataCache,-} from "@/react/hooks/pagedDataCache";+} from "@/hooks/pagedDataCache";import {invalidateProjectPagedDataCacheIfChanged,projectIssuesPagedDataCacheScope,diff --git a/frontend/src/react/pages/project/pagedDataCacheScope.ts b/frontend/src/routes/project/pagedDataCacheScope.tssimilarity index 93%rename from frontend/src/react/pages/project/pagedDataCacheScope.tsrename to frontend/src/routes/project/pagedDataCacheScope.tsindex 5137926366..d64c2ac3b0 100644--- a/frontend/src/react/pages/project/pagedDataCacheScope.ts+++ b/frontend/src/routes/project/pagedDataCacheScope.ts@@ -1,4 +1,4 @@-import { invalidatePagedDataCacheScope } from "@/react/hooks/pagedDataCache";+import { invalidatePagedDataCacheScope } from "@/hooks/pagedDataCache";type VersionedResource = {name: string;diff --git a/frontend/src/react/pages/project/plan-detail/ProjectPlanDetailPage.test.tsx b/frontend/src/routes/project/plan-detail/ProjectPlanDetailPage.test.tsxsimilarity index 97%rename from frontend/src/react/pages/project/plan-detail/ProjectPlanDetailPage.test.tsxrename to frontend/src/routes/project/plan-detail/ProjectPlanDetailPage.test.tsxindex f00f899c82..1ac1cf2be2 100644--- a/frontend/src/react/pages/project/plan-detail/ProjectPlanDetailPage.test.tsx+++ b/frontend/src/routes/project/plan-detail/ProjectPlanDetailPage.test.tsx@@ -2,7 +2,7 @@ import type { ReactNode } from "react";import { act } from "react";import { createRoot } from "react-dom/client";import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";-import { MAIN_SCROLL_RESTORATION_ID } from "@/react/router/NavigationScrollRestoration";+import { MAIN_SCROLL_RESTORATION_ID } from "@/app/router/NavigationScrollRestoration";import { State } from "@/types/proto-es/v1/common_pb";import type { PlanDetailPageState } from "./shell/hooks/types";@@ -27,7 +27,7 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/components/ui/alert-dialog", () => ({+vi.mock("@/components/ui/alert-dialog", () => ({AlertDialog: ({ children }: { children: ReactNode }) => <>{children}</>,AlertDialogContent: ({ children }: { children: ReactNode }) => (<div>{children}</div>@@ -40,11 +40,11 @@ vi.mock("@/react/components/ui/alert-dialog", () => ({),}));-vi.mock("@/react/components/ui/badge", () => ({+vi.mock("@/components/ui/badge", () => ({Badge: ({ children }: { children: ReactNode }) => <span>{children}</span>,}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,onClick,@@ -54,7 +54,7 @@ vi.mock("@/react/components/ui/button", () => ({}) => <button onClick={onClick}>{children}</button>,}));-vi.mock("@/react/lib/utils", () => ({+vi.mock("@/lib/utils", () => ({cn: (...classes: Array<string | false | null | undefined>) =>classes.filter(Boolean).join(" "),}));diff --git a/frontend/src/react/pages/project/plan-detail/ProjectPlanDetailPage.tsx b/frontend/src/routes/project/plan-detail/ProjectPlanDetailPage.tsxsimilarity index 98%rename from frontend/src/react/pages/project/plan-detail/ProjectPlanDetailPage.tsxrename to frontend/src/routes/project/plan-detail/ProjectPlanDetailPage.tsxindex c53f124e5f..445a565dfd 100644--- a/frontend/src/react/pages/project/plan-detail/ProjectPlanDetailPage.tsx+++ b/frontend/src/routes/project/plan-detail/ProjectPlanDetailPage.tsx@@ -2,16 +2,16 @@ import { Code2, Loader2, MessageSquareMore, Rocket } from "lucide-react";import type { ReactNode } from "react";import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";+import { MAIN_SCROLL_RESTORATION_ID } from "@/app/router/NavigationScrollRestoration";import {AlertDialog,AlertDialogContent,AlertDialogFooter,AlertDialogTitle,-} from "@/react/components/ui/alert-dialog";-import { Badge } from "@/react/components/ui/badge";-import { Button } from "@/react/components/ui/button";-import { cn } from "@/react/lib/utils";-import { MAIN_SCROLL_RESTORATION_ID } from "@/react/router/NavigationScrollRestoration";+} from "@/components/ui/alert-dialog";+import { Badge } from "@/components/ui/badge";+import { Button } from "@/components/ui/button";+import { cn } from "@/lib/utils";import { IssueStatus } from "@/types/proto-es/v1/issue_service_pb";import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";import { getRolloutStatus } from "@/utils";diff --git a/frontend/src/react/pages/project/plan-detail/components/PlanDetailAggregateChecks.tsx b/frontend/src/routes/project/plan-detail/components/PlanDetailAggregateChecks.tsxsimilarity index 91%rename from frontend/src/react/pages/project/plan-detail/components/PlanDetailAggregateChecks.tsxrename to frontend/src/routes/project/plan-detail/components/PlanDetailAggregateChecks.tsxindex 916723e780..bd60f91cda 100644--- a/frontend/src/react/pages/project/plan-detail/components/PlanDetailAggregateChecks.tsx+++ b/frontend/src/routes/project/plan-detail/components/PlanDetailAggregateChecks.tsx@@ -1,8 +1,8 @@import { useMemo } from "react";-import { PlanCheckSection } from "@/react/components/plan-check/PlanCheckSection";+import { PlanCheckSection } from "@/components/plan-check/PlanCheckSection";+import { getPlanCheckSummaryWithFallback } from "@/lib/plan/check";import { usePlanCheckActions } from "../hooks/usePlanCheckActions";import { usePlanDetailContext } from "../shell/PlanDetailContext";-import { getPlanCheckSummaryWithFallback } from "../utils/planCheck";import { PlanTargetDisplay } from "./PlanTargetDisplay";// Plan-wide checks rendered as a verdict-line footer at the bottom of thediff --git a/frontend/src/react/pages/project/plan-detail/components/PlanDetailChangesBranch.test.tsx b/frontend/src/routes/project/plan-detail/components/PlanDetailChangesBranch.test.tsxsimilarity index 97%rename from frontend/src/react/pages/project/plan-detail/components/PlanDetailChangesBranch.test.tsxrename to frontend/src/routes/project/plan-detail/components/PlanDetailChangesBranch.test.tsxindex e7069ce5ec..096e053b2c 100644--- a/frontend/src/react/pages/project/plan-detail/components/PlanDetailChangesBranch.test.tsx+++ b/frontend/src/routes/project/plan-detail/components/PlanDetailChangesBranch.test.tsx@@ -74,25 +74,25 @@ vi.mock("@bufbuild/protobuf", () => ({create: (_schema: unknown, init?: Record<string, unknown>) => ({ ...init }),}));-vi.mock("@/react/hooks/useSessionPageSize", () => ({+vi.mock("@/hooks/useSessionPageSize", () => ({useSessionPageSize: () => [20, () => {}],}));-vi.mock("@/react/components/EngineIcon", () => ({+vi.mock("@/components/EngineIcon", () => ({EngineIcon: () => null,}));-vi.mock("@/react/components/EnvironmentLabel", () => ({+vi.mock("@/components/EnvironmentLabel", () => ({EnvironmentLabel: () => null,}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({ children, ...props }: ButtonHTMLAttributes<HTMLButtonElement>) => (<button {...props}>{children}</button>),}));-vi.mock("@/react/components/ui/dropdown-menu", () => ({+vi.mock("@/components/ui/dropdown-menu", () => ({DropdownMenu: ({ children }: { children: ReactNode }) => <>{children}</>,DropdownMenuContent: ({ children }: { children: ReactNode }) => (<div>{children}</div>@@ -105,7 +105,7 @@ vi.mock("@/react/components/ui/dropdown-menu", () => ({),}));-vi.mock("@/react/components/ui/search-input", () => ({+vi.mock("@/components/ui/search-input", () => ({SearchInput: ({wrapperClassName,...props@@ -122,7 +122,7 @@ vi.mock("@/react/components/ui/search-input", () => ({),}));-vi.mock("@/react/components/ui/select", () => ({+vi.mock("@/components/ui/select", () => ({Select: ({children,onValueChange,@@ -158,7 +158,7 @@ vi.mock("@/react/components/ui/select", () => ({),}));-vi.mock("@/react/components/ui/sheet", () => ({+vi.mock("@/components/ui/sheet", () => ({Sheet: ({ children, open }: { children: ReactNode; open: boolean }) =>open ? <div>{children}</div> : null,SheetBody: ({@@ -183,7 +183,7 @@ vi.mock("@/react/components/ui/sheet", () => ({SheetTitle: ({ children }: { children: ReactNode }) => <h2>{children}</h2>,}));-vi.mock("@/react/components/ui/switch", () => ({+vi.mock("@/components/ui/switch", () => ({Switch: ({checked,disabled,@@ -203,11 +203,11 @@ vi.mock("@/react/components/ui/switch", () => ({),}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: ({ children }: { children: ReactNode }) => <>{children}</>,}));-vi.mock("@/react/components/ui/popover", () => ({+vi.mock("@/components/ui/popover", () => ({Popover: ({ children }: { children: ReactNode }) => <div>{children}</div>,PopoverContent: ({ children }: { children: ReactNode }) => (<div>{children}</div>@@ -217,13 +217,13 @@ vi.mock("@/react/components/ui/popover", () => ({),}));-vi.mock("@/react/lib/utils", () => ({+vi.mock("@/lib/utils", () => ({cn: (...classes: Array<string | false | null | undefined>) =>classes.filter(Boolean).join(" "),}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {push: mocks.routerPush,resolve: () => ({ href: "/database-group-detail" }),@@ -238,14 +238,14 @@ vi.mock("@/types", () => ({unknownDatabaseGroup: () => ({ name: "", matchedDatabases: [] }),}));-vi.mock("@/connect", () => ({+vi.mock("@/api", () => ({instanceRoleServiceClientConnect: mocks.instanceRoleServiceClientConnect,planServiceClientConnect: {updatePlan: vi.fn(async (request) => request.plan),},}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({getProjectNameAndDatabaseGroupName: (name: string) =>name.split("/databaseGroups/"),pushNotification: vi.fn(),@@ -255,7 +255,7 @@ vi.mock("@/store", () => ({// `useAppStore.getState().<method>()` and reactive selectors over app-store// maps. Delegate map lookups to the existing store mocks so per-test setup// keeps working.-vi.mock("@/react/stores/app", async () => {+vi.mock("@/stores/app", async () => {const { DatabaseGroupView } = await vi.importActual<typeof import("@/types/proto-es/v1/database_group_service_pb")>("@/types/proto-es/v1/database_group_service_pb");@@ -310,7 +310,7 @@ vi.mock("@/react/stores/app", async () => {return { useAppStore };});-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useCurrentUser: () => ({name: "users/[email protected]",email: "[email protected]",@@ -388,7 +388,7 @@ vi.mock("../utils/options", () => ({getPlanOptionVisibility: mocks.getPlanOptionVisibility,}));-vi.mock("../utils/planCheck", () => ({+vi.mock("@/lib/plan/check", () => ({planCheckRunListForSpec: () => [],transformReleaseCheckResultsToPlanCheckRuns: (results: CheckReleaseResponse_CheckResult[]diff --git a/frontend/src/react/pages/project/plan-detail/components/PlanDetailChangesBranch.tsx b/frontend/src/routes/project/plan-detail/components/PlanDetailChangesBranch.tsxsimilarity index 98%rename from frontend/src/react/pages/project/plan-detail/components/PlanDetailChangesBranch.tsxrename to frontend/src/routes/project/plan-detail/components/PlanDetailChangesBranch.tsxindex f4c49f9cc7..0f8663c5d0 100644--- a/frontend/src/react/pages/project/plan-detail/components/PlanDetailChangesBranch.tsx+++ b/frontend/src/routes/project/plan-detail/components/PlanDetailChangesBranch.tsx@@ -16,42 +16,47 @@ import { v4 as uuidv4 } from "uuid";import {instanceRoleServiceClientConnect,planServiceClientConnect,-} from "@/connect";-import { EngineIcon } from "@/react/components/EngineIcon";-import { EnvironmentLabel } from "@/react/components/EnvironmentLabel";-import { GhostFlagsButton } from "@/react/components/ghost/GhostFlagsButton";-import { RouterLink } from "@/react/components/RouterLink";-import { Alert } from "@/react/components/ui/alert";+} from "@/api";+import { router } from "@/app/router";+import {+ PROJECT_V1_ROUTE_DATABASE_GROUP_DETAIL,+ PROJECT_V1_ROUTE_PLAN_DETAIL_SPEC_DETAIL,+} from "@/app/router/handles";+import { EngineIcon } from "@/components/EngineIcon";+import { EnvironmentLabel } from "@/components/EnvironmentLabel";+import { GhostFlagsButton } from "@/components/ghost/GhostFlagsButton";+import { RouterLink } from "@/components/RouterLink";+import { Alert } from "@/components/ui/alert";import {AlertDialog,AlertDialogContent,AlertDialogDescription,AlertDialogFooter,AlertDialogTitle,-} from "@/react/components/ui/alert-dialog";-import { Badge } from "@/react/components/ui/badge";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";+} from "@/components/ui/alert-dialog";+import { Badge } from "@/components/ui/badge";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";+} from "@/components/ui/dropdown-menu";import {Popover,PopoverContent,PopoverTrigger,-} from "@/react/components/ui/popover";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";-import { SearchInput } from "@/react/components/ui/search-input";+} from "@/components/ui/popover";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";+import { SearchInput } from "@/components/ui/search-input";import {Select,SelectContent,SelectItem,SelectTrigger,SelectValue,-} from "@/react/components/ui/select";+} from "@/components/ui/select";import {Sheet,SheetBody,@@ -59,21 +64,20 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { Switch } from "@/react/components/ui/switch";-import { Tooltip } from "@/react/components/ui/tooltip";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { useSessionPageSize } from "@/react/hooks/useSessionPageSize";-import { seedSheetStatement } from "@/react/hooks/useSheetStatement";-import { cn } from "@/react/lib/utils";-import { router } from "@/react/router";+} from "@/components/ui/sheet";+import { Switch } from "@/components/ui/switch";+import { Tooltip } from "@/components/ui/tooltip";+import { useCurrentUser } from "@/hooks/useAppState";+import { useProjectByName } from "@/hooks/useProjectByName";+import { useSessionPageSize } from "@/hooks/useSessionPageSize";+import { seedSheetStatement } from "@/hooks/useSheetStatement";import {- PROJECT_V1_ROUTE_DATABASE_GROUP_DETAIL,- PROJECT_V1_ROUTE_PLAN_DETAIL_SPEC_DETAIL,-} from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { getProjectNameAndDatabaseGroupName, pushNotification } from "@/store";+ planCheckRunListForSpec,+ transformReleaseCheckResultsToPlanCheckRuns,+} from "@/lib/plan/check";+import { cn } from "@/lib/utils";+import { getProjectNameAndDatabaseGroupName, pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import {isValidDatabaseGroupName,isValidDatabaseName,@@ -127,10 +131,6 @@ import {allowGhostForDatabase,getPlanOptionVisibility,} from "../utils/options";-import {- planCheckRunListForSpec,- transformReleaseCheckResultsToPlanCheckRuns,-} from "../utils/planCheck";import {getSelectedSpec,getSpecTitle,diff --git a/frontend/src/react/pages/project/plan-detail/components/PlanDetailDeployFuture.tsx b/frontend/src/routes/project/plan-detail/components/PlanDetailDeployFuture.tsxsimilarity index 88%rename from frontend/src/react/pages/project/plan-detail/components/PlanDetailDeployFuture.tsxrename to frontend/src/routes/project/plan-detail/components/PlanDetailDeployFuture.tsxindex 77ea27c964..aa50fc2452 100644--- a/frontend/src/react/pages/project/plan-detail/components/PlanDetailDeployFuture.tsx+++ b/frontend/src/routes/project/plan-detail/components/PlanDetailDeployFuture.tsx@@ -1,11 +1,11 @@import { create } from "@bufbuild/protobuf";import { useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { rolloutServiceClientConnect } from "@/connect";-import { Button } from "@/react/components/ui/button";-import { router } from "@/react/router";-import { buildPlanDeployRouteFromRolloutName } from "@/react/router/routeHelpers";-import { pushNotification } from "@/store";+import { rolloutServiceClientConnect } from "@/api";+import { router } from "@/app/router";+import { buildPlanDeployRouteFromRolloutName } from "@/app/router/routeHelpers";+import { Button } from "@/components/ui/button";+import { pushNotification } from "@/stores";import { State } from "@/types/proto-es/v1/common_pb";import { CreateRolloutRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";import { usePlanDetailContext } from "../shell/PlanDetailContext";diff --git a/frontend/src/react/pages/project/plan-detail/components/PlanDetailDraftChecks.tsx b/frontend/src/routes/project/plan-detail/components/PlanDetailDraftChecks.tsxsimilarity index 92%rename from frontend/src/react/pages/project/plan-detail/components/PlanDetailDraftChecks.tsxrename to frontend/src/routes/project/plan-detail/components/PlanDetailDraftChecks.tsxindex ceb07a8f09..714d1149c7 100644--- a/frontend/src/react/pages/project/plan-detail/components/PlanDetailDraftChecks.tsx+++ b/frontend/src/routes/project/plan-detail/components/PlanDetailDraftChecks.tsx@@ -2,10 +2,11 @@ import { create } from "@bufbuild/protobuf";import { CircleQuestionMark } from "lucide-react";import { useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { releaseServiceClientConnect } from "@/connect";-import { PlanCheckSection } from "@/react/components/plan-check/PlanCheckSection";-import { Tooltip } from "@/react/components/ui/tooltip";-import { pushNotification } from "@/store";+import { releaseServiceClientConnect } from "@/api";+import { PlanCheckSection } from "@/components/plan-check/PlanCheckSection";+import { Tooltip } from "@/components/ui/tooltip";+import { transformReleaseCheckResultsToPlanCheckRuns } from "@/lib/plan/check";+import { pushNotification } from "@/stores";import type { Plan_Spec } from "@/types/proto-es/v1/plan_service_pb";import {CheckReleaseRequestSchema,@@ -18,7 +19,6 @@ import {getSpecStatementContent,useLocalSheetsVersion,} from "../utils/localSheet";-import { transformReleaseCheckResultsToPlanCheckRuns } from "../utils/planCheck";import { PlanTargetDisplay } from "./PlanTargetDisplay";export function PlanDetailDraftChecks({diff --git a/frontend/src/react/pages/project/plan-detail/components/PlanDetailHeader.test.tsx b/frontend/src/routes/project/plan-detail/components/PlanDetailHeader.test.tsxsimilarity index 97%rename from frontend/src/react/pages/project/plan-detail/components/PlanDetailHeader.test.tsxrename to frontend/src/routes/project/plan-detail/components/PlanDetailHeader.test.tsxindex 987f98e4b6..52ca6b7793 100644--- a/frontend/src/react/pages/project/plan-detail/components/PlanDetailHeader.test.tsx+++ b/frontend/src/routes/project/plan-detail/components/PlanDetailHeader.test.tsx@@ -43,7 +43,7 @@ vi.mock("@bufbuild/protobuf", () => ({create: (_schema: unknown, init?: Record<string, unknown>) => ({ ...init }),}));-vi.mock("@/connect", () => ({+vi.mock("@/api", () => ({issueServiceClientConnect: {batchUpdateIssuesStatus: mocks.batchUpdateIssuesStatus,createIssue: mocks.createIssue,@@ -55,7 +55,7 @@ vi.mock("@/connect", () => ({},}));-vi.mock("@/react/components/IssueLabelSelect", () => ({+vi.mock("@/components/IssueLabelSelect", () => ({IssueLabelSelect: ({onChange,selected,@@ -72,11 +72,11 @@ vi.mock("@/react/components/IssueLabelSelect", () => ({),}));-vi.mock("@/react/components/MarkdownEditor", () => ({+vi.mock("@/components/MarkdownEditor", () => ({MarkdownEditor: ({ content }: { content: string }) => <span>{content}</span>,}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({appearance: _appearance,children,@@ -90,7 +90,7 @@ vi.mock("@/react/components/ui/button", () => ({}) => <button {...props}>{children}</button>,}));-vi.mock("@/react/components/ui/checkbox", () => ({+vi.mock("@/components/ui/checkbox", () => ({Checkbox: ({checked,onCheckedChange,@@ -106,13 +106,13 @@ vi.mock("@/react/components/ui/checkbox", () => ({),}));-vi.mock("@/react/components/ui/textarea", () => ({+vi.mock("@/components/ui/textarea", () => ({Textarea: (props: TextareaHTMLAttributes<HTMLTextAreaElement>) => (<textarea {...props} />),}));-vi.mock("@/react/components/ui/popover", async () => {+vi.mock("@/components/ui/popover", async () => {const React = await vi.importActual<typeof import("react")>("react");const PopoverContext = React.createContext<{onOpenChange?: (open: boolean) => void;@@ -161,7 +161,7 @@ vi.mock("@/react/components/ui/popover", async () => {};});-vi.mock("@/react/components/ui/dropdown-menu", () => ({+vi.mock("@/components/ui/dropdown-menu", () => ({DropdownMenu: ({ children }: { children: ReactNode }) => (<div>{children}</div>),@@ -189,16 +189,16 @@ vi.mock("@/react/components/ui/dropdown-menu", () => ({),}));-vi.mock("@/react/lib/utils", () => ({+vi.mock("@/lib/utils", () => ({cn: (...classes: Array<string | false | null | undefined>) =>classes.filter(Boolean).join(" "),}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({router: { replace: mocks.replaceRoute },}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const getState = () => ({createSheet: vi.fn(),listIssueComments: vi.fn(),@@ -206,7 +206,7 @@ vi.mock("@/react/stores/app", () => {return { useAppStore: { getState } };});-vi.mock("@/store", () => ({ pushNotification: mocks.pushNotification }));+vi.mock("@/stores", () => ({ pushNotification: mocks.pushNotification }));vi.mock("@/utils", () => ({extractPlanUID: (name: string) => name.split("/").at(-1) ?? "",diff --git a/frontend/src/react/pages/project/plan-detail/components/PlanDetailHeader.tsx b/frontend/src/routes/project/plan-detail/components/PlanDetailHeader.tsxsimilarity index 97%rename from frontend/src/react/pages/project/plan-detail/components/PlanDetailHeader.tsxrename to frontend/src/routes/project/plan-detail/components/PlanDetailHeader.tsxindex c1417ce781..0605155cbd 100644--- a/frontend/src/react/pages/project/plan-detail/components/PlanDetailHeader.tsx+++ b/frontend/src/routes/project/plan-detail/components/PlanDetailHeader.tsx@@ -2,30 +2,39 @@ import { clone, create } from "@bufbuild/protobuf";import { EllipsisVertical, Loader2 } from "lucide-react";import { useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { issueServiceClientConnect, planServiceClientConnect } from "@/connect";+import { issueServiceClientConnect, planServiceClientConnect } from "@/api";+import { router } from "@/app/router";+import { PROJECT_V1_ROUTE_PLAN_DETAIL } from "@/app/router/handles";import {type IssueLabel,IssueLabelSelect,-} from "@/react/components/IssueLabelSelect";-import { Alert } from "@/react/components/ui/alert";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";+} from "@/components/IssueLabelSelect";+import { Alert } from "@/components/ui/alert";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";+} from "@/components/ui/dropdown-menu";import {Popover,PopoverContent,PopoverTrigger,-} from "@/react/components/ui/popover";-import { cn } from "@/react/lib/utils";-import { router } from "@/react/router";-import { PROJECT_V1_ROUTE_PLAN_DETAIL } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/components/ui/popover";+import {+ createPlanWithDraftReview,+ DraftReviewIssueCreationError,+ getCreateIssueBlockingErrors,+ getCreateIssueConfirmErrors,+ getCreatePlanBlockingReasons,+ hasChecksWarning,+ submitDraftReview,+} from "@/lib/plan/workflow";+import { cn } from "@/lib/utils";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import { State } from "@/types/proto-es/v1/common_pb";import {BatchUpdateIssuesStatusRequestSchema,@@ -47,15 +56,6 @@ import {import { usePlanDetailSpecValidation } from "../hooks/usePlanDetailSpecValidation";import { focusPlanPhase } from "../shell/focusPhase";import { usePlanDetailContext } from "../shell/PlanDetailContext";-import {- createPlanWithDraftReview,- DraftReviewIssueCreationError,- getCreateIssueBlockingErrors,- getCreateIssueConfirmErrors,- getCreatePlanBlockingReasons,- hasChecksWarning,- submitDraftReview,-} from "../utils/header";import { getLocalSheetByName, removeLocalSheet } from "../utils/localSheet";import { PlanLifecycleSlot } from "./lifecycle/PlanLifecycleSlot";import { PlanLifecycleStamp } from "./lifecycle/PlanLifecycleStamp";diff --git a/frontend/src/react/pages/project/plan-detail/components/PlanDetailHeaderDetails.tsx b/frontend/src/routes/project/plan-detail/components/PlanDetailHeaderDetails.tsxsimilarity index 97%rename from frontend/src/react/pages/project/plan-detail/components/PlanDetailHeaderDetails.tsxrename to frontend/src/routes/project/plan-detail/components/PlanDetailHeaderDetails.tsxindex 439f68d529..525b11400c 100644--- a/frontend/src/react/pages/project/plan-detail/components/PlanDetailHeaderDetails.tsx+++ b/frontend/src/routes/project/plan-detail/components/PlanDetailHeaderDetails.tsx@@ -6,12 +6,12 @@ import { create } from "@bufbuild/protobuf";import { ChevronUp, Plus } from "lucide-react";import { useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { issueServiceClientConnect, planServiceClientConnect } from "@/connect";-import { MarkdownEditor } from "@/react/components/MarkdownEditor";-import { Button } from "@/react/components/ui/button";-import { Textarea } from "@/react/components/ui/textarea";-import { cn } from "@/react/lib/utils";-import { pushNotification } from "@/store";+import { issueServiceClientConnect, planServiceClientConnect } from "@/api";+import { MarkdownEditor } from "@/components/MarkdownEditor";+import { Button } from "@/components/ui/button";+import { Textarea } from "@/components/ui/textarea";+import { cn } from "@/lib/utils";+import { pushNotification } from "@/stores";import {IssueSchema,UpdateIssueRequestSchema,diff --git a/frontend/src/react/pages/project/plan-detail/components/PlanDetailMeta.test.tsx b/frontend/src/routes/project/plan-detail/components/PlanDetailMeta.test.tsxsimilarity index 95%rename from frontend/src/react/pages/project/plan-detail/components/PlanDetailMeta.test.tsxrename to frontend/src/routes/project/plan-detail/components/PlanDetailMeta.test.tsxindex 9a5a5c4e89..68b4cf600b 100644--- a/frontend/src/react/pages/project/plan-detail/components/PlanDetailMeta.test.tsx+++ b/frontend/src/routes/project/plan-detail/components/PlanDetailMeta.test.tsx@@ -27,19 +27,19 @@ vi.mock("@bufbuild/protobuf", () => ({create: (_schema: unknown, init?: Record<string, unknown>) => ({ ...init }),}));-vi.mock("@/connect", () => ({+vi.mock("@/api", () => ({issueServiceClientConnect: { updateIssue: mocks.updateIssue },}));-vi.mock("@/react/components/HumanizeTs", () => ({ HumanizeTs: () => null }));+vi.mock("@/components/HumanizeTs", () => ({ HumanizeTs: () => null }));-vi.mock("@/react/components/ui/checkbox", () => ({+vi.mock("@/components/ui/checkbox", () => ({Checkbox: ({ checked }: { checked: boolean }) => (<input checked={checked} readOnly type="checkbox" />),}));-vi.mock("@/react/components/ui/popover", async () => {+vi.mock("@/components/ui/popover", async () => {const React = await vi.importActual<typeof import("react")>("react");const PopoverContext = React.createContext<{onOpenChange?: (open: boolean) => void;@@ -88,12 +88,12 @@ vi.mock("@/react/components/ui/popover", async () => {};});-vi.mock("@/react/lib/utils", () => ({+vi.mock("@/lib/utils", () => ({cn: (...classes: Array<string | false | null | undefined>) =>classes.filter(Boolean).join(" "),}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({extractUserEmail: (name: string) => name,pushNotification: mocks.pushNotification,}));diff --git a/frontend/src/react/pages/project/plan-detail/components/PlanDetailMeta.tsx b/frontend/src/routes/project/plan-detail/components/PlanDetailMeta.tsxsimilarity index 96%rename from frontend/src/react/pages/project/plan-detail/components/PlanDetailMeta.tsxrename to frontend/src/routes/project/plan-detail/components/PlanDetailMeta.tsxindex 736ba47f75..a1a328f473 100644--- a/frontend/src/react/pages/project/plan-detail/components/PlanDetailMeta.tsx+++ b/frontend/src/routes/project/plan-detail/components/PlanDetailMeta.tsx@@ -2,16 +2,16 @@ import { create } from "@bufbuild/protobuf";import { Plus, X } from "lucide-react";import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { issueServiceClientConnect } from "@/connect";-import { HumanizeTs } from "@/react/components/HumanizeTs";-import { Checkbox } from "@/react/components/ui/checkbox";+import { issueServiceClientConnect } from "@/api";+import { HumanizeTs } from "@/components/HumanizeTs";+import { Checkbox } from "@/components/ui/checkbox";import {Popover,PopoverContent,PopoverTrigger,-} from "@/react/components/ui/popover";-import { cn } from "@/react/lib/utils";-import { extractUserEmail, pushNotification } from "@/store";+} from "@/components/ui/popover";+import { cn } from "@/lib/utils";+import { extractUserEmail, pushNotification } from "@/stores";import { getTimeForPbTimestampProtoEs } from "@/types";import type { Color } from "@/types/proto-es/google/type/color_pb";import {diff --git a/frontend/src/react/pages/project/plan-detail/components/PlanDetailRollbackSheet.lifecycle.test.tsx b/frontend/src/routes/project/plan-detail/components/PlanDetailRollbackSheet.lifecycle.test.tsxsimilarity index 88%rename from frontend/src/react/pages/project/plan-detail/components/PlanDetailRollbackSheet.lifecycle.test.tsxrename to frontend/src/routes/project/plan-detail/components/PlanDetailRollbackSheet.lifecycle.test.tsxindex ed3fdb98a9..8b7035065c 100644--- a/frontend/src/react/pages/project/plan-detail/components/PlanDetailRollbackSheet.lifecycle.test.tsx+++ b/frontend/src/routes/project/plan-detail/components/PlanDetailRollbackSheet.lifecycle.test.tsx@@ -11,7 +11,7 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/connect", () => ({+vi.mock("@/api", () => ({issueServiceClientConnect: {},planServiceClientConnect: {},rolloutServiceClientConnect: {@@ -19,28 +19,28 @@ vi.mock("@/connect", () => ({},}));-vi.mock("@/react/components/monaco", () => ({+vi.mock("@/components/monaco", () => ({ReadonlyMonaco: ({ content }: { content: string }) => (<div data-testid="rollback-statement">{content}</div>),}));-vi.mock("@/react/components/PermissionGuard", () => ({+vi.mock("@/components/PermissionGuard", () => ({PermissionGuard: ({ children }: { children: ReactNode }) => <>{children}</>,usePermissionCheck: () => [true, undefined],}));-vi.mock("@/react/components/ui/alert", () => ({+vi.mock("@/components/ui/alert", () => ({Alert: ({ description }: { description: ReactNode }) => (<div role="alert">{description}</div>),}));-vi.mock("@/react/components/ui/badge", () => ({+vi.mock("@/components/ui/badge", () => ({Badge: ({ children }: { children: ReactNode }) => <span>{children}</span>,}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,...props@@ -49,11 +49,11 @@ vi.mock("@/react/components/ui/button", () => ({),}));-vi.mock("@/react/components/ui/checkbox", () => ({+vi.mock("@/components/ui/checkbox", () => ({Checkbox: () => <input type="checkbox" />,}));-vi.mock("@/react/components/ui/sheet", () => ({+vi.mock("@/components/ui/sheet", () => ({Sheet: ({ children, open }: { children: ReactNode; open: boolean }) =>open ? <>{children}</> : null,SheetBody: ({ children }: { children: ReactNode }) => <div>{children}</div>,@@ -65,17 +65,17 @@ vi.mock("@/react/components/ui/sheet", () => ({SheetTitle: ({ children }: { children: ReactNode }) => <h2>{children}</h2>,}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useCurrentUser: () => ({ name: "users/[email protected]" }),}));-vi.mock("@/react/hooks/useProjectByName", () => ({+vi.mock("@/hooks/useProjectByName", () => ({useProjectByName: () => ({ name: "projects/p1" }),}));-vi.mock("@/react/router", () => ({ router: { push: vi.fn() } }));+vi.mock("@/app/router", () => ({ router: { push: vi.fn() } }));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: Object.assign((selector: (state: unknown) => unknown) =>selector({ projectsByName: { "projects/p1": { name: "projects/p1" } } }),@@ -83,7 +83,7 @@ vi.mock("@/react/stores/app", () => ({),}));-vi.mock("@/store", () => ({ pushNotification: vi.fn() }));+vi.mock("@/stores", () => ({ pushNotification: vi.fn() }));vi.mock("@/utils", () => ({extractPlanUID: () => "1",diff --git a/frontend/src/react/pages/project/plan-detail/components/PlanDetailRollbackSheet.test.tsx b/frontend/src/routes/project/plan-detail/components/PlanDetailRollbackSheet.test.tsxsimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/components/PlanDetailRollbackSheet.test.tsxrename to frontend/src/routes/project/plan-detail/components/PlanDetailRollbackSheet.test.tsxdiff --git a/frontend/src/react/pages/project/plan-detail/components/PlanDetailRollbackSheet.tsx b/frontend/src/routes/project/plan-detail/components/PlanDetailRollbackSheet.tsxsimilarity index 94%rename from frontend/src/react/pages/project/plan-detail/components/PlanDetailRollbackSheet.tsxrename to frontend/src/routes/project/plan-detail/components/PlanDetailRollbackSheet.tsxindex a44fba4991..54ecbd30a7 100644--- a/frontend/src/react/pages/project/plan-detail/components/PlanDetailRollbackSheet.tsx+++ b/frontend/src/routes/project/plan-detail/components/PlanDetailRollbackSheet.tsx@@ -8,17 +8,19 @@ import {issueServiceClientConnect,planServiceClientConnect,rolloutServiceClientConnect,-} from "@/connect";-import { silentContextKey } from "@/connect/context-key";-import { ReadonlyMonaco } from "@/react/components/monaco";+} from "@/api";+import { silentContextKey } from "@/api/context-key";+import { router } from "@/app/router";+import { PROJECT_V1_ROUTE_PLAN_DETAIL } from "@/app/router/handles";+import { ReadonlyMonaco } from "@/components/monaco";import {PermissionGuard,usePermissionCheck,-} from "@/react/components/PermissionGuard";-import { Alert } from "@/react/components/ui/alert";-import { Badge } from "@/react/components/ui/badge";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";+} from "@/components/PermissionGuard";+import { Alert } from "@/components/ui/alert";+import { Badge } from "@/components/ui/badge";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";import {Sheet,SheetBody,@@ -26,13 +28,12 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { router } from "@/react/router";-import { PROJECT_V1_ROUTE_PLAN_DETAIL } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/components/ui/sheet";+import { useCurrentUser } from "@/hooks/useAppState";+import { useProjectByName } from "@/hooks/useProjectByName";+import { DraftReviewIssueCreationError } from "@/lib/plan/workflow";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import type { Task, TaskRun } from "@/types/proto-es/v1/rollout_service_pb";import { PreviewTaskRunRollbackRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";import {@@ -40,7 +41,6 @@ import {extractPlanUIDFromRolloutName,extractProjectResourceName,} from "@/utils";-import { DraftReviewIssueCreationError } from "../utils/header";import { PlanTargetDisplay } from "./PlanTargetDisplay";import { createRollbackDraftReview } from "./rollbackDraft";diff --git a/frontend/src/react/pages/project/plan-detail/components/PlanDetailStatementSection.tsx b/frontend/src/routes/project/plan-detail/components/PlanDetailStatementSection.tsxsimilarity index 97%rename from frontend/src/react/pages/project/plan-detail/components/PlanDetailStatementSection.tsxrename to frontend/src/routes/project/plan-detail/components/PlanDetailStatementSection.tsxindex 77c795cb59..95008522d7 100644--- a/frontend/src/react/pages/project/plan-detail/components/PlanDetailStatementSection.tsx+++ b/frontend/src/routes/project/plan-detail/components/PlanDetailStatementSection.tsx@@ -6,15 +6,15 @@ import {planServiceClientConnect,releaseServiceClientConnect,sheetServiceClientConnect,-} from "@/connect";-import { MonacoEditor, ReadonlyMonaco } from "@/react/components/monaco";-import { ReleaseInfoCard } from "@/react/components/release/ReleaseInfoCard";-import { Alert } from "@/react/components/ui/alert";-import { Button } from "@/react/components/ui/button";-import { seedSheetStatement } from "@/react/hooks/useSheetStatement";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/api";+import { MonacoEditor, ReadonlyMonaco } from "@/components/monaco";+import { ReleaseInfoCard } from "@/components/release/ReleaseInfoCard";+import { Alert } from "@/components/ui/alert";+import { Button } from "@/components/ui/button";+import { seedSheetStatement } from "@/hooks/useSheetStatement";+import { cn } from "@/lib/utils";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import {isValidDatabaseName,isValidReleaseName,diff --git a/frontend/src/react/pages/project/plan-detail/components/PlanDetailTabStrip.tsx b/frontend/src/routes/project/plan-detail/components/PlanDetailTabStrip.tsxsimilarity index 98%rename from frontend/src/react/pages/project/plan-detail/components/PlanDetailTabStrip.tsxrename to frontend/src/routes/project/plan-detail/components/PlanDetailTabStrip.tsxindex ba09ec2f32..def11fcb29 100644--- a/frontend/src/react/pages/project/plan-detail/components/PlanDetailTabStrip.tsx+++ b/frontend/src/routes/project/plan-detail/components/PlanDetailTabStrip.tsx@@ -1,5 +1,5 @@import type { ReactNode } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";export function PlanDetailTabStrip({action,diff --git a/frontend/src/react/pages/project/plan-detail/components/PlanDetailTaskRolloutActionPanel.tsx b/frontend/src/routes/project/plan-detail/components/PlanDetailTaskRolloutActionPanel.tsxsimilarity index 96%rename from frontend/src/react/pages/project/plan-detail/components/PlanDetailTaskRolloutActionPanel.tsxrename to frontend/src/routes/project/plan-detail/components/PlanDetailTaskRolloutActionPanel.tsxindex 3a6f4f108c..6d34197b0e 100644--- a/frontend/src/react/pages/project/plan-detail/components/PlanDetailTaskRolloutActionPanel.tsx+++ b/frontend/src/routes/project/plan-detail/components/PlanDetailTaskRolloutActionPanel.tsx@@ -3,11 +3,11 @@ import { TimestampSchema } from "@bufbuild/protobuf/wkt";import { Loader2 } from "lucide-react";import { useCallback, useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { rolloutServiceClientConnect } from "@/connect";-import { TaskStatusIcon } from "@/react/components/TaskStatusIcon";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";+import { rolloutServiceClientConnect } from "@/api";+import { TaskStatusIcon } from "@/components/TaskStatusIcon";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";import {Sheet,SheetBody,@@ -15,13 +15,13 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { Textarea } from "@/react/components/ui/textarea";-import { Tooltip } from "@/react/components/ui/tooltip";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";-import { projectNamePrefix } from "@/store/modules/v1/common";+} from "@/components/ui/sheet";+import { Textarea } from "@/components/ui/textarea";+import { Tooltip } from "@/components/ui/tooltip";+import { useCurrentUser } from "@/hooks/useAppState";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";import { Issue_Type } from "@/types/proto-es/v1/issue_service_pb";import type { Stage, Task } from "@/types/proto-es/v1/rollout_service_pb";import {diff --git a/frontend/src/react/pages/project/plan-detail/components/PlanDetailTaskRunSession.test.tsx b/frontend/src/routes/project/plan-detail/components/PlanDetailTaskRunSession.test.tsxsimilarity index 99%rename from frontend/src/react/pages/project/plan-detail/components/PlanDetailTaskRunSession.test.tsxrename to frontend/src/routes/project/plan-detail/components/PlanDetailTaskRunSession.test.tsxindex d6bc2c37bc..4284fbfbb1 100644--- a/frontend/src/react/pages/project/plan-detail/components/PlanDetailTaskRunSession.test.tsx+++ b/frontend/src/routes/project/plan-detail/components/PlanDetailTaskRunSession.test.tsx@@ -20,7 +20,7 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/connect", () => ({+vi.mock("@/api", () => ({rolloutServiceClientConnect: { getTaskRunSession: mocks.getTaskRunSession },}));diff --git a/frontend/src/react/pages/project/plan-detail/components/PlanDetailTaskRunSession.tsx b/frontend/src/routes/project/plan-detail/components/PlanDetailTaskRunSession.tsxsimilarity index 96%rename from frontend/src/react/pages/project/plan-detail/components/PlanDetailTaskRunSession.tsxrename to frontend/src/routes/project/plan-detail/components/PlanDetailTaskRunSession.tsxindex 23035a14f9..18dc3a36b8 100644--- a/frontend/src/react/pages/project/plan-detail/components/PlanDetailTaskRunSession.tsx+++ b/frontend/src/routes/project/plan-detail/components/PlanDetailTaskRunSession.tsx@@ -3,8 +3,8 @@ import { createContextValues } from "@connectrpc/connect";import { AlignHorizontalJustifyStart, Loader2 } from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { rolloutServiceClientConnect } from "@/connect";-import { silentContextKey } from "@/connect/context-key";+import { rolloutServiceClientConnect } from "@/api";+import { silentContextKey } from "@/api/context-key";import {Table,TableBody,@@ -12,9 +12,9 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { usePolling } from "@/react/hooks/usePolling";-import { sameMessage } from "@/react/lib/protoIdentity";+} from "@/components/ui/table";+import { usePolling } from "@/hooks/usePolling";+import { sameMessage } from "@/lib/protoIdentity";import { getDateForPbTimestampProtoEs } from "@/types";import {GetTaskRunSessionRequestSchema,diff --git a/frontend/src/react/pages/project/plan-detail/components/PlanTargetDisplay.test.tsx b/frontend/src/routes/project/plan-detail/components/PlanTargetDisplay.test.tsxsimilarity index 97%rename from frontend/src/react/pages/project/plan-detail/components/PlanTargetDisplay.test.tsxrename to frontend/src/routes/project/plan-detail/components/PlanTargetDisplay.test.tsxindex 4546209075..3a35d06bb5 100644--- a/frontend/src/react/pages/project/plan-detail/components/PlanTargetDisplay.test.tsx+++ b/frontend/src/routes/project/plan-detail/components/PlanTargetDisplay.test.tsx@@ -14,7 +14,7 @@ const mocks = vi.hoisted(() => ({getEnvironmentByName: vi.fn(),}));-vi.mock("@/react/components/EngineIcon", () => ({+vi.mock("@/components/EngineIcon", () => ({EngineIcon: ({className,engine,@@ -28,12 +28,12 @@ vi.mock("@/react/components/EngineIcon", () => ({),}));-vi.mock("@/react/lib/utils", () => ({+vi.mock("@/lib/utils", () => ({cn: (...classes: Array<string | false | null | undefined>) =>classes.filter(Boolean).join(" "),}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const getState = () => ({databasesByName: mocks.databasesByName,environmentList: mocks.environmentList,diff --git a/frontend/src/routes/project/plan-detail/components/PlanTargetDisplay.tsx b/frontend/src/routes/project/plan-detail/components/PlanTargetDisplay.tsxnew file mode 100644index 0000000000..9ccc1f33f1--- /dev/null+++ b/frontend/src/routes/project/plan-detail/components/PlanTargetDisplay.tsx@@ -0,0 +1 @@+export { DatabaseTargetDisplay as PlanTargetDisplay } from "@/components/DatabaseTargetDisplay";diff --git a/frontend/src/react/pages/project/plan-detail/components/SchemaEditorSheet.tsx b/frontend/src/routes/project/plan-detail/components/SchemaEditorSheet.tsxsimilarity index 94%rename from frontend/src/react/pages/project/plan-detail/components/SchemaEditorSheet.tsxrename to frontend/src/routes/project/plan-detail/components/SchemaEditorSheet.tsxindex 54ec18109c..9e72bab876 100644--- a/frontend/src/react/pages/project/plan-detail/components/SchemaEditorSheet.tsx+++ b/frontend/src/routes/project/plan-detail/components/SchemaEditorSheet.tsx@@ -2,21 +2,21 @@ import { cloneDeep } from "lodash-es";import { Loader2, Maximize2, Minimize2, X } from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { SchemaEditorLite } from "@/react/components/SchemaEditorLite";-import { generateDiffDDL } from "@/react/components/SchemaEditorLite/core/generateDiffDDL";-import type { EditTarget } from "@/react/components/SchemaEditorLite/core/types";-import type { SchemaEditorHandle } from "@/react/components/SchemaEditorLite/types";-import { Button } from "@/react/components/ui/button";-import { Combobox } from "@/react/components/ui/combobox";+import { Button } from "@/components/ui/button";+import { Combobox } from "@/components/ui/combobox";import {Sheet,SheetClose,SheetContent,SheetFooter,SheetTitle,-} from "@/react/components/ui/sheet";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/components/ui/sheet";+import { SchemaEditorLite } from "@/modules/schema-editor";+import { generateDiffDDL } from "@/modules/schema-editor/core/generateDiffDDL";+import type { EditTarget } from "@/modules/schema-editor/core/types";+import type { SchemaEditorHandle } from "@/modules/schema-editor/types";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import { isValidDatabaseName } from "@/types";import type { Project } from "@/types/proto-es/v1/project_service_pb";import { unknownDatabase } from "@/types/v1/database";diff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployBranch.test.tsx b/frontend/src/routes/project/plan-detail/components/deploy/DeployBranch.test.tsxsimilarity index 97%rename from frontend/src/react/pages/project/plan-detail/components/deploy/DeployBranch.test.tsxrename to frontend/src/routes/project/plan-detail/components/deploy/DeployBranch.test.tsxindex 88aecefedc..54ee0888e1 100644--- a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployBranch.test.tsx+++ b/frontend/src/routes/project/plan-detail/components/deploy/DeployBranch.test.tsx@@ -11,7 +11,7 @@ vi.mock("react-i18next", () => ({}));const routerMocks = vi.hoisted(() => ({ push: vi.fn() }));-vi.mock("@/react/router", () => ({ router: { push: routerMocks.push } }));+vi.mock("@/app/router", () => ({ router: { push: routerMocks.push } }));// Render a button per stage that calls the CURRENT onSelectStage prop, so a// click uses the latest render's handler (with up-to-date optimistic state).diff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployBranch.tsx b/frontend/src/routes/project/plan-detail/components/deploy/DeployBranch.tsxsimilarity index 98%rename from frontend/src/react/pages/project/plan-detail/components/deploy/DeployBranch.tsxrename to frontend/src/routes/project/plan-detail/components/deploy/DeployBranch.tsxindex c624303260..a1d9151074 100644--- a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployBranch.tsx+++ b/frontend/src/routes/project/plan-detail/components/deploy/DeployBranch.tsx@@ -1,7 +1,7 @@import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { router } from "@/react/router";+import { router } from "@/app/router";+import { Button } from "@/components/ui/button";import type { Plan } from "@/types/proto-es/v1/plan_service_pb";import type { Rollout, Task } from "@/types/proto-es/v1/rollout_service_pb";import { extractStageUID } from "@/utils/v1/issue/rollout";diff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployLatestTaskRunInfo.tsx b/frontend/src/routes/project/plan-detail/components/deploy/DeployLatestTaskRunInfo.tsxsimilarity index 91%rename from frontend/src/react/pages/project/plan-detail/components/deploy/DeployLatestTaskRunInfo.tsxrename to frontend/src/routes/project/plan-detail/components/deploy/DeployLatestTaskRunInfo.tsxindex dc995ddbbe..5e079cfb5f 100644--- a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployLatestTaskRunInfo.tsx+++ b/frontend/src/routes/project/plan-detail/components/deploy/DeployLatestTaskRunInfo.tsx@@ -1,12 +1,12 @@import { Clock3, History, User } from "lucide-react";import { useTranslation } from "react-i18next";-import { HumanizeTs } from "@/react/components/HumanizeTs";-import { TaskRunStatusIcon } from "@/react/components/TaskRunStatusIcon";-import { TaskRunLogViewer } from "@/react/components/task-run-log";-import { Button } from "@/react/components/ui/button";-import { Tooltip } from "@/react/components/ui/tooltip";-import { executorEmailOfTaskRun } from "@/react/lib/taskRun";-import { cn } from "@/react/lib/utils";+import { HumanizeTs } from "@/components/HumanizeTs";+import { TaskRunStatusIcon } from "@/components/TaskRunStatusIcon";+import { TaskRunLogViewer } from "@/components/task-run-log";+import { Button } from "@/components/ui/button";+import { Tooltip } from "@/components/ui/tooltip";+import { executorEmailOfTaskRun } from "@/lib/taskRun";+import { cn } from "@/lib/utils";import { getDateForPbTimestampProtoEs } from "@/types";import type { Engine } from "@/types/proto-es/v1/common_pb";import { Engine as EngineEnum } from "@/types/proto-es/v1/common_pb";diff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployPendingTasksSection.tsx b/frontend/src/routes/project/plan-detail/components/deploy/DeployPendingTasksSection.tsxsimilarity index 97%rename from frontend/src/react/pages/project/plan-detail/components/deploy/DeployPendingTasksSection.tsxrename to frontend/src/routes/project/plan-detail/components/deploy/DeployPendingTasksSection.tsxindex f6d8937946..67665ff8bd 100644--- a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployPendingTasksSection.tsx+++ b/frontend/src/routes/project/plan-detail/components/deploy/DeployPendingTasksSection.tsx@@ -2,16 +2,16 @@ import { create } from "@bufbuild/protobuf";import { ChevronDown, ChevronRight, Loader2 } from "lucide-react";import { useEffect, useState } from "react";import { useTranslation } from "react-i18next";-import { rolloutServiceClientConnect } from "@/connect";-import { Button } from "@/react/components/ui/button";+import { rolloutServiceClientConnect } from "@/api";+import { Button } from "@/components/ui/button";import {Sheet,SheetBody,SheetContent,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { pushNotification } from "@/store";+} from "@/components/ui/sheet";+import { pushNotification } from "@/stores";import { isValidDatabaseGroupName, isValidDatabaseName } from "@/types";import type { Plan } from "@/types/proto-es/v1/plan_service_pb";import {diff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployReleaseInfoCard.tsx b/frontend/src/routes/project/plan-detail/components/deploy/DeployReleaseInfoCard.tsxsimilarity index 79%rename from frontend/src/react/pages/project/plan-detail/components/deploy/DeployReleaseInfoCard.tsxrename to frontend/src/routes/project/plan-detail/components/deploy/DeployReleaseInfoCard.tsxindex b90693bc5e..188cddd060 100644--- a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployReleaseInfoCard.tsx+++ b/frontend/src/routes/project/plan-detail/components/deploy/DeployReleaseInfoCard.tsx@@ -1,7 +1,7 @@import { useEffect, useState } from "react";-import { ReleaseInfoCard } from "@/react/components/release/ReleaseInfoCard";-import { useReleaseByName } from "@/react/hooks/useAppState";-import { useAppStore } from "@/react/stores/app";+import { ReleaseInfoCard } from "@/components/release/ReleaseInfoCard";+import { useReleaseByName } from "@/hooks/useAppState";+import { useAppStore } from "@/stores/app";export function DeployReleaseInfoCard({className,diff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployStageCard.tsx b/frontend/src/routes/project/plan-detail/components/deploy/DeployStageCard.tsxsimilarity index 94%rename from frontend/src/react/pages/project/plan-detail/components/deploy/DeployStageCard.tsxrename to frontend/src/routes/project/plan-detail/components/deploy/DeployStageCard.tsxindex 48b20a7ba8..c211d563e5 100644--- a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployStageCard.tsx+++ b/frontend/src/routes/project/plan-detail/components/deploy/DeployStageCard.tsx@@ -1,7 +1,7 @@import { ArrowRight, Eye } from "lucide-react";import { useTranslation } from "react-i18next";-import { TaskStatusIcon } from "@/react/components/TaskStatusIcon";-import { Button } from "@/react/components/ui/button";+import { TaskStatusIcon } from "@/components/TaskStatusIcon";+import { Button } from "@/components/ui/button";import type { Rollout, Stage } from "@/types/proto-es/v1/rollout_service_pb";import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";import { getStageStatus } from "@/utils";diff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployStageContentView.test.tsx b/frontend/src/routes/project/plan-detail/components/deploy/DeployStageContentView.test.tsxsimilarity index 96%rename from frontend/src/react/pages/project/plan-detail/components/deploy/DeployStageContentView.test.tsxrename to frontend/src/routes/project/plan-detail/components/deploy/DeployStageContentView.test.tsxindex 99e838ab74..960a03971b 100644--- a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployStageContentView.test.tsx+++ b/frontend/src/routes/project/plan-detail/components/deploy/DeployStageContentView.test.tsx@@ -47,8 +47,8 @@ vi.mock("./DeployTaskFilter", () => ({vi.mock("./DeployStageRollbackSection", () => ({DeployStageRollbackSection: () => null,}));-vi.mock("@/connect", () => ({ rolloutServiceClientConnect: {} }));-vi.mock("@/store", () => ({ pushNotification: () => undefined }));+vi.mock("@/api", () => ({ rolloutServiceClientConnect: {} }));+vi.mock("@/stores", () => ({ pushNotification: () => undefined }));const makeStage = (name: string,diff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployStageContentView.tsx b/frontend/src/routes/project/plan-detail/components/deploy/DeployStageContentView.tsxsimilarity index 96%rename from frontend/src/react/pages/project/plan-detail/components/deploy/DeployStageContentView.tsxrename to frontend/src/routes/project/plan-detail/components/deploy/DeployStageContentView.tsxindex d636f7c187..5ad12a9353 100644--- a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployStageContentView.tsx+++ b/frontend/src/routes/project/plan-detail/components/deploy/DeployStageContentView.tsx@@ -2,9 +2,9 @@ import { create } from "@bufbuild/protobuf";import { Plus } from "lucide-react";import { memo, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { rolloutServiceClientConnect } from "@/connect";-import { Button } from "@/react/components/ui/button";-import { pushNotification } from "@/store";+import { rolloutServiceClientConnect } from "@/api";+import { Button } from "@/components/ui/button";+import { pushNotification } from "@/stores";import type { Stage } from "@/types/proto-es/v1/rollout_service_pb";import {CreateRolloutRequestSchema,diff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployStageRollbackSection.test.tsx b/frontend/src/routes/project/plan-detail/components/deploy/DeployStageRollbackSection.test.tsxsimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/components/deploy/DeployStageRollbackSection.test.tsxrename to frontend/src/routes/project/plan-detail/components/deploy/DeployStageRollbackSection.test.tsxdiff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployStageRollbackSection.tsx b/frontend/src/routes/project/plan-detail/components/deploy/DeployStageRollbackSection.tsxsimilarity index 97%rename from frontend/src/react/pages/project/plan-detail/components/deploy/DeployStageRollbackSection.tsxrename to frontend/src/routes/project/plan-detail/components/deploy/DeployStageRollbackSection.tsxindex 5967c74cf0..d4eebf69e5 100644--- a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployStageRollbackSection.tsx+++ b/frontend/src/routes/project/plan-detail/components/deploy/DeployStageRollbackSection.tsx@@ -1,7 +1,7 @@import { DatabaseBackup } from "lucide-react";import { useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";+import { Button } from "@/components/ui/button";import {type Stage,TaskRun_Status,diff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskBody.test.tsx b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskBody.test.tsxsimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskBody.test.tsxrename to frontend/src/routes/project/plan-detail/components/deploy/DeployTaskBody.test.tsxdiff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskBody.tsx b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskBody.tsxsimilarity index 96%rename from frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskBody.tsxrename to frontend/src/routes/project/plan-detail/components/deploy/DeployTaskBody.tsxindex f3483965a0..b1dfcb84e9 100644--- a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskBody.tsx+++ b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskBody.tsx@@ -1,7 +1,7 @@import { useTranslation } from "react-i18next";-import { ReadonlyMonaco } from "@/react/components/monaco";-import { getTaskRunWaitingMessage } from "@/react/lib/taskRun";-import { cn } from "@/react/lib/utils";+import { ReadonlyMonaco } from "@/components/monaco";+import { getTaskRunWaitingMessage } from "@/lib/taskRun";+import { cn } from "@/lib/utils";import type { Engine } from "@/types/proto-es/v1/common_pb";import type { Task, TaskRun } from "@/types/proto-es/v1/rollout_service_pb";import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";diff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskFilter.test.tsx b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskFilter.test.tsxsimilarity index 96%rename from frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskFilter.test.tsxrename to frontend/src/routes/project/plan-detail/components/deploy/DeployTaskFilter.test.tsxindex 556f7c3c58..3da183dda9 100644--- a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskFilter.test.tsx+++ b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskFilter.test.tsx@@ -13,7 +13,7 @@ vi.mock("react-i18next", async (importOriginal) => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/components/TaskStatusIcon", () => ({+vi.mock("@/components/TaskStatusIcon", () => ({TaskStatusIcon: () => null,}));diff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskFilter.tsx b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskFilter.tsxsimilarity index 96%rename from frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskFilter.tsxrename to frontend/src/routes/project/plan-detail/components/deploy/DeployTaskFilter.tsxindex 8a9d4f8405..314fd80dc5 100644--- a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskFilter.tsx+++ b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskFilter.tsx@@ -1,5 +1,5 @@import { useTranslation } from "react-i18next";-import { TaskStatusIcon } from "@/react/components/TaskStatusIcon";+import { TaskStatusIcon } from "@/components/TaskStatusIcon";import type { Stage } from "@/types/proto-es/v1/rollout_service_pb";import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";import { stringifyTaskStatus, TASK_STATUS_PRIORITY } from "@/utils";diff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskHeader.tsx b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskHeader.tsxsimilarity index 95%rename from frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskHeader.tsxrename to frontend/src/routes/project/plan-detail/components/deploy/DeployTaskHeader.tsxindex 8491c29f34..51afd4a731 100644--- a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskHeader.tsx+++ b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskHeader.tsx@@ -7,11 +7,11 @@ import {X,} from "lucide-react";import { useTranslation } from "react-i18next";-import { HumanizeTs } from "@/react/components/HumanizeTs";-import { TaskStatusIcon } from "@/react/components/TaskStatusIcon";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";-import { cn } from "@/react/lib/utils";+import { HumanizeTs } from "@/components/HumanizeTs";+import { TaskStatusIcon } from "@/components/TaskStatusIcon";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";+import { cn } from "@/lib/utils";import { getTimeForPbTimestampProtoEs } from "@/types";import type { Task, TaskRun } from "@/types/proto-es/v1/rollout_service_pb";import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";diff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskItem.tsx b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskItem.tsxsimilarity index 98%rename from frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskItem.tsxrename to frontend/src/routes/project/plan-detail/components/deploy/DeployTaskItem.tsxindex e6a879e18f..afd9640f8d 100644--- a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskItem.tsx+++ b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskItem.tsx@@ -1,7 +1,7 @@import { memo, useEffect, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { formatTaskRunDuration } from "@/react/lib/taskRun";-import { cn } from "@/react/lib/utils";+import { formatTaskRunDuration } from "@/lib/taskRun";+import { cn } from "@/lib/utils";import { getTimeForPbTimestampProtoEs } from "@/types";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";import type { Plan } from "@/types/proto-es/v1/plan_service_pb";diff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskList.test.tsx b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskList.test.tsxsimilarity index 99%rename from frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskList.test.tsxrename to frontend/src/routes/project/plan-detail/components/deploy/DeployTaskList.test.tsxindex de34c2e915..2e41cd4422 100644--- a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskList.test.tsx+++ b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskList.test.tsx@@ -18,7 +18,7 @@ const routerMocks = vi.hoisted(() => ({replace: vi.fn(),}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({router: { replace: routerMocks.replace },}));diff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskList.tsx b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskList.tsxsimilarity index 98%rename from frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskList.tsxrename to frontend/src/routes/project/plan-detail/components/deploy/DeployTaskList.tsxindex 43c76845d9..401710dc7f 100644--- a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskList.tsx+++ b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskList.tsx@@ -1,9 +1,9 @@import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { useLatestRef } from "@/react/hooks/useLatestRef";-import { useOnKeyChange } from "@/react/hooks/useOnKeyChange";-import { router } from "@/react/router";+import { router } from "@/app/router";+import { Button } from "@/components/ui/button";+import { useLatestRef } from "@/hooks/useLatestRef";+import { useOnKeyChange } from "@/hooks/useOnKeyChange";import {type Stage,type Task,diff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskRunHistorySheet.test.tsx b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskRunHistorySheet.test.tsxsimilarity index 97%rename from frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskRunHistorySheet.test.tsxrename to frontend/src/routes/project/plan-detail/components/deploy/DeployTaskRunHistorySheet.test.tsxindex 591c3fc560..841e9a8862 100644--- a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskRunHistorySheet.test.tsx+++ b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskRunHistorySheet.test.tsx@@ -22,7 +22,7 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/components/ui/sheet", () => ({+vi.mock("@/components/ui/sheet", () => ({Sheet: ({ children, open }: { children: ReactNode; open: boolean }) =>open ? <div>{children}</div> : null,SheetBody: ({ children }: { children: ReactNode }) => <div>{children}</div>,@@ -34,7 +34,7 @@ vi.mock("@/react/components/ui/sheet", () => ({}));const viewerMounts = vi.hoisted(() => ({ count: 0 }));-vi.mock("@/react/components/task-run-log", async () => {+vi.mock("@/components/task-run-log", async () => {const { useEffect } = await import("react");return {TaskRunLogViewer: ({ taskRunName }: { taskRunName: string }) => {@@ -48,7 +48,7 @@ vi.mock("@/react/components/task-run-log", async () => {};});-vi.mock("@/react/components/HumanizeTs", () => ({+vi.mock("@/components/HumanizeTs", () => ({HumanizeTs: ({ ts }: { ts: number }) => <span>{ts}</span>,}));diff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskRunHistorySheet.tsx b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskRunHistorySheet.tsxsimilarity index 93%rename from frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskRunHistorySheet.tsxrename to frontend/src/routes/project/plan-detail/components/deploy/DeployTaskRunHistorySheet.tsxindex 40b65c1b05..3d467ed135 100644--- a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskRunHistorySheet.tsx+++ b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskRunHistorySheet.tsx@@ -1,23 +1,23 @@import { ChevronDown, ChevronRight, Clock3, User } from "lucide-react";import { useState } from "react";import { useTranslation } from "react-i18next";-import { HumanizeTs } from "@/react/components/HumanizeTs";-import { TaskRunStatusIcon } from "@/react/components/TaskRunStatusIcon";-import { TaskRunLogViewer } from "@/react/components/task-run-log";-import { EllipsisText } from "@/react/components/ui/ellipsis-text";+import { HumanizeTs } from "@/components/HumanizeTs";+import { TaskRunStatusIcon } from "@/components/TaskRunStatusIcon";+import { TaskRunLogViewer } from "@/components/task-run-log";+import { EllipsisText } from "@/components/ui/ellipsis-text";import {Sheet,SheetBody,SheetContent,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { useOnKeyChange } from "@/react/hooks/useOnKeyChange";+} from "@/components/ui/sheet";+import { useOnKeyChange } from "@/hooks/useOnKeyChange";import {executorEmailOfTaskRun,formatTaskRunDuration,getTaskRunComment,-} from "@/react/lib/taskRun";+} from "@/lib/taskRun";import { getTimeForPbTimestampProtoEs } from "@/types";import type { TaskRun } from "@/types/proto-es/v1/rollout_service_pb";diff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskSkippedReason.test.tsx b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskSkippedReason.test.tsxsimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskSkippedReason.test.tsxrename to frontend/src/routes/project/plan-detail/components/deploy/DeployTaskSkippedReason.test.tsxdiff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskSkippedReason.tsx b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskSkippedReason.tsxsimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskSkippedReason.tsxrename to frontend/src/routes/project/plan-detail/components/deploy/DeployTaskSkippedReason.tsxdiff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskToolbar.tsx b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskToolbar.tsxsimilarity index 97%rename from frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskToolbar.tsxrename to frontend/src/routes/project/plan-detail/components/deploy/DeployTaskToolbar.tsxindex 4ffaa42822..6382abc33a 100644--- a/frontend/src/react/pages/project/plan-detail/components/deploy/DeployTaskToolbar.tsx+++ b/frontend/src/routes/project/plan-detail/components/deploy/DeployTaskToolbar.tsx@@ -1,9 +1,9 @@import { Play, SkipForward, X } from "lucide-react";import { useEffect, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";-import { Tooltip } from "@/react/components/ui/tooltip";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";+import { Tooltip } from "@/components/ui/tooltip";import { Issue_Type } from "@/types/proto-es/v1/issue_service_pb";import type { Stage, Task } from "@/types/proto-es/v1/rollout_service_pb";import {diff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/taskActionState.ts b/frontend/src/routes/project/plan-detail/components/deploy/taskActionState.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/components/deploy/taskActionState.tsrename to frontend/src/routes/project/plan-detail/components/deploy/taskActionState.tsdiff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/taskActions.test.tsx b/frontend/src/routes/project/plan-detail/components/deploy/taskActions.test.tsxsimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/components/deploy/taskActions.test.tsxrename to frontend/src/routes/project/plan-detail/components/deploy/taskActions.test.tsxdiff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/taskActions.tsx b/frontend/src/routes/project/plan-detail/components/deploy/taskActions.tsxsimilarity index 97%rename from frontend/src/react/pages/project/plan-detail/components/deploy/taskActions.tsxrename to frontend/src/routes/project/plan-detail/components/deploy/taskActions.tsxindex 547aa4055d..52c612df82 100644--- a/frontend/src/react/pages/project/plan-detail/components/deploy/taskActions.tsx+++ b/frontend/src/routes/project/plan-detail/components/deploy/taskActions.tsx@@ -1,5 +1,5 @@import { useEffect, useMemo, useState } from "react";-import { useLatestRef } from "@/react/hooks/useLatestRef";+import { useLatestRef } from "@/hooks/useLatestRef";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";import type { Project } from "@/types/proto-es/v1/project_service_pb";import type { Task } from "@/types/proto-es/v1/rollout_service_pb";diff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/types.ts b/frontend/src/routes/project/plan-detail/components/deploy/types.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/components/deploy/types.tsrename to frontend/src/routes/project/plan-detail/components/deploy/types.tsdiff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/useDeployTaskStatement.test.tsx b/frontend/src/routes/project/plan-detail/components/deploy/useDeployTaskStatement.test.tsxsimilarity index 98%rename from frontend/src/react/pages/project/plan-detail/components/deploy/useDeployTaskStatement.test.tsxrename to frontend/src/routes/project/plan-detail/components/deploy/useDeployTaskStatement.test.tsxindex 087f95d1df..23f2590ac9 100644--- a/frontend/src/react/pages/project/plan-detail/components/deploy/useDeployTaskStatement.test.tsx+++ b/frontend/src/routes/project/plan-detail/components/deploy/useDeployTaskStatement.test.tsx@@ -6,7 +6,7 @@ import { useDeployTaskStatement } from "./useDeployTaskStatement";const getSheetByName = vi.fn();const getOrFetchSheetByName = vi.fn();-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: {getState: () => ({ getSheetByName, getOrFetchSheetByName }),},diff --git a/frontend/src/react/pages/project/plan-detail/components/deploy/useDeployTaskStatement.tsx b/frontend/src/routes/project/plan-detail/components/deploy/useDeployTaskStatement.tsxsimilarity index 90%rename from frontend/src/react/pages/project/plan-detail/components/deploy/useDeployTaskStatement.tsxrename to frontend/src/routes/project/plan-detail/components/deploy/useDeployTaskStatement.tsxindex 41e8fb4694..e13c7c7bf2 100644--- a/frontend/src/react/pages/project/plan-detail/components/deploy/useDeployTaskStatement.tsx+++ b/frontend/src/routes/project/plan-detail/components/deploy/useDeployTaskStatement.tsx@@ -1,5 +1,5 @@import { useMemo } from "react";-import { useSheetStatement } from "@/react/hooks/useSheetStatement";+import { useSheetStatement } from "@/hooks/useSheetStatement";import type { Task } from "@/types/proto-es/v1/rollout_service_pb";import { sheetNameOfTaskV1 } from "@/utils/v1/issue/rollout";diff --git a/frontend/src/react/pages/project/plan-detail/components/lifecycle/DeployStageActions.tsx b/frontend/src/routes/project/plan-detail/components/lifecycle/DeployStageActions.tsxsimilarity index 97%rename from frontend/src/react/pages/project/plan-detail/components/lifecycle/DeployStageActions.tsxrename to frontend/src/routes/project/plan-detail/components/lifecycle/DeployStageActions.tsxindex 4cc8fe0bfa..217c14b569 100644--- a/frontend/src/react/pages/project/plan-detail/components/lifecycle/DeployStageActions.tsx+++ b/frontend/src/routes/project/plan-detail/components/lifecycle/DeployStageActions.tsx@@ -8,9 +8,9 @@import { Play } from "lucide-react";import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { TaskStatusIcon } from "@/react/components/TaskStatusIcon";-import { Button } from "@/react/components/ui/button";-import { router } from "@/react/router";+import { router } from "@/app/router";+import { TaskStatusIcon } from "@/components/TaskStatusIcon";+import { Button } from "@/components/ui/button";import {type Stage,Task_Status,diff --git a/frontend/src/react/pages/project/plan-detail/components/lifecycle/LifecycleStamp.tsx b/frontend/src/routes/project/plan-detail/components/lifecycle/LifecycleStamp.tsxsimilarity index 96%rename from frontend/src/react/pages/project/plan-detail/components/lifecycle/LifecycleStamp.tsxrename to frontend/src/routes/project/plan-detail/components/lifecycle/LifecycleStamp.tsxindex b80f4e0411..e1f27a052c 100644--- a/frontend/src/react/pages/project/plan-detail/components/lifecycle/LifecycleStamp.tsx+++ b/frontend/src/routes/project/plan-detail/components/lifecycle/LifecycleStamp.tsx@@ -1,5 +1,5 @@import type { ReactNode } from "react";-import { cn } from "@/react/lib/utils";+import { cn } from "@/lib/utils";// A bordered pill, not a button — it makes the lifecycle state visible without// implying another primary action. Two sizes: `sm` (default) is a compact badgediff --git a/frontend/src/react/pages/project/plan-detail/components/lifecycle/PlanLifecycleSlot.test.tsx b/frontend/src/routes/project/plan-detail/components/lifecycle/PlanLifecycleSlot.test.tsxsimilarity index 98%rename from frontend/src/react/pages/project/plan-detail/components/lifecycle/PlanLifecycleSlot.test.tsxrename to frontend/src/routes/project/plan-detail/components/lifecycle/PlanLifecycleSlot.test.tsxindex 0eab00a611..d258cb7aae 100644--- a/frontend/src/react/pages/project/plan-detail/components/lifecycle/PlanLifecycleSlot.test.tsx+++ b/frontend/src/routes/project/plan-detail/components/lifecycle/PlanLifecycleSlot.test.tsx@@ -17,7 +17,7 @@ vi.mock("../../shell/PlanDetailContext", () => ({usePlanDetailContext: () => ({ issue: { name: "projects/p/issues/1" } }),}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({ children }: { children: React.ReactNode }) => (<button type="button">{children}</button>),diff --git a/frontend/src/react/pages/project/plan-detail/components/lifecycle/PlanLifecycleSlot.tsx b/frontend/src/routes/project/plan-detail/components/lifecycle/PlanLifecycleSlot.tsxsimilarity index 97%rename from frontend/src/react/pages/project/plan-detail/components/lifecycle/PlanLifecycleSlot.tsxrename to frontend/src/routes/project/plan-detail/components/lifecycle/PlanLifecycleSlot.tsxindex dca299ec3f..d5f966ce98 100644--- a/frontend/src/react/pages/project/plan-detail/components/lifecycle/PlanLifecycleSlot.tsx+++ b/frontend/src/routes/project/plan-detail/components/lifecycle/PlanLifecycleSlot.tsx@@ -5,7 +5,7 @@// the title/create flow; everything else lives here.import { Loader2 } from "lucide-react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";+import { Button } from "@/components/ui/button";import { usePlanDetailContext } from "../../shell/PlanDetailContext";import { FrontierStatusStamp, RunStageAction } from "./DeployStageActions";import { LifecycleStamp } from "./LifecycleStamp";diff --git a/frontend/src/react/pages/project/plan-detail/components/lifecycle/PlanLifecycleStamp.tsx b/frontend/src/routes/project/plan-detail/components/lifecycle/PlanLifecycleStamp.tsxsimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/components/lifecycle/PlanLifecycleStamp.tsxrename to frontend/src/routes/project/plan-detail/components/lifecycle/PlanLifecycleStamp.tsxdiff --git a/frontend/src/react/pages/project/plan-detail/components/lifecycle/PlanStatusAction.tsx b/frontend/src/routes/project/plan-detail/components/lifecycle/PlanStatusAction.tsxsimilarity index 96%rename from frontend/src/react/pages/project/plan-detail/components/lifecycle/PlanStatusAction.tsxrename to frontend/src/routes/project/plan-detail/components/lifecycle/PlanStatusAction.tsxindex 1b26b889d5..7be456b08f 100644--- a/frontend/src/react/pages/project/plan-detail/components/lifecycle/PlanStatusAction.tsx+++ b/frontend/src/routes/project/plan-detail/components/lifecycle/PlanStatusAction.tsx@@ -19,19 +19,19 @@ import {} from "lucide-react";import { type ReactNode, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { issueServiceClientConnect } from "@/connect";-import { PlanCheckResultsDrawer } from "@/react/components/plan-check/PlanCheckSection";+import { issueServiceClientConnect } from "@/api";+import { PlanCheckResultsDrawer } from "@/components/plan-check/PlanCheckSection";import {Popover,PopoverContent,PopoverTrigger,-} from "@/react/components/ui/popover";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { displayRoleTitleFromList } from "@/react/lib/role";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";-import { userNamePrefix } from "@/store/modules/v1/common";+} from "@/components/ui/popover";+import { useCurrentUser } from "@/hooks/useAppState";+import { displayRoleTitleFromList } from "@/lib/role";+import { cn } from "@/lib/utils";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import { userNamePrefix } from "@/stores/modules/v1/common";import { unknownUser } from "@/types";import { ApprovalStatus } from "@/types/proto-es/v1/common_pb";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";diff --git a/frontend/src/react/pages/project/plan-detail/components/lifecycle/ReviewYourTurnAction.tsx b/frontend/src/routes/project/plan-detail/components/lifecycle/ReviewYourTurnAction.tsxsimilarity index 92%rename from frontend/src/react/pages/project/plan-detail/components/lifecycle/ReviewYourTurnAction.tsxrename to frontend/src/routes/project/plan-detail/components/lifecycle/ReviewYourTurnAction.tsxindex 6dfb1bbb89..9ebe0b660d 100644--- a/frontend/src/react/pages/project/plan-detail/components/lifecycle/ReviewYourTurnAction.tsx+++ b/frontend/src/routes/project/plan-detail/components/lifecycle/ReviewYourTurnAction.tsx@@ -5,12 +5,12 @@import { ChevronDown } from "lucide-react";import { useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";+import { Button } from "@/components/ui/button";import {Popover,PopoverContent,PopoverTrigger,-} from "@/react/components/ui/popover";+} from "@/components/ui/popover";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";import { ReviewActionPopover } from "../review/ReviewActionPopover";diff --git a/frontend/src/react/pages/project/plan-detail/components/lifecycle/frontierStage.test.ts b/frontend/src/routes/project/plan-detail/components/lifecycle/frontierStage.test.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/components/lifecycle/frontierStage.test.tsrename to frontend/src/routes/project/plan-detail/components/lifecycle/frontierStage.test.tsdiff --git a/frontend/src/react/pages/project/plan-detail/components/lifecycle/frontierStage.ts b/frontend/src/routes/project/plan-detail/components/lifecycle/frontierStage.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/components/lifecycle/frontierStage.tsrename to frontend/src/routes/project/plan-detail/components/lifecycle/frontierStage.tsdiff --git a/frontend/src/react/pages/project/plan-detail/components/lifecycle/planLifecycleHeaderState.test.ts b/frontend/src/routes/project/plan-detail/components/lifecycle/planLifecycleHeaderState.test.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/components/lifecycle/planLifecycleHeaderState.test.tsrename to frontend/src/routes/project/plan-detail/components/lifecycle/planLifecycleHeaderState.test.tsdiff --git a/frontend/src/react/pages/project/plan-detail/components/lifecycle/planLifecycleHeaderState.ts b/frontend/src/routes/project/plan-detail/components/lifecycle/planLifecycleHeaderState.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/components/lifecycle/planLifecycleHeaderState.tsrename to frontend/src/routes/project/plan-detail/components/lifecycle/planLifecycleHeaderState.tsdiff --git a/frontend/src/react/pages/project/plan-detail/components/lifecycle/planStatusLabel.test.ts b/frontend/src/routes/project/plan-detail/components/lifecycle/planStatusLabel.test.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/components/lifecycle/planStatusLabel.test.tsrename to frontend/src/routes/project/plan-detail/components/lifecycle/planStatusLabel.test.tsdiff --git a/frontend/src/react/pages/project/plan-detail/components/lifecycle/planStatusLabel.ts b/frontend/src/routes/project/plan-detail/components/lifecycle/planStatusLabel.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/components/lifecycle/planStatusLabel.tsrename to frontend/src/routes/project/plan-detail/components/lifecycle/planStatusLabel.tsdiff --git a/frontend/src/react/pages/project/plan-detail/components/lifecycle/usePlanLifecycleHeader.ts b/frontend/src/routes/project/plan-detail/components/lifecycle/usePlanLifecycleHeader.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/components/lifecycle/usePlanLifecycleHeader.tsrename to frontend/src/routes/project/plan-detail/components/lifecycle/usePlanLifecycleHeader.tsdiff --git a/frontend/src/react/pages/project/plan-detail/components/lifecycle/useStageTitle.ts b/frontend/src/routes/project/plan-detail/components/lifecycle/useStageTitle.tssimilarity index 91%rename from frontend/src/react/pages/project/plan-detail/components/lifecycle/useStageTitle.tsrename to frontend/src/routes/project/plan-detail/components/lifecycle/useStageTitle.tsindex ee07844aba..d7e88f1a34 100644--- a/frontend/src/react/pages/project/plan-detail/components/lifecycle/useStageTitle.ts+++ b/frontend/src/routes/project/plan-detail/components/lifecycle/useStageTitle.ts@@ -1,5 +1,5 @@import { useMemo } from "react";-import { useAppStore } from "@/react/stores/app";+import { useAppStore } from "@/stores/app";import type { Stage } from "@/types/proto-es/v1/rollout_service_pb";// Resolve a stage's display title (its environment title), subscribing todiff --git a/frontend/src/react/pages/project/plan-detail/components/review/PlanReviewSection.test.tsx b/frontend/src/routes/project/plan-detail/components/review/PlanReviewSection.test.tsxsimilarity index 95%rename from frontend/src/react/pages/project/plan-detail/components/review/PlanReviewSection.test.tsxrename to frontend/src/routes/project/plan-detail/components/review/PlanReviewSection.test.tsxindex e5a9ddb81a..d1254f74dc 100644--- a/frontend/src/react/pages/project/plan-detail/components/review/PlanReviewSection.test.tsx+++ b/frontend/src/routes/project/plan-detail/components/review/PlanReviewSection.test.tsx@@ -72,7 +72,7 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: Object.assign((selector: (state: unknown) => unknown) =>selector({@@ -100,7 +100,7 @@ vi.mock("@/react/stores/app", () => ({),}));-vi.mock("@/connect", () => ({+vi.mock("@/api", () => ({issueServiceClientConnect: {requestIssue: mocks.requestIssue,approveIssue: mocks.approveIssue,@@ -111,20 +111,20 @@ vi.mock("@/connect", () => ({},}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {push: mocks.routerPush,resolve: mocks.routerResolve,},}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: vi.fn(),extractUserEmail: (identifier: string) => identifier.replace(/^users\//, ""),}));-vi.mock("@/store/modules/v1/common", () => ({+vi.mock("@/stores/modules/v1/common", () => ({projectNamePrefix: "projects/",roleNamePrefix: "roles/",userNamePrefix: "users/",@@ -135,30 +135,30 @@ vi.mock("@/store/modules/v1/common", () => ({},}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useCurrentUser: () => mocks.currentUser,}));-vi.mock("@/react/hooks/useProjectByName", () => ({+vi.mock("@/hooks/useProjectByName", () => ({useProjectByName: () => ({name: "projects/p1",allowSelfApproval: true,}),}));-vi.mock("@/react/components/MarkdownEditor", () => ({+vi.mock("@/components/MarkdownEditor", () => ({MarkdownEditor: ({ content }: { content?: string }) => (<div data-testid="markdown">{content}</div>),}));-vi.mock("@/react/components/HumanizeTs", () => ({+vi.mock("@/components/HumanizeTs", () => ({HumanizeTs: ({ ts }: { ts: number }) => (<span data-testid="humanize-ts">{ts}</span>),}));-vi.mock("@/react/components/UserAvatar", () => ({+vi.mock("@/components/UserAvatar", () => ({UserAvatar: ({ title }: { title?: string }) => (<span data-testid="user-avatar">{title}</span>),@@ -166,7 +166,7 @@ vi.mock("@/react/components/UserAvatar", () => ({getInitials: (name: string) => name.slice(0, 2),}));-vi.mock("@/react/components/RouterLink", () => ({+vi.mock("@/components/RouterLink", () => ({RouterLink: ({children,to,@@ -176,17 +176,17 @@ vi.mock("@/react/components/RouterLink", () => ({}) => <a href={JSON.stringify(to)}>{children}</a>,}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: ({ children }: { children: React.ReactNode }) => <>{children}</>,}));-vi.mock("@/react/components/ui/badge", () => ({+vi.mock("@/components/ui/badge", () => ({Badge: ({ children }: { children: React.ReactNode }) => (<span>{children}</span>),}));-vi.mock("@/react/components/ui/popover", () => ({+vi.mock("@/components/ui/popover", () => ({Popover: ({ children }: { children: React.ReactNode }) => <>{children}</>,PopoverTrigger: ({ children }: { children: React.ReactNode }) => (<div>{children}</div>@@ -196,7 +196,7 @@ vi.mock("@/react/components/ui/popover", () => ({),}));-vi.mock("@/react/components/ui/alert", () => ({+vi.mock("@/components/ui/alert", () => ({Alert: ({children,title,@@ -212,16 +212,16 @@ vi.mock("@/react/components/ui/alert", () => ({alertVariants: {},}));-vi.mock("@/react/lib/utils", () => ({+vi.mock("@/lib/utils", () => ({cn: (...classes: Array<string | false | null | undefined>) =>classes.filter(Boolean).join(" "),}));-vi.mock("@/react/lib/role", () => ({+vi.mock("@/lib/role", () => ({displayRoleTitleFromList: (role: string) => role,}));-vi.mock("@/react/lib/plan/diffPlanSpecs", () => ({+vi.mock("@/lib/plan/diffPlanSpecs", () => ({diffPlanSpecsForEvent: () => [],diffEntryKey: (entry: { kind: string }) => entry.kind,}));@@ -255,7 +255,7 @@ vi.mock("@/types", () => ({getTimeForPbTimestampProtoEs: () => 0,}));-vi.mock("@/react/stores/app/issueComment", () => ({+vi.mock("@/stores/app/issueComment", () => ({IssueCommentType: {APPROVAL: "APPROVAL",USER_COMMENT: "USER_COMMENT",@@ -270,7 +270,7 @@ vi.mock("@/react/stores/app/issueComment", () => ({},}));-vi.mock("@/react/stores/app/group", () => ({+vi.mock("@/stores/app/group", () => ({ensureGroupIdentifier: (id: string) => id,}));diff --git a/frontend/src/react/pages/project/plan-detail/components/review/PlanReviewSection.tsx b/frontend/src/routes/project/plan-detail/components/review/PlanReviewSection.tsxsimilarity index 96%rename from frontend/src/react/pages/project/plan-detail/components/review/PlanReviewSection.tsxrename to frontend/src/routes/project/plan-detail/components/review/PlanReviewSection.tsxindex 61d0224ff0..ecc315f930 100644--- a/frontend/src/react/pages/project/plan-detail/components/review/PlanReviewSection.tsx+++ b/frontend/src/routes/project/plan-detail/components/review/PlanReviewSection.tsx@@ -1,8 +1,8 @@import { create } from "@bufbuild/protobuf";import { useEffect } from "react";import { useTranslation } from "react-i18next";-import { useAppStore } from "@/react/stores/app";-import { projectNamePrefix } from "@/store/modules/v1/common";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";import { ApprovalStatus } from "@/types/proto-es/v1/common_pb";import type { IssueComment } from "@/types/proto-es/v1/issue_service_pb";import { ListIssueCommentsRequestSchema } from "@/types/proto-es/v1/issue_service_pb";diff --git a/frontend/src/react/pages/project/plan-detail/components/review/ReviewActionPopover.tsx b/frontend/src/routes/project/plan-detail/components/review/ReviewActionPopover.tsxsimilarity index 91%rename from frontend/src/react/pages/project/plan-detail/components/review/ReviewActionPopover.tsxrename to frontend/src/routes/project/plan-detail/components/review/ReviewActionPopover.tsxindex 1b03ba5490..b121ddf707 100644--- a/frontend/src/react/pages/project/plan-detail/components/review/ReviewActionPopover.tsx+++ b/frontend/src/routes/project/plan-detail/components/review/ReviewActionPopover.tsx@@ -2,19 +2,19 @@ import { create } from "@bufbuild/protobuf";import { Loader2, MessageCircle } from "lucide-react";import { type ReactNode, useEffect, useState } from "react";import { useTranslation } from "react-i18next";-import { issueServiceClientConnect } from "@/connect";+import { issueServiceClientConnect } from "@/api";import {type ActivityIconSpec,ICON_TEXT_TONE,REVIEW_DECISION_ICON,-} from "@/react/components/issue-activity/activityIcons";-import { MarkdownEditor } from "@/react/components/MarkdownEditor";-import { Button } from "@/react/components/ui/button";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";-import { Tooltip } from "@/react/components/ui/tooltip";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/components/issue-activity/activityIcons";+import { MarkdownEditor } from "@/components/MarkdownEditor";+import { Button } from "@/components/ui/button";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";+import { Tooltip } from "@/components/ui/tooltip";+import { cn } from "@/lib/utils";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";import {ApproveIssueRequestSchema,diff --git a/frontend/src/react/pages/project/plan-detail/components/review/ReviewActivityTimeline.test.tsx b/frontend/src/routes/project/plan-detail/components/review/ReviewActivityTimeline.test.tsxsimilarity index 91%rename from frontend/src/react/pages/project/plan-detail/components/review/ReviewActivityTimeline.test.tsxrename to frontend/src/routes/project/plan-detail/components/review/ReviewActivityTimeline.test.tsxindex 7f4c4914d1..53acfdc9c9 100644--- a/frontend/src/react/pages/project/plan-detail/components/review/ReviewActivityTimeline.test.tsx+++ b/frontend/src/routes/project/plan-detail/components/review/ReviewActivityTimeline.test.tsx@@ -19,7 +19,7 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/components/issue-activity/IssueCommentActivity", () => ({+vi.mock("@/components/issue-activity/IssueCommentActivity", () => ({ActivityRowShell: ({header,icon,@@ -44,23 +44,23 @@ vi.mock("@/react/components/issue-activity/IssueCommentActivity", () => ({),}));-vi.mock("@/react/components/HumanizeTs", () => ({+vi.mock("@/components/HumanizeTs", () => ({HumanizeTs: () => null,}));-vi.mock("@/react/components/MarkdownEditor", () => ({+vi.mock("@/components/MarkdownEditor", () => ({MarkdownEditor: () => null,}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useCurrentUser: () => ({ email: "[email protected]" }),}));-vi.mock("@/react/hooks/useProjectByName", () => ({+vi.mock("@/hooks/useProjectByName", () => ({useProjectByName: () => undefined,}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: Object.assign((selector: (state: unknown) => unknown) =>selector({@@ -74,7 +74,7 @@ vi.mock("@/react/stores/app", () => ({),}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: vi.fn(),}));diff --git a/frontend/src/react/pages/project/plan-detail/components/review/ReviewActivityTimeline.tsx b/frontend/src/routes/project/plan-detail/components/review/ReviewActivityTimeline.tsxsimilarity index 94%rename from frontend/src/react/pages/project/plan-detail/components/review/ReviewActivityTimeline.tsxrename to frontend/src/routes/project/plan-detail/components/review/ReviewActivityTimeline.tsxindex 66a9d7ac30..67798582aa 100644--- a/frontend/src/react/pages/project/plan-detail/components/review/ReviewActivityTimeline.tsx+++ b/frontend/src/routes/project/plan-detail/components/review/ReviewActivityTimeline.tsx@@ -1,7 +1,7 @@import { FileText, Loader2, Pencil } from "lucide-react";import { type ReactNode, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { HumanizeTs } from "@/react/components/HumanizeTs";+import { HumanizeTs } from "@/components/HumanizeTs";import {ActivityRowShell,CommentCreator,@@ -10,19 +10,19 @@ import {IssueCommentRow,ReviewSubmissionIcon,ReviewSubmissionSentence,-} from "@/react/components/issue-activity/IssueCommentActivity";-import { MarkdownEditor } from "@/react/components/MarkdownEditor";-import { Button } from "@/react/components/ui/button";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { diffPlanSpecsForEvent } from "@/react/lib/plan/diffPlanSpecs";-import { useAppStore } from "@/react/stores/app";+} from "@/components/issue-activity/IssueCommentActivity";+import { MarkdownEditor } from "@/components/MarkdownEditor";+import { Button } from "@/components/ui/button";+import { useCurrentUser } from "@/hooks/useAppState";+import { useProjectByName } from "@/hooks/useProjectByName";+import { diffPlanSpecsForEvent } from "@/lib/plan/diffPlanSpecs";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import {getIssueCommentType,IssueCommentType,-} from "@/react/stores/app/issueComment";-import { pushNotification } from "@/store";-import { projectNamePrefix } from "@/store/modules/v1/common";+} from "@/stores/app/issueComment";+import { projectNamePrefix } from "@/stores/modules/v1/common";import { getTimeForPbTimestampProtoEs, unknownUser } from "@/types";import type { Issue, IssueComment } from "@/types/proto-es/v1/issue_service_pb";import type { Plan } from "@/types/proto-es/v1/plan_service_pb";diff --git a/frontend/src/react/pages/project/plan-detail/components/review/ReviewApprovalFlow.test.tsx b/frontend/src/routes/project/plan-detail/components/review/ReviewApprovalFlow.test.tsxsimilarity index 96%rename from frontend/src/react/pages/project/plan-detail/components/review/ReviewApprovalFlow.test.tsxrename to frontend/src/routes/project/plan-detail/components/review/ReviewApprovalFlow.test.tsxindex dd7c0e0ca1..722e697395 100644--- a/frontend/src/react/pages/project/plan-detail/components/review/ReviewApprovalFlow.test.tsx+++ b/frontend/src/routes/project/plan-detail/components/review/ReviewApprovalFlow.test.tsx@@ -24,7 +24,7 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: (selector: (state: unknown) => unknown) =>selector({roleList: [],@@ -44,12 +44,12 @@ vi.mock("../../shell/PlanDetailContext", () => ({usePlanDetailContext: () => ({ projectId: "p1" }),}));-vi.mock("@/react/components/UserAvatar", () => ({+vi.mock("@/components/UserAvatar", () => ({getAvatarColor: () => "#000",getInitials: (name: string) => name.slice(0, 2),}));-vi.mock("@/store/modules/v1/common", () => ({+vi.mock("@/stores/modules/v1/common", () => ({projectNamePrefix: "projects/",}));@@ -61,7 +61,7 @@ vi.mock("@/types", () => ({}),}));-vi.mock("@/react/lib/role", () => ({+vi.mock("@/lib/role", () => ({displayRoleTitleFromList: (role: string) => role,}));diff --git a/frontend/src/react/pages/project/plan-detail/components/review/ReviewApprovalFlow.tsx b/frontend/src/routes/project/plan-detail/components/review/ReviewApprovalFlow.tsxsimilarity index 98%rename from frontend/src/react/pages/project/plan-detail/components/review/ReviewApprovalFlow.tsxrename to frontend/src/routes/project/plan-detail/components/review/ReviewApprovalFlow.tsxindex fb788b9bda..4810a3dda0 100644--- a/frontend/src/react/pages/project/plan-detail/components/review/ReviewApprovalFlow.tsx+++ b/frontend/src/routes/project/plan-detail/components/review/ReviewApprovalFlow.tsx@@ -1,17 +1,17 @@import { Check, User, X } from "lucide-react";import { type ReactNode, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { getAvatarColor, getInitials } from "@/react/components/UserAvatar";-import { Badge } from "@/react/components/ui/badge";+import { getAvatarColor, getInitials } from "@/components/UserAvatar";+import { Badge } from "@/components/ui/badge";import {Popover,PopoverContent,PopoverTrigger,-} from "@/react/components/ui/popover";-import { displayRoleTitleFromList } from "@/react/lib/role";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";-import { projectNamePrefix } from "@/store/modules/v1/common";+} from "@/components/ui/popover";+import { displayRoleTitleFromList } from "@/lib/role";+import { cn } from "@/lib/utils";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";import { unknownUser } from "@/types";import { ApprovalStatus } from "@/types/proto-es/v1/common_pb";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";diff --git a/frontend/src/react/pages/project/plan-detail/components/review/ReviewCommentComposer.tsx b/frontend/src/routes/project/plan-detail/components/review/ReviewCommentComposer.tsxsimilarity index 90%rename from frontend/src/react/pages/project/plan-detail/components/review/ReviewCommentComposer.tsxrename to frontend/src/routes/project/plan-detail/components/review/ReviewCommentComposer.tsxindex 28a930c80b..bd78e1b43f 100644--- a/frontend/src/react/pages/project/plan-detail/components/review/ReviewCommentComposer.tsx+++ b/frontend/src/routes/project/plan-detail/components/review/ReviewCommentComposer.tsx@@ -1,12 +1,12 @@import { Loader2 } from "lucide-react";import { useCallback, useEffect, useState } from "react";import { useTranslation } from "react-i18next";-import { MarkdownEditor } from "@/react/components/MarkdownEditor";-import { UserAvatar } from "@/react/components/UserAvatar";-import { Button } from "@/react/components/ui/button";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+import { MarkdownEditor } from "@/components/MarkdownEditor";+import { UserAvatar } from "@/components/UserAvatar";+import { Button } from "@/components/ui/button";+import { useCurrentUser } from "@/hooks/useAppState";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";const draftKey = (issueName: string) => `bb.plan-review.draft.${issueName}`;diff --git a/frontend/src/react/pages/project/plan-detail/components/review/ReviewReadinessFooter.tsx b/frontend/src/routes/project/plan-detail/components/review/ReviewReadinessFooter.tsxsimilarity index 98%rename from frontend/src/react/pages/project/plan-detail/components/review/ReviewReadinessFooter.tsxrename to frontend/src/routes/project/plan-detail/components/review/ReviewReadinessFooter.tsxindex 9576d9bd94..fbf3c7c826 100644--- a/frontend/src/react/pages/project/plan-detail/components/review/ReviewReadinessFooter.tsx+++ b/frontend/src/routes/project/plan-detail/components/review/ReviewReadinessFooter.tsx@@ -1,7 +1,7 @@import { Ban, CircleCheck, CircleX, Clock3, Loader2 } from "lucide-react";import { Fragment, type ReactNode } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";+import { Button } from "@/components/ui/button";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";import type { Plan } from "@/types/proto-es/v1/plan_service_pb";import { BypassAndDeploySheet, useBypassDeploy } from "./bypassDeploy";diff --git a/frontend/src/react/pages/project/plan-detail/components/review/ReviewRejectionBanner.tsx b/frontend/src/routes/project/plan-detail/components/review/ReviewRejectionBanner.tsxsimilarity index 90%rename from frontend/src/react/pages/project/plan-detail/components/review/ReviewRejectionBanner.tsxrename to frontend/src/routes/project/plan-detail/components/review/ReviewRejectionBanner.tsxindex 2fba795a84..30ba8f9abd 100644--- a/frontend/src/react/pages/project/plan-detail/components/review/ReviewRejectionBanner.tsx+++ b/frontend/src/routes/project/plan-detail/components/review/ReviewRejectionBanner.tsx@@ -1,17 +1,17 @@import { create } from "@bufbuild/protobuf";import { useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { issueServiceClientConnect } from "@/connect";-import { HumanizeTs } from "@/react/components/HumanizeTs";-import { Alert } from "@/react/components/ui/alert";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { useAppStore } from "@/react/stores/app";+import { issueServiceClientConnect } from "@/api";+import { HumanizeTs } from "@/components/HumanizeTs";+import { Alert } from "@/components/ui/alert";+import { useCurrentUser } from "@/hooks/useAppState";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import {getIssueCommentType,IssueCommentType,-} from "@/react/stores/app/issueComment";-import { pushNotification } from "@/store";-import { userNamePrefix } from "@/store/modules/v1/common";+} from "@/stores/app/issueComment";+import { userNamePrefix } from "@/stores/modules/v1/common";import { getTimeForPbTimestampProtoEs, unknownUser } from "@/types";import { ApprovalStatus } from "@/types/proto-es/v1/common_pb";import type { Issue, IssueComment } from "@/types/proto-es/v1/issue_service_pb";diff --git a/frontend/src/react/pages/project/plan-detail/components/review/ReviewSectionHeader.tsx b/frontend/src/routes/project/plan-detail/components/review/ReviewSectionHeader.tsxsimilarity index 97%rename from frontend/src/react/pages/project/plan-detail/components/review/ReviewSectionHeader.tsxrename to frontend/src/routes/project/plan-detail/components/review/ReviewSectionHeader.tsxindex 406bf0ea78..70b241b744 100644--- a/frontend/src/react/pages/project/plan-detail/components/review/ReviewSectionHeader.tsx+++ b/frontend/src/routes/project/plan-detail/components/review/ReviewSectionHeader.tsx@@ -1,6 +1,6 @@import { Info, ShieldAlert, ShieldCheck } from "lucide-react";import { useTranslation } from "react-i18next";-import { Tooltip } from "@/react/components/ui/tooltip";+import { Tooltip } from "@/components/ui/tooltip";import { RiskLevel } from "@/types/proto-es/v1/common_pb";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";import { extractIssueUID } from "@/utils/v1/issue/issue";diff --git a/frontend/src/react/pages/project/plan-detail/components/review/approvalFlowLayout.test.ts b/frontend/src/routes/project/plan-detail/components/review/approvalFlowLayout.test.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/components/review/approvalFlowLayout.test.tsrename to frontend/src/routes/project/plan-detail/components/review/approvalFlowLayout.test.tsdiff --git a/frontend/src/react/pages/project/plan-detail/components/review/approvalFlowLayout.ts b/frontend/src/routes/project/plan-detail/components/review/approvalFlowLayout.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/components/review/approvalFlowLayout.tsrename to frontend/src/routes/project/plan-detail/components/review/approvalFlowLayout.tsdiff --git a/frontend/src/react/pages/project/plan-detail/components/review/bypassDeploy.tsx b/frontend/src/routes/project/plan-detail/components/review/bypassDeploy.tsxsimilarity index 95%rename from frontend/src/react/pages/project/plan-detail/components/review/bypassDeploy.tsxrename to frontend/src/routes/project/plan-detail/components/review/bypassDeploy.tsxindex 25c124b04f..1ef9894075 100644--- a/frontend/src/react/pages/project/plan-detail/components/review/bypassDeploy.tsx+++ b/frontend/src/routes/project/plan-detail/components/review/bypassDeploy.tsx@@ -8,11 +8,11 @@ import { create } from "@bufbuild/protobuf";import { Loader2 } from "lucide-react";import { useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { rolloutServiceClientConnect } from "@/connect";-import { PlanCheckSection } from "@/react/components/plan-check/PlanCheckSection";-import { Alert } from "@/react/components/ui/alert";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";+import { rolloutServiceClientConnect } from "@/api";+import { PlanCheckSection } from "@/components/plan-check/PlanCheckSection";+import { Alert } from "@/components/ui/alert";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";import {Sheet,SheetBody,@@ -20,8 +20,9 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { pushNotification } from "@/store";+} from "@/components/ui/sheet";+import { getPlanCheckSummaryWithFallback } from "@/lib/plan/check";+import { pushNotification } from "@/stores";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";import type { Plan } from "@/types/proto-es/v1/plan_service_pb";import { CreateRolloutRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";@@ -29,7 +30,6 @@ import { focusPlanPhase } from "../../shell/focusPhase";import { usePlanDetailContext } from "../../shell/PlanDetailContext";import type { PlanCheckSummary } from "../../utils/phaseSummary";import { getPlanCheckSummary } from "../../utils/phaseSummary";-import { getPlanCheckSummaryWithFallback } from "../../utils/planCheck";import { ReviewApprovalFlow } from "./ReviewApprovalFlow";import {type BypassActionWeight,diff --git a/frontend/src/react/pages/project/plan-detail/components/review/consolidateTimeline.test.ts b/frontend/src/routes/project/plan-detail/components/review/consolidateTimeline.test.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/components/review/consolidateTimeline.test.tsrename to frontend/src/routes/project/plan-detail/components/review/consolidateTimeline.test.tsdiff --git a/frontend/src/react/pages/project/plan-detail/components/review/consolidateTimeline.ts b/frontend/src/routes/project/plan-detail/components/review/consolidateTimeline.tssimilarity index 99%rename from frontend/src/react/pages/project/plan-detail/components/review/consolidateTimeline.tsrename to frontend/src/routes/project/plan-detail/components/review/consolidateTimeline.tsindex dbd167aa32..2c3e370037 100644--- a/frontend/src/react/pages/project/plan-detail/components/review/consolidateTimeline.ts+++ b/frontend/src/routes/project/plan-detail/components/review/consolidateTimeline.ts@@ -17,7 +17,7 @@ import { clone } from "@bufbuild/protobuf";import {getIssueCommentType,IssueCommentType,-} from "@/react/stores/app/issueComment";+} from "@/stores/app/issueComment";import {type IssueComment,IssueCommentSchema,diff --git a/frontend/src/react/pages/project/plan-detail/components/review/foldTimeline.test.ts b/frontend/src/routes/project/plan-detail/components/review/foldTimeline.test.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/components/review/foldTimeline.test.tsrename to frontend/src/routes/project/plan-detail/components/review/foldTimeline.test.tsdiff --git a/frontend/src/react/pages/project/plan-detail/components/review/foldTimeline.ts b/frontend/src/routes/project/plan-detail/components/review/foldTimeline.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/components/review/foldTimeline.tsrename to frontend/src/routes/project/plan-detail/components/review/foldTimeline.tsdiff --git a/frontend/src/react/pages/project/plan-detail/components/review/readinessFooterState.test.ts b/frontend/src/routes/project/plan-detail/components/review/readinessFooterState.test.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/components/review/readinessFooterState.test.tsrename to frontend/src/routes/project/plan-detail/components/review/readinessFooterState.test.tsdiff --git a/frontend/src/react/pages/project/plan-detail/components/review/readinessFooterState.ts b/frontend/src/routes/project/plan-detail/components/review/readinessFooterState.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/components/review/readinessFooterState.tsrename to frontend/src/routes/project/plan-detail/components/review/readinessFooterState.tsdiff --git a/frontend/src/react/pages/project/plan-detail/components/review/timelineEvents.test.ts b/frontend/src/routes/project/plan-detail/components/review/timelineEvents.test.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/components/review/timelineEvents.test.tsrename to frontend/src/routes/project/plan-detail/components/review/timelineEvents.test.tsdiff --git a/frontend/src/react/pages/project/plan-detail/components/review/timelineEvents.ts b/frontend/src/routes/project/plan-detail/components/review/timelineEvents.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/components/review/timelineEvents.tsrename to frontend/src/routes/project/plan-detail/components/review/timelineEvents.tsdiff --git a/frontend/src/react/pages/project/plan-detail/components/review/useApprovalCandidates.ts b/frontend/src/routes/project/plan-detail/components/review/useApprovalCandidates.tssimilarity index 94%rename from frontend/src/react/pages/project/plan-detail/components/review/useApprovalCandidates.tsrename to frontend/src/routes/project/plan-detail/components/review/useApprovalCandidates.tsindex d95426b10c..f2bdd21897 100644Binary files a/frontend/src/react/pages/project/plan-detail/components/review/useApprovalCandidates.ts and b/frontend/src/routes/project/plan-detail/components/review/useApprovalCandidates.ts differdiff --git a/frontend/src/react/pages/project/plan-detail/components/rollbackDraft.test.ts b/frontend/src/routes/project/plan-detail/components/rollbackDraft.test.tssimilarity index 98%rename from frontend/src/react/pages/project/plan-detail/components/rollbackDraft.test.tsrename to frontend/src/routes/project/plan-detail/components/rollbackDraft.test.tsindex 6551409106..83253c86f7 100644--- a/frontend/src/react/pages/project/plan-detail/components/rollbackDraft.test.ts+++ b/frontend/src/routes/project/plan-detail/components/rollbackDraft.test.ts@@ -1,10 +1,10 @@import { create } from "@bufbuild/protobuf";import { describe, expect, test, vi } from "vitest";+import { DraftReviewIssueCreationError } from "@/lib/plan/workflow";import type { CreateIssueRequest } from "@/types/proto-es/v1/issue_service_pb";import { IssueSchema } from "@/types/proto-es/v1/issue_service_pb";import type { CreatePlanRequest } from "@/types/proto-es/v1/plan_service_pb";import { PlanSchema } from "@/types/proto-es/v1/plan_service_pb";-import { DraftReviewIssueCreationError } from "../utils/header";import { createRollbackDraftReview } from "./rollbackDraft";const preview = {diff --git a/frontend/src/react/pages/project/plan-detail/components/rollbackDraft.ts b/frontend/src/routes/project/plan-detail/components/rollbackDraft.tssimilarity index 96%rename from frontend/src/react/pages/project/plan-detail/components/rollbackDraft.tsrename to frontend/src/routes/project/plan-detail/components/rollbackDraft.tsindex 6e67eb784e..e3a1a681a1 100644--- a/frontend/src/react/pages/project/plan-detail/components/rollbackDraft.ts+++ b/frontend/src/routes/project/plan-detail/components/rollbackDraft.ts@@ -1,4 +1,5 @@import { create } from "@bufbuild/protobuf";+import { createPlanWithDraftReview } from "@/lib/plan/workflow";import type {CreateIssueRequest,Issue,@@ -14,7 +15,6 @@ import {} from "@/types/proto-es/v1/plan_service_pb";import type { Sheet } from "@/types/proto-es/v1/sheet_service_pb";import { SheetSchema } from "@/types/proto-es/v1/sheet_service_pb";-import { createPlanWithDraftReview } from "../utils/header";export interface RollbackDraftPreview {statement: string;diff --git a/frontend/src/react/pages/project/plan-detail/hooks/usePlanCheckActions.test.tsx b/frontend/src/routes/project/plan-detail/hooks/usePlanCheckActions.test.tsxsimilarity index 94%rename from frontend/src/react/pages/project/plan-detail/hooks/usePlanCheckActions.test.tsxrename to frontend/src/routes/project/plan-detail/hooks/usePlanCheckActions.test.tsxindex 91e62709b5..62dcd045f0 100644--- a/frontend/src/react/pages/project/plan-detail/hooks/usePlanCheckActions.test.tsx+++ b/frontend/src/routes/project/plan-detail/hooks/usePlanCheckActions.test.tsx@@ -16,7 +16,7 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/connect", () => ({+vi.mock("@/api", () => ({planServiceClientConnect: {getPlan: mocks.getPlan,getPlanCheckRun: mocks.getPlanCheckRun,@@ -24,25 +24,25 @@ vi.mock("@/connect", () => ({},}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useCurrentUser: () => ({ email: "[email protected]" }),}));-vi.mock("@/react/hooks/useProjectByName", () => ({+vi.mock("@/hooks/useProjectByName", () => ({useProjectByName: () => ({ name: "projects/foo" }),}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: (selector: (state: { projectsByName: object }) => unknown) =>selector({ projectsByName: {} }),}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({projectNamePrefix: "projects/",pushNotification: mocks.pushNotification,}));-vi.mock("@/store/modules/v1/common", () => ({+vi.mock("@/stores/modules/v1/common", () => ({extractUserEmail: (name: string) => name.replace(/^users\//, ""),}));diff --git a/frontend/src/react/pages/project/plan-detail/hooks/usePlanCheckActions.tsx b/frontend/src/routes/project/plan-detail/hooks/usePlanCheckActions.tsxsimilarity index 86%rename from frontend/src/react/pages/project/plan-detail/hooks/usePlanCheckActions.tsxrename to frontend/src/routes/project/plan-detail/hooks/usePlanCheckActions.tsxindex c4e5d8a75c..fe3e0f757f 100644--- a/frontend/src/react/pages/project/plan-detail/hooks/usePlanCheckActions.tsx+++ b/frontend/src/routes/project/plan-detail/hooks/usePlanCheckActions.tsx@@ -1,12 +1,12 @@import { create } from "@bufbuild/protobuf";import { useCallback, useMemo } from "react";import { useTranslation } from "react-i18next";-import { planServiceClientConnect } from "@/connect";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { useAppStore } from "@/react/stores/app";-import { projectNamePrefix, pushNotification } from "@/store";-import { extractUserEmail } from "@/store/modules/v1/common";+import { planServiceClientConnect } from "@/api";+import { useCurrentUser } from "@/hooks/useAppState";+import { useProjectByName } from "@/hooks/useProjectByName";+import { projectNamePrefix, pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import { extractUserEmail } from "@/stores/modules/v1/common";import { RunPlanChecksRequestSchema } from "@/types/proto-es/v1/plan_service_pb";import { hasProjectPermissionV2 } from "@/utils";import { usePlanDetailContext } from "../shell/PlanDetailContext";diff --git a/frontend/src/react/pages/project/plan-detail/hooks/usePlanDetailSpecValidation.ts b/frontend/src/routes/project/plan-detail/hooks/usePlanDetailSpecValidation.tssimilarity index 98%rename from frontend/src/react/pages/project/plan-detail/hooks/usePlanDetailSpecValidation.tsrename to frontend/src/routes/project/plan-detail/hooks/usePlanDetailSpecValidation.tsindex 28efaf62c4..f71259e030 100644--- a/frontend/src/react/pages/project/plan-detail/hooks/usePlanDetailSpecValidation.ts+++ b/frontend/src/routes/project/plan-detail/hooks/usePlanDetailSpecValidation.ts@@ -1,5 +1,5 @@import { useEffect, useState } from "react";-import { useAppStore } from "@/react/stores/app";+import { useAppStore } from "@/stores/app";import type { Plan_Spec } from "@/types/proto-es/v1/plan_service_pb";import { sheetNameOfSpec } from "@/utils/v1/issue/plan";import { extractSheetUID, getSheetStatement } from "@/utils/v1/sheet";diff --git a/frontend/src/react/pages/project/plan-detail/index.ts b/frontend/src/routes/project/plan-detail/index.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/index.tsrename to frontend/src/routes/project/plan-detail/index.tsdiff --git a/frontend/src/react/pages/project/plan-detail/shared/stores/PlanDetailStoreProvider.tsx b/frontend/src/routes/project/plan-detail/shared/stores/PlanDetailStoreProvider.tsxsimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/shared/stores/PlanDetailStoreProvider.tsxrename to frontend/src/routes/project/plan-detail/shared/stores/PlanDetailStoreProvider.tsxdiff --git a/frontend/src/react/pages/project/plan-detail/shared/stores/__tests__/usePlanDetailStore.test.tsx b/frontend/src/routes/project/plan-detail/shared/stores/__tests__/usePlanDetailStore.test.tsxsimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/shared/stores/__tests__/usePlanDetailStore.test.tsxrename to frontend/src/routes/project/plan-detail/shared/stores/__tests__/usePlanDetailStore.test.tsxdiff --git a/frontend/src/react/pages/project/plan-detail/shared/stores/editingSlice.ts b/frontend/src/routes/project/plan-detail/shared/stores/editingSlice.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/shared/stores/editingSlice.tsrename to frontend/src/routes/project/plan-detail/shared/stores/editingSlice.tsdiff --git a/frontend/src/react/pages/project/plan-detail/shared/stores/phaseSlice.ts b/frontend/src/routes/project/plan-detail/shared/stores/phaseSlice.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/shared/stores/phaseSlice.tsrename to frontend/src/routes/project/plan-detail/shared/stores/phaseSlice.tsdiff --git a/frontend/src/react/pages/project/plan-detail/shared/stores/pollingSlice.ts b/frontend/src/routes/project/plan-detail/shared/stores/pollingSlice.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/shared/stores/pollingSlice.tsrename to frontend/src/routes/project/plan-detail/shared/stores/pollingSlice.tsdiff --git a/frontend/src/react/pages/project/plan-detail/shared/stores/selectionSlice.ts b/frontend/src/routes/project/plan-detail/shared/stores/selectionSlice.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/shared/stores/selectionSlice.tsrename to frontend/src/routes/project/plan-detail/shared/stores/selectionSlice.tsdiff --git a/frontend/src/react/pages/project/plan-detail/shared/stores/snapshotSlice.ts b/frontend/src/routes/project/plan-detail/shared/stores/snapshotSlice.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/shared/stores/snapshotSlice.tsrename to frontend/src/routes/project/plan-detail/shared/stores/snapshotSlice.tsdiff --git a/frontend/src/react/pages/project/plan-detail/shared/stores/types.ts b/frontend/src/routes/project/plan-detail/shared/stores/types.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/shared/stores/types.tsrename to frontend/src/routes/project/plan-detail/shared/stores/types.tsdiff --git a/frontend/src/react/pages/project/plan-detail/shared/stores/usePlanDetailStore.ts b/frontend/src/routes/project/plan-detail/shared/stores/usePlanDetailStore.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/shared/stores/usePlanDetailStore.tsrename to frontend/src/routes/project/plan-detail/shared/stores/usePlanDetailStore.tsdiff --git a/frontend/src/react/pages/project/plan-detail/shell/PlanDetailContext.tsx b/frontend/src/routes/project/plan-detail/shell/PlanDetailContext.tsxsimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/shell/PlanDetailContext.tsxrename to frontend/src/routes/project/plan-detail/shell/PlanDetailContext.tsxdiff --git a/frontend/src/react/pages/project/plan-detail/shell/__tests__/leaveGuard.test.ts b/frontend/src/routes/project/plan-detail/shell/__tests__/leaveGuard.test.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/shell/__tests__/leaveGuard.test.tsrename to frontend/src/routes/project/plan-detail/shell/__tests__/leaveGuard.test.tsdiff --git a/frontend/src/react/pages/project/plan-detail/shell/constants.ts b/frontend/src/routes/project/plan-detail/shell/constants.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/shell/constants.tsrename to frontend/src/routes/project/plan-detail/shell/constants.tsdiff --git a/frontend/src/react/pages/project/plan-detail/shell/focusPhase.ts b/frontend/src/routes/project/plan-detail/shell/focusPhase.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/shell/focusPhase.tsrename to frontend/src/routes/project/plan-detail/shell/focusPhase.tsdiff --git a/frontend/src/react/pages/project/plan-detail/shell/hooks/fetchPlanSnapshot.test.ts b/frontend/src/routes/project/plan-detail/shell/hooks/fetchPlanSnapshot.test.tssimilarity index 99%rename from frontend/src/react/pages/project/plan-detail/shell/hooks/fetchPlanSnapshot.test.tsrename to frontend/src/routes/project/plan-detail/shell/hooks/fetchPlanSnapshot.test.tsindex 721e1b63dc..cfb0bbb0c1 100644--- a/frontend/src/react/pages/project/plan-detail/shell/hooks/fetchPlanSnapshot.test.ts+++ b/frontend/src/routes/project/plan-detail/shell/hooks/fetchPlanSnapshot.test.ts@@ -22,7 +22,7 @@ const mocks = vi.hoisted(() => ({listTaskRuns: vi.fn(),}));-vi.mock("@/connect", () => ({+vi.mock("@/api", () => ({issueServiceClientConnect: { getIssue: mocks.getIssue },planServiceClientConnect: {getPlan: mocks.getPlan,diff --git a/frontend/src/react/pages/project/plan-detail/shell/hooks/fetchPlanSnapshot.ts b/frontend/src/routes/project/plan-detail/shell/hooks/fetchPlanSnapshot.tssimilarity index 98%rename from frontend/src/react/pages/project/plan-detail/shell/hooks/fetchPlanSnapshot.tsrename to frontend/src/routes/project/plan-detail/shell/hooks/fetchPlanSnapshot.tsindex 986b5dd377..48fd22cd9f 100644--- a/frontend/src/react/pages/project/plan-detail/shell/hooks/fetchPlanSnapshot.ts+++ b/frontend/src/routes/project/plan-detail/shell/hooks/fetchPlanSnapshot.ts@@ -6,8 +6,8 @@ import {projectServiceClientConnect,rolloutServiceClientConnect,userServiceClientConnect,-} from "@/connect";-import { silentContextKey } from "@/connect/context-key";+} from "@/api";+import { silentContextKey } from "@/api/context-key";import {GetIssueRequestSchema,type Issue,diff --git a/frontend/src/react/pages/project/plan-detail/shell/hooks/types.ts b/frontend/src/routes/project/plan-detail/shell/hooks/types.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/shell/hooks/types.tsrename to frontend/src/routes/project/plan-detail/shell/hooks/types.tsdiff --git a/frontend/src/react/pages/project/plan-detail/shell/hooks/useDerivedPlanState.ts b/frontend/src/routes/project/plan-detail/shell/hooks/useDerivedPlanState.tssimilarity index 98%rename from frontend/src/react/pages/project/plan-detail/shell/hooks/useDerivedPlanState.tsrename to frontend/src/routes/project/plan-detail/shell/hooks/useDerivedPlanState.tsindex ac152014a1..bcaf417ae5 100644--- a/frontend/src/react/pages/project/plan-detail/shell/hooks/useDerivedPlanState.ts+++ b/frontend/src/routes/project/plan-detail/shell/hooks/useDerivedPlanState.ts@@ -1,5 +1,5 @@import { useMemo, useRef } from "react";-import { sortTaskRunsNewestFirst } from "@/react/lib/taskRun";+import { sortTaskRunsNewestFirst } from "@/lib/taskRun";import type { TaskRun } from "@/types/proto-es/v1/rollout_service_pb";import { extractTaskNameFromTaskRunName } from "@/utils";import type {diff --git a/frontend/src/react/pages/project/plan-detail/shell/hooks/useEditingScopes.ts b/frontend/src/routes/project/plan-detail/shell/hooks/useEditingScopes.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/shell/hooks/useEditingScopes.tsrename to frontend/src/routes/project/plan-detail/shell/hooks/useEditingScopes.tsdiff --git a/frontend/src/react/pages/project/plan-detail/shell/hooks/useInitialFetch.ts b/frontend/src/routes/project/plan-detail/shell/hooks/useInitialFetch.tssimilarity index 91%rename from frontend/src/react/pages/project/plan-detail/shell/hooks/useInitialFetch.tsrename to frontend/src/routes/project/plan-detail/shell/hooks/useInitialFetch.tsindex 5398a3d5a5..3c64bb9590 100644--- a/frontend/src/react/pages/project/plan-detail/shell/hooks/useInitialFetch.ts+++ b/frontend/src/routes/project/plan-detail/shell/hooks/useInitialFetch.ts@@ -1,12 +1,9 @@import { Code, ConnectError } from "@connectrpc/connect";import type { MutableRefObject } from "react";import { useEffect } from "react";-import { router } from "@/react/router";-import {- WORKSPACE_ROUTE_403,- WORKSPACE_ROUTE_404,-} from "@/react/router/handles";-import { buildPermissionDeniedRouteQuery } from "@/react/router/permissionDenied";+import { router } from "@/app/router";+import { WORKSPACE_ROUTE_403, WORKSPACE_ROUTE_404 } from "@/app/router/handles";+import { buildPermissionDeniedRouteQuery } from "@/app/router/permissionDenied";import { unknownPlan } from "@/types/v1/issue/plan";import type { PlanDetailStoreApi } from "../../shared/stores/usePlanDetailStore";import { fetchPlanSnapshot } from "./fetchPlanSnapshot";diff --git a/frontend/src/react/pages/project/plan-detail/shell/hooks/useLeaveGuard.ts b/frontend/src/routes/project/plan-detail/shell/hooks/useLeaveGuard.tssimilarity index 98%rename from frontend/src/react/pages/project/plan-detail/shell/hooks/useLeaveGuard.tsrename to frontend/src/routes/project/plan-detail/shell/hooks/useLeaveGuard.tsindex e593e584a0..78f3bb888f 100644--- a/frontend/src/react/pages/project/plan-detail/shell/hooks/useLeaveGuard.ts+++ b/frontend/src/routes/project/plan-detail/shell/hooks/useLeaveGuard.ts@@ -1,6 +1,6 @@import { useCallback, useEffect } from "react";import { useTranslation } from "react-i18next";-import { router } from "@/react/router";+import { router } from "@/app/router";import {usePlanDetailStore,usePlanDetailStoreApi,diff --git a/frontend/src/react/pages/project/plan-detail/shell/hooks/usePhaseState.ts b/frontend/src/routes/project/plan-detail/shell/hooks/usePhaseState.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/shell/hooks/usePhaseState.tsrename to frontend/src/routes/project/plan-detail/shell/hooks/usePhaseState.tsdiff --git a/frontend/src/react/pages/project/plan-detail/shell/hooks/usePlanDetailPage.test.tsx b/frontend/src/routes/project/plan-detail/shell/hooks/usePlanDetailPage.test.tsxsimilarity index 99%rename from frontend/src/react/pages/project/plan-detail/shell/hooks/usePlanDetailPage.test.tsxrename to frontend/src/routes/project/plan-detail/shell/hooks/usePlanDetailPage.test.tsxindex 26b9353f96..9a24366842 100644--- a/frontend/src/react/pages/project/plan-detail/shell/hooks/usePlanDetailPage.test.tsx+++ b/frontend/src/routes/project/plan-detail/shell/hooks/usePlanDetailPage.test.tsx@@ -28,8 +28,8 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {push: mocks.routerPush,replace: mocks.routerReplace,diff --git a/frontend/src/react/pages/project/plan-detail/shell/hooks/usePlanDetailPage.ts b/frontend/src/routes/project/plan-detail/shell/hooks/usePlanDetailPage.tssimilarity index 99%rename from frontend/src/react/pages/project/plan-detail/shell/hooks/usePlanDetailPage.tsrename to frontend/src/routes/project/plan-detail/shell/hooks/usePlanDetailPage.tsindex 13e39c4d02..4b3f2e7c21 100644--- a/frontend/src/react/pages/project/plan-detail/shell/hooks/usePlanDetailPage.ts+++ b/frontend/src/routes/project/plan-detail/shell/hooks/usePlanDetailPage.ts@@ -7,17 +7,17 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";-import {- preserveTaskRunIdentities,- sameMessage,- sameMessageList,-} from "@/react/lib/protoIdentity";import {PLAN_DETAIL_PHASE_CHANGES,PLAN_DETAIL_PHASE_DEPLOY,PLAN_DETAIL_PHASE_REVIEW,-} from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";+} from "@/app/router/handles";+import {+ preserveTaskRunIdentities,+ sameMessage,+ sameMessageList,+} from "@/lib/protoIdentity";+import { useAppStore } from "@/stores/app";import { ApprovalStatus, State } from "@/types/proto-es/v1/common_pb";import { IssueSchema, IssueStatus } from "@/types/proto-es/v1/issue_service_pb";import {diff --git a/frontend/src/react/pages/project/plan-detail/shell/hooks/usePlanPolling.test.tsx b/frontend/src/routes/project/plan-detail/shell/hooks/usePlanPolling.test.tsxsimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/shell/hooks/usePlanPolling.test.tsxrename to frontend/src/routes/project/plan-detail/shell/hooks/usePlanPolling.test.tsxdiff --git a/frontend/src/react/pages/project/plan-detail/shell/hooks/usePlanPolling.ts b/frontend/src/routes/project/plan-detail/shell/hooks/usePlanPolling.tssimilarity index 98%rename from frontend/src/react/pages/project/plan-detail/shell/hooks/usePlanPolling.tsrename to frontend/src/routes/project/plan-detail/shell/hooks/usePlanPolling.tsindex 5a6d02b0b1..33cb2dc1a8 100644--- a/frontend/src/react/pages/project/plan-detail/shell/hooks/usePlanPolling.ts+++ b/frontend/src/routes/project/plan-detail/shell/hooks/usePlanPolling.ts@@ -1,5 +1,5 @@import { useCallback, useEffect, useRef } from "react";-import { useLatestRef } from "@/react/hooks/useLatestRef";+import { useLatestRef } from "@/hooks/useLatestRef";const IDLE_MIN_INTERVAL_MS = 1000;const IDLE_MAX_INTERVAL_MS = 16000;diff --git a/frontend/src/react/pages/project/plan-detail/shell/hooks/useRedirects.test.ts b/frontend/src/routes/project/plan-detail/shell/hooks/useRedirects.test.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/shell/hooks/useRedirects.test.tsrename to frontend/src/routes/project/plan-detail/shell/hooks/useRedirects.test.tsdiff --git a/frontend/src/react/pages/project/plan-detail/shell/hooks/useRedirects.ts b/frontend/src/routes/project/plan-detail/shell/hooks/useRedirects.tssimilarity index 95%rename from frontend/src/react/pages/project/plan-detail/shell/hooks/useRedirects.tsrename to frontend/src/routes/project/plan-detail/shell/hooks/useRedirects.tsindex 8f08298284..ba11bc4e72 100644--- a/frontend/src/react/pages/project/plan-detail/shell/hooks/useRedirects.ts+++ b/frontend/src/routes/project/plan-detail/shell/hooks/useRedirects.ts@@ -1,5 +1,5 @@import { useEffect } from "react";-import { router } from "@/react/router";+import { router } from "@/app/router";import { type Issue } from "@/types/proto-es/v1/issue_service_pb";import type { Plan } from "@/types/proto-es/v1/plan_service_pb";import { getIssueRoute } from "@/utils";diff --git a/frontend/src/react/pages/project/plan-detail/shell/hooks/useRouteSelection.ts b/frontend/src/routes/project/plan-detail/shell/hooks/useRouteSelection.tssimilarity index 93%rename from frontend/src/react/pages/project/plan-detail/shell/hooks/useRouteSelection.tsrename to frontend/src/routes/project/plan-detail/shell/hooks/useRouteSelection.tsindex 6ea64af86e..3d6a43f87f 100644--- a/frontend/src/react/pages/project/plan-detail/shell/hooks/useRouteSelection.ts+++ b/frontend/src/routes/project/plan-detail/shell/hooks/useRouteSelection.ts@@ -1,5 +1,5 @@import { useEffect } from "react";-import { getRouteQueryString } from "@/react/router/handles";+import { getRouteQueryString } from "@/app/router/handles";import type { PlanDetailPhase } from "../../shared/stores/types";import { usePlanDetailStore } from "../../shared/stores/usePlanDetailStore";diff --git a/frontend/src/react/pages/project/plan-detail/shell/leaveGuard.ts b/frontend/src/routes/project/plan-detail/shell/leaveGuard.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/shell/leaveGuard.tsrename to frontend/src/routes/project/plan-detail/shell/leaveGuard.tsdiff --git a/frontend/src/react/pages/project/plan-detail/utils/createPlan.ts b/frontend/src/routes/project/plan-detail/utils/createPlan.tssimilarity index 98%rename from frontend/src/react/pages/project/plan-detail/utils/createPlan.tsrename to frontend/src/routes/project/plan-detail/utils/createPlan.tsindex cff7eefd19..7aa3506082 100644--- a/frontend/src/react/pages/project/plan-detail/utils/createPlan.ts+++ b/frontend/src/routes/project/plan-detail/utils/createPlan.ts@@ -1,7 +1,7 @@import { create } from "@bufbuild/protobuf";import { head } from "lodash-es";import { v4 as uuidv4 } from "uuid";-import { keyValueStorage } from "@/react/lib/keyValueStorage";+import { keyValueStorage } from "@/lib/keyValueStorage";import type { Plan_Spec } from "@/types/proto-es/v1/plan_service_pb";import {Plan_ChangeDatabaseConfigSchema,diff --git a/frontend/src/react/pages/project/plan-detail/utils/directiveUtils.test.ts b/frontend/src/routes/project/plan-detail/utils/directiveUtils.test.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/utils/directiveUtils.test.tsrename to frontend/src/routes/project/plan-detail/utils/directiveUtils.test.tsdiff --git a/frontend/src/react/pages/project/plan-detail/utils/directiveUtils.ts b/frontend/src/routes/project/plan-detail/utils/directiveUtils.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/utils/directiveUtils.tsrename to frontend/src/routes/project/plan-detail/utils/directiveUtils.tsdiff --git a/frontend/src/react/pages/project/plan-detail/utils/localSheet.test.ts b/frontend/src/routes/project/plan-detail/utils/localSheet.test.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/utils/localSheet.test.tsrename to frontend/src/routes/project/plan-detail/utils/localSheet.test.tsdiff --git a/frontend/src/react/pages/project/plan-detail/utils/localSheet.ts b/frontend/src/routes/project/plan-detail/utils/localSheet.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/utils/localSheet.tsrename to frontend/src/routes/project/plan-detail/utils/localSheet.tsdiff --git a/frontend/src/react/pages/project/plan-detail/utils/options.test.ts b/frontend/src/routes/project/plan-detail/utils/options.test.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/utils/options.test.tsrename to frontend/src/routes/project/plan-detail/utils/options.test.tsdiff --git a/frontend/src/react/pages/project/plan-detail/utils/options.ts b/frontend/src/routes/project/plan-detail/utils/options.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/utils/options.tsrename to frontend/src/routes/project/plan-detail/utils/options.tsdiff --git a/frontend/src/react/pages/project/plan-detail/utils/phaseSummary.test.ts b/frontend/src/routes/project/plan-detail/utils/phaseSummary.test.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/utils/phaseSummary.test.tsrename to frontend/src/routes/project/plan-detail/utils/phaseSummary.test.tsdiff --git a/frontend/src/react/pages/project/plan-detail/utils/phaseSummary.ts b/frontend/src/routes/project/plan-detail/utils/phaseSummary.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/utils/phaseSummary.tsrename to frontend/src/routes/project/plan-detail/utils/phaseSummary.tsdiff --git a/frontend/src/react/pages/project/plan-detail/utils/rolloutPreview.ts b/frontend/src/routes/project/plan-detail/utils/rolloutPreview.tssimilarity index 99%rename from frontend/src/react/pages/project/plan-detail/utils/rolloutPreview.tsrename to frontend/src/routes/project/plan-detail/utils/rolloutPreview.tsindex ad1285d898..a8b71144d7 100644--- a/frontend/src/react/pages/project/plan-detail/utils/rolloutPreview.ts+++ b/frontend/src/routes/project/plan-detail/utils/rolloutPreview.ts@@ -1,5 +1,5 @@import { create } from "@bufbuild/protobuf";-import { useAppStore } from "@/react/stores/app";+import { useAppStore } from "@/stores/app";import { isValidDatabaseGroupName, isValidDatabaseName } from "@/types";import { DatabaseGroupView } from "@/types/proto-es/v1/database_group_service_pb";import type {diff --git a/frontend/src/react/pages/project/plan-detail/utils/spec.test.ts b/frontend/src/routes/project/plan-detail/utils/spec.test.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/utils/spec.test.tsrename to frontend/src/routes/project/plan-detail/utils/spec.test.tsdiff --git a/frontend/src/react/pages/project/plan-detail/utils/spec.ts b/frontend/src/routes/project/plan-detail/utils/spec.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/utils/spec.tsrename to frontend/src/routes/project/plan-detail/utils/spec.tsdiff --git a/frontend/src/react/pages/project/plan-detail/utils/specMutation.ts b/frontend/src/routes/project/plan-detail/utils/specMutation.tssimilarity index 98%rename from frontend/src/react/pages/project/plan-detail/utils/specMutation.tsrename to frontend/src/routes/project/plan-detail/utils/specMutation.tsindex 5e52a55dc2..6039eab4a2 100644--- a/frontend/src/react/pages/project/plan-detail/utils/specMutation.ts+++ b/frontend/src/routes/project/plan-detail/utils/specMutation.ts@@ -1,5 +1,5 @@import { clone, create } from "@bufbuild/protobuf";-import { planServiceClientConnect, sheetServiceClientConnect } from "@/connect";+import { planServiceClientConnect, sheetServiceClientConnect } from "@/api";import type { Plan, Plan_Spec } from "@/types/proto-es/v1/plan_service_pb";import {PlanSchema,diff --git a/frontend/src/react/pages/project/plan-detail/utils/sqlAdvice.test.ts b/frontend/src/routes/project/plan-detail/utils/sqlAdvice.test.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/utils/sqlAdvice.test.tsrename to frontend/src/routes/project/plan-detail/utils/sqlAdvice.test.tsdiff --git a/frontend/src/react/pages/project/plan-detail/utils/sqlAdvice.ts b/frontend/src/routes/project/plan-detail/utils/sqlAdvice.tssimilarity index 96%rename from frontend/src/react/pages/project/plan-detail/utils/sqlAdvice.tsrename to frontend/src/routes/project/plan-detail/utils/sqlAdvice.tsindex 64c181c5cf..1c0a421bf1 100644--- a/frontend/src/react/pages/project/plan-detail/utils/sqlAdvice.ts+++ b/frontend/src/routes/project/plan-detail/utils/sqlAdvice.ts@@ -1,4 +1,4 @@-import type { AdviceOption } from "@/react/components/monaco/types";+import type { AdviceOption } from "@/components/monaco/types";import type {PlanCheckRun,PlanCheckRun_Result,diff --git a/frontend/src/react/pages/project/plan-detail/utils/targets.test.ts b/frontend/src/routes/project/plan-detail/utils/targets.test.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/utils/targets.test.tsrename to frontend/src/routes/project/plan-detail/utils/targets.test.tsdiff --git a/frontend/src/react/pages/project/plan-detail/utils/targets.ts b/frontend/src/routes/project/plan-detail/utils/targets.tssimilarity index 100%rename from frontend/src/react/pages/project/plan-detail/utils/targets.tsrename to frontend/src/routes/project/plan-detail/utils/targets.tsdiff --git a/frontend/src/react/pages/project/utils/reviewBadge.test.ts b/frontend/src/routes/project/utils/reviewBadge.test.tssimilarity index 100%rename from frontend/src/react/pages/project/utils/reviewBadge.test.tsrename to frontend/src/routes/project/utils/reviewBadge.test.tsdiff --git a/frontend/src/react/pages/project/utils/reviewBadge.ts b/frontend/src/routes/project/utils/reviewBadge.tssimilarity index 100%rename from frontend/src/react/pages/project/utils/reviewBadge.tsrename to frontend/src/routes/project/utils/reviewBadge.tsdiff --git a/frontend/src/react/pages/project/utils/taskRolloutActionPanel.test.tsx b/frontend/src/routes/project/utils/taskRolloutActionPanel.test.tsxsimilarity index 100%rename from frontend/src/react/pages/project/utils/taskRolloutActionPanel.test.tsxrename to frontend/src/routes/project/utils/taskRolloutActionPanel.test.tsxdiff --git a/frontend/src/react/pages/project/utils/taskRolloutActionPanel.tsx b/frontend/src/routes/project/utils/taskRolloutActionPanel.tsxsimilarity index 88%rename from frontend/src/react/pages/project/utils/taskRolloutActionPanel.tsxrename to frontend/src/routes/project/utils/taskRolloutActionPanel.tsxindex b7467cbc2f..cf00dd2b91 100644--- a/frontend/src/react/pages/project/utils/taskRolloutActionPanel.tsx+++ b/frontend/src/routes/project/utils/taskRolloutActionPanel.tsx@@ -1,4 +1,4 @@-import { DateTimePicker } from "@/react/components/ui/date-time-picker";+import { DateTimePicker } from "@/components/ui/date-time-picker";export const TASK_ROLLOUT_ACTION_SHEET_WIDTH = "standard";diff --git a/frontend/src/react/pages/settings/AuditLogPage.tsx b/frontend/src/routes/workspace/AuditLogPage.tsxsimilarity index 70%rename from frontend/src/react/pages/settings/AuditLogPage.tsxrename to frontend/src/routes/workspace/AuditLogPage.tsxindex 8438d44c38..99e658431a 100644--- a/frontend/src/react/pages/settings/AuditLogPage.tsx+++ b/frontend/src/routes/workspace/AuditLogPage.tsx@@ -1,10 +1,10 @@-import { AuditLogTable } from "@/react/components/AuditLogTable";-import { FeatureAttention } from "@/react/components/FeatureAttention";+import { AuditLogTable } from "@/components/AuditLogTable";+import { FeatureAttention } from "@/components/FeatureAttention";import {WorkspacePageContent,WorkspacePageLayout,-} from "@/react/components/WorkspacePageLayout";-import { projectNamePrefix } from "@/store/modules/v1/common";+} from "@/components/WorkspacePageLayout";+import { projectNamePrefix } from "@/stores/modules/v1/common";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { hasWorkspacePermissionV2 } from "@/utils";diff --git a/frontend/src/react/pages/settings/CancelSubscriptionDialog.tsx b/frontend/src/routes/workspace/CancelSubscriptionDialog.tsxsimilarity index 94%rename from frontend/src/react/pages/settings/CancelSubscriptionDialog.tsxrename to frontend/src/routes/workspace/CancelSubscriptionDialog.tsxindex f9ca889c89..9ffebbdee3 100644--- a/frontend/src/react/pages/settings/CancelSubscriptionDialog.tsx+++ b/frontend/src/routes/workspace/CancelSubscriptionDialog.tsx@@ -7,10 +7,10 @@ import {AlertDialogDescription,AlertDialogFooter,AlertDialogTitle,-} from "@/react/components/ui/alert-dialog";-import { Button } from "@/react/components/ui/button";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";-import { Textarea } from "@/react/components/ui/textarea";+} from "@/components/ui/alert-dialog";+import { Button } from "@/components/ui/button";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";+import { Textarea } from "@/components/ui/textarea";// Stripe cancellation_details.feedback enum values.// See https://stripe.com/docs/api/subscriptions/canceldiff --git a/frontend/src/react/pages/settings/CreateInstancePage.test.tsx b/frontend/src/routes/workspace/CreateInstancePage.test.tsxsimilarity index 96%rename from frontend/src/react/pages/settings/CreateInstancePage.test.tsxrename to frontend/src/routes/workspace/CreateInstancePage.test.tsxindex f38d017322..0560a9cc11 100644--- a/frontend/src/react/pages/settings/CreateInstancePage.test.tsx+++ b/frontend/src/routes/workspace/CreateInstancePage.test.tsx@@ -24,11 +24,11 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/hooks/useUnsavedChangesGuard", () => ({+vi.mock("@/hooks/useUnsavedChangesGuard", () => ({useUnsavedChangesGuard: mocks.useUnsavedChangesGuard,}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({router: {push: mocks.routerPush,currentRoute: {@@ -39,7 +39,7 @@ vi.mock("@/react/router", () => ({},}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: {getState: () => ({instanceCountLimit: () => 10,@@ -48,11 +48,11 @@ vi.mock("@/react/stores/app", () => ({},}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: vi.fn(),}));-vi.mock("@/react/components/instance", () => ({+vi.mock("@/components/instance", () => ({InfoPanel: ({ children }: { children: React.ReactNode }) => (<div>{children}</div>),diff --git a/frontend/src/react/pages/settings/CreateInstancePage.tsx b/frontend/src/routes/workspace/CreateInstancePage.tsxsimilarity index 94%rename from frontend/src/react/pages/settings/CreateInstancePage.tsxrename to frontend/src/routes/workspace/CreateInstancePage.tsxindex 40805367ac..8d66381421 100644--- a/frontend/src/react/pages/settings/CreateInstancePage.tsx+++ b/frontend/src/routes/workspace/CreateInstancePage.tsx@@ -1,5 +1,10 @@import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";+import { router } from "@/app/router";+import {+ INSTANCE_ROUTE_DASHBOARD,+ PROJECT_V1_ROUTE_DATABASES,+} from "@/app/router/handles";import {InfoPanel,InfoPanelContent,@@ -7,16 +12,11 @@ import {InstanceFormButtons,InstanceFormProvider,useInstanceFormContext,-} from "@/react/components/instance";-import type { InfoSection } from "@/react/components/instance/info-content";-import { useUnsavedChangesGuard } from "@/react/hooks/useUnsavedChangesGuard";-import { router } from "@/react/router";-import {- INSTANCE_ROUTE_DASHBOARD,- PROJECT_V1_ROUTE_DATABASES,-} from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/components/instance";+import type { InfoSection } from "@/components/instance/info-content";+import { useUnsavedChangesGuard } from "@/hooks/useUnsavedChangesGuard";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";const MIN_DOCKED_MAIN_WIDTH = 700;const DOCKED_INFO_RAIL_WIDTH = 500;diff --git a/frontend/src/react/pages/settings/CustomApprovalPage.tsx b/frontend/src/routes/workspace/CustomApprovalPage.tsxsimilarity index 89%rename from frontend/src/react/pages/settings/CustomApprovalPage.tsxrename to frontend/src/routes/workspace/CustomApprovalPage.tsxindex 9ea25704dc..0005d3221e 100644--- a/frontend/src/react/pages/settings/CustomApprovalPage.tsx+++ b/frontend/src/routes/workspace/CustomApprovalPage.tsx@@ -1,18 +1,18 @@import { Loader2 } from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { RulesSection } from "@/react/components/CustomApproval/RulesSection";-import { APPROVAL_SOURCES } from "@/react/components/CustomApproval/utils";-import { FeatureAttention } from "@/react/components/FeatureAttention";+import { RulesSection } from "@/components/CustomApproval/RulesSection";+import { APPROVAL_SOURCES } from "@/components/CustomApproval/utils";+import { FeatureAttention } from "@/components/FeatureAttention";import {WorkspacePageInfo,WorkspacePageLayout,-} from "@/react/components/WorkspacePageLayout";-import { useAppStore } from "@/react/stores/app";+} from "@/components/WorkspacePageLayout";+import { useAppStore } from "@/stores/app";import {useWorkspaceApprovalSettingStore,type WorkspaceApprovalSettingState,-} from "@/react/stores/workspaceApprovalSetting";+} from "@/stores/workspaceApprovalSetting";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { hasWorkspacePermissionV2 } from "@/utils";diff --git a/frontend/src/react/pages/settings/DataClassificationPage.tsx b/frontend/src/routes/workspace/DataClassificationPage.tsxsimilarity index 95%rename from frontend/src/react/pages/settings/DataClassificationPage.tsxrename to frontend/src/routes/workspace/DataClassificationPage.tsxindex 837cce8ba5..f4a3a1096d 100644--- a/frontend/src/react/pages/settings/DataClassificationPage.tsx+++ b/frontend/src/routes/workspace/DataClassificationPage.tsx@@ -4,18 +4,18 @@ import { Pencil, Trash2, Undo2, X } from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";import { v4 as uuidv4 } from "uuid";-import { ClassificationTree } from "@/react/components/ClassificationTree";-import { FeatureAttention } from "@/react/components/FeatureAttention";-import { LearnMoreLink } from "@/react/components/LearnMoreLink";-import { Button } from "@/react/components/ui/button";+import { ClassificationTree } from "@/components/ClassificationTree";+import { FeatureAttention } from "@/components/FeatureAttention";+import { LearnMoreLink } from "@/components/LearnMoreLink";+import { Button } from "@/components/ui/button";import {WorkspacePageInfo,WorkspacePageLayout,WorkspacePageToolbar,-} from "@/react/components/WorkspacePageLayout";-import classificationExample from "@/react/lib/sensitive-data/classification-example.json";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/components/WorkspacePageLayout";+import classificationExample from "@/lib/sensitive-data/classification-example.json";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import type {DataClassificationSetting_DataClassificationConfig_DataClassification as DataClassification,DataClassificationSetting_DataClassificationConfig,@@ -83,9 +83,7 @@ function MonacoJSONEditor({useEffect(() => {let disposed = false;(async () => {- const { createMonacoEditor } = await import(- "@/react/components/monaco/core"- );+ const { createMonacoEditor } = await import("@/components/monaco/core");if (disposed || !containerRef.current) return;const editor = await createMonacoEditor({container: containerRef.current,diff --git a/frontend/src/react/pages/settings/DatabasesPage.test.tsx b/frontend/src/routes/workspace/DatabasesPage.test.tsxsimilarity index 91%rename from frontend/src/react/pages/settings/DatabasesPage.test.tsxrename to frontend/src/routes/workspace/DatabasesPage.test.tsxindex 4ee75900f2..762fc2bdda 100644--- a/frontend/src/react/pages/settings/DatabasesPage.test.tsx+++ b/frontend/src/routes/workspace/DatabasesPage.test.tsx@@ -23,7 +23,7 @@ vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({router: {currentRoute: {value: { query: {} },@@ -33,30 +33,30 @@ vi.mock("@/react/router", () => ({},}));-vi.mock("@/react/components/AdvancedSearch", () => ({+vi.mock("@/components/AdvancedSearch", () => ({AdvancedSearch: () => <div data-testid="advanced-search" />,getValueFromScopes: () => undefined,}));-vi.mock("@/react/components/EditEnvironmentSheet", () => ({+vi.mock("@/components/EditEnvironmentSheet", () => ({EditEnvironmentSheet: () => null,}));-vi.mock("@/react/components/EngineIcon", () => ({+vi.mock("@/components/EngineIcon", () => ({EngineIcon: () => <span data-testid="engine-icon" />,}));-vi.mock("@/react/components/EnvironmentLabel", () => ({+vi.mock("@/components/EnvironmentLabel", () => ({EnvironmentLabel: () => <span data-testid="environment-label" />,}));-vi.mock("@/react/components/PermissionGuard", () => ({+vi.mock("@/components/PermissionGuard", () => ({PermissionGuard: ({ children }: { children: React.ReactNode }) => (<>{children}</>),}));-vi.mock("@/react/components/WorkspacePageLayout", () => ({+vi.mock("@/components/WorkspacePageLayout", () => ({WorkspacePageLayout: ({ children }: { children: React.ReactNode }) => (<div>{children}</div>),@@ -65,7 +65,7 @@ vi.mock("@/react/components/WorkspacePageLayout", () => ({),}));-vi.mock("@/react/components/database", () => ({+vi.mock("@/components/database", () => ({CreateDatabaseSheet: ({ open }: { open: boolean }) => (<div data-testid="create-database-sheet" data-open={String(open)} />),@@ -86,7 +86,7 @@ vi.mock("@/react/components/database", () => ({TransferProjectSheet: () => null,}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const appState = {databasesByName: {},environmentList: [],@@ -108,7 +108,7 @@ vi.mock("@/react/stores/app", () => {return { useAppStore };});-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: vi.fn(),}));diff --git a/frontend/src/react/pages/settings/DatabasesPage.tsx b/frontend/src/routes/workspace/DatabasesPage.tsxsimilarity index 95%rename from frontend/src/react/pages/settings/DatabasesPage.tsxrename to frontend/src/routes/workspace/DatabasesPage.tsxindex 6ec2009354..b5d6a31065 100644--- a/frontend/src/react/pages/settings/DatabasesPage.tsx+++ b/frontend/src/routes/workspace/DatabasesPage.tsx@@ -9,36 +9,36 @@ import {type ScopeOption,type SearchParams,type ValueOption,-} from "@/react/components/AdvancedSearch";+} from "@/components/AdvancedSearch";import {CreateDatabaseSheet,DatabaseBatchOperationsBar,DatabaseTable,LabelEditorSheet,TransferProjectSheet,-} from "@/react/components/database";-import { EditEnvironmentSheet } from "@/react/components/EditEnvironmentSheet";-import { EngineIcon } from "@/react/components/EngineIcon";-import { EnvironmentLabel } from "@/react/components/EnvironmentLabel";-import { PermissionGuard } from "@/react/components/PermissionGuard";-import { Button } from "@/react/components/ui/button";+} from "@/components/database";+import { EditEnvironmentSheet } from "@/components/EditEnvironmentSheet";+import { EngineIcon } from "@/components/EngineIcon";+import { EnvironmentLabel } from "@/components/EnvironmentLabel";+import { PermissionGuard } from "@/components/PermissionGuard";+import { Button } from "@/components/ui/button";import {WorkspacePageLayout,WorkspacePageToolbar,-} from "@/react/components/WorkspacePageLayout";+} from "@/components/WorkspacePageLayout";import {createAdvancedSearchParser,serializeAdvancedSearch,useURLSearchParam,-} from "@/react/hooks/useURLSearchParam";-import type { DatabaseFilter } from "@/react/lib/databaseFilter";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/hooks/useURLSearchParam";+import type { DatabaseFilter } from "@/lib/databaseFilter";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import {environmentNamePrefix,instanceNamePrefix,projectNamePrefix,-} from "@/store/modules/v1/common";+} from "@/stores/modules/v1/common";import {isValidDatabaseName,UNKNOWN_ENVIRONMENT_NAME,diff --git a/frontend/src/react/pages/settings/EnvironmentsPage.tsx b/frontend/src/routes/workspace/EnvironmentsPage.tsxsimilarity index 96%rename from frontend/src/react/pages/settings/EnvironmentsPage.tsxrename to frontend/src/routes/workspace/EnvironmentsPage.tsxindex 4d401f7bbc..eb679e978a 100644--- a/frontend/src/react/pages/settings/EnvironmentsPage.tsx+++ b/frontend/src/routes/workspace/EnvironmentsPage.tsx@@ -28,20 +28,21 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";-import { EnvironmentLabel } from "@/react/components/EnvironmentLabel";-import { FeatureAttention } from "@/react/components/FeatureAttention";-import { FeatureBadge } from "@/react/components/FeatureBadge";-import { LearnMoreLink } from "@/react/components/LearnMoreLink";-import { PermissionGuard } from "@/react/components/PermissionGuard";-import { ResourceIdField } from "@/react/components/ResourceIdField";-import { RouterLink } from "@/react/components/RouterLink";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";+import { router } from "@/app/router";import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";+ WORKSPACE_ROUTE_SQL_REVIEW_CREATE,+ WORKSPACE_ROUTE_SQL_REVIEW_DETAIL,+} from "@/app/router/handles";+import { EnvironmentLabel } from "@/components/EnvironmentLabel";+import { FeatureAttention } from "@/components/FeatureAttention";+import { FeatureBadge } from "@/components/FeatureBadge";+import { LearnMoreLink } from "@/components/LearnMoreLink";+import { PermissionGuard } from "@/components/PermissionGuard";+import { ResourceIdField } from "@/components/ResourceIdField";+import { RouterLink } from "@/components/RouterLink";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";import {DropdownMenu,DropdownMenuContent,@@ -49,9 +50,9 @@ import {DropdownMenuLabel,DropdownMenuSeparator,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";-import { FormField } from "@/react/components/ui/form";-import { Input } from "@/react/components/ui/input";+} from "@/components/ui/dropdown-menu";+import { FormField } from "@/components/ui/form";+import { Input } from "@/components/ui/input";import {Sheet,SheetBody,@@ -59,28 +60,18 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { StickyActionFooter } from "@/react/components/ui/sticky-action-footer";-import {- Tabs,- TabsList,- TabsPanel,- TabsTrigger,-} from "@/react/components/ui/tabs";-import { useEnvironmentList } from "@/react/hooks/useAppState";-import { useUnsavedChangesGuard } from "@/react/hooks/useUnsavedChangesGuard";-import { displayRoleTitleFromList } from "@/react/lib/role";-import { cn } from "@/react/lib/utils";-import { router } from "@/react/router";-import {- WORKSPACE_ROUTE_SQL_REVIEW_CREATE,- WORKSPACE_ROUTE_SQL_REVIEW_DETAIL,-} from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { getEmptyRolloutPolicy } from "@/react/stores/app/policy";-import { useSQLReviewStore } from "@/react/stores/sqlReview";-import { pushNotification } from "@/store";-import { environmentNamePrefix } from "@/store/modules/v1/common";+} from "@/components/ui/sheet";+import { StickyActionFooter } from "@/components/ui/sticky-action-footer";+import { Tabs, TabsList, TabsPanel, TabsTrigger } from "@/components/ui/tabs";+import { useEnvironmentList } from "@/hooks/useAppState";+import { useUnsavedChangesGuard } from "@/hooks/useUnsavedChangesGuard";+import { displayRoleTitleFromList } from "@/lib/role";+import { cn } from "@/lib/utils";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import { getEmptyRolloutPolicy } from "@/stores/app/policy";+import { environmentNamePrefix } from "@/stores/modules/v1/common";+import { useSQLReviewStore } from "@/stores/sqlReview";import {DEFAULT_ENVIRONMENT_COLOR,formatEnvironmentName,diff --git a/frontend/src/react/pages/settings/EnvironmentsPageLayout.test.ts b/frontend/src/routes/workspace/EnvironmentsPageLayout.test.tssimilarity index 100%rename from frontend/src/react/pages/settings/EnvironmentsPageLayout.test.tsrename to frontend/src/routes/workspace/EnvironmentsPageLayout.test.tsdiff --git a/frontend/src/react/pages/settings/GeneralPage.tsx b/frontend/src/routes/workspace/GeneralPage.tsxsimilarity index 100%rename from frontend/src/react/pages/settings/GeneralPage.tsxrename to frontend/src/routes/workspace/GeneralPage.tsxdiff --git a/frontend/src/react/pages/settings/GlobalMaskingPage.test.tsx b/frontend/src/routes/workspace/GlobalMaskingPage.test.tsxsimilarity index 92%rename from frontend/src/react/pages/settings/GlobalMaskingPage.test.tsxrename to frontend/src/routes/workspace/GlobalMaskingPage.test.tsxindex 82b26ce533..9888f49f07 100644--- a/frontend/src/react/pages/settings/GlobalMaskingPage.test.tsx+++ b/frontend/src/routes/workspace/GlobalMaskingPage.test.tsx@@ -7,7 +7,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }).IS_REACT_ACT_ENVIRONMENT = true;-vi.mock("@/plugins/cel", () => ({+vi.mock("@/modules/cel", () => ({buildCELExpr: vi.fn(),emptySimpleExpr: () => ({}),resolveCELExpr: () => ({}),@@ -15,15 +15,15 @@ vi.mock("@/plugins/cel", () => ({wrapAsGroup: (expr: unknown) => expr,}));-vi.mock("@/react/components/ExprEditor", () => ({+vi.mock("@/components/ExprEditor", () => ({ExprEditor: () => createElement("div", { "data-testid": "expr-editor" }),}));-vi.mock("@/react/components/FeatureAttention", () => ({+vi.mock("@/components/FeatureAttention", () => ({FeatureAttention: () => null,}));-vi.mock("@/react/components/ui/alert", () => ({+vi.mock("@/components/ui/alert", () => ({Alert: ({children,description,@@ -33,7 +33,7 @@ vi.mock("@/react/components/ui/alert", () => ({}) => createElement("div", {}, description, children),}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,disabled,@@ -45,12 +45,12 @@ vi.mock("@/react/components/ui/button", () => ({}) => createElement("button", { disabled, onClick }, children),}));-vi.mock("@/react/components/ui/input", () => ({+vi.mock("@/components/ui/input", () => ({Input: (props: InputHTMLAttributes<HTMLInputElement>) =>createElement("input", props),}));-vi.mock("@/react/components/ui/select", () => ({+vi.mock("@/components/ui/select", () => ({Select: ({ children }: { children: ReactNode }) =>createElement("div", {}, children),SelectContent: ({ children }: { children: ReactNode }) =>@@ -73,12 +73,12 @@ vi.mock("@/react/components/ui/select", () => ({createElement("span", {}, typeof children === "function" ? null : children),}));-vi.mock("@/react/lib/sensitive-data/components-utils", () => ({+vi.mock("@/lib/sensitive-data/components-utils", () => ({factorOperatorOverrideMap: {},getClassificationLevelOptions: () => [],}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const state = {environmentList: [],getOrFetchPolicyByParentAndType: vi.fn(async () => ({@@ -117,7 +117,7 @@ vi.mock("@/react/stores/app", () => {return { useAppStore };});-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: vi.fn(),}));diff --git a/frontend/src/react/pages/settings/GlobalMaskingPage.tsx b/frontend/src/routes/workspace/GlobalMaskingPage.tsxsimilarity index 97%rename from frontend/src/react/pages/settings/GlobalMaskingPage.tsxrename to frontend/src/routes/workspace/GlobalMaskingPage.tsxindex 2b02c6d958..13cb9775a2 100644--- a/frontend/src/react/pages/settings/GlobalMaskingPage.tsx+++ b/frontend/src/routes/workspace/GlobalMaskingPage.tsx@@ -10,37 +10,37 @@ import {import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";import { v4 as uuidv4 } from "uuid";-import type { ConditionGroupExpr, Factor, SimpleExpr } from "@/plugins/cel";-import {- buildCELExpr,- emptySimpleExpr,- resolveCELExpr,- validateSimpleExpr,- wrapAsGroup,-} from "@/plugins/cel";-import { ExprEditor, type OptionConfig } from "@/react/components/ExprEditor";-import { FeatureAttention } from "@/react/components/FeatureAttention";-import { LearnMoreLink } from "@/react/components/LearnMoreLink";-import { Button } from "@/react/components/ui/button";-import { Input } from "@/react/components/ui/input";+import { ExprEditor, type OptionConfig } from "@/components/ExprEditor";+import { FeatureAttention } from "@/components/FeatureAttention";+import { LearnMoreLink } from "@/components/LearnMoreLink";+import { Button } from "@/components/ui/button";+import { Input } from "@/components/ui/input";import {Select,SelectContent,SelectItem,SelectTrigger,SelectValue,-} from "@/react/components/ui/select";+} from "@/components/ui/select";import {WorkspacePageInfo,WorkspacePageLayout,WorkspacePageToolbar,-} from "@/react/components/WorkspacePageLayout";+} from "@/components/WorkspacePageLayout";import {factorOperatorOverrideMap,getClassificationLevelOptions,-} from "@/react/lib/sensitive-data/components-utils";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/lib/sensitive-data/components-utils";+import type { ConditionGroupExpr, Factor, SimpleExpr } from "@/modules/cel";+import {+ buildCELExpr,+ emptySimpleExpr,+ resolveCELExpr,+ validateSimpleExpr,+ wrapAsGroup,+} from "@/modules/cel";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import { ExprSchema } from "@/types/proto-es/google/type/expr_pb";import type {MaskingRulePolicy_MaskingRule,diff --git a/frontend/src/react/pages/settings/GroupsPage.test.tsx b/frontend/src/routes/workspace/GroupsPage.test.tsxsimilarity index 93%rename from frontend/src/react/pages/settings/GroupsPage.test.tsxrename to frontend/src/routes/workspace/GroupsPage.test.tsxindex 4e01b963e7..83d8dd4d46 100644--- a/frontend/src/react/pages/settings/GroupsPage.test.tsx+++ b/frontend/src/routes/workspace/GroupsPage.test.tsx@@ -9,7 +9,7 @@ import type {import { act, createElement } from "react";import { createRoot } from "react-dom/client";import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";-import { nativeChange } from "@/react/test-utils/nativeChange";+import { nativeChange } from "@/test-utils/nativeChange";(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }@@ -34,12 +34,12 @@ const mocks = vi.hoisted(() => ({const pageDir = dirname(fileURLToPath(import.meta.url));-vi.mock("@/react/components/ComponentPermissionGuard", () => ({+vi.mock("@/components/ComponentPermissionGuard", () => ({ComponentPermissionGuard: ({ children }: { children: ReactNode }) =>createElement("div", {}, children),}));-vi.mock("@/react/components/FeatureBadge", () => ({+vi.mock("@/components/FeatureBadge", () => ({FeatureBadge: ({fallback,}: {@@ -49,17 +49,17 @@ vi.mock("@/react/components/FeatureBadge", () => ({}) => createElement("span", {}, fallback),}));-vi.mock("@/react/components/HighlightLabelText", () => ({+vi.mock("@/components/HighlightLabelText", () => ({HighlightLabelText: ({ text }: { text: string }) =>createElement("span", {}, text),}));-vi.mock("@/react/components/UserCell", () => ({+vi.mock("@/components/UserCell", () => ({UserCell: ({ user }: { user?: { email?: string } }) =>createElement("span", {}, user?.email ?? ""),}));-vi.mock("@/react/components/UserSelect", () => ({+vi.mock("@/components/UserSelect", () => ({UserSelect: ({disabled,onChange,@@ -78,7 +78,7 @@ vi.mock("@/react/components/UserSelect", () => ({}),}));-vi.mock("@/react/components/ui/alert", () => ({+vi.mock("@/components/ui/alert", () => ({Alert: ({children,description,@@ -88,7 +88,7 @@ vi.mock("@/react/components/ui/alert", () => ({}) => createElement("div", {}, description, children),}));-vi.mock("@/react/components/ui/alert-dialog", () => ({+vi.mock("@/components/ui/alert-dialog", () => ({AlertDialog: ({children,open,@@ -108,12 +108,12 @@ vi.mock("@/react/components/ui/alert-dialog", () => ({createElement("h3", {}, children),}));-vi.mock("@/react/components/ui/badge", () => ({+vi.mock("@/components/ui/badge", () => ({Badge: ({ children }: { children?: ReactNode }) =>createElement("span", {}, children),}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,disabled,@@ -126,17 +126,17 @@ vi.mock("@/react/components/ui/button", () => ({}) => createElement("button", { disabled, onClick }, children),}));-vi.mock("@/react/components/ui/input", () => ({+vi.mock("@/components/ui/input", () => ({Input: (props: InputHTMLAttributes<HTMLInputElement>) =>createElement("input", props),}));-vi.mock("@/react/components/ui/search-input", () => ({+vi.mock("@/components/ui/search-input", () => ({SearchInput: (props: InputHTMLAttributes<HTMLInputElement>) =>createElement("input", props),}));-vi.mock("@/react/components/ui/select", () => ({+vi.mock("@/components/ui/select", () => ({Select: ({children,disabled,@@ -156,7 +156,7 @@ vi.mock("@/react/components/ui/select", () => ({createElement("span", {}, typeof children === "function" ? null : children),}));-vi.mock("@/react/components/ui/sheet", () => ({+vi.mock("@/components/ui/sheet", () => ({Sheet: ({ children, open }: { children: ReactNode; open: boolean }) =>open ? createElement("div", { "data-testid": "sheet" }, children) : null,SheetBody: ({ children }: { children: ReactNode }) =>@@ -171,7 +171,7 @@ vi.mock("@/react/components/ui/sheet", () => ({createElement("h2", {}, children),}));-vi.mock("@/react/components/ui/table", () => ({+vi.mock("@/components/ui/table", () => ({Table: ({ children }: { children: ReactNode }) =>createElement("table", {}, children),TableBody: ({ children }: { children: ReactNode }) =>@@ -186,19 +186,19 @@ vi.mock("@/react/components/ui/table", () => ({createElement("tr", {}, children),}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: ({ children }: { children: ReactNode }) =>createElement("span", {}, children),}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useCurrentUser: () => ({email: "[email protected]",name: "users/[email protected]",}),}));-vi.mock("@/react/hooks/usePagedData", () => ({+vi.mock("@/hooks/usePagedData", () => ({PagedTableFooter: () => null,usePagedData: () => ({dataList: [],@@ -214,7 +214,7 @@ vi.mock("@/react/hooks/usePagedData", () => ({}),}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({SETTING_ROUTE_WORKSPACE_GENERAL: "workspace-general",router: {afterEach: () => vi.fn(),@@ -229,11 +229,11 @@ vi.mock("@/react/router", () => ({},}));-vi.mock("@/react/router/handles", () => ({+vi.mock("@/app/router/handles", () => ({SETTING_ROUTE_WORKSPACE_GENERAL: "workspace-general",}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const storeState = {batchGetOrFetchUsers: vi.fn(async () => []),createGroup: vi.fn(),@@ -252,11 +252,11 @@ vi.mock("@/react/stores/app", () => {return { useAppStore };});-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: vi.fn(),}));-vi.mock("@/store/modules/v1/common", () => ({+vi.mock("@/stores/modules/v1/common", () => ({extractUserEmail: (name: string) => name.replace(/^users\//, ""),groupNamePrefix: "groups/",}));diff --git a/frontend/src/react/pages/settings/GroupsPage.tsx b/frontend/src/routes/workspace/GroupsPage.tsxsimilarity index 96%rename from frontend/src/react/pages/settings/GroupsPage.tsxrename to frontend/src/routes/workspace/GroupsPage.tsxindex 82d5e1489f..b8029e7b32 100644--- a/frontend/src/react/pages/settings/GroupsPage.tsx+++ b/frontend/src/routes/workspace/GroupsPage.tsx@@ -10,35 +10,34 @@ import {} from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { ComponentPermissionGuard } from "@/react/components/ComponentPermissionGuard";-import { FeatureBadge } from "@/react/components/FeatureBadge";-import { HighlightLabelText } from "@/react/components/HighlightLabelText";-import { RouterLink } from "@/react/components/RouterLink";-import { UserCell } from "@/react/components/UserCell";-import { UserSelect } from "@/react/components/UserSelect";-import { Alert } from "@/react/components/ui/alert";+import type { NavigationHistoryAction } from "@/app/router";+import { router } from "@/app/router";+import { SETTING_ROUTE_WORKSPACE_GENERAL } from "@/app/router/handles";+import { ComponentPermissionGuard } from "@/components/ComponentPermissionGuard";+import { FeatureBadge } from "@/components/FeatureBadge";+import { HighlightLabelText } from "@/components/HighlightLabelText";+import { RouterLink } from "@/components/RouterLink";+import { UserCell } from "@/components/UserCell";+import { UserSelect } from "@/components/UserSelect";+import { Alert } from "@/components/ui/alert";import {AlertDialog,AlertDialogContent,AlertDialogFooter,AlertDialogTitle,-} from "@/react/components/ui/alert-dialog";-import { Badge } from "@/react/components/ui/badge";-import { Button } from "@/react/components/ui/button";-import {- FormError,- FormField,- FormFieldGroup,-} from "@/react/components/ui/form";-import { Input } from "@/react/components/ui/input";-import { SearchInput } from "@/react/components/ui/search-input";+} from "@/components/ui/alert-dialog";+import { Badge } from "@/components/ui/badge";+import { Button } from "@/components/ui/button";+import { FormError, FormField, FormFieldGroup } from "@/components/ui/form";+import { Input } from "@/components/ui/input";+import { SearchInput } from "@/components/ui/search-input";import {Select,SelectContent,SelectItem,SelectTrigger,SelectValue,-} from "@/react/components/ui/select";+} from "@/components/ui/select";import {Sheet,SheetBody,@@ -46,8 +45,8 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { listRowStateClassName } from "@/react/components/ui/styles.stylex";+} from "@/components/ui/sheet";+import { listRowStateClassName } from "@/components/ui/styles.stylex";import {Table,TableBody,@@ -55,26 +54,23 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { Tooltip } from "@/react/components/ui/tooltip";+} from "@/components/ui/table";+import { Tooltip } from "@/components/ui/tooltip";import {WorkspacePageFooter,WorkspacePageLayout,WorkspacePageToolbar,-} from "@/react/components/WorkspacePageLayout";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { PagedTableFooter, usePagedData } from "@/react/hooks/usePagedData";+} from "@/components/WorkspacePageLayout";+import { useCurrentUser } from "@/hooks/useAppState";+import { PagedTableFooter, usePagedData } from "@/hooks/usePagedData";import {DOMAIN_RESTRICTION_PRODUCT_INTRO,PRODUCT_INTRO_QUERY_KEY,-} from "@/react/lib/productIntro";-import { cn } from "@/react/lib/utils";-import type { NavigationHistoryAction } from "@/react/router";-import { router } from "@/react/router";-import { SETTING_ROUTE_WORKSPACE_GENERAL } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";-import { extractUserEmail, groupNamePrefix } from "@/store/modules/v1/common";+} from "@/lib/productIntro";+import { cn } from "@/lib/utils";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import { extractUserEmail, groupNamePrefix } from "@/stores/modules/v1/common";import { UNKNOWN_USER_NAME } from "@/types";import type { Group, GroupMember } from "@/types/proto-es/v1/group_service_pb";import {diff --git a/frontend/src/react/pages/settings/IDPDetailPage.tsx b/frontend/src/routes/workspace/IDPDetailPage.tsxsimilarity index 98%rename from frontend/src/react/pages/settings/IDPDetailPage.tsxrename to frontend/src/routes/workspace/IDPDetailPage.tsxindex 6d28be3adb..cb56452367 100644--- a/frontend/src/react/pages/settings/IDPDetailPage.tsx+++ b/frontend/src/routes/workspace/IDPDetailPage.tsx@@ -4,37 +4,33 @@ import { cloneDeep, isEqual } from "lodash-es";import { ArrowRight, Database, Info, Key, ShieldCheck } from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { identityProviderServiceClientConnect } from "@/connect";-import { LearnMoreLink } from "@/react/components/LearnMoreLink";-import { PermissionGuard } from "@/react/components/PermissionGuard";-import { ResourceIdField } from "@/react/components/ResourceIdField";+import { identityProviderServiceClientConnect } from "@/api";+import { router, useCurrentRoute } from "@/app/router";+import { WORKSPACE_ROUTE_IDENTITY_PROVIDERS } from "@/app/router/handles";+import { LearnMoreLink } from "@/components/LearnMoreLink";+import { PermissionGuard } from "@/components/PermissionGuard";+import { ResourceIdField } from "@/components/ResourceIdField";import {AlertDialog,AlertDialogContent,AlertDialogDescription,AlertDialogTitle,-} from "@/react/components/ui/alert-dialog";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";-import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";-import { Input } from "@/react/components/ui/input";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";+} from "@/components/ui/alert-dialog";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";+import { Input } from "@/components/ui/input";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";import {WorkspacePageInfo,WorkspacePageLayout,-} from "@/react/components/WorkspacePageLayout";-import { router, useCurrentRoute } from "@/react/router";-import { WORKSPACE_ROUTE_IDENTITY_PROVIDERS } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/components/WorkspacePageLayout";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import {getIdentityProviderResourceId,idpNamePrefix,-} from "@/store/modules/v1/common";+} from "@/stores/modules/v1/common";import type { OAuthWindowEventPayload } from "@/types";import type {IdentityProvider,diff --git a/frontend/src/react/pages/settings/IDPsPage.tsx b/frontend/src/routes/workspace/IDPsPage.tsxsimilarity index 98%rename from frontend/src/react/pages/settings/IDPsPage.tsxrename to frontend/src/routes/workspace/IDPsPage.tsxindex 48adc7644c..1fa279d43f 100644--- a/frontend/src/react/pages/settings/IDPsPage.tsx+++ b/frontend/src/routes/workspace/IDPsPage.tsx@@ -14,29 +14,23 @@ import {} from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { identityProviderServiceClientConnect } from "@/connect";-import { FeatureAttention } from "@/react/components/FeatureAttention";-import { FeatureBadge } from "@/react/components/FeatureBadge";-import { LearnMoreLink } from "@/react/components/LearnMoreLink";-import { PermissionGuard } from "@/react/components/PermissionGuard";+import { identityProviderServiceClientConnect } from "@/api";+import { router } from "@/app/router";+import { WORKSPACE_ROUTE_IDENTITY_PROVIDER_DETAIL } from "@/app/router/handles";+import { FeatureAttention } from "@/components/FeatureAttention";+import { FeatureBadge } from "@/components/FeatureBadge";+import { LearnMoreLink } from "@/components/LearnMoreLink";+import { PermissionGuard } from "@/components/PermissionGuard";import {ResourceIdField,type ResourceIdFieldRef,-} from "@/react/components/ResourceIdField";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";-import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";-import {- FormField,- FormFieldGroup,- FormTitle,-} from "@/react/components/ui/form";-import { Input } from "@/react/components/ui/input";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";+} from "@/components/ResourceIdField";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";+import { FormField, FormFieldGroup, FormTitle } from "@/components/ui/form";+import { Input } from "@/components/ui/input";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";import {Sheet,SheetBody,@@ -44,7 +38,7 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";+} from "@/components/ui/sheet";import {Table,TableBody,@@ -52,22 +46,20 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";+} from "@/components/ui/table";import {WorkspacePageInfo,WorkspacePageLayout,WorkspacePageToolbar,-} from "@/react/components/WorkspacePageLayout";-import { useIdentityProviderList } from "@/react/hooks/useAppState";-import { writeTextToClipboard } from "@/react/lib/clipboard";-import { router } from "@/react/router";-import { WORKSPACE_ROUTE_IDENTITY_PROVIDER_DETAIL } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/components/WorkspacePageLayout";+import { useIdentityProviderList } from "@/hooks/useAppState";+import { writeTextToClipboard } from "@/lib/clipboard";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import {getIdentityProviderResourceId,idpNamePrefix,-} from "@/store/modules/v1/common";+} from "@/stores/modules/v1/common";import type { OAuthWindowEventPayload } from "@/types";import type {IdentityProvider,diff --git a/frontend/src/react/pages/settings/IDPsPageLayout.test.ts b/frontend/src/routes/workspace/IDPsPageLayout.test.tssimilarity index 100%rename from frontend/src/react/pages/settings/IDPsPageLayout.test.tsrename to frontend/src/routes/workspace/IDPsPageLayout.test.tsdiff --git a/frontend/src/react/pages/settings/IMPage.test.tsx b/frontend/src/routes/workspace/IMPage.test.tsxsimilarity index 96%rename from frontend/src/react/pages/settings/IMPage.test.tsxrename to frontend/src/routes/workspace/IMPage.test.tsxindex da6e7eaf3b..e3ace0d1dc 100644--- a/frontend/src/react/pages/settings/IMPage.test.tsx+++ b/frontend/src/routes/workspace/IMPage.test.tsx@@ -40,11 +40,11 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/components/PermissionGuard", () => ({+vi.mock("@/components/PermissionGuard", () => ({PermissionGuard: ({ children }: { children: ReactElement }) => children,}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const useAppStore = <T,>(selector: (state: { settingsByName: typeof mocks.settingsByName }) => T) =>@@ -59,7 +59,7 @@ vi.mock("@/react/stores/app", () => {return { useAppStore };});-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: vi.fn(),}));diff --git a/frontend/src/react/pages/settings/IMPage.tsx b/frontend/src/routes/workspace/IMPage.tsxsimilarity index 97%rename from frontend/src/react/pages/settings/IMPage.tsxrename to frontend/src/routes/workspace/IMPage.tsxindex 38c72f8c73..b8cd49f8cc 100644--- a/frontend/src/react/pages/settings/IMPage.tsx+++ b/frontend/src/routes/workspace/IMPage.tsx@@ -15,24 +15,24 @@ import feishuIcon from "@/assets/im/feishu.webp";import slackIcon from "@/assets/im/slack.png";import teamsIcon from "@/assets/im/teams.svg";import wecomIcon from "@/assets/im/wecom.png";-import { LearnMoreLink } from "@/react/components/LearnMoreLink";-import { PermissionGuard } from "@/react/components/PermissionGuard";-import { Button } from "@/react/components/ui/button";-import { FormField, FormFieldGroup } from "@/react/components/ui/form";-import { Input } from "@/react/components/ui/input";+import { LearnMoreLink } from "@/components/LearnMoreLink";+import { PermissionGuard } from "@/components/PermissionGuard";+import { Button } from "@/components/ui/button";+import { FormField, FormFieldGroup } from "@/components/ui/form";+import { Input } from "@/components/ui/input";import {Select,SelectContent,SelectItem,SelectTrigger,SelectValue,-} from "@/react/components/ui/select";+} from "@/components/ui/select";import {WorkspacePageInfo,WorkspacePageLayout,-} from "@/react/components/WorkspacePageLayout";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/components/WorkspacePageLayout";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import { WebhookType } from "@/types/proto-es/v1/common_pb";import {AppIMSetting_DingTalkSchema,diff --git a/frontend/src/react/pages/settings/InstanceDatabaseRedirectPage.tsx b/frontend/src/routes/workspace/InstanceDatabaseRedirectPage.tsxsimilarity index 88%rename from frontend/src/react/pages/settings/InstanceDatabaseRedirectPage.tsxrename to frontend/src/routes/workspace/InstanceDatabaseRedirectPage.tsxindex 56c79227fd..d482d220ed 100644--- a/frontend/src/react/pages/settings/InstanceDatabaseRedirectPage.tsx+++ b/frontend/src/routes/workspace/InstanceDatabaseRedirectPage.tsx@@ -1,17 +1,17 @@import { useEffect } from "react";+import { router } from "@/app/router";+import {+ INSTANCE_ROUTE_DETAIL,+ PROJECT_V1_ROUTE_DATABASE_DETAIL,+} from "@/app/router/handles";import {databaseNamePrefix,getProjectName,instanceNamePrefix,isValidProjectName,-} from "@/react/lib/resourceName";-import { router } from "@/react/router";-import {- INSTANCE_ROUTE_DETAIL,- PROJECT_V1_ROUTE_DATABASE_DETAIL,-} from "@/react/router/handles";-import { getOrFetchDatabaseByName } from "@/react/stores/app/databaseAccess";-import { pushNotification } from "@/store";+} from "@/lib/resourceName";+import { pushNotification } from "@/stores";+import { getOrFetchDatabaseByName } from "@/stores/app/databaseAccess";export function InstanceDatabaseRedirectPage({instanceId,diff --git a/frontend/src/react/pages/settings/InstanceDetailPage.tsx b/frontend/src/routes/workspace/InstanceDetailPage.tsxsimilarity index 95%rename from frontend/src/react/pages/settings/InstanceDetailPage.tsxrename to frontend/src/routes/workspace/InstanceDetailPage.tsxindex 2742c5a6eb..938d722e7d 100644--- a/frontend/src/react/pages/settings/InstanceDetailPage.tsx+++ b/frontend/src/routes/workspace/InstanceDetailPage.tsx@@ -9,16 +9,16 @@ import {type ScopeOption,type SearchParams,type ValueOption,-} from "@/react/components/AdvancedSearch";+} from "@/components/AdvancedSearch";import {DatabaseBatchOperationsBar,DatabaseTable,LabelEditorSheet,TransferProjectSheet,-} from "@/react/components/database";-import { EditEnvironmentSheet } from "@/react/components/EditEnvironmentSheet";-import { EngineIcon } from "@/react/components/EngineIcon";-import { EnvironmentLabel } from "@/react/components/EnvironmentLabel";+} from "@/components/database";+import { EditEnvironmentSheet } from "@/components/EditEnvironmentSheet";+import { EngineIcon } from "@/components/EngineIcon";+import { EnvironmentLabel } from "@/components/EnvironmentLabel";import {InstanceActionDropdown,InstanceFormBody,@@ -27,23 +27,18 @@ import {InstanceRoleTable,InstanceSyncButton,useInstanceFormContext,-} from "@/react/components/instance";-import { Alert } from "@/react/components/ui/alert";-import {- Tabs,- TabsList,- TabsPanel,- TabsTrigger,-} from "@/react/components/ui/tabs";-import { useUnsavedChangesGuard } from "@/react/hooks/useUnsavedChangesGuard";-import type { DatabaseFilter } from "@/react/lib/databaseFilter";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/components/instance";+import { Alert } from "@/components/ui/alert";+import { Tabs, TabsList, TabsPanel, TabsTrigger } from "@/components/ui/tabs";+import { useUnsavedChangesGuard } from "@/hooks/useUnsavedChangesGuard";+import type { DatabaseFilter } from "@/lib/databaseFilter";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import {environmentNamePrefix,instanceNamePrefix,projectNamePrefix,-} from "@/store/modules/v1/common";+} from "@/stores/modules/v1/common";import {isValidDatabaseName,UNKNOWN_ENVIRONMENT_NAME,diff --git a/frontend/src/react/pages/settings/InstancesPage.tsx b/frontend/src/routes/workspace/InstancesPage.tsxsimilarity index 95%rename from frontend/src/react/pages/settings/InstancesPage.tsxrename to frontend/src/routes/workspace/InstancesPage.tsxindex 0885ffa5ab..d111492e65 100644--- a/frontend/src/react/pages/settings/InstancesPage.tsx+++ b/frontend/src/routes/workspace/InstancesPage.tsx@@ -11,39 +11,42 @@ import {} from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";+import { router, useCurrentRoute } from "@/app/router";+import { INSTANCE_ROUTE_CREATE } from "@/app/router/handles";+import { useScrollRestorationLoadMore } from "@/app/router/NavigationScrollRestoration";import {AdvancedSearch,getValueFromScopes,type ScopeOption,type SearchParams,-} from "@/react/components/AdvancedSearch";-import { EngineIcon } from "@/react/components/EngineIcon";-import { EnvironmentLabel } from "@/react/components/EnvironmentLabel";-import { InstanceAssignmentSheet } from "@/react/components/InstanceAssignmentSheet";-import { InstanceDeleteDialog } from "@/react/components/instance";-import { PermissionGuard } from "@/react/components/PermissionGuard";+} from "@/components/AdvancedSearch";+import { EngineIcon } from "@/components/EngineIcon";+import { EnvironmentLabel } from "@/components/EnvironmentLabel";+import { InstanceAssignmentSheet } from "@/components/InstanceAssignmentSheet";+import { InstanceDeleteDialog } from "@/components/instance";+import { PermissionGuard } from "@/components/PermissionGuard";import {type SelectionAction,SelectionActionBar,-} from "@/react/components/SelectionActionBar";-import { Alert } from "@/react/components/ui/alert";+} from "@/components/SelectionActionBar";+import { Alert } from "@/components/ui/alert";import {AlertDialog,AlertDialogContent,AlertDialogDescription,AlertDialogTitle,-} from "@/react/components/ui/alert-dialog";-import { Badge } from "@/react/components/ui/badge";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";+} from "@/components/ui/alert-dialog";+import { Badge } from "@/components/ui/badge";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";-import { EllipsisText } from "@/react/components/ui/ellipsis-text";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";+} from "@/components/ui/dropdown-menu";+import { EllipsisText } from "@/components/ui/ellipsis-text";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";import {Sheet,SheetBody,@@ -51,7 +54,7 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";+} from "@/components/ui/sheet";import {Table,TableBody,@@ -59,32 +62,29 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";+} from "@/components/ui/table";import {WorkspacePageContent,WorkspacePageFooter,WorkspacePageLayout,WorkspacePageToolbar,-} from "@/react/components/WorkspacePageLayout";-import { useColumnWidths } from "@/react/hooks/useColumnWidths";-import { PagedTableFooter } from "@/react/hooks/usePagedData";+} from "@/components/WorkspacePageLayout";+import { useColumnWidths } from "@/hooks/useColumnWidths";+import { PagedTableFooter } from "@/hooks/usePagedData";import {getPageSizeOptions,useSessionPageSize,-} from "@/react/hooks/useSessionPageSize";+} from "@/hooks/useSessionPageSize";import {createAdvancedSearchParser,serializeAdvancedSearch,useURLSearchParam,-} from "@/react/hooks/useURLSearchParam";-import { cn } from "@/react/lib/utils";-import { router, useCurrentRoute } from "@/react/router";-import { INSTANCE_ROUTE_CREATE } from "@/react/router/handles";-import { useScrollRestorationLoadMore } from "@/react/router/NavigationScrollRestoration";-import { useAppStore } from "@/react/stores/app";-import type { InstanceFilter } from "@/react/stores/app/types";-import { pushNotification } from "@/store";-import { environmentNamePrefix } from "@/store/modules/v1/common";+} from "@/hooks/useURLSearchParam";+import { cn } from "@/lib/utils";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import type { InstanceFilter } from "@/stores/app/types";+import { environmentNamePrefix } from "@/stores/modules/v1/common";import {DEFAULT_ENVIRONMENT_COLOR,isValidInstanceName,diff --git a/frontend/src/react/pages/settings/LandingPage.navigation.test.ts b/frontend/src/routes/workspace/LandingPage.navigation.test.tssimilarity index 100%rename from frontend/src/react/pages/settings/LandingPage.navigation.test.tsrename to frontend/src/routes/workspace/LandingPage.navigation.test.tsdiff --git a/frontend/src/react/pages/settings/LandingPage.tsx b/frontend/src/routes/workspace/LandingPage.tsxsimilarity index 96%rename from frontend/src/react/pages/settings/LandingPage.tsxrename to frontend/src/routes/workspace/LandingPage.tsxindex b5a64991b4..25b8332bd6 100644--- a/frontend/src/react/pages/settings/LandingPage.tsx+++ b/frontend/src/routes/workspace/LandingPage.tsx@@ -21,21 +21,7 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";-import { RouterLink } from "@/react/components/RouterLink";-import { Checkbox } from "@/react/components/ui/checkbox";-import {- Sheet,- SheetBody,- SheetContent,- SheetHeader,- SheetTitle,-} from "@/react/components/ui/sheet";-import {- useOptionalCurrentUser,- useServerState,-} from "@/react/hooks/useAppState";-import { useRecentVisit } from "@/react/hooks/useRecentVisit";-import { router } from "@/react/router";+import { router } from "@/app/router";import {DATABASE_ROUTE_DASHBOARD,ENVIRONMENT_V1_ROUTE_DASHBOARD,@@ -59,9 +45,20 @@ import {WORKSPACE_ROUTE_SQL_REVIEW,WORKSPACE_ROUTE_USERS,WORKSPACE_ROUTE_WORKLOAD_IDENTITIES,-} from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { projectNamePrefix } from "@/store/modules/v1/common";+} from "@/app/router/handles";+import { RouterLink } from "@/components/RouterLink";+import { Checkbox } from "@/components/ui/checkbox";+import {+ Sheet,+ SheetBody,+ SheetContent,+ SheetHeader,+ SheetTitle,+} from "@/components/ui/sheet";+import { useOptionalCurrentUser, useServerState } from "@/hooks/useAppState";+import { useRecentVisit } from "@/hooks/useRecentVisit";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";import { UNKNOWN_PROJECT_NAME } from "@/types";import type { Project } from "@/types/proto-es/v1/project_service_pb";import { extractProjectResourceName, storageKeyQuickAccess } from "@/utils";diff --git a/frontend/src/react/pages/settings/LearnMoreLinkLayout.test.ts b/frontend/src/routes/workspace/LearnMoreLinkLayout.test.tssimilarity index 100%rename from frontend/src/react/pages/settings/LearnMoreLinkLayout.test.tsrename to frontend/src/routes/workspace/LearnMoreLinkLayout.test.tsdiff --git a/frontend/src/react/pages/settings/MCPPage.test.ts b/frontend/src/routes/workspace/MCPPage.test.tssimilarity index 100%rename from frontend/src/react/pages/settings/MCPPage.test.tsrename to frontend/src/routes/workspace/MCPPage.test.tsdiff --git a/frontend/src/react/pages/settings/MCPPage.tsx b/frontend/src/routes/workspace/MCPPage.tsxsimilarity index 91%rename from frontend/src/react/pages/settings/MCPPage.tsxrename to frontend/src/routes/workspace/MCPPage.tsxindex b84a308182..0a27f27bc8 100644--- a/frontend/src/react/pages/settings/MCPPage.tsx+++ b/frontend/src/routes/workspace/MCPPage.tsx@@ -1,17 +1,12 @@import { useMemo } from "react";import { useTranslation } from "react-i18next";-import { ExternalUrlAlert } from "@/react/components/ExternalUrlAlert";-import { Alert } from "@/react/components/ui/alert";-import { CopyButton } from "@/react/components/ui/copy-button";-import { Input } from "@/react/components/ui/input";-import {- Tabs,- TabsList,- TabsPanel,- TabsTrigger,-} from "@/react/components/ui/tabs";-import { Textarea } from "@/react/components/ui/textarea";-import { useServerState } from "@/react/hooks/useAppState";+import { ExternalUrlAlert } from "@/components/ExternalUrlAlert";+import { Alert } from "@/components/ui/alert";+import { CopyButton } from "@/components/ui/copy-button";+import { Input } from "@/components/ui/input";+import { Tabs, TabsList, TabsPanel, TabsTrigger } from "@/components/ui/tabs";+import { Textarea } from "@/components/ui/textarea";+import { useServerState } from "@/hooks/useAppState";export function MCPPage() {const { t } = useTranslation();diff --git a/frontend/src/react/pages/settings/MemberBindingEnvironmentBanner.test.tsx b/frontend/src/routes/workspace/MemberBindingEnvironmentBanner.test.tsxsimilarity index 97%rename from frontend/src/react/pages/settings/MemberBindingEnvironmentBanner.test.tsxrename to frontend/src/routes/workspace/MemberBindingEnvironmentBanner.test.tsxindex 3dd8b68f94..21b55f86e5 100644--- a/frontend/src/react/pages/settings/MemberBindingEnvironmentBanner.test.tsx+++ b/frontend/src/routes/workspace/MemberBindingEnvironmentBanner.test.tsx@@ -12,7 +12,7 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/components/EnvironmentLabel", () => ({+vi.mock("@/components/EnvironmentLabel", () => ({EnvironmentLabel: ({environmentName,className,diff --git a/frontend/src/react/pages/settings/MemberBindingEnvironmentBanner.tsx b/frontend/src/routes/workspace/MemberBindingEnvironmentBanner.tsxsimilarity index 80%rename from frontend/src/react/pages/settings/MemberBindingEnvironmentBanner.tsxrename to frontend/src/routes/workspace/MemberBindingEnvironmentBanner.tsxindex e636106d2e..95843f15e8 100644--- a/frontend/src/react/pages/settings/MemberBindingEnvironmentBanner.tsx+++ b/frontend/src/routes/workspace/MemberBindingEnvironmentBanner.tsx@@ -1,6 +1,6 @@-import { EnvironmentLabel } from "@/react/components/EnvironmentLabel";-import { DDLWarningCallout } from "@/react/components/role-grant/DDLWarningCallout";-import type { EnvLimitationKind } from "@/react/lib/project-member/utils";+import { EnvironmentLabel } from "@/components/EnvironmentLabel";+import { DDLWarningCallout } from "@/components/role-grant/DDLWarningCallout";+import type { EnvLimitationKind } from "@/lib/project-member/utils";import type { ProjectRoleBindingEnvironmentLimitationState } from "./membersPageEnvironment";export function MemberBindingEnvironmentBanner({diff --git a/frontend/src/react/pages/settings/MemberDatabaseResourceName.test.tsx b/frontend/src/routes/workspace/MemberDatabaseResourceName.test.tsxsimilarity index 97%rename from frontend/src/react/pages/settings/MemberDatabaseResourceName.test.tsxrename to frontend/src/routes/workspace/MemberDatabaseResourceName.test.tsxindex 655a6868de..3100c474f0 100644--- a/frontend/src/react/pages/settings/MemberDatabaseResourceName.test.tsx+++ b/frontend/src/routes/workspace/MemberDatabaseResourceName.test.tsx@@ -8,7 +8,7 @@ const mocks = vi.hoisted(() => ({instancesByName: {} as Record<string, unknown>,}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: <T,>(selector: (state: {databasesByName: Record<string, unknown>;@@ -21,7 +21,7 @@ vi.mock("@/react/stores/app", () => ({}),}));-vi.mock("@/react/components/EngineIcon", () => ({+vi.mock("@/components/EngineIcon", () => ({EngineIcon: ({ engine }: { engine: string }) => (<span data-testid="engine-icon">{engine}</span>),diff --git a/frontend/src/react/pages/settings/MemberDatabaseResourceName.tsx b/frontend/src/routes/workspace/MemberDatabaseResourceName.tsxsimilarity index 94%rename from frontend/src/react/pages/settings/MemberDatabaseResourceName.tsxrename to frontend/src/routes/workspace/MemberDatabaseResourceName.tsxindex 00e97500a3..fdb13508a9 100644--- a/frontend/src/react/pages/settings/MemberDatabaseResourceName.tsx+++ b/frontend/src/routes/workspace/MemberDatabaseResourceName.tsx@@ -1,7 +1,7 @@import { ChevronRight } from "lucide-react";import { useMemo } from "react";-import { EngineIcon } from "@/react/components/EngineIcon";-import { useAppStore } from "@/react/stores/app";+import { EngineIcon } from "@/components/EngineIcon";+import { useAppStore } from "@/stores/app";import type { DatabaseResource } from "@/types";import {extractDatabaseResourceName,diff --git a/frontend/src/react/pages/settings/MembersPage.test.tsx b/frontend/src/routes/workspace/MembersPage.test.tsxsimilarity index 90%rename from frontend/src/react/pages/settings/MembersPage.test.tsxrename to frontend/src/routes/workspace/MembersPage.test.tsxindex 2936b68a93..d30e3ccd9c 100644--- a/frontend/src/react/pages/settings/MembersPage.test.tsx+++ b/frontend/src/routes/workspace/MembersPage.test.tsx@@ -27,7 +27,7 @@ const {maximumRequestExpirationSeconds: { value: undefined as number | undefined },}));-vi.mock("@/react/components/AccountMultiSelect", () => ({+vi.mock("@/components/AccountMultiSelect", () => ({AccountMultiSelect: ({onChange,}: {@@ -43,29 +43,29 @@ vi.mock("@/react/components/AccountMultiSelect", () => ({),}));-vi.mock("@/react/components/DatabaseResourceSelector", () => ({+vi.mock("@/components/DatabaseResourceSelector", () => ({DatabaseResourceSelector: () =>createElement("div", { "data-testid": "database-resource-selector" }),}));-vi.mock("@/react/components/EnvironmentSelect", () => ({+vi.mock("@/components/EnvironmentSelect", () => ({EnvironmentSelect: () =>createElement("div", { "data-testid": "environment-multi-select" }),}));-vi.mock("@/react/components/ExprEditor", () => ({+vi.mock("@/components/ExprEditor", () => ({ExprEditor: () => createElement("div", { "data-testid": "expr-editor" }),}));-vi.mock("@/react/components/FeatureBadge", () => ({+vi.mock("@/components/FeatureBadge", () => ({FeatureBadge: () => createElement("span", {}),}));-vi.mock("@/react/components/LearnMoreLink", () => ({+vi.mock("@/components/LearnMoreLink", () => ({LearnMoreLink: () => createElement("a", {}),}));-vi.mock("@/react/components/PermissionGuard", () => ({+vi.mock("@/components/PermissionGuard", () => ({PermissionGuard: ({children,}: {@@ -73,7 +73,7 @@ vi.mock("@/react/components/PermissionGuard", () => ({}) => createElement("div", {}, children({ disabled: false })),}));-vi.mock("@/react/components/RoleSelect", () => ({+vi.mock("@/components/RoleSelect", () => ({RoleSelect: ({value,onChange,@@ -89,15 +89,15 @@ vi.mock("@/react/components/RoleSelect", () => ({}),}));-vi.mock("@/react/components/role-grant/DDLWarningCallout", () => ({+vi.mock("@/components/role-grant/DDLWarningCallout", () => ({DDLWarningCallout: () => null,}));-vi.mock("@/react/components/UserCell", () => ({+vi.mock("@/components/UserCell", () => ({UserCell: () => createElement("span", {}),}));-vi.mock("@/react/components/ui/alert", () => ({+vi.mock("@/components/ui/alert", () => ({Alert: ({children,description,@@ -109,12 +109,12 @@ vi.mock("@/react/components/ui/alert", () => ({}) => createElement("div", {}, title, description, children),}));-vi.mock("@/react/components/ui/badge", () => ({+vi.mock("@/components/ui/badge", () => ({Badge: ({ children }: { children?: ReactNode }) =>createElement("span", {}, children),}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,disabled,@@ -127,21 +127,21 @@ vi.mock("@/react/components/ui/button", () => ({}) => createElement("button", { disabled, onClick }, children),}));-vi.mock("@/react/components/ui/checkbox", () => ({+vi.mock("@/components/ui/checkbox", () => ({Checkbox: () => createElement("input", { type: "checkbox" }),}));-vi.mock("@/react/components/ui/input", () => ({+vi.mock("@/components/ui/input", () => ({Input: (props: InputHTMLAttributes<HTMLInputElement>) =>createElement("input", props),}));-vi.mock("@/react/components/ui/search-input", () => ({+vi.mock("@/components/ui/search-input", () => ({SearchInput: (props: InputHTMLAttributes<HTMLInputElement>) =>createElement("input", props),}));-vi.mock("@/react/components/ui/sheet", () => ({+vi.mock("@/components/ui/sheet", () => ({Sheet: ({ children, open }: { children: ReactNode; open: boolean }) =>open ? createElement("div", { "data-testid": "sheet" }, children) : null,SheetBody: ({ children }: { children: ReactNode }) =>@@ -156,7 +156,7 @@ vi.mock("@/react/components/ui/sheet", () => ({createElement("h2", {}, children),}));-vi.mock("@/react/components/ui/table", () => ({+vi.mock("@/components/ui/table", () => ({Table: ({ children }: { children: ReactNode }) =>createElement("table", {}, children),TableBody: ({ children }: { children: ReactNode }) =>@@ -171,7 +171,7 @@ vi.mock("@/react/components/ui/table", () => ({createElement("tr", {}, children),}));-vi.mock("@/react/components/ui/tabs", () => ({+vi.mock("@/components/ui/tabs", () => ({Tabs: ({ children }: { children: ReactNode }) =>createElement("div", {}, children),TabsList: ({ children }: { children: ReactNode }) =>@@ -182,29 +182,29 @@ vi.mock("@/react/components/ui/tabs", () => ({createElement("button", {}, children),}));-vi.mock("@/react/components/ui/tooltip", () => ({+vi.mock("@/components/ui/tooltip", () => ({Tooltip: ({ children }: { children: ReactNode }) =>createElement("span", {}, children),}));-vi.mock("@/react/hooks/useEscapeKey", () => ({+vi.mock("@/hooks/useEscapeKey", () => ({useEscapeKey: () => {},}));-vi.mock("@/react/lib/project-member/utils", () => ({+vi.mock("@/lib/project-member/utils", () => ({getRoleEnvironmentLimitationKind: vi.fn(() => undefined),roleHasDatabaseLimitation: vi.fn((role: string) =>role.includes("sqlEditor")),}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({useNavigate: () => vi.fn(),WORKSPACE_ROUTE_GROUPS: "groups",WORKSPACE_ROUTE_USER_PROFILE: "user-profile",}));-vi.mock("@/plugins/cel", () => ({+vi.mock("@/modules/cel", () => ({buildCELExpr: vi.fn(),emptySimpleExpr: () => ({}),validateSimpleExpr: () => true,@@ -266,7 +266,7 @@ vi.mock("@/utils/issue/cel", () => ({stringifyConditionExpression: () => "",}));-vi.mock("@/react/lib/memberBindings", () => ({+vi.mock("@/lib/memberBindings", () => ({getMemberBindings: () => [],groupProjectRoleBindings: () => [],}));@@ -282,18 +282,18 @@ vi.mock("react-i18next", () => ({const projectIamPolicy = { bindings: [] };-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: mockPushNotification,}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useCurrentUser: () => ({email: "[email protected]",name: "users/[email protected]",}),}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const buildState = () => ({batchGetOrFetchUsers: vi.fn(async () => []),roleList: [{ name: "roles/sqlEditorUser", permissions: [] }],@@ -351,12 +351,12 @@ vi.mock("./MemberDatabaseResourceName", () => ({MemberDatabaseResourceName: () => null,}));-vi.mock("./RequestRoleSheet", () => ({+vi.mock("@/modules/access-control/RequestRoleSheet", () => ({RequestRoleSheet: () => null,}));-import { buildCELExpr } from "@/plugins/cel";-import { nativeChange } from "@/react/test-utils/nativeChange";+import { buildCELExpr } from "@/modules/cel";+import { nativeChange } from "@/test-utils/nativeChange";import { MembersPage } from "./MembersPage";let container: HTMLDivElement;diff --git a/frontend/src/react/pages/settings/MembersPage.tsx b/frontend/src/routes/workspace/MembersPage.tsxsimilarity index 97%rename from frontend/src/react/pages/settings/MembersPage.tsxrename to frontend/src/routes/workspace/MembersPage.tsxindex 3d962e070d..31f662b515 100644--- a/frontend/src/react/pages/settings/MembersPage.tsx+++ b/frontend/src/routes/workspace/MembersPage.tsx@@ -20,37 +20,34 @@ import React, {} from "react";import { useTranslation } from "react-i18next";import { v4 as uuidv4 } from "uuid";-import type { ConditionGroupExpr, Factor, Operator } from "@/plugins/cel";import {- buildCELExpr,- emptySimpleExpr,- validateSimpleExpr,- wrapAsGroup,-} from "@/plugins/cel";-import { AccountMultiSelect } from "@/react/components/AccountMultiSelect";-import { DatabaseResourceSelector as DatabaseResourceSelectorComponent } from "@/react/components/DatabaseResourceSelector";-import { EnvironmentSelect } from "@/react/components/EnvironmentSelect";-import { ExprEditor, type OptionConfig } from "@/react/components/ExprEditor";-import { FeatureBadge } from "@/react/components/FeatureBadge";-import { LearnMoreLink } from "@/react/components/LearnMoreLink";-import { PermissionGuard } from "@/react/components/PermissionGuard";+ WORKSPACE_ROUTE_GROUPS,+ WORKSPACE_ROUTE_USER_PROFILE,+} from "@/app/router";+import { AccountMultiSelect } from "@/components/AccountMultiSelect";+import { DatabaseResourceSelector as DatabaseResourceSelectorComponent } from "@/components/DatabaseResourceSelector";+import { EnvironmentSelect } from "@/components/EnvironmentSelect";+import { ExprEditor, type OptionConfig } from "@/components/ExprEditor";+import { FeatureBadge } from "@/components/FeatureBadge";+import { LearnMoreLink } from "@/components/LearnMoreLink";+import { PermissionGuard } from "@/components/PermissionGuard";import {ProjectPageInfo,ProjectPageLayout,ProjectPageToolbar,-} from "@/react/components/ProjectPageLayout";-import { RoleSelect } from "@/react/components/RoleSelect";-import { DDLWarningCallout } from "@/react/components/role-grant/DDLWarningCallout";-import { UserCell } from "@/react/components/UserCell";-import { Alert } from "@/react/components/ui/alert";-import { Badge } from "@/react/components/ui/badge";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";-import { ExpirationPicker } from "@/react/components/ui/expiration-picker";-import { FormError, FormField } from "@/react/components/ui/form";-import { Input } from "@/react/components/ui/input";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";-import { SearchInput } from "@/react/components/ui/search-input";+} from "@/components/ProjectPageLayout";+import { RoleSelect } from "@/components/RoleSelect";+import { DDLWarningCallout } from "@/components/role-grant/DDLWarningCallout";+import { UserCell } from "@/components/UserCell";+import { Alert } from "@/components/ui/alert";+import { Badge } from "@/components/ui/badge";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";+import { ExpirationPicker } from "@/components/ui/expiration-picker";+import { FormError, FormField } from "@/components/ui/form";+import { Input } from "@/components/ui/input";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";+import { SearchInput } from "@/components/ui/search-input";import {Sheet,SheetBody,@@ -58,7 +55,7 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";+} from "@/components/ui/sheet";import {Table,TableBody,@@ -66,38 +63,42 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import {- Tabs,- TabsList,- TabsPanel,- TabsTrigger,-} from "@/react/components/ui/tabs";-import { Tooltip } from "@/react/components/ui/tooltip";+} from "@/components/ui/table";+import { Tabs, TabsList, TabsPanel, TabsTrigger } from "@/components/ui/tabs";+import { Tooltip } from "@/components/ui/tooltip";import {WorkspacePageLayout,WorkspacePageToolbar,-} from "@/react/components/WorkspacePageLayout";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { useEscapeKey } from "@/react/hooks/useEscapeKey";-import { useProjectByName } from "@/react/hooks/useProjectByName";+} from "@/components/WorkspacePageLayout";+import { useCurrentUser } from "@/hooks/useAppState";+import { useEscapeKey } from "@/hooks/useEscapeKey";+import { useProjectByName } from "@/hooks/useProjectByName";import {getMemberBindings,groupProjectRoleBindings,-} from "@/react/lib/memberBindings";+} from "@/lib/memberBindings";import {getRoleEnvironmentLimitationKind,roleHasDatabaseLimitation,-} from "@/react/lib/project-member/utils";-import { displayRoleTitleFromList } from "@/react/lib/role";-import { cn } from "@/react/lib/utils";+} from "@/lib/project-member/utils";+import { displayRoleTitleFromList } from "@/lib/role";+import { cn } from "@/lib/utils";+import { RequestRoleSheet } from "@/modules/access-control/RequestRoleSheet";import {- WORKSPACE_ROUTE_GROUPS,- WORKSPACE_ROUTE_USER_PROFILE,-} from "@/react/router";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";-import { projectNamePrefix } from "@/store/modules/v1/common";+ getRequestRoleButtonState,+ REQUEST_ROLE_REQUIRED_PERMISSIONS,+} from "@/modules/access-control/requestRoleButton";+import type { DatabaseMode } from "@/modules/access-control/types";+import type { ConditionGroupExpr, Factor, Operator } from "@/modules/cel";+import {+ buildCELExpr,+ emptySimpleExpr,+ validateSimpleExpr,+ wrapAsGroup,+} from "@/modules/cel";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import { projectNamePrefix } from "@/stores/modules/v1/common";import {ALL_USERS_USER_EMAIL,type DatabaseResource,@@ -138,12 +139,6 @@ import { MemberBindingEnvironmentBanner } from "./MemberBindingEnvironmentBannerimport { MemberDatabaseResourceName } from "./MemberDatabaseResourceName";import { getSetIamPolicyPermissionGuardConfig } from "./membersPageActions";import { getProjectRoleBindingEnvironmentLimitationState } from "./membersPageEnvironment";-import { RequestRoleSheet } from "./RequestRoleSheet";-import {- getRequestRoleButtonState,- REQUEST_ROLE_REQUIRED_PERMISSIONS,-} from "./requestRoleButton";-import type { DatabaseMode } from "./types";const EMPTY_ROLE_SET = new Set<string>();diff --git a/frontend/src/react/pages/workspace/MyIssuesPage.creators.test.ts b/frontend/src/routes/workspace/MyIssuesPage.creators.test.tssimilarity index 100%rename from frontend/src/react/pages/workspace/MyIssuesPage.creators.test.tsrename to frontend/src/routes/workspace/MyIssuesPage.creators.test.tsdiff --git a/frontend/src/react/pages/workspace/MyIssuesPage.tsx b/frontend/src/routes/workspace/MyIssuesPage.tsxsimilarity index 92%rename from frontend/src/react/pages/workspace/MyIssuesPage.tsxrename to frontend/src/routes/workspace/MyIssuesPage.tsxindex d07170bb4a..fc7ff7d601 100644--- a/frontend/src/react/pages/workspace/MyIssuesPage.tsx+++ b/frontend/src/routes/workspace/MyIssuesPage.tsx@@ -1,28 +1,28 @@import { useCallback, useEffect, useMemo, useState } from "react";import { useLocation } from "react-router";-import type { SearchParams } from "@/react/components/AdvancedSearch";+import {+ markScrollRestorationEntry,+ useScrollRestorationKey,+ useScrollRestorationLoadMore,+} from "@/app/router/NavigationScrollRestoration";+import type { SearchParams } from "@/components/AdvancedSearch";import {BatchActionBar,BatchIssueStatusActionDrawer,IssueListPanel,IssueSearchBar,useIssueSearchScopeOptions,-} from "@/react/components/IssueTable";+} from "@/components/IssueTable";import {WorkspacePageContent,WorkspacePageFooter,WorkspacePageLayout,-} from "@/react/components/WorkspacePageLayout";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { PagedTableFooter, usePagedData } from "@/react/hooks/usePagedData";-import { useURLSearchParam } from "@/react/hooks/useURLSearchParam";-import { refreshIssueList } from "@/react/lib/issue/issueListRefresh";-import {- markScrollRestorationEntry,- useScrollRestorationKey,- useScrollRestorationLoadMore,-} from "@/react/router/NavigationScrollRestoration";-import { useAppStore } from "@/react/stores/app";+} from "@/components/WorkspacePageLayout";+import { useCurrentUser } from "@/hooks/useAppState";+import { PagedTableFooter, usePagedData } from "@/hooks/usePagedData";+import { useURLSearchParam } from "@/hooks/useURLSearchParam";+import { refreshIssueList } from "@/lib/issue/issueListRefresh";+import { useAppStore } from "@/stores/app";import { ApprovalStatus } from "@/types/proto-es/v1/common_pb";import type { Issue } from "@/types/proto-es/v1/issue_service_pb";import { IssueStatus } from "@/types/proto-es/v1/issue_service_pb";diff --git a/frontend/src/react/pages/workspace/Page403.test.tsx b/frontend/src/routes/workspace/Page403.test.tsxsimilarity index 94%rename from frontend/src/react/pages/workspace/Page403.test.tsxrename to frontend/src/routes/workspace/Page403.test.tsxindex bedb6fb890..819d058208 100644--- a/frontend/src/react/pages/workspace/Page403.test.tsx+++ b/frontend/src/routes/workspace/Page403.test.tsx@@ -1,7 +1,7 @@import { act } from "react";import { createRoot } from "react-dom/client";import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";-import { WORKSPACE_ROUTE_LANDING } from "@/react/router/handles";+import { WORKSPACE_ROUTE_LANDING } from "@/app/router/handles";import { Page403 } from "./Page403";(@@ -17,7 +17,7 @@ const mocks = vi.hoisted(() => ({},}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({router: {currentRoute: mocks.currentRoute,push: mocks.routerPush,diff --git a/frontend/src/react/pages/workspace/Page403.tsx b/frontend/src/routes/workspace/Page403.tsxsimilarity index 91%rename from frontend/src/react/pages/workspace/Page403.tsxrename to frontend/src/routes/workspace/Page403.tsxindex 98a0565138..e5c71aea30 100644--- a/frontend/src/react/pages/workspace/Page403.tsx+++ b/frontend/src/routes/workspace/Page403.tsx@@ -1,10 +1,10 @@import { ChevronLeft, ShieldAlert } from "lucide-react";import { useMemo } from "react";import { useTranslation } from "react-i18next";-import { RouterLink } from "@/react/components/RouterLink";-import { buttonVariants } from "@/react/components/ui/button";-import { router } from "@/react/router";-import { WORKSPACE_ROUTE_LANDING } from "@/react/router/handles";+import { router } from "@/app/router";+import { WORKSPACE_ROUTE_LANDING } from "@/app/router/handles";+import { RouterLink } from "@/components/RouterLink";+import { buttonVariants } from "@/components/ui/button";import type { Permission } from "@/types";export function Page403() {diff --git a/frontend/src/react/pages/workspace/Page404.test.tsx b/frontend/src/routes/workspace/Page404.test.tsxsimilarity index 94%rename from frontend/src/react/pages/workspace/Page404.test.tsxrename to frontend/src/routes/workspace/Page404.test.tsxindex b7f7a13341..74113f7800 100644--- a/frontend/src/react/pages/workspace/Page404.test.tsx+++ b/frontend/src/routes/workspace/Page404.test.tsx@@ -1,7 +1,7 @@import { act } from "react";import { createRoot } from "react-dom/client";import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";-import { WORKSPACE_ROUTE_LANDING } from "@/react/router/handles";+import { WORKSPACE_ROUTE_LANDING } from "@/app/router/handles";import { Page404 } from "./Page404";(@@ -16,7 +16,7 @@ vi.mock("@/assets/logo-icon.svg", () => ({default: "logo.svg",}));-vi.mock("@/react/router", () => ({+vi.mock("@/app/router", () => ({router: {push: mocks.routerPush,resolve: (to: unknown) => ({ href: String(to), fullPath: String(to) }),diff --git a/frontend/src/react/pages/workspace/Page404.tsx b/frontend/src/routes/workspace/Page404.tsxsimilarity index 80%rename from frontend/src/react/pages/workspace/Page404.tsxrename to frontend/src/routes/workspace/Page404.tsxindex e0f2eaba41..886d5f894d 100644--- a/frontend/src/react/pages/workspace/Page404.tsx+++ b/frontend/src/routes/workspace/Page404.tsx@@ -1,9 +1,9 @@import { ChevronLeft } from "lucide-react";import { useTranslation } from "react-i18next";+import { WORKSPACE_ROUTE_LANDING } from "@/app/router/handles";import logoIcon from "@/assets/logo-icon.svg";-import { RouterLink } from "@/react/components/RouterLink";-import { buttonVariants } from "@/react/components/ui/button";-import { WORKSPACE_ROUTE_LANDING } from "@/react/router/handles";+import { RouterLink } from "@/components/RouterLink";+import { buttonVariants } from "@/components/ui/button";export function Page404() {const { t } = useTranslation();diff --git a/frontend/src/react/pages/settings/ProfilePage.tsx b/frontend/src/routes/workspace/ProfilePage.tsxsimilarity index 100%rename from frontend/src/react/pages/settings/ProfilePage.tsxrename to frontend/src/routes/workspace/ProfilePage.tsxdiff --git a/frontend/src/react/pages/settings/ProjectsPage.navigation.test.ts b/frontend/src/routes/workspace/ProjectsPage.navigation.test.tssimilarity index 100%rename from frontend/src/react/pages/settings/ProjectsPage.navigation.test.tsrename to frontend/src/routes/workspace/ProjectsPage.navigation.test.tsdiff --git a/frontend/src/react/pages/settings/ProjectsPage.tsx b/frontend/src/routes/workspace/ProjectsPage.tsxsimilarity index 95%rename from frontend/src/react/pages/settings/ProjectsPage.tsxrename to frontend/src/routes/workspace/ProjectsPage.tsxindex 98bc9c72bc..dc8eaa586a 100644--- a/frontend/src/react/pages/settings/ProjectsPage.tsx+++ b/frontend/src/routes/workspace/ProjectsPage.tsx@@ -1,55 +1,55 @@import { Archive, Check, EllipsisVertical, Plus, Trash2 } from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";+import { router, useCurrentRoute } from "@/app/router";+import { PROJECT_V1_ROUTE_ISSUES } from "@/app/router/handles";+import { useScrollRestorationLoadMore } from "@/app/router/NavigationScrollRestoration";import {AdvancedSearch,getValueFromScopes,type ScopeOption,type SearchParams,-} from "@/react/components/AdvancedSearch";-import { ProjectCreateDialog } from "@/react/components/header/ProjectCreateDialog";-import { PermissionGuard } from "@/react/components/PermissionGuard";-import { ProjectTable } from "@/react/components/ProjectTable";+} from "@/components/AdvancedSearch";+import { ProjectCreateDialog } from "@/components/header/ProjectCreateDialog";+import { PermissionGuard } from "@/components/PermissionGuard";+import { ProjectTable } from "@/components/ProjectTable";import {type SelectionAction,SelectionActionBar,-} from "@/react/components/SelectionActionBar";+} from "@/components/SelectionActionBar";import {AlertDialog,AlertDialogContent,AlertDialogDescription,AlertDialogTitle,-} from "@/react/components/ui/alert-dialog";-import { Button } from "@/react/components/ui/button";+} from "@/components/ui/alert-dialog";+import { Button } from "@/components/ui/button";import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";+} from "@/components/ui/dropdown-menu";import {WorkspacePageContent,WorkspacePageFooter,WorkspacePageLayout,WorkspacePageToolbar,-} from "@/react/components/WorkspacePageLayout";-import { PagedTableFooter } from "@/react/hooks/usePagedData";+} from "@/components/WorkspacePageLayout";+import { PagedTableFooter } from "@/hooks/usePagedData";import {getPageSizeOptions,useSessionPageSize,-} from "@/react/hooks/useSessionPageSize";+} from "@/hooks/useSessionPageSize";import {createAdvancedSearchParser,serializeAdvancedSearch,useURLSearchParam,-} from "@/react/hooks/useURLSearchParam";-import { cn } from "@/react/lib/utils";-import { router, useCurrentRoute } from "@/react/router";-import { PROJECT_V1_ROUTE_ISSUES } from "@/react/router/handles";-import { useScrollRestorationLoadMore } from "@/react/router/NavigationScrollRestoration";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";-import { getProjectName } from "@/store/modules/v1/common";+} from "@/hooks/useURLSearchParam";+import { cn } from "@/lib/utils";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import { getProjectName } from "@/stores/modules/v1/common";import { State } from "@/types/proto-es/v1/common_pb";import type { Project } from "@/types/proto-es/v1/project_service_pb";import {diff --git a/frontend/src/react/pages/settings/PurchaseSection.tsx b/frontend/src/routes/workspace/PurchaseSection.tsxsimilarity index 98%rename from frontend/src/react/pages/settings/PurchaseSection.tsxrename to frontend/src/routes/workspace/PurchaseSection.tsxindex e11d008041..1d4c5a642d 100644--- a/frontend/src/react/pages/settings/PurchaseSection.tsx+++ b/frontend/src/routes/workspace/PurchaseSection.tsx@@ -1,12 +1,12 @@import { Check, Loader2, Minus, Plus } from "lucide-react";import { useCallback, useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { Alert } from "@/react/components/ui/alert";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";-import { useSubscriptionState } from "@/react/hooks/useAppState";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+import { Alert } from "@/components/ui/alert";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";+import { useSubscriptionState } from "@/hooks/useAppState";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import type { PurchasePlanAdditional } from "@/types/proto-es/v1/subscription_service_pb";import {BillingInterval,diff --git a/frontend/src/react/pages/settings/RiskAssessmentPage.tsx b/frontend/src/routes/workspace/RiskAssessmentPage.tsxsimilarity index 93%rename from frontend/src/react/pages/settings/RiskAssessmentPage.tsxrename to frontend/src/routes/workspace/RiskAssessmentPage.tsxindex af52424395..bde2f0c4a9 100644--- a/frontend/src/react/pages/settings/RiskAssessmentPage.tsx+++ b/frontend/src/routes/workspace/RiskAssessmentPage.tsx@@ -1,10 +1,10 @@import { useTranslation } from "react-i18next";-import { FeatureAttention } from "@/react/components/FeatureAttention";-import { Badge } from "@/react/components/ui/badge";+import { FeatureAttention } from "@/components/FeatureAttention";+import { Badge } from "@/components/ui/badge";import {WorkspacePageInfo,WorkspacePageLayout,-} from "@/react/components/WorkspacePageLayout";+} from "@/components/WorkspacePageLayout";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";export function RiskAssessmentPage() {diff --git a/frontend/src/react/pages/settings/RolesPage.tsx b/frontend/src/routes/workspace/RolesPage.tsxsimilarity index 95%rename from frontend/src/react/pages/settings/RolesPage.tsxrename to frontend/src/routes/workspace/RolesPage.tsxindex ae6c848609..ec95c55286 100644--- a/frontend/src/react/pages/settings/RolesPage.tsx+++ b/frontend/src/routes/workspace/RolesPage.tsx@@ -4,36 +4,28 @@ import { cloneDeep, sortBy, uniq } from "lodash-es";import { Pencil, Plus, Trash2, X } from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { FeatureAttention } from "@/react/components/FeatureAttention";-import { FeatureBadge } from "@/react/components/FeatureBadge";-import { LearnMoreLink } from "@/react/components/LearnMoreLink";-import { PermissionGuard } from "@/react/components/PermissionGuard";+import { FeatureAttention } from "@/components/FeatureAttention";+import { FeatureBadge } from "@/components/FeatureBadge";+import { LearnMoreLink } from "@/components/LearnMoreLink";+import { PermissionGuard } from "@/components/PermissionGuard";import {ResourceIdField,type ResourceIdFieldRef,-} from "@/react/components/ResourceIdField";-import { RoleSelect } from "@/react/components/RoleSelect";-import { Alert } from "@/react/components/ui/alert";+} from "@/components/ResourceIdField";+import { RoleSelect } from "@/components/RoleSelect";+import { Alert } from "@/components/ui/alert";import {AlertDialog,AlertDialogContent,AlertDialogDescription,AlertDialogTitle,-} from "@/react/components/ui/alert-dialog";-import { Badge } from "@/react/components/ui/badge";-import { Button } from "@/react/components/ui/button";-import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";-import {- FormField,- FormFieldGroup,- FormTitle,-} from "@/react/components/ui/form";-import { Input } from "@/react/components/ui/input";-import { SearchInput } from "@/react/components/ui/search-input";+} from "@/components/ui/alert-dialog";+import { Badge } from "@/components/ui/badge";+import { Button } from "@/components/ui/button";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";+import { FormField, FormFieldGroup, FormTitle } from "@/components/ui/form";+import { Input } from "@/components/ui/input";+import { SearchInput } from "@/components/ui/search-input";import {Sheet,SheetBody,@@ -41,7 +33,7 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";+} from "@/components/ui/sheet";import {Table,TableBody,@@ -49,21 +41,21 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { Textarea } from "@/react/components/ui/textarea";-import { BlockTooltip } from "@/react/components/ui/tooltip";+} from "@/components/ui/table";+import { Textarea } from "@/components/ui/textarea";+import { BlockTooltip } from "@/components/ui/tooltip";import {WorkspacePageInfo,WorkspacePageLayout,WorkspacePageToolbar,-} from "@/react/components/WorkspacePageLayout";+} from "@/components/WorkspacePageLayout";import {displayRoleDescriptionFromList,displayRoleTitleFromList,-} from "@/react/lib/role";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";-import { roleNamePrefix } from "@/store/modules/v1/common";+} from "@/lib/role";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import { roleNamePrefix } from "@/stores/modules/v1/common";import {BASIC_WORKSPACE_PERMISSIONS,PERMISSIONS,diff --git a/frontend/src/react/pages/settings/RolesPageLayout.test.ts b/frontend/src/routes/workspace/RolesPageLayout.test.tssimilarity index 100%rename from frontend/src/react/pages/settings/RolesPageLayout.test.tsrename to frontend/src/routes/workspace/RolesPageLayout.test.tsdiff --git a/frontend/src/react/pages/settings/SQLReviewCreatePage.test.tsx b/frontend/src/routes/workspace/SQLReviewCreatePage.test.tsxsimilarity index 91%rename from frontend/src/react/pages/settings/SQLReviewCreatePage.test.tsxrename to frontend/src/routes/workspace/SQLReviewCreatePage.test.tsxindex 2b42839ee8..8605679122 100644--- a/frontend/src/react/pages/settings/SQLReviewCreatePage.test.tsx+++ b/frontend/src/routes/workspace/SQLReviewCreatePage.test.tsx@@ -12,7 +12,7 @@ const mocks = vi.hoisted(() => ({let SQLReviewCreatePage: typeof import("./SQLReviewCreatePage").SQLReviewCreatePage;-vi.mock("@/react/stores/sqlReview", () => ({+vi.mock("@/stores/sqlReview", () => ({useSQLReviewStore: {getState: () => ({fetchReviewPolicyList: mocks.fetchReviewPolicyList,@@ -20,7 +20,7 @@ vi.mock("@/react/stores/sqlReview", () => ({},}));-vi.mock("@/react/components/sql-review/ReviewCreation", () => ({+vi.mock("@/components/sql-review/ReviewCreation", () => ({ReviewCreation: () => <div data-testid="review-creation" />,}));diff --git a/frontend/src/react/pages/settings/SQLReviewCreatePage.tsx b/frontend/src/routes/workspace/SQLReviewCreatePage.tsxsimilarity index 92%rename from frontend/src/react/pages/settings/SQLReviewCreatePage.tsxrename to frontend/src/routes/workspace/SQLReviewCreatePage.tsxindex 5de73d8511..6db8eb04dc 100644--- a/frontend/src/react/pages/settings/SQLReviewCreatePage.tsx+++ b/frontend/src/routes/workspace/SQLReviewCreatePage.tsx@@ -1,5 +1,5 @@import { useEffect, useState } from "react";-import { useSQLReviewStore } from "@/react/stores/sqlReview";+import { useSQLReviewStore } from "@/stores/sqlReview";import {ReviewCreation,type ReviewCreationProps,diff --git a/frontend/src/react/pages/settings/SQLReviewDetailPage.tsx b/frontend/src/routes/workspace/SQLReviewDetailPage.tsxsimilarity index 93%rename from frontend/src/react/pages/settings/SQLReviewDetailPage.tsxrename to frontend/src/routes/workspace/SQLReviewDetailPage.tsxindex 7dececee82..37082591be 100644--- a/frontend/src/react/pages/settings/SQLReviewDetailPage.tsx+++ b/frontend/src/routes/workspace/SQLReviewDetailPage.tsx@@ -1,30 +1,30 @@import { Trash2 } from "lucide-react";import { useCallback, useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { PermissionGuard } from "@/react/components/PermissionGuard";-import { AttachResourcesPanel } from "@/react/components/sql-review/Panels";-import { ResourceLink } from "@/react/components/sql-review/ResourceLink";-import { RuleTableWithFilter } from "@/react/components/sql-review/RuleTable";-import { TabsByEngine } from "@/react/components/sql-review/TabsByEngine";-import { Alert } from "@/react/components/ui/alert";-import { Badge } from "@/react/components/ui/badge";-import { Button } from "@/react/components/ui/button";+import { router } from "@/app/router";+import { WORKSPACE_ROUTE_SQL_REVIEW } from "@/app/router/handles";+import { PermissionGuard } from "@/components/PermissionGuard";+import { AttachResourcesPanel } from "@/components/sql-review/Panels";+import { ResourceLink } from "@/components/sql-review/ResourceLink";+import { RuleTableWithFilter } from "@/components/sql-review/RuleTable";+import { TabsByEngine } from "@/components/sql-review/TabsByEngine";+import { Alert } from "@/components/ui/alert";+import { Badge } from "@/components/ui/badge";+import { Button } from "@/components/ui/button";import {Dialog,DialogContent,DialogDescription,DialogTitle,-} from "@/react/components/ui/dialog";-import { Input } from "@/react/components/ui/input";-import { StickyActionFooter } from "@/react/components/ui/sticky-action-footer";+} from "@/components/ui/dialog";+import { Input } from "@/components/ui/input";+import { StickyActionFooter } from "@/components/ui/sticky-action-footer";import {getRuleMapValidationErrorTitle,rulesToTemplate,-} from "@/react/lib/sql-review/utils";-import { router } from "@/react/router";-import { WORKSPACE_ROUTE_SQL_REVIEW } from "@/react/router/handles";-import { useSQLReviewStore } from "@/react/stores/sqlReview";-import { pushNotification } from "@/store";+} from "@/lib/sql-review/utils";+import { pushNotification } from "@/stores";+import { useSQLReviewStore } from "@/stores/sqlReview";import type { RuleTemplateV2 } from "@/types";import {convertRuleMapToPolicyRuleList,diff --git a/frontend/src/react/pages/settings/SQLReviewPage.tsx b/frontend/src/routes/workspace/SQLReviewPage.tsxsimilarity index 93%rename from frontend/src/react/pages/settings/SQLReviewPage.tsxrename to frontend/src/routes/workspace/SQLReviewPage.tsxindex 747199113e..dd01ef2058 100644--- a/frontend/src/react/pages/settings/SQLReviewPage.tsx+++ b/frontend/src/routes/workspace/SQLReviewPage.tsx@@ -1,13 +1,18 @@import { Check, Pencil, Plus, Trash2, X } from "lucide-react";import { useCallback, useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { HighlightLabelText } from "@/react/components/HighlightLabelText";-import { LearnMoreLink } from "@/react/components/LearnMoreLink";-import { ResourceLink } from "@/react/components/sql-review/ResourceLink";-import { Badge } from "@/react/components/ui/badge";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";-import { SearchInput } from "@/react/components/ui/search-input";+import { router } from "@/app/router";+import {+ WORKSPACE_ROUTE_SQL_REVIEW_CREATE,+ WORKSPACE_ROUTE_SQL_REVIEW_DETAIL,+} from "@/app/router/handles";+import { HighlightLabelText } from "@/components/HighlightLabelText";+import { LearnMoreLink } from "@/components/LearnMoreLink";+import { ResourceLink } from "@/components/sql-review/ResourceLink";+import { Badge } from "@/components/ui/badge";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";+import { SearchInput } from "@/components/ui/search-input";import {Table,TableBody,@@ -15,20 +20,15 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { Tooltip } from "@/react/components/ui/tooltip";+} from "@/components/ui/table";+import { Tooltip } from "@/components/ui/tooltip";import {WorkspacePageInfo,WorkspacePageLayout,WorkspacePageToolbar,-} from "@/react/components/WorkspacePageLayout";-import { router } from "@/react/router";-import {- WORKSPACE_ROUTE_SQL_REVIEW_CREATE,- WORKSPACE_ROUTE_SQL_REVIEW_DETAIL,-} from "@/react/router/handles";-import { useSQLReviewStore } from "@/react/stores/sqlReview";-import { pushNotification } from "@/store";+} from "@/components/WorkspacePageLayout";+import { pushNotification } from "@/stores";+import { useSQLReviewStore } from "@/stores/sqlReview";import type { SQLReviewPolicy } from "@/types";import { hasWorkspacePermissionV2, sqlReviewPolicySlug } from "@/utils";diff --git a/frontend/src/react/pages/settings/SemanticTypesPage.tsx b/frontend/src/routes/workspace/SemanticTypesPage.tsxsimilarity index 98%rename from frontend/src/react/pages/settings/SemanticTypesPage.tsxrename to frontend/src/routes/workspace/SemanticTypesPage.tsxindex e0abd57485..7ffce3b7a5 100644--- a/frontend/src/react/pages/settings/SemanticTypesPage.tsx+++ b/frontend/src/routes/workspace/SemanticTypesPage.tsx@@ -3,16 +3,16 @@ import { Check, Info, Pencil, Plus, Trash2, Undo2 } from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";import { v4 as uuidv4 } from "uuid";-import { FeatureAttention } from "@/react/components/FeatureAttention";-import { Button } from "@/react/components/ui/button";-import { Input } from "@/react/components/ui/input";-import { NumberInput } from "@/react/components/ui/number-input";+import { FeatureAttention } from "@/components/FeatureAttention";+import { Button } from "@/components/ui/button";+import { Input } from "@/components/ui/input";+import { NumberInput } from "@/components/ui/number-input";import {Popover,PopoverContent,PopoverTrigger,-} from "@/react/components/ui/popover";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";+} from "@/components/ui/popover";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";import {Sheet,SheetBody,@@ -20,7 +20,7 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";+} from "@/components/ui/sheet";import {Table,TableBody,@@ -28,15 +28,15 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { Tooltip } from "@/react/components/ui/tooltip";+} from "@/components/ui/table";+import { Tooltip } from "@/components/ui/tooltip";import {WorkspacePageInfo,WorkspacePageLayout,WorkspacePageToolbar,-} from "@/react/components/WorkspacePageLayout";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/components/WorkspacePageLayout";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import { getSemanticTemplateList } from "@/types";import type {Algorithm,diff --git a/frontend/src/react/pages/settings/ServiceAccountsPage.tsx b/frontend/src/routes/workspace/ServiceAccountsPage.tsxsimilarity index 96%rename from frontend/src/react/pages/settings/ServiceAccountsPage.tsxrename to frontend/src/routes/workspace/ServiceAccountsPage.tsxindex 8d4657f45f..1906982ef4 100644--- a/frontend/src/react/pages/settings/ServiceAccountsPage.tsx+++ b/frontend/src/routes/workspace/ServiceAccountsPage.tsx@@ -3,18 +3,18 @@ import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { Copy, KeyRound, Plus, Trash2, Undo2 } from "lucide-react";import { useCallback, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { PermissionGuard } from "@/react/components/PermissionGuard";+import { PermissionGuard } from "@/components/PermissionGuard";import {ProjectPageLayout,ProjectPageToolbar,-} from "@/react/components/ProjectPageLayout";-import { RoleSelect } from "@/react/components/RoleSelect";-import { UserCell } from "@/react/components/UserCell";-import { Badge } from "@/react/components/ui/badge";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";-import { FormField } from "@/react/components/ui/form";-import { Input } from "@/react/components/ui/input";+} from "@/components/ProjectPageLayout";+import { RoleSelect } from "@/components/RoleSelect";+import { UserCell } from "@/components/UserCell";+import { Badge } from "@/components/ui/badge";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";+import { FormField } from "@/components/ui/form";+import { Input } from "@/components/ui/input";import {Sheet,SheetBody,@@ -22,7 +22,7 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";+} from "@/components/ui/sheet";import {Table,TableBody,@@ -30,23 +30,23 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { Tooltip } from "@/react/components/ui/tooltip";+} from "@/components/ui/table";+import { Tooltip } from "@/components/ui/tooltip";import {WorkspacePageLayout,WorkspacePageToolbar,-} from "@/react/components/WorkspacePageLayout";-import { PagedTableFooter, usePagedData } from "@/react/hooks/usePagedData";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { writeTextToClipboard } from "@/react/lib/clipboard";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";+} from "@/components/WorkspacePageLayout";+import { PagedTableFooter, usePagedData } from "@/hooks/usePagedData";+import { useProjectByName } from "@/hooks/useProjectByName";+import { writeTextToClipboard } from "@/lib/clipboard";+import { cn } from "@/lib/utils";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import {ensureServiceAccountFullName,serviceAccountToUser,-} from "@/react/stores/app/serviceAccount";-import { pushNotification } from "@/store";-import { projectNamePrefix } from "@/store/modules/v1/common";+} from "@/stores/app/serviceAccount";+import { projectNamePrefix } from "@/stores/modules/v1/common";import {getServiceAccountNameInBinding,getServiceAccountSuffix,diff --git a/frontend/src/react/pages/settings/SubscriptionPage.test.tsx b/frontend/src/routes/workspace/SubscriptionPage.test.tsxsimilarity index 95%rename from frontend/src/react/pages/settings/SubscriptionPage.test.tsxrename to frontend/src/routes/workspace/SubscriptionPage.test.tsxindex c0ddec5af2..2d01cf691d 100644--- a/frontend/src/react/pages/settings/SubscriptionPage.test.tsx+++ b/frontend/src/routes/workspace/SubscriptionPage.test.tsx@@ -13,7 +13,7 @@ const mocks = vi.hoisted(() => ({notify: vi.fn(),}));-vi.mock("@/connect", () => ({+vi.mock("@/api", () => ({subscriptionServiceClientConnect: {exportVCSProviderUsers: mocks.exportVCSProviderUsers,},@@ -25,17 +25,17 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/components/InstanceAssignmentSheet", () => ({+vi.mock("@/components/InstanceAssignmentSheet", () => ({InstanceAssignmentSheet: () => null,}));-vi.mock("@/react/components/ui/badge", () => ({+vi.mock("@/components/ui/badge", () => ({Badge: ({ children }: { children: React.ReactNode }) => (<span>{children}</span>),}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,...props@@ -46,19 +46,19 @@ vi.mock("@/react/components/ui/button", () => ({),}));-vi.mock("@/react/components/ui/input", () => ({+vi.mock("@/components/ui/input", () => ({Input: (props: React.InputHTMLAttributes<HTMLInputElement>) => (<input {...props} />),}));-vi.mock("@/react/components/ui/textarea", () => ({+vi.mock("@/components/ui/textarea", () => ({Textarea: (props: React.TextareaHTMLAttributes<HTMLTextAreaElement>) => (<textarea {...props} />),}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useNotify: () => mocks.notify,useServerState: () => ({activeVcsUserCount: 2,diff --git a/frontend/src/react/pages/settings/SubscriptionPage.tsx b/frontend/src/routes/workspace/SubscriptionPage.tsxsimilarity index 94%rename from frontend/src/react/pages/settings/SubscriptionPage.tsxrename to frontend/src/routes/workspace/SubscriptionPage.tsxindex 01f775e0d6..58063dbd0d 100644--- a/frontend/src/react/pages/settings/SubscriptionPage.tsx+++ b/frontend/src/routes/workspace/SubscriptionPage.tsx@@ -3,27 +3,23 @@ import dayjs from "dayjs";import { Copy, Download, Pencil } from "lucide-react";import { type ChangeEvent, useState } from "react";import { useTranslation } from "react-i18next";-import { subscriptionServiceClientConnect } from "@/connect";-import { silentContextKey } from "@/connect/context-key";-import { InstanceAssignmentSheet } from "@/react/components/InstanceAssignmentSheet";-import { LearnMoreLink } from "@/react/components/LearnMoreLink";-import { Badge } from "@/react/components/ui/badge";-import { Button } from "@/react/components/ui/button";-import {- FormField,- FormFieldGroup,- FormLabel,-} from "@/react/components/ui/form";-import { Input } from "@/react/components/ui/input";-import { Textarea } from "@/react/components/ui/textarea";-import { WorkspacePageLayout } from "@/react/components/WorkspacePageLayout";+import { subscriptionServiceClientConnect } from "@/api";+import { silentContextKey } from "@/api/context-key";+import { InstanceAssignmentSheet } from "@/components/InstanceAssignmentSheet";+import { LearnMoreLink } from "@/components/LearnMoreLink";+import { Badge } from "@/components/ui/badge";+import { Button } from "@/components/ui/button";+import { FormField, FormFieldGroup, FormLabel } from "@/components/ui/form";+import { Input } from "@/components/ui/input";+import { Textarea } from "@/components/ui/textarea";+import { WorkspacePageLayout } from "@/components/WorkspacePageLayout";import {useNotify,useServerState,useSubscriptionState,-} from "@/react/hooks/useAppState";-import { writeTextToClipboard } from "@/react/lib/clipboard";-import { getResourceId, workspaceNamePrefix } from "@/react/lib/resourceName";+} from "@/hooks/useAppState";+import { writeTextToClipboard } from "@/lib/clipboard";+import { getResourceId, workspaceNamePrefix } from "@/lib/resourceName";import { ENTERPRISE_INQUIRE_LINK } from "@/types";import { PlanType } from "@/types/proto-es/v1/subscription_service_pb";import { hasWorkspacePermissionV2 } from "@/utils";diff --git a/frontend/src/react/pages/settings/SubscriptionPageLayout.test.ts b/frontend/src/routes/workspace/SubscriptionPageLayout.test.tssimilarity index 100%rename from frontend/src/react/pages/settings/SubscriptionPageLayout.test.tsrename to frontend/src/routes/workspace/SubscriptionPageLayout.test.tsdiff --git a/frontend/src/react/pages/settings/TwoFactorSetupPage.tsx b/frontend/src/routes/workspace/TwoFactorSetupPage.tsxsimilarity index 100%rename from frontend/src/react/pages/settings/TwoFactorSetupPage.tsxrename to frontend/src/routes/workspace/TwoFactorSetupPage.tsxdiff --git a/frontend/src/react/pages/settings/UsersPage.tsx b/frontend/src/routes/workspace/UsersPage.tsxsimilarity index 96%rename from frontend/src/react/pages/settings/UsersPage.tsxrename to frontend/src/routes/workspace/UsersPage.tsxindex f7eb725293..1f19748508 100644--- a/frontend/src/react/pages/settings/UsersPage.tsx+++ b/frontend/src/routes/workspace/UsersPage.tsx@@ -13,16 +13,21 @@ import {} from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { ComponentPermissionGuard } from "@/react/components/ComponentPermissionGuard";-import { FeatureBadge } from "@/react/components/FeatureBadge";-import { RoleSelect } from "@/react/components/RoleSelect";-import { UserCell } from "@/react/components/UserCell";-import { Badge } from "@/react/components/ui/badge";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";-import { FormError, FormField, FormTitle } from "@/react/components/ui/form";-import { Input } from "@/react/components/ui/input";-import { SearchInput } from "@/react/components/ui/search-input";+import { router } from "@/app/router";+import {+ WORKSPACE_ROUTE_GROUPS,+ WORKSPACE_ROUTE_USER_PROFILE,+} from "@/app/router/handles";+import { ComponentPermissionGuard } from "@/components/ComponentPermissionGuard";+import { FeatureBadge } from "@/components/FeatureBadge";+import { RoleSelect } from "@/components/RoleSelect";+import { UserCell } from "@/components/UserCell";+import { Badge } from "@/components/ui/badge";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";+import { FormError, FormField, FormTitle } from "@/components/ui/form";+import { Input } from "@/components/ui/input";+import { SearchInput } from "@/components/ui/search-input";import {Sheet,SheetBody,@@ -30,8 +35,8 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { listRowStateClassName } from "@/react/components/ui/styles.stylex";+} from "@/components/ui/sheet";+import { listRowStateClassName } from "@/components/ui/styles.stylex";import {Table,TableBody,@@ -39,23 +44,18 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { Tooltip } from "@/react/components/ui/tooltip";+} from "@/components/ui/table";+import { Tooltip } from "@/components/ui/tooltip";import {WorkspacePageLayout,WorkspacePageToolbar,-} from "@/react/components/WorkspacePageLayout";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { PagedTableFooter, usePagedData } from "@/react/hooks/usePagedData";-import { cn } from "@/react/lib/utils";-import { router } from "@/react/router";-import {- WORKSPACE_ROUTE_GROUPS,- WORKSPACE_ROUTE_USER_PROFILE,-} from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";-import { getUserFullNameByType } from "@/store/modules/v1/common";+} from "@/components/WorkspacePageLayout";+import { useCurrentUser } from "@/hooks/useAppState";+import { PagedTableFooter, usePagedData } from "@/hooks/usePagedData";+import { cn } from "@/lib/utils";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";+import { getUserFullNameByType } from "@/stores/modules/v1/common";import {AccountType,getAccountTypeByEmail,diff --git a/frontend/src/react/pages/settings/UsersPageLayout.test.ts b/frontend/src/routes/workspace/UsersPageLayout.test.tssimilarity index 100%rename from frontend/src/react/pages/settings/UsersPageLayout.test.tsrename to frontend/src/routes/workspace/UsersPageLayout.test.tsdiff --git a/frontend/src/react/pages/settings/WorkloadIdentitiesPage.tsx b/frontend/src/routes/workspace/WorkloadIdentitiesPage.tsxsimilarity index 94%rename from frontend/src/react/pages/settings/WorkloadIdentitiesPage.tsxrename to frontend/src/routes/workspace/WorkloadIdentitiesPage.tsxindex 44154dda86..d48982965f 100644--- a/frontend/src/react/pages/settings/WorkloadIdentitiesPage.tsx+++ b/frontend/src/routes/workspace/WorkloadIdentitiesPage.tsx@@ -1,16 +1,16 @@import { Plus, Trash2, Undo2 } from "lucide-react";import { useCallback, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { CreateWorkloadIdentitySheet } from "@/react/components/CreateWorkloadIdentitySheet";-import { PermissionGuard } from "@/react/components/PermissionGuard";+import { CreateWorkloadIdentitySheet } from "@/components/CreateWorkloadIdentitySheet";+import { PermissionGuard } from "@/components/PermissionGuard";import {ProjectPageLayout,ProjectPageToolbar,-} from "@/react/components/ProjectPageLayout";-import { UserCell } from "@/react/components/UserCell";-import { Button } from "@/react/components/ui/button";-import { Checkbox } from "@/react/components/ui/checkbox";-import { listRowStateClassName } from "@/react/components/ui/styles.stylex";+} from "@/components/ProjectPageLayout";+import { UserCell } from "@/components/UserCell";+import { Button } from "@/components/ui/button";+import { Checkbox } from "@/components/ui/checkbox";+import { listRowStateClassName } from "@/components/ui/styles.stylex";import {Table,TableBody,@@ -18,22 +18,22 @@ import {TableHead,TableHeader,TableRow,-} from "@/react/components/ui/table";-import { Tooltip } from "@/react/components/ui/tooltip";+} from "@/components/ui/table";+import { Tooltip } from "@/components/ui/tooltip";import {WorkspacePageLayout,WorkspacePageToolbar,-} from "@/react/components/WorkspacePageLayout";-import { PagedTableFooter, usePagedData } from "@/react/hooks/usePagedData";-import { useProjectByName } from "@/react/hooks/useProjectByName";-import { cn } from "@/react/lib/utils";-import { useAppStore } from "@/react/stores/app";+} from "@/components/WorkspacePageLayout";+import { PagedTableFooter, usePagedData } from "@/hooks/usePagedData";+import { useProjectByName } from "@/hooks/useProjectByName";+import { cn } from "@/lib/utils";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import {ensureWorkloadIdentityFullName,workloadIdentityToUser,-} from "@/react/stores/app/workloadIdentity";-import { pushNotification } from "@/store";-import { projectNamePrefix } from "@/store/modules/v1/common";+} from "@/stores/app/workloadIdentity";+import { projectNamePrefix } from "@/stores/modules/v1/common";import { State } from "@/types/proto-es/v1/common_pb";import type { Project } from "@/types/proto-es/v1/project_service_pb";import type { User } from "@/types/proto-es/v1/user_service_pb";diff --git a/frontend/src/react/pages/settings/WorkspacePageLayout.test.ts b/frontend/src/routes/workspace/WorkspacePageLayout.test.tssimilarity index 97%rename from frontend/src/react/pages/settings/WorkspacePageLayout.test.tsrename to frontend/src/routes/workspace/WorkspacePageLayout.test.tsindex 35dd550eac..2eb7924405 100644--- a/frontend/src/react/pages/settings/WorkspacePageLayout.test.ts+++ b/frontend/src/routes/workspace/WorkspacePageLayout.test.ts@@ -82,7 +82,7 @@ describe("workspace list page layout", () => {for (const file of workspaceListPages) {const source = readSettingsPage(file);- expect(source, file).toContain("@/react/components/WorkspacePageLayout");+ expect(source, file).toContain("@/components/WorkspacePageLayout");if (adaptiveWorkspaceListPages.includes(file as (typeof adaptiveWorkspaceListPages)[number]@@ -151,7 +151,7 @@ describe("workspace list page layout", () => {test("combines global masking info into one shared info surface", () => {const source = readSettingsPage("GlobalMaskingPage.tsx");- expect(source).not.toContain("@/react/components/ui/alert");+ expect(source).not.toContain("@/components/ui/alert");expect(source).toContain("custom-approval.rule.first-match-wins");expect(source).toContain("settings.sensitive-data.global-rules.description"diff --git a/frontend/src/react/pages/settings/environmentSelection.test.tsx b/frontend/src/routes/workspace/environmentSelection.test.tsxsimilarity index 100%rename from frontend/src/react/pages/settings/environmentSelection.test.tsxrename to frontend/src/routes/workspace/environmentSelection.test.tsxdiff --git a/frontend/src/react/pages/settings/environmentSelection.ts b/frontend/src/routes/workspace/environmentSelection.tssimilarity index 100%rename from frontend/src/react/pages/settings/environmentSelection.tsrename to frontend/src/routes/workspace/environmentSelection.tsdiff --git a/frontend/src/react/pages/settings/general/AIAugmentationSection.tsx b/frontend/src/routes/workspace/general/AIAugmentationSection.tsxsimilarity index 94%rename from frontend/src/react/pages/settings/general/AIAugmentationSection.tsxrename to frontend/src/routes/workspace/general/AIAugmentationSection.tsxindex 2fd19fc167..7c5ff4e1fc 100644--- a/frontend/src/react/pages/settings/general/AIAugmentationSection.tsx+++ b/frontend/src/routes/workspace/general/AIAugmentationSection.tsx@@ -10,30 +10,26 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";-import { ComponentPermissionGuard } from "@/react/components/ComponentPermissionGuard";-import { LearnMoreLink } from "@/react/components/LearnMoreLink";-import { PermissionGuard } from "@/react/components/PermissionGuard";-import { Alert } from "@/react/components/ui/alert";-import { Checkbox } from "@/react/components/ui/checkbox";-import {- FormField,- FormFieldGroup,- FormSection,-} from "@/react/components/ui/form";-import { Input } from "@/react/components/ui/input";+import { ComponentPermissionGuard } from "@/components/ComponentPermissionGuard";+import { LearnMoreLink } from "@/components/LearnMoreLink";+import { PermissionGuard } from "@/components/PermissionGuard";+import { Alert } from "@/components/ui/alert";+import { Checkbox } from "@/components/ui/checkbox";+import { FormField, FormFieldGroup, FormSection } from "@/components/ui/form";+import { Input } from "@/components/ui/input";import {Select,SelectContent,SelectItem,SelectTrigger,SelectValue,-} from "@/react/components/ui/select";-import { useServerState } from "@/react/hooks/useAppState";+} from "@/components/ui/select";+import { useServerState } from "@/hooks/useAppState";import {AI_ASSISTANT_PRODUCT_INTRO,useProductIntro,-} from "@/react/lib/productIntro";-import { useAppStore } from "@/react/stores/app";+} from "@/lib/productIntro";+import { useAppStore } from "@/stores/app";import {AISetting_Provider,AISettingSchema,diff --git a/frontend/src/react/pages/settings/general/AccountSection.tsx b/frontend/src/routes/workspace/general/AccountSection.tsxsimilarity index 98%rename from frontend/src/react/pages/settings/general/AccountSection.tsxrename to frontend/src/routes/workspace/general/AccountSection.tsxindex bc6a4f5621..afafc40138 100644--- a/frontend/src/react/pages/settings/general/AccountSection.tsx+++ b/frontend/src/routes/workspace/general/AccountSection.tsx@@ -12,22 +12,18 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";-import { FeatureBadge } from "@/react/components/FeatureBadge";+import { FeatureBadge } from "@/components/FeatureBadge";import {PermissionGuard,usePermissionCheck,-} from "@/react/components/PermissionGuard";-import { Checkbox } from "@/react/components/ui/checkbox";-import {- FormField,- FormFieldGroup,- FormSection,-} from "@/react/components/ui/form";-import { Input } from "@/react/components/ui/input";-import { NumberInput } from "@/react/components/ui/number-input";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";-import { usePlanFeature, useServerState } from "@/react/hooks/useAppState";-import { useAppStore } from "@/react/stores/app";+} from "@/components/PermissionGuard";+import { Checkbox } from "@/components/ui/checkbox";+import { FormField, FormFieldGroup, FormSection } from "@/components/ui/form";+import { Input } from "@/components/ui/input";+import { NumberInput } from "@/components/ui/number-input";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";+import { usePlanFeature, useServerState } from "@/hooks/useAppState";+import { useAppStore } from "@/stores/app";import {defaultAccessTokenDurationInHours,defaultRefreshTokenDurationInHours,diff --git a/frontend/src/react/pages/settings/general/AnnouncementSection.test.tsx b/frontend/src/routes/workspace/general/AnnouncementSection.test.tsxsimilarity index 95%rename from frontend/src/react/pages/settings/general/AnnouncementSection.test.tsxrename to frontend/src/routes/workspace/general/AnnouncementSection.test.tsxindex d03445afcb..aa7bed45ba 100644--- a/frontend/src/react/pages/settings/general/AnnouncementSection.test.tsx+++ b/frontend/src/routes/workspace/general/AnnouncementSection.test.tsx@@ -53,20 +53,20 @@ vi.mock("react-i18next", () => ({}),}));-vi.mock("@/react/components/FeatureBadge", () => ({+vi.mock("@/components/FeatureBadge", () => ({FeatureBadge: () => null,}));-vi.mock("@/react/components/PermissionGuard", () => ({+vi.mock("@/components/PermissionGuard", () => ({PermissionGuard: ({ children }: { children: ReactElement }) => children,usePermissionCheck: () => [true],}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({usePlanFeature: () => true,}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: {getState: () => ({getWorkspaceProfile: mocks.getWorkspaceProfile,diff --git a/frontend/src/react/pages/settings/general/AnnouncementSection.tsx b/frontend/src/routes/workspace/general/AnnouncementSection.tsxsimilarity index 94%rename from frontend/src/react/pages/settings/general/AnnouncementSection.tsxrename to frontend/src/routes/workspace/general/AnnouncementSection.tsxindex 9524d215df..8bed1915f1 100644--- a/frontend/src/react/pages/settings/general/AnnouncementSection.tsx+++ b/frontend/src/routes/workspace/general/AnnouncementSection.tsx@@ -9,20 +9,20 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";-import { AnnouncementBanner } from "@/react/components/AnnouncementBanner";+import { AnnouncementBanner } from "@/components/AnnouncementBanner";import {ANNOUNCEMENT_PRESET_KEYS,ANNOUNCEMENT_PRESETS,type AnnouncementTheme,matchPresetKey,resolveAnnouncementTheme,-} from "@/react/components/announcement-theme";-import { FeatureBadge } from "@/react/components/FeatureBadge";+} from "@/components/announcement-theme";+import { FeatureBadge } from "@/components/FeatureBadge";import {PermissionGuard,usePermissionCheck,-} from "@/react/components/PermissionGuard";-import { ColorInput } from "@/react/components/ui/color-input";+} from "@/components/PermissionGuard";+import { ColorInput } from "@/components/ui/color-input";import {FormControlGroup,FormControlRow,@@ -30,11 +30,11 @@ import {FormFieldGroup,FormLabel,FormSection,-} from "@/react/components/ui/form";-import { Input } from "@/react/components/ui/input";-import { SegmentedControl } from "@/react/components/ui/segmented-control";-import { usePlanFeature } from "@/react/hooks/useAppState";-import { useAppStore } from "@/react/stores/app";+} from "@/components/ui/form";+import { Input } from "@/components/ui/input";+import { SegmentedControl } from "@/components/ui/segmented-control";+import { usePlanFeature } from "@/hooks/useAppState";+import { useAppStore } from "@/stores/app";import {Announcement_AnnouncementThemeSchema,AnnouncementSchema,diff --git a/frontend/src/react/pages/settings/general/AuditLogSection.tsx b/frontend/src/routes/workspace/general/AuditLogSection.tsxsimilarity index 92%rename from frontend/src/react/pages/settings/general/AuditLogSection.tsxrename to frontend/src/routes/workspace/general/AuditLogSection.tsxindex cb228c5073..4940ad15da 100644--- a/frontend/src/react/pages/settings/general/AuditLogSection.tsx+++ b/frontend/src/routes/workspace/general/AuditLogSection.tsx@@ -9,15 +9,11 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";-import { FeatureBadge } from "@/react/components/FeatureBadge";-import { Checkbox } from "@/react/components/ui/checkbox";-import {- FormField,- FormFieldGroup,- FormSection,-} from "@/react/components/ui/form";-import { usePlanFeature } from "@/react/hooks/useAppState";-import { useAppStore } from "@/react/stores/app";+import { FeatureBadge } from "@/components/FeatureBadge";+import { Checkbox } from "@/components/ui/checkbox";+import { FormField, FormFieldGroup, FormSection } from "@/components/ui/form";+import { usePlanFeature } from "@/hooks/useAppState";+import { useAppStore } from "@/stores/app";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import type { SectionHandle } from "./useSettingSection";diff --git a/frontend/src/react/pages/settings/general/BrandingSection.tsx b/frontend/src/routes/workspace/general/BrandingSection.tsxsimilarity index 95%rename from frontend/src/react/pages/settings/general/BrandingSection.tsxrename to frontend/src/routes/workspace/general/BrandingSection.tsxindex 57dfe70ea6..98cf6b0d97 100644--- a/frontend/src/react/pages/settings/general/BrandingSection.tsx+++ b/frontend/src/routes/workspace/general/BrandingSection.tsx@@ -10,21 +10,17 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";-import { FeatureBadge } from "@/react/components/FeatureBadge";+import { FeatureBadge } from "@/components/FeatureBadge";import {PermissionGuard,usePermissionCheck,-} from "@/react/components/PermissionGuard";-import { Button } from "@/react/components/ui/button";-import {- FormField,- FormFieldGroup,- FormSection,-} from "@/react/components/ui/form";-import { Input } from "@/react/components/ui/input";-import { usePlanFeature, useWorkspace } from "@/react/hooks/useAppState";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/components/PermissionGuard";+import { Button } from "@/components/ui/button";+import { FormField, FormFieldGroup, FormSection } from "@/components/ui/form";+import { Input } from "@/components/ui/input";+import { usePlanFeature, useWorkspace } from "@/hooks/useAppState";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import { WorkspaceSchema } from "@/types/proto-es/v1/workspace_service_pb";import type { SectionHandle } from "./useSettingSection";diff --git a/frontend/src/react/pages/settings/general/DangerZoneSection.tsx b/frontend/src/routes/workspace/general/DangerZoneSection.tsxsimilarity index 95%rename from frontend/src/react/pages/settings/general/DangerZoneSection.tsxrename to frontend/src/routes/workspace/general/DangerZoneSection.tsxindex 2cb922b107..58ff7129f5 100644--- a/frontend/src/react/pages/settings/general/DangerZoneSection.tsx+++ b/frontend/src/routes/workspace/general/DangerZoneSection.tsx@@ -1,21 +1,18 @@import { useCallback, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { workspaceServiceClientConnect } from "@/connect";+import { workspaceServiceClientConnect } from "@/api";import {AlertDialog,AlertDialogContent,AlertDialogDescription,AlertDialogFooter,AlertDialogTitle,-} from "@/react/components/ui/alert-dialog";-import { Button } from "@/react/components/ui/button";-import { Input } from "@/react/components/ui/input";-import {- useOptionalCurrentUser,- useWorkspace,-} from "@/react/hooks/useAppState";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/components/ui/alert-dialog";+import { Button } from "@/components/ui/button";+import { Input } from "@/components/ui/input";+import { useOptionalCurrentUser, useWorkspace } from "@/hooks/useAppState";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import { PresetRoleType } from "@/types/iam/role";import { userBindingPrefix } from "@/types/v1/user";import { hasWorkspacePermissionV2 } from "@/utils";diff --git a/frontend/src/react/pages/settings/general/GeneralPage.tsx b/frontend/src/routes/workspace/general/GeneralPage.tsxsimilarity index 93%rename from frontend/src/react/pages/settings/general/GeneralPage.tsxrename to frontend/src/routes/workspace/general/GeneralPage.tsxindex 2aeaf6bcf4..ea884d33ca 100644--- a/frontend/src/react/pages/settings/general/GeneralPage.tsx+++ b/frontend/src/routes/workspace/general/GeneralPage.tsx@@ -1,12 +1,12 @@import { useCallback, useEffect, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { PermissionGuard } from "@/react/components/PermissionGuard";-import { Button } from "@/react/components/ui/button";-import { StickyActionFooter } from "@/react/components/ui/sticky-action-footer";-import { WorkspacePageLayout } from "@/react/components/WorkspacePageLayout";-import { useServerState } from "@/react/hooks/useAppState";-import { useUnsavedChangesGuard } from "@/react/hooks/useUnsavedChangesGuard";-import { pushNotification } from "@/store";+import { PermissionGuard } from "@/components/PermissionGuard";+import { Button } from "@/components/ui/button";+import { StickyActionFooter } from "@/components/ui/sticky-action-footer";+import { WorkspacePageLayout } from "@/components/WorkspacePageLayout";+import { useServerState } from "@/hooks/useAppState";+import { useUnsavedChangesGuard } from "@/hooks/useUnsavedChangesGuard";+import { pushNotification } from "@/stores";import { hasWorkspacePermissionV2 } from "@/utils";import { AccountSection } from "./AccountSection";import { AIAugmentationSection } from "./AIAugmentationSection";diff --git a/frontend/src/react/pages/settings/general/GeneralPageLayout.test.ts b/frontend/src/routes/workspace/general/GeneralPageLayout.test.tssimilarity index 96%rename from frontend/src/react/pages/settings/general/GeneralPageLayout.test.tsrename to frontend/src/routes/workspace/general/GeneralPageLayout.test.tsindex 79ffc6be88..2f0f9a68f8 100644--- a/frontend/src/react/pages/settings/general/GeneralPageLayout.test.ts+++ b/frontend/src/routes/workspace/general/GeneralPageLayout.test.ts@@ -22,8 +22,8 @@ describe("GeneralPage section layout", () => {for (const file of configurableSections) {const source = readFileSync(join(sectionDir, file), "utf8");- expect(source, file).toContain("@/react/components/ui/form");- expect(source, file).not.toContain("@/react/components/ui/form.v2");+ expect(source, file).toContain("@/components/ui/form");+ expect(source, file).not.toContain("@/components/ui/form.v2");expect(source, file).toContain("FormSection");expect(source, file).toContain("FormFieldGroup");expect(source, file).not.toContain("FormSectionHeader");diff --git a/frontend/src/react/pages/settings/general/GeneralSection.tsx b/frontend/src/routes/workspace/general/GeneralSection.tsxsimilarity index 91%rename from frontend/src/react/pages/settings/general/GeneralSection.tsxrename to frontend/src/routes/workspace/general/GeneralSection.tsxindex 39c8055409..e6752f67bc 100644--- a/frontend/src/react/pages/settings/general/GeneralSection.tsx+++ b/frontend/src/routes/workspace/general/GeneralSection.tsx@@ -9,33 +9,25 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";-import { LearnMoreLink } from "@/react/components/LearnMoreLink";+import { router } from "@/app/router";+import { SQL_EDITOR_HOME_MODULE } from "@/app/router/handles";+import { LearnMoreLink } from "@/components/LearnMoreLink";import {PermissionGuard,usePermissionCheck,-} from "@/react/components/PermissionGuard";-import { Alert } from "@/react/components/ui/alert";-import { Button } from "@/react/components/ui/button";-import {- Dialog,- DialogContent,- DialogTitle,-} from "@/react/components/ui/dialog";-import {- FormField,- FormFieldGroup,- FormSection,-} from "@/react/components/ui/form";-import { Input } from "@/react/components/ui/input";-import { RadioGroup, RadioGroupItem } from "@/react/components/ui/radio-group";-import { useServerState } from "@/react/hooks/useAppState";+} from "@/components/PermissionGuard";+import { Alert } from "@/components/ui/alert";+import { Button } from "@/components/ui/button";+import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";+import { FormField, FormFieldGroup, FormSection } from "@/components/ui/form";+import { Input } from "@/components/ui/input";+import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";+import { useServerState } from "@/hooks/useAppState";import {EXTERNAL_URL_PRODUCT_INTRO,useProductIntro,-} from "@/react/lib/productIntro";-import { router } from "@/react/router";-import { SQL_EDITOR_HOME_MODULE } from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";+} from "@/lib/productIntro";+import { useAppStore } from "@/stores/app";import { DatabaseChangeMode } from "@/types/proto-es/v1/setting_service_pb";import type { SectionHandle } from "./useSettingSection";diff --git a/frontend/src/react/pages/settings/general/ProductImprovementSection.tsx b/frontend/src/routes/workspace/general/ProductImprovementSection.tsxsimilarity index 92%rename from frontend/src/react/pages/settings/general/ProductImprovementSection.tsxrename to frontend/src/routes/workspace/general/ProductImprovementSection.tsxindex 769c177edf..a1aa5da6e1 100644--- a/frontend/src/react/pages/settings/general/ProductImprovementSection.tsx+++ b/frontend/src/routes/workspace/general/ProductImprovementSection.tsx@@ -8,13 +8,9 @@ import {useState,} from "react";import { useTranslation } from "react-i18next";-import { Checkbox } from "@/react/components/ui/checkbox";-import {- FormField,- FormFieldGroup,- FormSection,-} from "@/react/components/ui/form";-import { useAppStore } from "@/react/stores/app";+import { Checkbox } from "@/components/ui/checkbox";+import { FormField, FormFieldGroup, FormSection } from "@/components/ui/form";+import { useAppStore } from "@/stores/app";import type { SectionHandle } from "./useSettingSection";interface ProductImprovementSectionProps {diff --git a/frontend/src/react/pages/settings/general/SQLEditorSection.test.tsx b/frontend/src/routes/workspace/general/SQLEditorSection.test.tsxsimilarity index 93%rename from frontend/src/react/pages/settings/general/SQLEditorSection.test.tsxrename to frontend/src/routes/workspace/general/SQLEditorSection.test.tsxindex 33d14b5e1b..c0764ed2e2 100644--- a/frontend/src/react/pages/settings/general/SQLEditorSection.test.tsx+++ b/frontend/src/routes/workspace/general/SQLEditorSection.test.tsx@@ -48,8 +48,8 @@ const mocks = vi.hoisted(() => {vi.mock("react-i18next", () => ({useTranslation: () => ({ t: (key: string) => key }),- // ThemePreview now embeds MonacoEditor, whose transitive imports pull in- // src/react/i18n.ts which calls `i18n.use(initReactI18next)`.+ // ThemePreview embeds MonacoEditor, whose transitive imports initialize the+ // shared react-i18next instance.initReactI18next: { type: "3rdParty", init: () => {} },}));@@ -65,18 +65,18 @@ vi.mock("@/utils", () => ({},}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({usePlanFeature: () => true,useWorkspaceResourceName: () => "workspaces/-",}));-vi.mock("@/react/components/FeatureBadge", () => ({+vi.mock("@/components/FeatureBadge", () => ({FeatureBadge: () => null,}));// ThemePreview embeds a real Monaco editor; stub it so the heavy codingame// monaco runtime (which imports .css) isn't loaded in the node test env.-vi.mock("@/react/components/monaco/MonacoEditor", () => ({+vi.mock("@/components/monaco/MonacoEditor", () => ({MonacoEditor: ({ content }: { content: string }) => (<textarea data-testid="monaco-editor" readOnly value={content} />),@@ -84,7 +84,7 @@ vi.mock("@/react/components/monaco/MonacoEditor", () => ({// The editor-theme enumeration dynamic-imports the codingame VSCode api +// services; stub it so the test doesn't pull that chain into jsdom.-vi.mock("@/react/components/monaco/editorThemes", () => ({+vi.mock("@/components/monaco/editorThemes", () => ({BUILTIN_EDITOR_THEMES: [{ id: "vs", label: "Light", type: "light" }],getAvailableEditorThemes: vi.fn(async () => [{ id: "vs", label: "Light", type: "light" },@@ -94,23 +94,23 @@ vi.mock("@/react/components/monaco/editorThemes", () => ({// ThemePreview now embeds the real result grid (SQLResultViewProvider +// VirtualDataTable / VirtualDataBlock). Those transitively pull in the SQL-// Editor store chain (src/react/stores/sqlEditor/editor.ts), which reads+// Editor store chain (src/stores/sqlEditor/editor.ts), which reads// useAppStore.getState() at module-eval time — colliding with this file's// hoisted app-store mock. Stub them like MonacoEditor: render-only shells with// no store usage. The theme preview only needs them to mount.-vi.mock("@/react/components/sql-editor/ResultView/context", () => ({+vi.mock("@/modules/sql-editor/components/ResultView/context", () => ({SQLResultViewProvider: ({ children }: { children: React.ReactNode }) => (<>{children}</>),}));-vi.mock("@/react/components/sql-editor/ResultView/VirtualDataTable", () => ({+vi.mock("@/modules/sql-editor/components/ResultView/VirtualDataTable", () => ({VirtualDataTable: () => <div data-testid="virtual-data-table" />,}));-vi.mock("@/react/components/sql-editor/ResultView/VirtualDataBlock", () => ({+vi.mock("@/modules/sql-editor/components/ResultView/VirtualDataBlock", () => ({VirtualDataBlock: () => <div data-testid="virtual-data-block" />,}));-vi.mock("@/react/components/PermissionGuard", () => ({+vi.mock("@/components/PermissionGuard", () => ({PermissionGuard: ({ children }: { children: React.ReactNode }) => (<>{children}</>),@@ -126,14 +126,14 @@ const storeState = {upsertPolicy: mocks.upsertPolicy,};-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: Object.assign((selector: (s: typeof storeState) => unknown) => selector(storeState),{ getState: () => storeState }),}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({DEFAULT_MAX_RESULT_SIZE_IN_MB: 100,}));diff --git a/frontend/src/react/pages/settings/general/SQLEditorSection.tsx b/frontend/src/routes/workspace/general/SQLEditorSection.tsxsimilarity index 95%rename from frontend/src/react/pages/settings/general/SQLEditorSection.tsxrename to frontend/src/routes/workspace/general/SQLEditorSection.tsxindex 01c48ba4de..f313c6add1 100644--- a/frontend/src/react/pages/settings/general/SQLEditorSection.tsx+++ b/frontend/src/routes/workspace/general/SQLEditorSection.tsx@@ -11,42 +11,35 @@ import {} from "react";import { useTranslation } from "react-i18next";import { v4 as uuidv4 } from "uuid";-import { FeatureBadge } from "@/react/components/FeatureBadge";+import { FeatureBadge } from "@/components/FeatureBadge";import {BUILTIN_EDITOR_THEMES,type EditorThemeOption,getAvailableEditorThemes,-} from "@/react/components/monaco/editorThemes";-import { PermissionGuard } from "@/react/components/PermissionGuard";+} from "@/components/monaco/editorThemes";+import { PermissionGuard } from "@/components/PermissionGuard";+import { Checkbox } from "@/components/ui/checkbox";+import { FormField, FormFieldGroup, FormSection } from "@/components/ui/form";+import { NumberInput } from "@/components/ui/number-input";+import { SegmentedControl } from "@/components/ui/segmented-control";+import { usePlanFeature, useWorkspaceResourceName } from "@/hooks/useAppState";import {deriveThemeFromAnchors,type ThemeAnchors,themeToAnchors,-} from "@/react/components/sql-editor/theme/derive";+} from "@/modules/sql-editor/components/theme/derive";import {DEFAULT_THEME_ID,PRESET_BY_ID,PRESETS,-} from "@/react/components/sql-editor/theme/presets";+} from "@/modules/sql-editor/components/theme/presets";import type {SQLEditorTheme,SQLEditorThemeToken,-} from "@/react/components/sql-editor/theme/types";-import { resolveWorkspaceTheme } from "@/react/components/sql-editor/theme/useWorkspaceSQLEditorTheme";-import { Checkbox } from "@/react/components/ui/checkbox";-import {- FormField,- FormFieldGroup,- FormSection,-} from "@/react/components/ui/form";-import { NumberInput } from "@/react/components/ui/number-input";-import { SegmentedControl } from "@/react/components/ui/segmented-control";-import {- usePlanFeature,- useWorkspaceResourceName,-} from "@/react/hooks/useAppState";-import { useAppStore } from "@/react/stores/app";-import { DEFAULT_MAX_RESULT_SIZE_IN_MB } from "@/store";+} from "@/modules/sql-editor/components/theme/types";+import { resolveWorkspaceTheme } from "@/modules/sql-editor/components/theme/useWorkspaceSQLEditorTheme";+import { DEFAULT_MAX_RESULT_SIZE_IN_MB } from "@/stores";+import { useAppStore } from "@/stores/app";import {PolicyResourceType,PolicyType,diff --git a/frontend/src/react/pages/settings/general/SecuritySection.tsx b/frontend/src/routes/workspace/general/SecuritySection.tsxsimilarity index 97%rename from frontend/src/react/pages/settings/general/SecuritySection.tsxrename to frontend/src/routes/workspace/general/SecuritySection.tsxindex 87e0459c00..79c7f2e435 100644--- a/frontend/src/react/pages/settings/general/SecuritySection.tsx+++ b/frontend/src/routes/workspace/general/SecuritySection.tsx@@ -13,24 +13,20 @@ import {useState,} from "react";import { Trans, useTranslation } from "react-i18next";-import { FeatureBadge } from "@/react/components/FeatureBadge";+import { FeatureBadge } from "@/components/FeatureBadge";import {PermissionGuard,usePermissionCheck,-} from "@/react/components/PermissionGuard";-import { Checkbox } from "@/react/components/ui/checkbox";-import {- FormField,- FormFieldGroup,- FormSection,-} from "@/react/components/ui/form";-import { Input } from "@/react/components/ui/input";-import { usePlanFeature } from "@/react/hooks/useAppState";+} from "@/components/PermissionGuard";+import { Checkbox } from "@/components/ui/checkbox";+import { FormField, FormFieldGroup, FormSection } from "@/components/ui/form";+import { Input } from "@/components/ui/input";+import { usePlanFeature } from "@/hooks/useAppState";import {DOMAIN_RESTRICTION_PRODUCT_INTRO,useProductIntro,-} from "@/react/lib/productIntro";-import { useAppStore } from "@/react/stores/app";+} from "@/lib/productIntro";+import { useAppStore } from "@/stores/app";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";import type { SectionHandle } from "./useSettingSection";diff --git a/frontend/src/react/pages/settings/general/aiProviderDefaults.test.ts b/frontend/src/routes/workspace/general/aiProviderDefaults.test.tssimilarity index 100%rename from frontend/src/react/pages/settings/general/aiProviderDefaults.test.tsrename to frontend/src/routes/workspace/general/aiProviderDefaults.test.tsdiff --git a/frontend/src/react/pages/settings/general/aiProviderDefaults.ts b/frontend/src/routes/workspace/general/aiProviderDefaults.tssimilarity index 100%rename from frontend/src/react/pages/settings/general/aiProviderDefaults.tsrename to frontend/src/routes/workspace/general/aiProviderDefaults.tsdiff --git a/frontend/src/react/pages/settings/general/sql-editor-theme/ThemeAnchorEditor.tsx b/frontend/src/routes/workspace/general/sql-editor-theme/ThemeAnchorEditor.tsxsimilarity index 92%rename from frontend/src/react/pages/settings/general/sql-editor-theme/ThemeAnchorEditor.tsxrename to frontend/src/routes/workspace/general/sql-editor-theme/ThemeAnchorEditor.tsxindex ae69447989..43f88c11a6 100644--- a/frontend/src/react/pages/settings/general/sql-editor-theme/ThemeAnchorEditor.tsx+++ b/frontend/src/routes/workspace/general/sql-editor-theme/ThemeAnchorEditor.tsx@@ -1,16 +1,16 @@import { CircleHelp } from "lucide-react";import { useTranslation } from "react-i18next";-import type { EditorThemeOption } from "@/react/components/monaco/editorThemes";-import type { ThemeAnchors } from "@/react/components/sql-editor/theme/derive";-import { ColorInput } from "@/react/components/ui/color-input";+import type { EditorThemeOption } from "@/components/monaco/editorThemes";+import { ColorInput } from "@/components/ui/color-input";import {Select,SelectContent,SelectItem,SelectTrigger,SelectValue,-} from "@/react/components/ui/select";-import { Tooltip } from "@/react/components/ui/tooltip";+} from "@/components/ui/select";+import { Tooltip } from "@/components/ui/tooltip";+import type { ThemeAnchors } from "@/modules/sql-editor/components/theme/derive";interface ThemeAnchorEditorProps {value: ThemeAnchors;diff --git a/frontend/src/react/pages/settings/general/sql-editor-theme/ThemePreview.tsx b/frontend/src/routes/workspace/general/sql-editor-theme/ThemePreview.tsxsimilarity index 92%rename from frontend/src/react/pages/settings/general/sql-editor-theme/ThemePreview.tsxrename to frontend/src/routes/workspace/general/sql-editor-theme/ThemePreview.tsxindex d5e9f1ffe3..45afc369e2 100644--- a/frontend/src/react/pages/settings/general/sql-editor-theme/ThemePreview.tsx+++ b/frontend/src/routes/workspace/general/sql-editor-theme/ThemePreview.tsx@@ -2,23 +2,20 @@ import { create } from "@bufbuild/protobuf";import { Copy, Play, Plus, Save, Share2, X } from "lucide-react";import { useState } from "react";import { useTranslation } from "react-i18next";-import {- AdvancedSearch,- type SearchParams,-} from "@/react/components/AdvancedSearch";-import { MonacoEditor } from "@/react/components/monaco/MonacoEditor";-import { SQLResultViewProvider } from "@/react/components/sql-editor/ResultView/context";+import { AdvancedSearch, type SearchParams } from "@/components/AdvancedSearch";+import { MonacoEditor } from "@/components/monaco/MonacoEditor";+import { Button } from "@/components/ui/button";+import { Switch } from "@/components/ui/switch";+import { SQLResultViewProvider } from "@/modules/sql-editor/components/ResultView/context";import type {ResultTableColumn,ResultTableRow,-} from "@/react/components/sql-editor/ResultView/types";-import { VirtualDataBlock } from "@/react/components/sql-editor/ResultView/VirtualDataBlock";-import { VirtualDataTable } from "@/react/components/sql-editor/ResultView/VirtualDataTable";-import { monacoThemeName } from "@/react/components/sql-editor/theme/derive";-import { SQLEditorThemeScope } from "@/react/components/sql-editor/theme/SQLEditorThemeScope";-import type { SQLEditorTheme } from "@/react/components/sql-editor/theme/types";-import { Button } from "@/react/components/ui/button";-import { Switch } from "@/react/components/ui/switch";+} from "@/modules/sql-editor/components/ResultView/types";+import { VirtualDataBlock } from "@/modules/sql-editor/components/ResultView/VirtualDataBlock";+import { VirtualDataTable } from "@/modules/sql-editor/components/ResultView/VirtualDataTable";+import { monacoThemeName } from "@/modules/sql-editor/components/theme/derive";+import { SQLEditorThemeScope } from "@/modules/sql-editor/components/theme/SQLEditorThemeScope";+import type { SQLEditorTheme } from "@/modules/sql-editor/components/theme/types";import { Engine } from "@/types/proto-es/v1/common_pb";import { DatabaseSchema$ } from "@/types/proto-es/v1/database_service_pb";import {diff --git a/frontend/src/react/pages/settings/general/useSettingSection.ts b/frontend/src/routes/workspace/general/useSettingSection.tssimilarity index 100%rename from frontend/src/react/pages/settings/general/useSettingSection.tsrename to frontend/src/routes/workspace/general/useSettingSection.tsdiff --git a/frontend/src/react/pages/settings/membersPageActions.test.ts b/frontend/src/routes/workspace/membersPageActions.test.tssimilarity index 100%rename from frontend/src/react/pages/settings/membersPageActions.test.tsrename to frontend/src/routes/workspace/membersPageActions.test.tsdiff --git a/frontend/src/react/pages/settings/membersPageActions.ts b/frontend/src/routes/workspace/membersPageActions.tssimilarity index 100%rename from frontend/src/react/pages/settings/membersPageActions.tsrename to frontend/src/routes/workspace/membersPageActions.tsdiff --git a/frontend/src/react/pages/settings/membersPageEnvironment.test.ts b/frontend/src/routes/workspace/membersPageEnvironment.test.tssimilarity index 97%rename from frontend/src/react/pages/settings/membersPageEnvironment.test.tsrename to frontend/src/routes/workspace/membersPageEnvironment.test.tsindex 2eeebed2ac..95043d0bbe 100644--- a/frontend/src/react/pages/settings/membersPageEnvironment.test.ts+++ b/frontend/src/routes/workspace/membersPageEnvironment.test.ts@@ -2,7 +2,7 @@ import { describe, expect, test, vi } from "vitest";import type { Binding } from "@/types/proto-es/v1/iam_policy_pb";import { getProjectRoleBindingEnvironmentLimitationState } from "./membersPageEnvironment";-vi.mock("@/react/lib/project-member/utils", () => ({+vi.mock("@/lib/project-member/utils", () => ({getRoleEnvironmentLimitationKind: (role: string) =>role === "roles/sqlEditorUser" ? "DDL/DML" : undefined,}));diff --git a/frontend/src/react/pages/settings/membersPageEnvironment.ts b/frontend/src/routes/workspace/membersPageEnvironment.tssimilarity index 90%rename from frontend/src/react/pages/settings/membersPageEnvironment.tsrename to frontend/src/routes/workspace/membersPageEnvironment.tsindex a29eb6002e..55a92cd7a5 100644--- a/frontend/src/react/pages/settings/membersPageEnvironment.ts+++ b/frontend/src/routes/workspace/membersPageEnvironment.ts@@ -1,4 +1,4 @@-import { getRoleEnvironmentLimitationKind } from "@/react/lib/project-member/utils";+import { getRoleEnvironmentLimitationKind } from "@/lib/project-member/utils";import type { Binding } from "@/types/proto-es/v1/iam_policy_pb";import { convertFromExpr } from "@/utils/issue/cel";diff --git a/frontend/src/react/pages/settings/profile/EmailInput.tsx b/frontend/src/routes/workspace/profile/EmailInput.tsxsimilarity index 97%rename from frontend/src/react/pages/settings/profile/EmailInput.tsxrename to frontend/src/routes/workspace/profile/EmailInput.tsxindex 7e7a141d66..c87b533910 100644--- a/frontend/src/react/pages/settings/profile/EmailInput.tsx+++ b/frontend/src/routes/workspace/profile/EmailInput.tsx@@ -1,14 +1,14 @@import { useCallback, useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { Input } from "@/react/components/ui/input";+import { Input } from "@/components/ui/input";import {Select,SelectContent,SelectItem,SelectTrigger,SelectValue,-} from "@/react/components/ui/select";-import { useAppStore } from "@/react/stores/app";+} from "@/components/ui/select";+import { useAppStore } from "@/stores/app";// WHATWG HTML spec email validation (lowercase only).const emailRegex =diff --git a/frontend/src/react/pages/settings/profile/ProfilePage.test.tsx b/frontend/src/routes/workspace/profile/ProfilePage.test.tsxsimilarity index 90%rename from frontend/src/react/pages/settings/profile/ProfilePage.test.tsxrename to frontend/src/routes/workspace/profile/ProfilePage.test.tsxindex b41a6adea6..564d6d049c 100644--- a/frontend/src/react/pages/settings/profile/ProfilePage.test.tsx+++ b/frontend/src/routes/workspace/profile/ProfilePage.test.tsx@@ -44,15 +44,15 @@ const mocks = vi.hoisted(() => ({hasWorkspacePermissionV2: vi.fn(() => true),}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useCurrentUser: mocks.useCurrentUser,}));-vi.mock("@/react/hooks/useUnsavedChangesGuard", () => ({+vi.mock("@/hooks/useUnsavedChangesGuard", () => ({useUnsavedChangesGuard: vi.fn(),}));-vi.mock("@/react/stores/app", () => {+vi.mock("@/stores/app", () => {const buildState = () => ({getUserByIdentifier: mocks.getUserByIdentifier,getOrFetchUserByIdentifier: mocks.getOrFetchUserByIdentifier,@@ -77,14 +77,14 @@ vi.mock("@/react/stores/app", () => {return { useAppStore };});-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({hasFeature: mocks.hasFeature,pushNotification: mocks.pushNotification,useAuthStore: mocks.useAuthStore,}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {replace: mocks.routerReplace,push: mocks.routerPush,@@ -109,15 +109,15 @@ vi.mock("@bufbuild/protobuf", async (importOriginal) => {};});-vi.mock("@/react/components/FeatureBadge", () => ({+vi.mock("@/components/FeatureBadge", () => ({FeatureBadge: () => <span data-testid="feature-badge" />,}));-vi.mock("@/react/components/LearnMoreLink", () => ({+vi.mock("@/components/LearnMoreLink", () => ({LearnMoreLink: () => <a href="https://example.com">learn</a>,}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,...props@@ -128,7 +128,7 @@ vi.mock("@/react/components/ui/button", () => ({),}));-vi.mock("@/react/components/ui/input", () => ({+vi.mock("@/components/ui/input", () => ({Input: ({ref,...props@@ -137,7 +137,7 @@ vi.mock("@/react/components/ui/input", () => ({}) => <input ref={ref} {...props} />,}));-vi.mock("@/react/components/ui/dialog", () => ({+vi.mock("@/components/ui/dialog", () => ({Dialog: ({ children }: { children: React.ReactNode }) => <>{children}</>,DialogContent: ({ children }: { children: React.ReactNode }) => (<div>{children}</div>@@ -150,7 +150,7 @@ vi.mock("@/react/components/ui/dialog", () => ({),}));-vi.mock("@/react/components/ui/dropdown-menu", () => ({+vi.mock("@/components/ui/dropdown-menu", () => ({DropdownMenu: ({ children }: { children: React.ReactNode }) => (<div>{children}</div>),@@ -171,7 +171,7 @@ vi.mock("@/react/components/ui/dropdown-menu", () => ({),}));-vi.mock("@/react/components/ui/feature-modal", () => ({+vi.mock("@/components/ui/feature-modal", () => ({FeatureModal: () => <div data-testid="feature-modal" />,}));@@ -191,7 +191,7 @@ vi.mock("./UserPasswordSection", () => ({}));vi.mock(- "@/react/pages/settings/two-factor/RegenerateRecoveryCodesView",+ "@/routes/workspace/two-factor/RegenerateRecoveryCodesView",() => ({RegenerateRecoveryCodesView: () => <div data-testid="recovery-codes" />,})diff --git a/frontend/src/react/pages/settings/profile/ProfilePage.tsx b/frontend/src/routes/workspace/profile/ProfilePage.tsxsimilarity index 95%rename from frontend/src/react/pages/settings/profile/ProfilePage.tsxrename to frontend/src/routes/workspace/profile/ProfilePage.tsxindex a273e74bbd..8ba9b4d95f 100644--- a/frontend/src/react/pages/settings/profile/ProfilePage.tsx+++ b/frontend/src/routes/workspace/profile/ProfilePage.tsx@@ -5,38 +5,38 @@ import { cloneDeep, isEqual } from "lodash-es";import { Ellipsis, ShieldAlert } from "lucide-react";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { FeatureBadge } from "@/react/components/FeatureBadge";-import { LearnMoreLink } from "@/react/components/LearnMoreLink";-import { RouterLink } from "@/react/components/RouterLink";-import { getAvatarColor, getInitials } from "@/react/components/UserAvatar";-import { Button } from "@/react/components/ui/button";+import { router } from "@/app/router";+import {+ SETTING_ROUTE_PROFILE_TWO_FACTOR,+ SETTING_ROUTE_WORKSPACE_SUBSCRIPTION,+ WORKSPACE_ROUTE_404,+ WORKSPACE_ROUTE_USER_PROFILE,+} from "@/app/router/handles";+import { FeatureBadge } from "@/components/FeatureBadge";+import { LearnMoreLink } from "@/components/LearnMoreLink";+import { RouterLink } from "@/components/RouterLink";+import { getAvatarColor, getInitials } from "@/components/UserAvatar";+import { Button } from "@/components/ui/button";import {Dialog,DialogContent,DialogDescription,DialogTitle,-} from "@/react/components/ui/dialog";+} from "@/components/ui/dialog";import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,-} from "@/react/components/ui/dropdown-menu";-import { FeatureModal } from "@/react/components/ui/feature-modal";-import { Input } from "@/react/components/ui/input";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { useUnsavedChangesGuard } from "@/react/hooks/useUnsavedChangesGuard";-import { displayRoleTitleFromList } from "@/react/lib/role";-import { RegenerateRecoveryCodesView } from "@/react/pages/settings/two-factor/RegenerateRecoveryCodesView";-import { router } from "@/react/router";-import {- SETTING_ROUTE_PROFILE_TWO_FACTOR,- SETTING_ROUTE_WORKSPACE_SUBSCRIPTION,- WORKSPACE_ROUTE_404,- WORKSPACE_ROUTE_USER_PROFILE,-} from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { hasFeature, pushNotification } from "@/store";+} from "@/components/ui/dropdown-menu";+import { FeatureModal } from "@/components/ui/feature-modal";+import { Input } from "@/components/ui/input";+import { useCurrentUser } from "@/hooks/useAppState";+import { useUnsavedChangesGuard } from "@/hooks/useUnsavedChangesGuard";+import { displayRoleTitleFromList } from "@/lib/role";+import { RegenerateRecoveryCodesView } from "@/routes/workspace/two-factor/RegenerateRecoveryCodesView";+import { hasFeature, pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import {AccountType,ALL_USERS_USER_EMAIL,diff --git a/frontend/src/react/pages/settings/profile/UserPasswordSection.tsx b/frontend/src/routes/workspace/profile/UserPasswordSection.tsxsimilarity index 98%rename from frontend/src/react/pages/settings/profile/UserPasswordSection.tsxrename to frontend/src/routes/workspace/profile/UserPasswordSection.tsxindex 6f8f41f302..18ffbbd0eb 100644--- a/frontend/src/react/pages/settings/profile/UserPasswordSection.tsx+++ b/frontend/src/routes/workspace/profile/UserPasswordSection.tsx@@ -7,8 +7,8 @@ import {} from "lucide-react";import { useMemo, useState } from "react";import { useTranslation } from "react-i18next";-import { Input } from "@/react/components/ui/input";-import { Tooltip } from "@/react/components/ui/tooltip";+import { Input } from "@/components/ui/input";+import { Tooltip } from "@/components/ui/tooltip";import type { WorkspaceProfileSetting_PasswordRestriction } from "@/types/proto-es/v1/setting_service_pb";interface PasswordCheck {diff --git a/frontend/src/react/pages/settings/resourceStateFilter.test.ts b/frontend/src/routes/workspace/resourceStateFilter.test.tssimilarity index 100%rename from frontend/src/react/pages/settings/resourceStateFilter.test.tsrename to frontend/src/routes/workspace/resourceStateFilter.test.tsdiff --git a/frontend/src/react/pages/settings/resourceStateFilter.ts b/frontend/src/routes/workspace/resourceStateFilter.tssimilarity index 80%rename from frontend/src/react/pages/settings/resourceStateFilter.tsrename to frontend/src/routes/workspace/resourceStateFilter.tsindex afdbaaebc4..afa2c40913 100644--- a/frontend/src/react/pages/settings/resourceStateFilter.ts+++ b/frontend/src/routes/workspace/resourceStateFilter.ts@@ -1,5 +1,5 @@-import type { SearchParams } from "@/react/components/AdvancedSearch";-import { legacyStateSearchParams } from "@/react/hooks/useURLSearchParam";+import type { SearchParams } from "@/components/AdvancedSearch";+import { legacyStateSearchParams } from "@/hooks/useURLSearchParam";import { State } from "@/types/proto-es/v1/common_pb";export const defaultActiveStateSearchParams = (diff --git a/frontend/src/react/pages/settings/shared/AADSyncSheet.tsx b/frontend/src/routes/workspace/shared/AADSyncSheet.tsxsimilarity index 92%rename from frontend/src/react/pages/settings/shared/AADSyncSheet.tsxrename to frontend/src/routes/workspace/shared/AADSyncSheet.tsxindex aed0fa1a1b..193b38dedb 100644--- a/frontend/src/react/pages/settings/shared/AADSyncSheet.tsx+++ b/frontend/src/routes/workspace/shared/AADSyncSheet.tsx@@ -2,10 +2,10 @@ import { create } from "@bufbuild/protobuf";import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { Copy } from "lucide-react";import { useTranslation } from "react-i18next";-import { ExternalUrlAlert } from "@/react/components/ExternalUrlAlert";-import { LearnMoreLink } from "@/react/components/LearnMoreLink";-import { Button } from "@/react/components/ui/button";-import { Input } from "@/react/components/ui/input";+import { ExternalUrlAlert } from "@/components/ExternalUrlAlert";+import { LearnMoreLink } from "@/components/LearnMoreLink";+import { Button } from "@/components/ui/button";+import { Input } from "@/components/ui/input";import {Sheet,SheetBody,@@ -13,10 +13,10 @@ import {SheetFooter,SheetHeader,SheetTitle,-} from "@/react/components/ui/sheet";-import { writeTextToClipboard } from "@/react/lib/clipboard";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/components/ui/sheet";+import { writeTextToClipboard } from "@/lib/clipboard";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import { hasWorkspacePermissionV2 } from "@/utils";// ============================================================diff --git a/frontend/src/react/pages/settings/two-factor/RecoveryCodesView.tsx b/frontend/src/routes/workspace/two-factor/RecoveryCodesView.tsxsimilarity index 94%rename from frontend/src/react/pages/settings/two-factor/RecoveryCodesView.tsxrename to frontend/src/routes/workspace/two-factor/RecoveryCodesView.tsxindex 2acc3d31e7..55a1e57f51 100644--- a/frontend/src/react/pages/settings/two-factor/RecoveryCodesView.tsx+++ b/frontend/src/routes/workspace/two-factor/RecoveryCodesView.tsx@@ -1,8 +1,8 @@import { Download } from "lucide-react";import { useCallback } from "react";import { useTranslation } from "react-i18next";-import { Alert } from "@/react/components/ui/alert";-import { Button } from "@/react/components/ui/button";+import { Alert } from "@/components/ui/alert";+import { Button } from "@/components/ui/button";interface RecoveryCodesViewProps {recoveryCodes: string[];diff --git a/frontend/src/react/pages/settings/two-factor/RegenerateRecoveryCodesView.tsx b/frontend/src/routes/workspace/two-factor/RegenerateRecoveryCodesView.tsxsimilarity index 91%rename from frontend/src/react/pages/settings/two-factor/RegenerateRecoveryCodesView.tsxrename to frontend/src/routes/workspace/two-factor/RegenerateRecoveryCodesView.tsxindex 6d4e65774b..66f256501a 100644--- a/frontend/src/react/pages/settings/two-factor/RegenerateRecoveryCodesView.tsx+++ b/frontend/src/routes/workspace/two-factor/RegenerateRecoveryCodesView.tsx@@ -2,10 +2,10 @@ import { create } from "@bufbuild/protobuf";import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { useCallback, useEffect, useState } from "react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+import { Button } from "@/components/ui/button";+import { useCurrentUser } from "@/hooks/useAppState";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import { UpdateUserRequestSchema } from "@/types/proto-es/v1/user_service_pb";import { RecoveryCodesView } from "./RecoveryCodesView";diff --git a/frontend/src/react/pages/settings/two-factor/TwoFactorSecretModal.tsx b/frontend/src/routes/workspace/two-factor/TwoFactorSecretModal.tsxsimilarity index 88%rename from frontend/src/react/pages/settings/two-factor/TwoFactorSecretModal.tsxrename to frontend/src/routes/workspace/two-factor/TwoFactorSecretModal.tsxindex 2d3b003afc..2428cabbd5 100644--- a/frontend/src/react/pages/settings/two-factor/TwoFactorSecretModal.tsx+++ b/frontend/src/routes/workspace/two-factor/TwoFactorSecretModal.tsx@@ -1,14 +1,14 @@import { Copy } from "lucide-react";import { useTranslation } from "react-i18next";-import { Button } from "@/react/components/ui/button";+import { Button } from "@/components/ui/button";import {Dialog,DialogContent,DialogDescription,DialogTitle,-} from "@/react/components/ui/dialog";-import { writeTextToClipboard } from "@/react/lib/clipboard";-import { pushNotification } from "@/store";+} from "@/components/ui/dialog";+import { writeTextToClipboard } from "@/lib/clipboard";+import { pushNotification } from "@/stores";interface TwoFactorSecretModalProps {secret: string;diff --git a/frontend/src/react/pages/settings/two-factor/TwoFactorSetupPage.test.tsx b/frontend/src/routes/workspace/two-factor/TwoFactorSetupPage.test.tsxsimilarity index 91%rename from frontend/src/react/pages/settings/two-factor/TwoFactorSetupPage.test.tsxrename to frontend/src/routes/workspace/two-factor/TwoFactorSetupPage.test.tsxindex fc5f27f2fc..874c74b94c 100644--- a/frontend/src/react/pages/settings/two-factor/TwoFactorSetupPage.test.tsx+++ b/frontend/src/routes/workspace/two-factor/TwoFactorSetupPage.test.tsx@@ -36,23 +36,23 @@ const mocks = vi.hoisted(() => ({},}));-vi.mock("@/react/hooks/useAppState", () => ({+vi.mock("@/hooks/useAppState", () => ({useCurrentUser: mocks.useCurrentUser,}));-vi.mock("@/react/stores/app", () => ({+vi.mock("@/stores/app", () => ({useAppStore: (selector: (state: unknown) => unknown) =>selector({updateUser: mocks.updateUser,}),}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({pushNotification: mocks.pushNotification,}));-vi.mock("@/react/router", async (importOriginal) => ({- ...(await importOriginal<typeof import("@/react/router")>()),+vi.mock("@/app/router", async (importOriginal) => ({+ ...(await importOriginal<typeof import("@/app/router")>()),router: {replace: mocks.routerReplace,currentRoute: mocks.currentRoute,@@ -91,11 +91,11 @@ vi.mock("qrcode.react", () => ({),}));-vi.mock("@/react/components/LearnMoreLink", () => ({+vi.mock("@/components/LearnMoreLink", () => ({LearnMoreLink: () => <a href="https://example.com">learn</a>,}));-vi.mock("@/react/components/ui/button", () => ({+vi.mock("@/components/ui/button", () => ({Button: ({children,...props@@ -106,7 +106,7 @@ vi.mock("@/react/components/ui/button", () => ({),}));-vi.mock("@/react/components/ui/otp-input", () => ({+vi.mock("@/components/ui/otp-input", () => ({OtpInput: () => <div data-testid="otp-input" />,}));diff --git a/frontend/src/react/pages/settings/two-factor/TwoFactorSetupPage.tsx b/frontend/src/routes/workspace/two-factor/TwoFactorSetupPage.tsxsimilarity index 96%rename from frontend/src/react/pages/settings/two-factor/TwoFactorSetupPage.tsxrename to frontend/src/routes/workspace/two-factor/TwoFactorSetupPage.tsxindex c2199ab8d7..c10000ffdd 100644--- a/frontend/src/react/pages/settings/two-factor/TwoFactorSetupPage.tsx+++ b/frontend/src/routes/workspace/two-factor/TwoFactorSetupPage.tsx@@ -5,17 +5,17 @@ import { Check } from "lucide-react";import { QRCodeSVG } from "qrcode.react";import { useCallback, useEffect, useRef, useState } from "react";import { useTranslation } from "react-i18next";-import { LearnMoreLink } from "@/react/components/LearnMoreLink";-import { Button } from "@/react/components/ui/button";-import { OtpInput } from "@/react/components/ui/otp-input";-import { useCurrentUser } from "@/react/hooks/useAppState";-import { router } from "@/react/router";+import { router } from "@/app/router";import {AUTH_2FA_SETUP_MODULE,SETTING_ROUTE_PROFILE,-} from "@/react/router/handles";-import { useAppStore } from "@/react/stores/app";-import { pushNotification } from "@/store";+} from "@/app/router/handles";+import { LearnMoreLink } from "@/components/LearnMoreLink";+import { Button } from "@/components/ui/button";+import { OtpInput } from "@/components/ui/otp-input";+import { useCurrentUser } from "@/hooks/useAppState";+import { pushNotification } from "@/stores";+import { useAppStore } from "@/stores/app";import { UpdateUserRequestSchema } from "@/types/proto-es/v1/user_service_pb";import { RecoveryCodesView } from "./RecoveryCodesView";import { TwoFactorSecretModal } from "./TwoFactorSecretModal";diff --git a/frontend/src/shims-vue-globals.d.ts b/frontend/src/shims-vue-globals.d.tsdeleted file mode 100644index d686fb412f..0000000000--- a/frontend/src/shims-vue-globals.d.ts+++ /dev/null@@ -1,16 +0,0 @@-import type dayjs from "dayjs";-import type { humanizeDate, humanizeTs } from "./utils";--export {};--declare module "vue" {- export interface ComponentCustomProperties {- window: Window & typeof globalThis;- console: Console;- dayjs: typeof dayjs;- humanizeTs: typeof humanizeTs;- humanizeDate: typeof humanizeDate;- isDev: boolean;- isRelease: boolean;- }-}diff --git a/frontend/src/store/modules/notification.ts b/frontend/src/store/modules/notification.tsdeleted file mode 100644index 46086d6164..0000000000--- a/frontend/src/store/modules/notification.ts+++ /dev/null@@ -1,18 +0,0 @@-import { VueShellBridgeEvent } from "@/react/shell-bridge";-import type { NotificationCreate } from "@/types";--/**- * Dispatches a notification as a window CustomEvent that the React toast- * manager (frontend/src/react/lib/toast.ts) catches and renders. Pinia-free:- * the former `useNotificationStore` was an empty-state shim around this same- * dispatch and has been removed.- */-export const pushNotification = (notification: NotificationCreate) => {- if (typeof window !== "undefined") {- window.dispatchEvent(- new CustomEvent<NotificationCreate>(VueShellBridgeEvent.notification, {- detail: notification,- })- );- }-};diff --git a/frontend/src/react/stores/app/accessGrant.test.ts b/frontend/src/stores/app/accessGrant.test.tssimilarity index 100%rename from frontend/src/react/stores/app/accessGrant.test.tsrename to frontend/src/stores/app/accessGrant.test.tsdiff --git a/frontend/src/react/stores/app/accessGrant.ts b/frontend/src/stores/app/accessGrant.tssimilarity index 98%rename from frontend/src/react/stores/app/accessGrant.tsrename to frontend/src/stores/app/accessGrant.tsindex 572f2e3502..2ffc288344 100644--- a/frontend/src/react/stores/app/accessGrant.ts+++ b/frontend/src/stores/app/accessGrant.ts@@ -1,5 +1,5 @@import { create as createProto } from "@bufbuild/protobuf";-import { accessGrantServiceClientConnect } from "@/connect";+import { accessGrantServiceClientConnect } from "@/api";import type { AccessGrant } from "@/types/proto-es/v1/access_grant_service_pb";import {ActivateAccessGrantRequestSchema,diff --git a/frontend/src/react/stores/app/auth.ts b/frontend/src/stores/app/auth.tssimilarity index 98%rename from frontend/src/react/stores/app/auth.tsrename to frontend/src/stores/app/auth.tsindex d9ad9a2833..8bd78c14c6 100644--- a/frontend/src/react/stores/app/auth.ts+++ b/frontend/src/stores/app/auth.ts@@ -1,8 +1,8 @@import { create } from "@bufbuild/protobuf";import { Code, createContextValues } from "@connectrpc/connect";import { uniqueId } from "lodash-es";-import { authServiceClientConnect, userServiceClientConnect } from "@/connect";-import { ignoredCodesContextKey } from "@/connect/context-key";+import { authServiceClientConnect, userServiceClientConnect } from "@/api";+import { ignoredCodesContextKey } from "@/api/context-key";import {AUTH_MFA_MODULE,AUTH_PASSWORD_RESET_MODULE,@@ -10,12 +10,12 @@ import {AUTH_SIGNIN_MODULE,SETUP_MODULE,SQL_EDITOR_HOME_MODULE,-} from "@/react/router/handles";+} from "@/app/router/handles";import {navigateByName,navigateToPath,resolvePath,-} from "@/react/router/navigation";+} from "@/app/router/navigation";import {LoginRequestSchema,SendEmailLoginCodeRequestSchema,diff --git a/frontend/src/react/stores/app/changelog.ts b/frontend/src/stores/app/changelog.tssimilarity index 98%rename from frontend/src/react/stores/app/changelog.tsrename to frontend/src/stores/app/changelog.tsindex 15df6ccb3a..6f65c19da3 100644--- a/frontend/src/react/stores/app/changelog.ts+++ b/frontend/src/stores/app/changelog.ts@@ -1,5 +1,5 @@import { create as createProto } from "@bufbuild/protobuf";-import { databaseServiceClientConnect } from "@/connect";+import { databaseServiceClientConnect } from "@/api";import { UNKNOWN_ID } from "@/types";import {ChangelogView,diff --git a/frontend/src/react/stores/app/database.ts b/frontend/src/stores/app/database.tssimilarity index 98%rename from frontend/src/react/stores/app/database.tsrename to frontend/src/stores/app/database.tsindex e3e14cb468..ebc1eed324 100644--- a/frontend/src/react/stores/app/database.ts+++ b/frontend/src/stores/app/database.ts@@ -1,8 +1,8 @@import { create as createProto } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";import { uniq } from "lodash-es";-import { databaseServiceClientConnect } from "@/connect";-import { silentContextKey } from "@/connect/context-key";+import { databaseServiceClientConnect } from "@/api";+import { silentContextKey } from "@/api/context-key";import {BatchGetDatabasesRequestSchema,BatchSyncDatabasesRequestSchema,@@ -28,7 +28,7 @@ import { createUnknownDatabase, setDatabaseAccess } from "./databaseAccess";import type { AppSliceCreator, DatabaseSlice } from "./types";import { buildDatabaseFilter, toError } from "./utils";-// Inlined to keep the app store's load graph free of the Pinia `@/store`+// Inlined to keep the app store's load graph free of the Pinia `@/stores`// barrel that `@/utils/v1/database` pulls in.function instanceResourceNameFromDatabase(databaseName: string): string {const match = databaseName.match(/(?:^|\/)instances\/([^/]+)\/databases\//);diff --git a/frontend/src/react/stores/app/databaseAccess.ts b/frontend/src/stores/app/databaseAccess.tssimilarity index 100%rename from frontend/src/react/stores/app/databaseAccess.tsrename to frontend/src/stores/app/databaseAccess.tsdiff --git a/frontend/src/react/stores/app/databaseCatalog.ts b/frontend/src/stores/app/databaseCatalog.tssimilarity index 97%rename from frontend/src/react/stores/app/databaseCatalog.tsrename to frontend/src/stores/app/databaseCatalog.tsindex b6e8a99862..a36ac1a662 100644--- a/frontend/src/react/stores/app/databaseCatalog.ts+++ b/frontend/src/stores/app/databaseCatalog.ts@@ -1,7 +1,7 @@import { create as createProto } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";-import { databaseCatalogServiceClientConnect } from "@/connect";-import { silentContextKey } from "@/connect/context-key";+import { databaseCatalogServiceClientConnect } from "@/api";+import { silentContextKey } from "@/api/context-key";import { UNKNOWN_ID, UNKNOWN_INSTANCE_NAME } from "@/types";import {ColumnCatalogSchema,diff --git a/frontend/src/react/stores/app/dbGroup.ts b/frontend/src/stores/app/dbGroup.tssimilarity index 97%rename from frontend/src/react/stores/app/dbGroup.tsrename to frontend/src/stores/app/dbGroup.tsindex 96b901c0c5..a1bfcd29f4 100644--- a/frontend/src/react/stores/app/dbGroup.ts+++ b/frontend/src/stores/app/dbGroup.ts@@ -1,9 +1,9 @@import { create as createProto } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";-import { databaseGroupServiceClientConnect } from "@/connect";-import { silentContextKey } from "@/connect/context-key";-import { buildCELExpr } from "@/plugins/cel";-import { databaseGroupNamePrefix } from "@/store/modules/v1/common";+import { databaseGroupServiceClientConnect } from "@/api";+import { silentContextKey } from "@/api/context-key";+import { buildCELExpr } from "@/modules/cel";+import { databaseGroupNamePrefix } from "@/stores/modules/v1/common";import {unknownDatabaseGroup as createUnknownDatabaseGroup,isValidDatabaseGroupName,diff --git a/frontend/src/react/stores/app/dbSchema.ts b/frontend/src/stores/app/dbSchema.tssimilarity index 98%rename from frontend/src/react/stores/app/dbSchema.tsrename to frontend/src/stores/app/dbSchema.tsindex 6661b28b7d..6ecac3cc65 100644--- a/frontend/src/react/stores/app/dbSchema.ts+++ b/frontend/src/stores/app/dbSchema.ts@@ -1,7 +1,7 @@import { create as createProto } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";-import { databaseServiceClientConnect } from "@/connect";-import { silentContextKey } from "@/connect/context-key";+import { databaseServiceClientConnect } from "@/api";+import { silentContextKey } from "@/api/context-key";import { UNKNOWN_ID } from "@/types/const";import {type DatabaseMetadata,diff --git a/frontend/src/react/stores/app/group.ts b/frontend/src/stores/app/group.tssimilarity index 96%rename from frontend/src/react/stores/app/group.tsrename to frontend/src/stores/app/group.tsindex 7d6e363a02..fffc087e36 100644--- a/frontend/src/react/stores/app/group.ts+++ b/frontend/src/stores/app/group.ts@@ -1,9 +1,9 @@import { create as createProto } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";import { uniq } from "lodash-es";-import { groupServiceClientConnect } from "@/connect";-import { silentContextKey } from "@/connect/context-key";-import { isValidProjectName } from "@/react/lib/resourceName";+import { groupServiceClientConnect } from "@/api";+import { silentContextKey } from "@/api/context-key";+import { isValidProjectName } from "@/lib/resourceName";import type { Group } from "@/types/proto-es/v1/group_service_pb";import {BatchGetGroupsRequestSchema,diff --git a/frontend/src/react/stores/app/iam.ts b/frontend/src/stores/app/iam.tssimilarity index 98%rename from frontend/src/react/stores/app/iam.tsrename to frontend/src/stores/app/iam.tsindex 2a14559132..6774aaf58f 100644--- a/frontend/src/react/stores/app/iam.ts+++ b/frontend/src/stores/app/iam.ts@@ -4,8 +4,8 @@ import {projectServiceClientConnect,roleServiceClientConnect,workspaceServiceClientConnect,-} from "@/connect";-import { userNamePrefix, workspaceNamePrefix } from "@/react/lib/resourceName";+} from "@/api";+import { userNamePrefix, workspaceNamePrefix } from "@/lib/resourceName";import { PRESET_WORKSPACE_ROLES } from "@/types/iam/role";import {BindingSchema,@@ -152,7 +152,7 @@ export const createIamSlice: AppSliceCreator<IamSlice> = (set, get) => ({};});// Prefetch policy members into the app-store group/user caches- // so `getMemberBindings` (in `@/react/lib/memberBindings`) can+ // so `getMemberBindings` (in `@/lib/memberBindings`) can// resolve titles synchronously on first render. Service-account// and workload-identity members are fetched independently by// their respective settings pages — the IAM policy itself onlydiff --git a/frontend/src/react/stores/app/identityProvider.ts b/frontend/src/stores/app/identityProvider.tssimilarity index 97%rename from frontend/src/react/stores/app/identityProvider.tsrename to frontend/src/stores/app/identityProvider.tsindex 6756875a86..04f0ff43d8 100644--- a/frontend/src/react/stores/app/identityProvider.ts+++ b/frontend/src/stores/app/identityProvider.ts@@ -1,8 +1,8 @@import { clone, create as createProto } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";import { isEqual, isUndefined } from "lodash-es";-import { identityProviderServiceClientConnect } from "@/connect";-import { silentContextKey } from "@/connect/context-key";+import { identityProviderServiceClientConnect } from "@/api";+import { silentContextKey } from "@/api/context-key";import type { IdentityProvider } from "@/types/proto-es/v1/idp_service_pb";import {CreateIdentityProviderRequestSchema,diff --git a/frontend/src/react/stores/app/index.test.ts b/frontend/src/stores/app/index.test.tssimilarity index 99%rename from frontend/src/react/stores/app/index.test.tsrename to frontend/src/stores/app/index.test.tsindex ec6bbeb005..4afb429da6 100644--- a/frontend/src/react/stores/app/index.test.ts+++ b/frontend/src/stores/app/index.test.ts@@ -1,6 +1,5 @@import { create as createProto } from "@bufbuild/protobuf";import { beforeEach, describe, expect, test, vi } from "vitest";-import { ReactShellBridgeEvent } from "@/react/shell-bridge";import { isValidDatabaseGroupName, UNKNOWN_PROJECT_NAME } from "@/types";import { ExprSchema } from "@/types/proto-es/google/type/expr_pb";import {@@ -161,7 +160,7 @@ const mocks = vi.hoisted(() => ({updateIssueComment: vi.fn(),}));-vi.mock("@/connect", () => ({+vi.mock("@/api", () => ({actuatorServiceClientConnect: {getActuatorInfo: mocks.getActuatorInfo,},@@ -1923,7 +1922,7 @@ describe("useAppStore", () => {});test("notify() routes to the React toast manager", async () => {- const { toastManager } = await import("@/react/lib/toast");+ const { toastManager } = await import("@/lib/toast");const addSpy = vi.spyOn(toastManager, "add");const store = createAppStore();@@ -1943,9 +1942,7 @@ describe("useAppStore", () => {test("keeps user-scoped preferences in localStorage", () => {const store = createAppStore();- const listener = vi.fn();store.setState({ currentUser: user });- window.addEventListener(ReactShellBridgeEvent.quickstartReset, listener);store.getState().setRecentProject(projectA.name);store.getState().setRecentProject(projectB.name);@@ -1970,14 +1967,6 @@ describe("useAppStore", () => {"project.visit": false,"data.query": false,});- expect(listener).toHaveBeenCalledWith(- expect.objectContaining({- detail: expect.objectContaining({- keys: expect.arrayContaining(["hidden", "data.query"]),- }),- })- );- window.removeEventListener(ReactShellBridgeEvent.quickstartReset, listener);});test("scopes recent projects by workspace in SaaS mode", () => {diff --git a/frontend/src/react/stores/app/index.ts b/frontend/src/stores/app/index.tssimilarity index 100%rename from frontend/src/react/stores/app/index.tsrename to frontend/src/stores/app/index.tsdiff --git a/frontend/src/react/stores/app/instance.ts b/frontend/src/stores/app/instance.tssimilarity index 98%rename from frontend/src/react/stores/app/instance.tsrename to frontend/src/stores/app/instance.tsindex c10c19f301..d0b8cd0fb1 100644--- a/frontend/src/react/stores/app/instance.ts+++ b/frontend/src/stores/app/instance.ts@@ -1,7 +1,7 @@import { create as createProto } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";-import { instanceServiceClientConnect } from "@/connect";-import { silentContextKey } from "@/connect/context-key";+import { instanceServiceClientConnect } from "@/api";+import { silentContextKey } from "@/api/context-key";import { Engine, State } from "@/types/proto-es/v1/common_pb";import {AddDataSourceRequestSchema,diff --git a/frontend/src/react/stores/app/instanceRole.ts b/frontend/src/stores/app/instanceRole.tssimilarity index 95%rename from frontend/src/react/stores/app/instanceRole.tsrename to frontend/src/stores/app/instanceRole.tsindex 1d30a4ff62..e7557b3bf4 100644--- a/frontend/src/react/stores/app/instanceRole.ts+++ b/frontend/src/stores/app/instanceRole.ts@@ -1,5 +1,5 @@import { create as createProto } from "@bufbuild/protobuf";-import { instanceRoleServiceClientConnect } from "@/connect";+import { instanceRoleServiceClientConnect } from "@/api";import { ListInstanceRolesRequestSchema } from "@/types/proto-es/v1/instance_role_service_pb";import type { AppSliceCreator, InstanceRoleSlice } from "./types";diff --git a/frontend/src/react/stores/app/issue.ts b/frontend/src/stores/app/issue.tssimilarity index 98%rename from frontend/src/react/stores/app/issue.tsrename to frontend/src/stores/app/issue.tsindex 19d505e8a5..73dde37368 100644--- a/frontend/src/react/stores/app/issue.ts+++ b/frontend/src/stores/app/issue.ts@@ -6,8 +6,8 @@ import {issueServiceClientConnect,planServiceClientConnect,rolloutServiceClientConnect,-} from "@/connect";-import { silentContextKey } from "@/connect/context-key";+} from "@/api";+import { silentContextKey } from "@/api/context-key";import type { IssueFilter } from "@/types";import { ApprovalStatus, RiskLevel } from "@/types/proto-es/v1/common_pb";import {diff --git a/frontend/src/react/stores/app/issueComment.ts b/frontend/src/stores/app/issueComment.tssimilarity index 97%rename from frontend/src/react/stores/app/issueComment.tsrename to frontend/src/stores/app/issueComment.tsindex eeec564307..9ec71c544f 100644--- a/frontend/src/react/stores/app/issueComment.ts+++ b/frontend/src/stores/app/issueComment.ts@@ -1,10 +1,10 @@import { create as createProto } from "@bufbuild/protobuf";-import { issueServiceClientConnect } from "@/connect";+import { issueServiceClientConnect } from "@/api";import {getProjectIdIssueIdIssueCommentId,issueNamePrefix,projectNamePrefix,-} from "@/store/modules/v1/common";+} from "@/stores/modules/v1/common";import {CreateIssueCommentRequestSchema,type IssueComment,diff --git a/frontend/src/react/stores/app/notification.ts b/frontend/src/stores/app/notification.tssimilarity index 80%rename from frontend/src/react/stores/app/notification.tsrename to frontend/src/stores/app/notification.tsindex 81801667a1..b0ee3fce75 100644--- a/frontend/src/react/stores/app/notification.ts+++ b/frontend/src/stores/app/notification.ts@@ -1,4 +1,4 @@-import { pushReactNotification } from "@/react/lib/toast";+import { pushReactNotification } from "@/lib/toast";import type { AppSliceCreator, NotificationSlice } from "./types";export const createNotificationSlice: AppSliceCreator<diff --git a/frontend/src/react/stores/app/plan.ts b/frontend/src/stores/app/plan.tssimilarity index 97%rename from frontend/src/react/stores/app/plan.tsrename to frontend/src/stores/app/plan.tsindex 1a602f2122..379d835614 100644--- a/frontend/src/react/stores/app/plan.ts+++ b/frontend/src/stores/app/plan.ts@@ -1,7 +1,7 @@import { create as createProto } from "@bufbuild/protobuf";import dayjs from "dayjs";import { uniq } from "lodash-es";-import { planServiceClientConnect } from "@/connect";+import { planServiceClientConnect } from "@/api";import {ListPlansRequestSchema,type Plan,diff --git a/frontend/src/react/stores/app/policy.ts b/frontend/src/stores/app/policy.tssimilarity index 97%rename from frontend/src/react/stores/app/policy.tsrename to frontend/src/stores/app/policy.tsindex dfec3996a0..ef2c3889b3 100644--- a/frontend/src/react/stores/app/policy.ts+++ b/frontend/src/stores/app/policy.ts@@ -1,7 +1,7 @@import { create as createProto } from "@bufbuild/protobuf";import { Code, ConnectError, createContextValues } from "@connectrpc/connect";-import { orgPolicyServiceClientConnect } from "@/connect";-import { silentContextKey } from "@/connect/context-key";+import { orgPolicyServiceClientConnect } from "@/api";+import { silentContextKey } from "@/api/context-key";import {DeletePolicyRequestSchema,GetPolicyRequestSchema,@@ -34,7 +34,7 @@ const getUpdateMaskFromPolicyType = (policyType: PolicyType): string[] => {}};-// Inlined to keep the app store's load graph free of `@/store/modules/v1/common`.+// Inlined to keep the app store's load graph free of `@/stores/modules/v1/common`.const POLICY_NAME_PREFIX = "policies/";// Mirror of the Pinia helper — normalizes `policies/{TYPE}` segments todiff --git a/frontend/src/react/stores/app/preferences.ts b/frontend/src/stores/app/preferences.tssimilarity index 96%rename from frontend/src/react/stores/app/preferences.tsrename to frontend/src/stores/app/preferences.tsindex 5b43c02b88..7bcb911c06 100644--- a/frontend/src/react/stores/app/preferences.ts+++ b/frontend/src/stores/app/preferences.ts@@ -1,4 +1,3 @@-import { emitReactQuickstartReset } from "@/react/shell-bridge";import {storageKeyIntroState,storageKeyRecentProjects,@@ -82,7 +81,6 @@ export const createPreferencesSlice: AppSliceCreator<PreferencesSlice> = (};writeJson(key, next);set((state) => ({ introStateVersion: state.introStateVersion + 1 }));- emitReactQuickstartReset({ keys: QUICKSTART_RESET_KEYS });},// Mirrors the Pinia `useUIStateStore.getIntroStateByKey`. Reads the per-userdiff --git a/frontend/src/react/stores/app/project.ts b/frontend/src/stores/app/project.tssimilarity index 98%rename from frontend/src/react/stores/app/project.tsrename to frontend/src/stores/app/project.tsindex 02b4dddbb9..1a534f5794 100644--- a/frontend/src/react/stores/app/project.ts+++ b/frontend/src/stores/app/project.ts@@ -1,8 +1,8 @@import { create as createProto } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";-import { projectServiceClientConnect } from "@/connect";-import { silentContextKey } from "@/connect/context-key";-import { isValidProjectName } from "@/react/lib/resourceName";+import { projectServiceClientConnect } from "@/api";+import { silentContextKey } from "@/api/context-key";+import { isValidProjectName } from "@/lib/resourceName";import { UNKNOWN_ID } from "@/types/const";import { State } from "@/types/proto-es/v1/common_pb";import {diff --git a/frontend/src/react/stores/app/projectAccess.ts b/frontend/src/stores/app/projectAccess.tssimilarity index 100%rename from frontend/src/react/stores/app/projectAccess.tsrename to frontend/src/stores/app/projectAccess.tsdiff --git a/frontend/src/react/stores/app/projectWebhook.ts b/frontend/src/stores/app/projectWebhook.tssimilarity index 97%rename from frontend/src/react/stores/app/projectWebhook.tsrename to frontend/src/stores/app/projectWebhook.tsindex 4e7c23fe3c..bde90fddd7 100644--- a/frontend/src/react/stores/app/projectWebhook.ts+++ b/frontend/src/stores/app/projectWebhook.ts@@ -1,5 +1,5 @@import { create as createProto } from "@bufbuild/protobuf";-import { projectServiceClientConnect } from "@/connect";+import { projectServiceClientConnect } from "@/api";import {AddWebhookRequestSchema,RemoveWebhookRequestSchema,diff --git a/frontend/src/react/stores/app/release.ts b/frontend/src/stores/app/release.tssimilarity index 97%rename from frontend/src/react/stores/app/release.tsrename to frontend/src/stores/app/release.tsindex b7b80889fa..6848ac7027 100644--- a/frontend/src/react/stores/app/release.ts+++ b/frontend/src/stores/app/release.ts@@ -1,7 +1,7 @@import { create as createProto } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";-import { releaseServiceClientConnect } from "@/connect";-import { silentContextKey } from "@/connect/context-key";+import { releaseServiceClientConnect } from "@/api";+import { silentContextKey } from "@/api/context-key";import { isValidReleaseName } from "@/types";import { State } from "@/types/proto-es/v1/common_pb";import type { Release } from "@/types/proto-es/v1/release_service_pb";diff --git a/frontend/src/react/stores/app/revision.ts b/frontend/src/stores/app/revision.tssimilarity index 97%rename from frontend/src/react/stores/app/revision.tsrename to frontend/src/stores/app/revision.tsindex 6630c09994..f49a39f95c 100644--- a/frontend/src/react/stores/app/revision.ts+++ b/frontend/src/stores/app/revision.ts@@ -1,5 +1,5 @@import { create as createProto } from "@bufbuild/protobuf";-import { revisionServiceClientConnect } from "@/connect";+import { revisionServiceClientConnect } from "@/api";import type { Revision } from "@/types/proto-es/v1/revision_service_pb";import {DeleteRevisionRequestSchema,diff --git a/frontend/src/react/stores/app/role.ts b/frontend/src/stores/app/role.tssimilarity index 96%rename from frontend/src/react/stores/app/role.tsrename to frontend/src/stores/app/role.tsindex 4224851372..9eafb396bc 100644--- a/frontend/src/react/stores/app/role.ts+++ b/frontend/src/stores/app/role.ts@@ -1,5 +1,5 @@import { create as createProto } from "@bufbuild/protobuf";-import { roleServiceClientConnect } from "@/connect";+import { roleServiceClientConnect } from "@/api";import {DeleteRoleRequestSchema,ListRolesRequestSchema,diff --git a/frontend/src/react/stores/app/rollout.ts b/frontend/src/stores/app/rollout.tssimilarity index 90%rename from frontend/src/react/stores/app/rollout.tsrename to frontend/src/stores/app/rollout.tsindex bd88d4af85..d1ca0229a6 100644--- a/frontend/src/react/stores/app/rollout.ts+++ b/frontend/src/stores/app/rollout.ts@@ -1,8 +1,8 @@import { create as createProto } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";-import { rolloutServiceClientConnect } from "@/connect";-import { silentContextKey } from "@/connect/context-key";-import { preserveRolloutIdentities } from "@/react/lib/protoIdentity";+import { rolloutServiceClientConnect } from "@/api";+import { silentContextKey } from "@/api/context-key";+import { preserveRolloutIdentities } from "@/lib/protoIdentity";import { GetRolloutRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";import { unknownRollout as createUnknownRollout } from "@/types/rollout";import type { AppSliceCreator, RolloutSlice } from "./types";diff --git a/frontend/src/react/stores/app/serviceAccount.ts b/frontend/src/stores/app/serviceAccount.tssimilarity index 98%rename from frontend/src/react/stores/app/serviceAccount.tsrename to frontend/src/stores/app/serviceAccount.tsindex 098e1d5922..67b1218474 100644--- a/frontend/src/react/stores/app/serviceAccount.ts+++ b/frontend/src/stores/app/serviceAccount.ts@@ -1,7 +1,7 @@import { create as createProto } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";-import { serviceAccountServiceClientConnect } from "@/connect";-import { silentContextKey } from "@/connect/context-key";+import { serviceAccountServiceClientConnect } from "@/api";+import { silentContextKey } from "@/api/context-key";import { State } from "@/types/proto-es/v1/common_pb";import type { ServiceAccount } from "@/types/proto-es/v1/service_account_service_pb";import {diff --git a/frontend/src/react/stores/app/sheet.ts b/frontend/src/stores/app/sheet.tssimilarity index 98%rename from frontend/src/react/stores/app/sheet.tsrename to frontend/src/stores/app/sheet.tsindex 656a2ab17b..b2ca90ddfe 100644--- a/frontend/src/react/stores/app/sheet.ts+++ b/frontend/src/stores/app/sheet.ts@@ -1,5 +1,5 @@import { create as createProto } from "@bufbuild/protobuf";-import { sheetServiceClientConnect } from "@/connect";+import { sheetServiceClientConnect } from "@/api";import {CreateSheetRequestSchema,GetSheetRequestSchema,diff --git a/frontend/src/react/stores/app/sql.ts b/frontend/src/stores/app/sql.tssimilarity index 91%rename from frontend/src/react/stores/app/sql.tsrename to frontend/src/stores/app/sql.tsindex 3451ac2897..17ed820350 100644--- a/frontend/src/react/stores/app/sql.ts+++ b/frontend/src/stores/app/sql.ts@@ -1,9 +1,6 @@import { Code, ConnectError, createContextValues } from "@connectrpc/connect";-import { sqlServiceClientConnect } from "@/connect";-import {- ignoredCodesContextKey,- silentContextKey,-} from "@/connect/context-key";+import { sqlServiceClientConnect } from "@/api";+import { ignoredCodesContextKey, silentContextKey } from "@/api/context-key";import { extractGrpcErrorMessage } from "@/utils/connect";import type { AppSliceCreator, SQLSlice } from "./types";diff --git a/frontend/src/react/stores/app/types.ts b/frontend/src/stores/app/types.tssimilarity index 99%rename from frontend/src/react/stores/app/types.tsrename to frontend/src/stores/app/types.tsindex 672ecda78d..6942d8d93d 100644--- a/frontend/src/react/stores/app/types.ts+++ b/frontend/src/stores/app/types.ts@@ -1,7 +1,7 @@import type { FieldMask } from "@bufbuild/protobuf/wkt";import type { StateCreator } from "zustand";-import type { ConditionGroupExpr } from "@/plugins/cel";-import type { DatabaseFilter } from "@/react/lib/databaseFilter";+import type { DatabaseFilter } from "@/lib/databaseFilter";+import type { ConditionGroupExpr } from "@/modules/cel";import type { AppFeatures } from "@/types/appProfile";import type { Permission } from "@/types/iam/permission";import type { NotificationCreate } from "@/types/notification";diff --git a/frontend/src/react/stores/app/user.ts b/frontend/src/stores/app/user.tssimilarity index 97%rename from frontend/src/react/stores/app/user.tsrename to frontend/src/stores/app/user.tsindex 0a10ff696d..19d272f828 100644--- a/frontend/src/react/stores/app/user.ts+++ b/frontend/src/stores/app/user.ts@@ -1,10 +1,10 @@import { create as createProto } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";import { uniq } from "lodash-es";-import { userServiceClientConnect } from "@/connect";-import { silentContextKey } from "@/connect/context-key";-import { userNamePrefix } from "@/react/lib/resourceName";-import { extractUserEmail } from "@/store/modules/v1/common";+import { userServiceClientConnect } from "@/api";+import { silentContextKey } from "@/api/context-key";+import { userNamePrefix } from "@/lib/resourceName";+import { extractUserEmail } from "@/stores/modules/v1/common";import {allUsersUser,isValidProjectName,diff --git a/frontend/src/react/stores/app/utils.ts b/frontend/src/stores/app/utils.tssimilarity index 98%rename from frontend/src/react/stores/app/utils.tsrename to frontend/src/stores/app/utils.tsindex 41db08ff35..f5c35a7340 100644--- a/frontend/src/react/stores/app/utils.ts+++ b/frontend/src/stores/app/utils.ts@@ -1,12 +1,12 @@import { Code, ConnectError } from "@connectrpc/connect";-import type { DatabaseFilter } from "@/react/lib/databaseFilter";+import type { DatabaseFilter } from "@/lib/databaseFilter";import {getProjectName,getUserName,isValidProjectName,projectNamePrefix,userNamePrefix,-} from "@/react/lib/resourceName";+} from "@/lib/resourceName";import { Engine } from "@/types/proto-es/v1/common_pb";import type { Binding } from "@/types/proto-es/v1/iam_policy_pb";import type { Project } from "@/types/proto-es/v1/project_service_pb";diff --git a/frontend/src/react/stores/app/workloadIdentity.ts b/frontend/src/stores/app/workloadIdentity.tssimilarity index 98%rename from frontend/src/react/stores/app/workloadIdentity.tsrename to frontend/src/stores/app/workloadIdentity.tsindex 0e1112a766..bcc79cc66c 100644--- a/frontend/src/react/stores/app/workloadIdentity.ts+++ b/frontend/src/stores/app/workloadIdentity.ts@@ -1,7 +1,7 @@import { create as createProto } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";-import { workloadIdentityServiceClientConnect } from "@/connect";-import { silentContextKey } from "@/connect/context-key";+import { workloadIdentityServiceClientConnect } from "@/api";+import { silentContextKey } from "@/api/context-key";import { State } from "@/types/proto-es/v1/common_pb";import { type User, UserSchema } from "@/types/proto-es/v1/user_service_pb";import type { WorkloadIdentity } from "@/types/proto-es/v1/workload_identity_service_pb";diff --git a/frontend/src/react/stores/app/worksheet.ts b/frontend/src/stores/app/worksheet.tssimilarity index 98%rename from frontend/src/react/stores/app/worksheet.tsrename to frontend/src/stores/app/worksheet.tsindex fde105245c..e434a8afb5 100644--- a/frontend/src/react/stores/app/worksheet.ts+++ b/frontend/src/stores/app/worksheet.ts@@ -1,8 +1,8 @@import { clone, create as createProto } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";import { uniq, uniqBy } from "lodash-es";-import { worksheetServiceClientConnect } from "@/connect";-import { silentContextKey } from "@/connect/context-key";+import { worksheetServiceClientConnect } from "@/api";+import { silentContextKey } from "@/api/context-key";import { UNKNOWN_ID } from "@/types";import type {Worksheet,diff --git a/frontend/src/react/stores/app/workspace.ts b/frontend/src/stores/app/workspace.tssimilarity index 98%rename from frontend/src/react/stores/app/workspace.tsrename to frontend/src/stores/app/workspace.tsindex ae66082a90..7ed7a347b2 100644--- a/frontend/src/react/stores/app/workspace.ts+++ b/frontend/src/stores/app/workspace.ts@@ -9,19 +9,16 @@ import {settingServiceClientConnect,subscriptionServiceClientConnect,workspaceServiceClientConnect,-} from "@/connect";-import { silentContextKey } from "@/connect/context-key";-import {- settingNamePrefix,- workspaceNamePrefix,-} from "@/react/lib/resourceName";-import { WORKSPACE_ROUTE_LANDING } from "@/react/router";-import { resolvePath } from "@/react/router/navigation";-import { getEnvironmentId } from "@/store/modules/v1/common";+} from "@/api";+import { silentContextKey } from "@/api/context-key";+import { WORKSPACE_ROUTE_LANDING } from "@/app/router";+import { resolvePath } from "@/app/router/navigation";+import { settingNamePrefix, workspaceNamePrefix } from "@/lib/resourceName";+import { getEnvironmentId } from "@/stores/modules/v1/common";import {broadcastWorkspaceSwitch,workspaceSwitchChannel,-} from "@/store/workspaceSwitchChannel";+} from "@/stores/workspaceSwitchChannel";import { defaultAppProfile } from "@/types/appProfile";import {hasFeature as checkFeature,diff --git a/frontend/src/store/index.ts b/frontend/src/stores/index.tssimilarity index 100%rename from frontend/src/store/index.tsrename to frontend/src/stores/index.tsdiff --git a/frontend/src/store/modules/index.ts b/frontend/src/stores/modules/index.tssimilarity index 73%rename from frontend/src/store/modules/index.tsrename to frontend/src/stores/modules/index.tsindex 1feb255b0f..008d927d6c 100644--- a/frontend/src/store/modules/index.ts+++ b/frontend/src/stores/modules/index.ts@@ -1,5 +1,5 @@// Pinia stores removed (migrated to the React app store at-// `@/react/stores/app`). Only pinia-free helpers remain here.+// `@/stores/app`). Only pinia-free helpers remain here.export * from "./notification";export * from "./utils";export * from "./migration-helpers";diff --git a/frontend/src/store/modules/migration-helpers.ts b/frontend/src/stores/modules/migration-helpers.tssimilarity index 100%rename from frontend/src/store/modules/migration-helpers.tsrename to frontend/src/stores/modules/migration-helpers.tsdiff --git a/frontend/src/stores/modules/notification.ts b/frontend/src/stores/modules/notification.tsnew file mode 100644index 0000000000..db613886c6--- /dev/null+++ b/frontend/src/stores/modules/notification.ts@@ -0,0 +1,6 @@+import { pushReactNotification } from "@/lib/toast";+import type { NotificationCreate } from "@/types";++export const pushNotification = (notification: NotificationCreate) => {+ pushReactNotification(notification);+};diff --git a/frontend/src/store/modules/utils.ts b/frontend/src/stores/modules/utils.tssimilarity index 100%rename from frontend/src/store/modules/utils.tsrename to frontend/src/stores/modules/utils.tsdiff --git a/frontend/src/store/modules/v1/common.ts b/frontend/src/stores/modules/v1/common.tssimilarity index 100%rename from frontend/src/store/modules/v1/common.tsrename to frontend/src/stores/modules/v1/common.tsdiff --git a/frontend/src/store/modules/v1/index.ts b/frontend/src/stores/modules/v1/index.tssimilarity index 60%rename from frontend/src/store/modules/v1/index.tsrename to frontend/src/stores/modules/v1/index.tsindex 92d05656a2..3924ec39e8 100644--- a/frontend/src/store/modules/v1/index.ts+++ b/frontend/src/stores/modules/v1/index.ts@@ -1,4 +1,4 @@// The legacy Pinia v1 stores have been removed (migrated to the React app-// store at `@/react/stores/app`). Only the pinia-free resource-name / helper+// store at `@/stores/app`). Only the pinia-free resource-name / helper// module remains.export * from "./common";diff --git a/frontend/src/react/stores/sqlReview.ts b/frontend/src/stores/sqlReview.tssimilarity index 97%rename from frontend/src/react/stores/sqlReview.tsrename to frontend/src/stores/sqlReview.tsindex c69cd4e3b4..3c82dbf98f 100644--- a/frontend/src/react/stores/sqlReview.ts+++ b/frontend/src/stores/sqlReview.ts@@ -2,9 +2,9 @@ import { create as createProto } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";import { pullAt, uniq } from "lodash-es";import { create } from "zustand";-import { reviewConfigServiceClientConnect } from "@/connect";-import { silentContextKey } from "@/connect/context-key";-import { useAppStore } from "@/react/stores/app";+import { reviewConfigServiceClientConnect } from "@/api";+import { silentContextKey } from "@/api/context-key";+import { useAppStore } from "@/stores/app";import type { SchemaPolicyRule, SQLReviewPolicy } from "@/types";import {PolicyType,diff --git a/frontend/src/react/stores/workspaceApprovalSetting.ts b/frontend/src/stores/workspaceApprovalSetting.tssimilarity index 96%rename from frontend/src/react/stores/workspaceApprovalSetting.tsrename to frontend/src/stores/workspaceApprovalSetting.tsindex baf5cd7ae2..831f1d8318 100644--- a/frontend/src/react/stores/workspaceApprovalSetting.ts+++ b/frontend/src/stores/workspaceApprovalSetting.ts@@ -1,9 +1,9 @@import { create as createProto } from "@bufbuild/protobuf";import { v4 as uuidv4 } from "uuid";import { create } from "zustand";-import { settingServiceClientConnect } from "@/connect";-import { settingNamePrefix } from "@/react/lib/resourceName";-import { useAppStore } from "@/react/stores/app";+import { settingServiceClientConnect } from "@/api";+import { settingNamePrefix } from "@/lib/resourceName";+import { useAppStore } from "@/stores/app";import type { LocalApprovalConfig, LocalApprovalRule } from "@/types";import {Setting_SettingName,diff --git a/frontend/src/store/workspaceSwitchChannel.ts b/frontend/src/stores/workspaceSwitchChannel.tssimilarity index 100%rename from frontend/src/store/workspaceSwitchChannel.tsrename to frontend/src/stores/workspaceSwitchChannel.tsdiff --git a/frontend/src/react/test-utils/nativeChange.ts b/frontend/src/test-utils/nativeChange.tssimilarity index 100%rename from frontend/src/react/test-utils/nativeChange.tsrename to frontend/src/test-utils/nativeChange.tsdiff --git a/frontend/src/types/iam/role.ts b/frontend/src/types/iam/role.tsindex 87dedeeed8..4dc35a9604 100644--- a/frontend/src/types/iam/role.ts+++ b/frontend/src/types/iam/role.ts@@ -1,4 +1,4 @@-import { roleNamePrefix } from "@/store/modules/v1/common";+import { roleNamePrefix } from "@/stores/modules/v1/common";export enum PresetRoleType {WORKSPACE_ADMIN = `${roleNamePrefix}workspaceAdmin`,diff --git a/frontend/src/types/release.ts b/frontend/src/types/release.tsindex 28eb051e49..9d281a9253 100644--- a/frontend/src/types/release.ts+++ b/frontend/src/types/release.ts@@ -1,4 +1,4 @@-import { getProjectNameReleaseId } from "@/store/modules/v1/common";+import { getProjectNameReleaseId } from "@/stores/modules/v1/common";import { UNKNOWN_ID } from "./const";export const isValidReleaseName = (name: unknown): name is string => {diff --git a/frontend/src/types/rollout.ts b/frontend/src/types/rollout.tsindex 432b5fd876..46467a3e4f 100644--- a/frontend/src/types/rollout.ts+++ b/frontend/src/types/rollout.ts@@ -1,5 +1,5 @@import { create as createProto } from "@bufbuild/protobuf";-import { getProjectNamePlanIdFromRolloutName } from "@/store/modules/v1/common";+import { getProjectNamePlanIdFromRolloutName } from "@/stores/modules/v1/common";import { UNKNOWN_ID } from "./const";import type { Rollout } from "./proto-es/v1/rollout_service_pb";import { RolloutSchema } from "./proto-es/v1/rollout_service_pb";diff --git a/frontend/src/types/semanticTypes.ts b/frontend/src/types/semanticTypes.tsindex f3cde58186..d4aa1a530f 100644--- a/frontend/src/types/semanticTypes.ts+++ b/frontend/src/types/semanticTypes.ts@@ -1,5 +1,5 @@import { create } from "@bufbuild/protobuf";-import i18n from "@/react/i18n";+import i18n from "@/lib/i18n";import type { Algorithm } from "@/types/proto-es/v1/setting_service_pb";import {type SemanticTypeSetting_SemanticType,diff --git a/frontend/src/types/sqlEditor/tab.ts b/frontend/src/types/sqlEditor/tab.tsindex cf62fdeb46..bd586e3eae 100644--- a/frontend/src/types/sqlEditor/tab.ts+++ b/frontend/src/types/sqlEditor/tab.ts@@ -1,5 +1,5 @@-import type { Selection as MonacoSelection } from "@/react/components/monaco/types";-import i18n from "@/react/i18n";+import type { Selection as MonacoSelection } from "@/components/monaco/types";+import i18n from "@/lib/i18n";import { DataSourceType } from "@/types/proto-es/v1/instance_service_pb";import type { SQLResultSetV1 } from "../v1/sql";import type { SQLEditorConnection, SQLEditorQueryParams } from "./editor";diff --git a/frontend/src/types/sqlReview.ts b/frontend/src/types/sqlReview.tsindex adcf05e10e..4528d1d710 100644--- a/frontend/src/types/sqlReview.ts+++ b/frontend/src/types/sqlReview.ts@@ -1,5 +1,5 @@import { create } from "@bufbuild/protobuf";-import i18n from "@/react/i18n";+import i18n from "@/lib/i18n";import { Engine } from "@/types/proto-es/v1/common_pb";import type { SQLReviewRule } from "@/types/proto-es/v1/review_config_service_pb";import {diff --git a/frontend/src/types/v1/environment.ts b/frontend/src/types/v1/environment.tsindex d7e8c4fc0b..9803a9c32c 100644--- a/frontend/src/types/v1/environment.ts+++ b/frontend/src/types/v1/environment.ts@@ -1,5 +1,5 @@import { create } from "@bufbuild/protobuf";-import { environmentNamePrefix } from "@/store";+import { environmentNamePrefix } from "@/stores";import { UNKNOWN_ID } from "../const";import {type EnvironmentSetting_Environment,diff --git a/frontend/src/types/v1/group.ts b/frontend/src/types/v1/group.tsindex 6430ad6b09..d4f79af0b0 100644--- a/frontend/src/types/v1/group.ts+++ b/frontend/src/types/v1/group.ts@@ -1,6 +1,6 @@import { create } from "@bufbuild/protobuf";-import i18n from "@/react/i18n";-import { extractGroupEmail } from "@/store/modules/v1/common";+import i18n from "@/lib/i18n";+import { extractGroupEmail } from "@/stores/modules/v1/common";import { type Group, GroupSchema } from "@/types/proto-es/v1/group_service_pb";import { UNKNOWN_ID } from "../const";diff --git a/frontend/src/types/v1/projectWebhook.test.ts b/frontend/src/types/v1/projectWebhook.test.tsindex 4219b3bd22..b061eadc10 100644--- a/frontend/src/types/v1/projectWebhook.test.ts+++ b/frontend/src/types/v1/projectWebhook.test.ts@@ -1,7 +1,7 @@import { describe, expect, test, vi } from "vitest";import { WebhookType } from "../proto-es/v1/common_pb";-vi.mock("@/react/i18n", () => ({+vi.mock("@/lib/i18n", () => ({default: {t: (key: string) => (key === "common.google-chat" ? "Google Chat" : key),},diff --git a/frontend/src/types/v1/projectWebhook.ts b/frontend/src/types/v1/projectWebhook.tsindex 2e99bf5224..71835dfcde 100644--- a/frontend/src/types/v1/projectWebhook.ts+++ b/frontend/src/types/v1/projectWebhook.ts@@ -1,5 +1,5 @@import { create as createProto } from "@bufbuild/protobuf";-import i18n from "@/react/i18n";+import i18n from "@/lib/i18n";import { WebhookType } from "../proto-es/v1/common_pb";import {Activity_Type,diff --git a/frontend/src/types/v1/user.ts b/frontend/src/types/v1/user.tsindex 36cd2731ab..a0b67e3ff5 100644--- a/frontend/src/types/v1/user.ts+++ b/frontend/src/types/v1/user.ts@@ -1,10 +1,10 @@import { create } from "@bufbuild/protobuf";-import i18n from "@/react/i18n";+import i18n from "@/lib/i18n";import {extractUserEmail,serviceAccountNamePrefix,workloadIdentityNamePrefix,-} from "@/store/modules/v1/common";+} from "@/stores/modules/v1/common";import { UNKNOWN_ID } from "../const";import { State } from "../proto-es/v1/common_pb";import type { User } from "../proto-es/v1/user_service_pb";diff --git a/frontend/src/types/workspaceApprovalSetting.ts b/frontend/src/types/workspaceApprovalSetting.tsindex 104b78dc49..36cee76932 100644--- a/frontend/src/types/workspaceApprovalSetting.ts+++ b/frontend/src/types/workspaceApprovalSetting.ts@@ -1,4 +1,4 @@-import type { ConditionGroupExpr } from "@/plugins/cel";+import type { ConditionGroupExpr } from "@/modules/cel";import type { ApprovalFlow } from "@/types/proto-es/v1/issue_service_pb";import type { WorkspaceApprovalSetting_Rule_Source } from "@/types/proto-es/v1/setting_service_pb";diff --git a/frontend/src/utils/accessGrant.ts b/frontend/src/utils/accessGrant.tsindex da99cecf3a..56772125ec 100644--- a/frontend/src/utils/accessGrant.ts+++ b/frontend/src/utils/accessGrant.ts@@ -1,5 +1,5 @@import dayjs from "dayjs";-import i18n from "@/react/i18n";+import i18n from "@/lib/i18n";import { getTimeForPbTimestampProtoEs } from "@/types";import {type AccessGrant,diff --git a/frontend/src/utils/app-store-bridge.ts b/frontend/src/utils/app-store-bridge.tsindex d23fb3e06d..7f76b9df78 100644--- a/frontend/src/utils/app-store-bridge.ts+++ b/frontend/src/utils/app-store-bridge.ts@@ -9,7 +9,7 @@ import type { User } from "@/types/proto-es/v1/user_service_pb";import type { Environment } from "@/types/v1/environment";// Narrow, synchronous accessors into the React app store for shared `@/utils`-// code. The app store *registers* these at init (see `@/react/stores/app`)+// code. The app store *registers* these at init (see `@/stores/app`)// rather than `@/utils` importing the store directly — a static import would// create an `@/utils` → app-store load-time cycle (the barrel-graph hazard// that also gates the permission checkers in `./iam/permission`).diff --git a/frontend/src/utils/auth.ts b/frontend/src/utils/auth.tsindex ba1b06a5a7..efc8468d18 100644--- a/frontend/src/utils/auth.ts+++ b/frontend/src/utils/auth.ts@@ -1,8 +1,8 @@// Auth/landing route-name literals. Inlined (no imports) on purpose: this// helper lives in the widely-imported `@/utils` barrel, so importing the route-// constants from `@/react/router/handles` here would add that module to the+// constants from `@/app/router/handles` here would add that module to the// barrel's load graph and tip a fragile load-order cycle (app store ↔ @/utils-// ↔ @/types). The values mirror `@/react/router/handles`.+// ↔ @/types). The values mirror `@/app/router/handles`.const AUTH_RELATED_ROUTES = ["auth.signin","auth.signin.admin",diff --git a/frontend/src/utils/auto-route.ts b/frontend/src/utils/auto-route.tsindex 27b3309853..a0bba36c79 100644--- a/frontend/src/utils/auto-route.ts+++ b/frontend/src/utils/auto-route.ts@@ -2,7 +2,7 @@ import {PROJECT_V1_ROUTE_DATABASE_DETAIL,PROJECT_V1_ROUTE_DATABASES,SETTING_ROUTE_WORKSPACE_SUBSCRIPTION,-} from "@/react/router/handles";+} from "@/app/router/handles";import type { Database } from "@/types/proto-es/v1/database_service_pb";import type { Project } from "@/types/proto-es/v1/project_service_pb";import { extractDatabaseResourceName, extractProjectResourceName } from "./v1";diff --git a/frontend/src/utils/datetime.test.ts b/frontend/src/utils/datetime.test.tsindex 01158a879a..764aecdc38 100644--- a/frontend/src/utils/datetime.test.ts+++ b/frontend/src/utils/datetime.test.ts@@ -1,6 +1,6 @@import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";-vi.mock("@/react/i18n", () => ({+vi.mock("@/lib/i18n", () => ({default: {language: "en-US",},diff --git a/frontend/src/utils/datetime.ts b/frontend/src/utils/datetime.tsindex 4f3c471bb0..53c15c3cb9 100644--- a/frontend/src/utils/datetime.ts+++ b/frontend/src/utils/datetime.ts@@ -1,4 +1,4 @@-import i18n from "@/react/i18n";+import i18n from "@/lib/i18n";export const RELATIVE_THRESHOLD_MS = 30 * 24 * 60 * 60 * 1000; // 30 daysexport const DEFAULT_NOW_THRESHOLD_MS = 10_000;diff --git a/frontend/src/utils/expr.ts b/frontend/src/utils/expr.tsindex 9386aec02a..10b991adf0 100644--- a/frontend/src/utils/expr.ts+++ b/frontend/src/utils/expr.ts@@ -1,12 +1,12 @@+import { instanceNamePrefix, projectNamePrefix } from "@/stores";import {batchGetOrFetchDatabases,fetchDatabases,-} from "@/react/stores/app/databaseAccess";+} from "@/stores/app/databaseAccess";import {batchGetOrFetchProjects,fetchProjectList,-} from "@/react/stores/app/projectAccess";-import { instanceNamePrefix, projectNamePrefix } from "@/store";+} from "@/stores/app/projectAccess";import { isValidInstanceName } from "@/types";import type { Database } from "@/types/proto-es/v1/database_service_pb";import type { Instance } from "@/types/proto-es/v1/instance_service_pb";@@ -103,7 +103,7 @@ export const getInstanceIdOptionConfig = (): OptionConfig => {return {options: [],fetch: async (instanceIds: string[]) => {- const { useAppStore } = await import("@/react/stores/app");+ const { useAppStore } = await import("@/stores/app");// TODO(ed): batch fetch instancesconst instances = await Promise.all(instanceIds.map((instanceId) =>@@ -122,7 +122,7 @@ export const getInstanceIdOptionConfig = (): OptionConfig => {return options;},search: async (params) => {- const { useAppStore } = await import("@/react/stores/app");+ const { useAppStore } = await import("@/stores/app");return useAppStore.getState().fetchInstanceList({diff --git a/frontend/src/utils/issue/cel.ts b/frontend/src/utils/issue/cel.tsindex 0456f9c2a6..fee64cfffb 100644--- a/frontend/src/utils/issue/cel.ts+++ b/frontend/src/utils/issue/cel.ts@@ -1,14 +1,14 @@import { create } from "@bufbuild/protobuf";import dayjs from "dayjs";import { cloneDeep, head } from "lodash-es";-import type { SimpleExpr } from "@/plugins/cel";-import { isRawStringExpr, resolveCELExpr } from "@/plugins/cel";+import type { SimpleExpr } from "@/modules/cel";+import { isRawStringExpr, resolveCELExpr } from "@/modules/cel";import {databaseNamePrefix,environmentNamePrefix,getEnvironmentId,instanceNamePrefix,-} from "@/store/modules/v1/common";+} from "@/stores/modules/v1/common";import type { DatabaseResource } from "@/types";import type { Expr } from "@/types/proto-es/google/api/expr/v1alpha1/syntax_pb";import type { Expr as ConditionExpr } from "@/types/proto-es/google/type/expr_pb";diff --git a/frontend/src/utils/pagination.ts b/frontend/src/utils/pagination.tsindex 57379f7fde..ce1c44dae0 100644--- a/frontend/src/utils/pagination.ts+++ b/frontend/src/utils/pagination.ts@@ -1,4 +1,4 @@-import { getCurrentUserV1 } from "@/store";+import { getCurrentUserV1 } from "@/stores";export const getDefaultPagination = () => {if (getCurrentUserV1().email.endsWith("@bytebase.com")) {diff --git a/frontend/src/utils/role.ts b/frontend/src/utils/role.tsindex 2614064579..e7dfa835be 100644--- a/frontend/src/utils/role.ts+++ b/frontend/src/utils/role.ts@@ -1,4 +1,4 @@-import i18n from "@/react/i18n";+import i18n from "@/lib/i18n";import type { Permission } from "@/types/iam";import { PresetRoleType } from "@/types/iam";import { appStoreUtilBridge } from "@/utils/app-store-bridge";diff --git a/frontend/src/utils/slug.ts b/frontend/src/utils/slug.tsindex 848da37313..04e37c4963 100644--- a/frontend/src/utils/slug.ts+++ b/frontend/src/utils/slug.ts@@ -1,7 +1,7 @@import {getReviewConfigId,reviewConfigNamePrefix,-} from "@/store/modules/v1/common";+} from "@/stores/modules/v1/common";import type { SQLReviewPolicy } from "../types";export function sqlReviewPolicySlug(reviewPolicy: SQLReviewPolicy): string {diff --git a/frontend/src/utils/sqlEditor.ts b/frontend/src/utils/sqlEditor.tsindex 5bd75a21ce..db4218423a 100644--- a/frontend/src/utils/sqlEditor.ts+++ b/frontend/src/utils/sqlEditor.ts@@ -48,6 +48,6 @@ export const isSameSQLEditorConnection = (};// `getConnectionForSQLEditorTab` / `isConnectedSQLEditorTab` and-// `getValidDataSourceByPolicy` moved to `@/react/lib/*` so the database and+// `getValidDataSourceByPolicy` moved to `@/lib/*` so the database and// policy lookups read the React app store directly without dragging-// `@/react/stores/app` into the `@/utils` import graph (a static ESM cycle).+// `@/stores/app` into the `@/utils` import graph (a static ESM cycle).diff --git a/frontend/src/utils/v1/advanced-search/issue/utils.ts b/frontend/src/utils/v1/advanced-search/issue/utils.tsindex 3da9374c75..de69aca8e8 100644--- a/frontend/src/utils/v1/advanced-search/issue/utils.ts+++ b/frontend/src/utils/v1/advanced-search/issue/utils.ts@@ -1,4 +1,4 @@-import { projectNamePrefix, userNamePrefix } from "@/store";+import { projectNamePrefix, userNamePrefix } from "@/stores";import type { IssueFilter } from "@/types";import { ApprovalStatus, RiskLevel } from "@/types/proto-es/v1/common_pb";import { Issue_Type, IssueStatus } from "@/types/proto-es/v1/issue_service_pb";diff --git a/frontend/src/utils/v1/cel.ts b/frontend/src/utils/v1/cel.tsindex 68aff65d3c..ec8bd484b3 100644--- a/frontend/src/utils/v1/cel.ts+++ b/frontend/src/utils/v1/cel.ts@@ -1,7 +1,7 @@import { create } from "@bufbuild/protobuf";import { createContextValues } from "@connectrpc/connect";-import { celServiceClientConnect } from "@/connect";-import { silentContextKey } from "@/connect/context-key";+import { celServiceClientConnect } from "@/api";+import { silentContextKey } from "@/api/context-key";import type { Expr } from "@/types/proto-es/google/api/expr/v1alpha1/syntax_pb";import { ExprSchema } from "@/types/proto-es/google/api/expr/v1alpha1/syntax_pb";import {diff --git a/frontend/src/utils/v1/changelog.ts b/frontend/src/utils/v1/changelog.tsindex 9720788506..19ba23e580 100644--- a/frontend/src/utils/v1/changelog.ts+++ b/frontend/src/utils/v1/changelog.ts@@ -1,5 +1,5 @@import { create } from "@bufbuild/protobuf";-import { getDatabaseByName } from "@/react/stores/app/databaseAccess";+import { getDatabaseByName } from "@/stores/app/databaseAccess";import { UNKNOWN_ID } from "@/types";import type {Changelog,diff --git a/frontend/src/utils/v1/database.ts b/frontend/src/utils/v1/database.tsindex 85572fa96d..91b7a3f922 100644--- a/frontend/src/utils/v1/database.ts+++ b/frontend/src/utils/v1/database.ts@@ -1,8 +1,8 @@-import { getProjectByName } from "@/react/stores/app/projectAccess";+import { getProjectByName } from "@/stores/app/projectAccess";import {databaseNamePrefix,instanceNamePrefix,-} from "@/store/modules/v1/common";+} from "@/stores/modules/v1/common";import type { QueryPermission } from "@/types";import {isValidDatabaseName,diff --git a/frontend/src/utils/v1/databaseResource.ts b/frontend/src/utils/v1/databaseResource.tsindex 6c1f7387a6..4e6d1beba8 100644--- a/frontend/src/utils/v1/databaseResource.ts+++ b/frontend/src/utils/v1/databaseResource.ts@@ -1,9 +1,9 @@import { flatten, isUndefined } from "lodash-es";-import { useAppStore } from "@/react/stores/app";+import { useAppStore } from "@/stores/app";import {databaseNamePrefix,instanceNamePrefix,-} from "@/store/modules/v1/common";+} from "@/stores/modules/v1/common";import type { DatabaseResource } from "@/types";import { Engine } from "@/types/proto-es/v1/common_pb";import type {diff --git a/frontend/src/utils/v1/iam.ts b/frontend/src/utils/v1/iam.tsindex f3246ac1dd..60d6b382c6 100644--- a/frontend/src/utils/v1/iam.ts+++ b/frontend/src/utils/v1/iam.ts@@ -1,17 +1,17 @@import { isUndefined, uniq } from "lodash-es";-import { getProjectByName } from "@/react/stores/app/projectAccess";import {ensureGroupIdentifier,extractServiceAccountId,extractWorkloadIdentityId,groupNamePrefix,-} from "@/store";+} from "@/stores";+import { getProjectByName } from "@/stores/app/projectAccess";import {getUserFullNameByType,serviceAccountNamePrefix,userNamePrefix,workloadIdentityNamePrefix,-} from "@/store/modules/v1/common";+} from "@/stores/modules/v1/common";import {ALL_USERS_USER_EMAIL,groupBindingPrefix,diff --git a/frontend/src/utils/v1/instance.test.ts b/frontend/src/utils/v1/instance.test.tsindex bc18bfe185..beddd54fb9 100644--- a/frontend/src/utils/v1/instance.test.ts+++ b/frontend/src/utils/v1/instance.test.ts@@ -1,13 +1,13 @@import { beforeEach, describe, expect, it, vi } from "vitest";import { Engine } from "@/types/proto-es/v1/common_pb";-vi.mock("@/react/i18n", () => ({+vi.mock("@/lib/i18n", () => ({default: {t: (key: string) => key,},}));-vi.mock("@/store", () => ({+vi.mock("@/stores", () => ({useSubscriptionV1Store: () => ({ currentPlan: 0 }),}));diff --git a/frontend/src/utils/v1/instance.ts b/frontend/src/utils/v1/instance.tsindex b974a19d47..ea8febefeb 100644--- a/frontend/src/utils/v1/instance.ts+++ b/frontend/src/utils/v1/instance.ts@@ -1,4 +1,4 @@-import i18n from "@/react/i18n";+import i18n from "@/lib/i18n";import { isValidInstanceName, unknownInstance } from "@/types";import { Engine } from "@/types/proto-es/v1/common_pb";// Using proto-es types directly, no conversions neededdiff --git a/frontend/src/utils/v1/issue/issue.ts b/frontend/src/utils/v1/issue/issue.tsindex 3b7d959636..5ad6315538 100644--- a/frontend/src/utils/v1/issue/issue.ts+++ b/frontend/src/utils/v1/issue/issue.ts@@ -1,13 +1,13 @@import { create } from "@bufbuild/protobuf";import dayjs from "dayjs";-import i18n from "@/react/i18n";-import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/react/router/handles";+import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/app/router/handles";+import i18n from "@/lib/i18n";+import { projectNamePrefix } from "@/stores";import {getDatabaseByName,getDatabaseList,-} from "@/react/stores/app/databaseAccess";-import { getProjectByName } from "@/react/stores/app/projectAccess";-import { projectNamePrefix } from "@/store";+} from "@/stores/app/databaseAccess";+import { getProjectByName } from "@/stores/app/projectAccess";import { isValidDatabaseName, UNKNOWN_ID, unknownDatabase } from "@/types";import { State } from "@/types/proto-es/v1/common_pb";import type { Database } from "@/types/proto-es/v1/database_service_pb";diff --git a/frontend/src/utils/v1/issue/rollout.ts b/frontend/src/utils/v1/issue/rollout.tsindex 92a979c668..a49eae3931 100644--- a/frontend/src/utils/v1/issue/rollout.ts+++ b/frontend/src/utils/v1/issue/rollout.ts@@ -1,5 +1,5 @@-import i18n from "@/react/i18n";-import { getDatabaseByName } from "@/react/stores/app/databaseAccess";+import i18n from "@/lib/i18n";+import { getDatabaseByName } from "@/stores/app/databaseAccess";import {getTimeForPbTimestampProtoEs,isValidDatabaseName,diff --git a/frontend/src/utils/v1/revision.ts b/frontend/src/utils/v1/revision.tsindex 44089ff428..136f83800e 100644--- a/frontend/src/utils/v1/revision.ts+++ b/frontend/src/utils/v1/revision.ts@@ -1,5 +1,5 @@-import i18n from "@/react/i18n";-import { getDatabaseByName } from "@/react/stores/app/databaseAccess";+import i18n from "@/lib/i18n";+import { getDatabaseByName } from "@/stores/app/databaseAccess";import type { Revision } from "@/types/proto-es/v1/revision_service_pb";import { Revision_Type } from "@/types/proto-es/v1/revision_service_pb";import { databaseV1Url, extractDatabaseResourceName } from "./database";diff --git a/frontend/src/utils/v1/user.ts b/frontend/src/utils/v1/user.tsindex 9848886ad2..455e7f849a 100644--- a/frontend/src/utils/v1/user.ts+++ b/frontend/src/utils/v1/user.ts@@ -1,4 +1,4 @@-import { extractUserEmail, userNamePrefix } from "@/store/modules/v1/common";+import { extractUserEmail, userNamePrefix } from "@/stores/modules/v1/common";import { ALL_USERS_USER_EMAIL } from "@/types";export const ensureUserFullName = (identifier: string) => {diff --git a/frontend/src/utils/v1/worksheet.ts b/frontend/src/utils/v1/worksheet.tsindex 1e3f8e54dc..2823252291 100644--- a/frontend/src/utils/v1/worksheet.ts+++ b/frontend/src/utils/v1/worksheet.ts@@ -1,6 +1,6 @@-import { getProjectByName } from "@/react/stores/app/projectAccess";-import { getCurrentUserV1 } from "@/store";-import { extractUserEmail } from "@/store/modules/v1/common";+import { getCurrentUserV1 } from "@/stores";+import { getProjectByName } from "@/stores/app/projectAccess";+import { extractUserEmail } from "@/stores/modules/v1/common";import { UNKNOWN_ID, UNKNOWN_PROJECT_NAME } from "@/types";import type { Worksheet } from "@/types/proto-es/v1/worksheet_service_pb";import { Worksheet_Visibility } from "@/types/proto-es/v1/worksheet_service_pb";@@ -75,7 +75,7 @@ export const isWorksheetWritableV1 = (sheet: Worksheet) => {return false;};-// `extractWorksheetConnection` moved to `@/react/lib/sqlEditorConnection`+// `extractWorksheetConnection` moved to `@/lib/sqlEditorConnection`// so the database lookup can go through the React app store without-// dragging `@/react/stores/app` into the `@/utils` import graph (which+// dragging `@/stores/app` into the `@/utils` import graph (which// would create a static ESM cycle).diff --git a/frontend/src/utils/workspaceApprovalSetting.ts b/frontend/src/utils/workspaceApprovalSetting.tsindex 02b7da2746..28b8e0ec4d 100644--- a/frontend/src/utils/workspaceApprovalSetting.ts+++ b/frontend/src/utils/workspaceApprovalSetting.ts@@ -1,7 +1,7 @@import { create } from "@bufbuild/protobuf";import { v4 as uuidv4 } from "uuid";-import type { ConditionGroupExpr } from "@/plugins/cel";-import { resolveCELExpr, wrapAsGroup } from "@/plugins/cel";+import type { ConditionGroupExpr } from "@/modules/cel";+import { resolveCELExpr, wrapAsGroup } from "@/modules/cel";import type { LocalApprovalConfig, LocalApprovalRule } from "@/types";import { ExprSchema } from "@/types/proto-es/google/type/expr_pb";import type { ApprovalFlow } from "@/types/proto-es/v1/issue_service_pb";diff --git a/frontend/tests/e2e/sql-editor/sql-editor-lsp.spec.ts b/frontend/tests/e2e/sql-editor/sql-editor-lsp.spec.tsindex f0738c2bb8..417e753054 100644--- a/frontend/tests/e2e/sql-editor/sql-editor-lsp.spec.ts+++ b/frontend/tests/e2e/sql-editor/sql-editor-lsp.spec.ts@@ -1,7 +1,7 @@// SQL Editor — LSP smoke test (completion over the /lsp websocket).//// Locks the language-client wiring in-// frontend/src/react/components/monaco/lsp-client.ts: the inline+// frontend/src/components/monaco/lsp-client.ts: the inline// BaseLanguageClient subclass must start against the websocket transports,// complete the LSP initialize handshake, deliver `setMetadata` via// workspace/executeCommand, and surface schema-aware completions indiff --git a/frontend/tests/e2e/sql-editor/sql-editor.page.ts b/frontend/tests/e2e/sql-editor/sql-editor.page.tsindex d59be7bd87..4e3f79fef6 100644--- a/frontend/tests/e2e/sql-editor/sql-editor.page.ts+++ b/frontend/tests/e2e/sql-editor/sql-editor.page.ts@@ -32,12 +32,12 @@ export class SqlEditorPage {// editorStore.allowAdmin && currentTab.mode === "WORKSHEET".//// Scoping note: the workspace-level "Bytebase has not configured- // --external-url" banner (frontend/src/react/components/BannersWrapper.tsx)+ // --external-url" banner (frontend/src/components/BannersWrapper.tsx)// ALSO renders a button with a lucide-wrench icon ("Configure now").// The framework's seed-test-data fixture silences that banner by// setting an external URL during setup, but we still anchor by the// editor's own warning-color class (`border-warning`, applied in- // frontend/src/react/components/sql-editor/AdminModeButton.tsx:53)+ // frontend/src/components/sql-editor/AdminModeButton.tsx:53)// so the locator stays correct even if a future build re-introduces// the banner.this.adminModeButton = pagediff --git a/frontend/vite.config.ts b/frontend/vite.config.tsindex 2dfa2dbc7c..a5b8607ba1 100644--- a/frontend/vite.config.ts+++ b/frontend/vite.config.ts@@ -46,10 +46,8 @@ export default defineConfig({name: "react-tsx-transform",enforce: "pre",async transform(code, id) {- // Both the main React tree (`src/react/...`) and the AI plugin's- // co-located React subtree (`src/plugins/ai/react/...`) compile- // with React's automatic JSX runtime.- if (!/\/(src\/react|src\/plugins\/ai\/react)\/.+\.tsx$/.test(id)) {+ // All TSX under src uses React's automatic JSX runtime.+ if (!/\/src\/.+\.tsx$/.test(id)) {return undefined;}const result = await esbuildTransform(code, {@@ -78,7 +76,7 @@ export default defineConfig({: [CodeInspectorPlugin({bundler: "vite",- exclude: [/src\/react\//],+ exclude: [/src\//],}),]),// Export CSP hashes from @vitejs/plugin-legacy for backend to use