Add support for connection string for warehouse.
This PR gives the ability to enable warehouse on a project and also get
the connection string to connect to.
> This project is only available in staging for now and gated behind a
feature flag
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Added a Warehouse connection option to the Connect dialog.
- Select schemas and tables to replicate, with setup progress, error
recovery, and retry support.
- View copyable Warehouse connection details, credentials guidance,
command-line instructions, and DuckLake setup scripts.
- Warehouse availability is controlled by feature configuration.
- **Tests**
- Added coverage for Warehouse table selection, setup script generation,
URL parsing, and connection configuration utilities.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
## Summary
Adds a narrow knip suppression so
`hooks/misc/useTrackExperimentExposure.ts` isn't flagged as an unused
file when no experiment is currently consuming it.
## Why
Different from the other files #49719 cleaned up. Those were one-off
feature code (specific banners, mutations, table rows) — genuinely dead
when their feature was removed. This hook is **shared experiment
plumbing**: every A/B experiment plugs into it, and we run experiments
frequently. Gaps between experiments are normal.
Deleting and re-adding it each cycle:
- Churns the codebase for no real cleanup value
- Adds review surface to every next experiment PR (has to also add the
hook back)
- Caused a stacked-merge race today — #49719 deleted it, #49534
reintroduced a usage in `plan-presentation.ts`. Both PRs' CI ran green
on their own bases, but merging both broke master's typecheck + Studio
deploy. Fixed in #49763.
## What this changes
One entry in `knip.jsonc` under
`workspaces["apps/studio"].ignoreIssues`:
\`\`\`jsonc
"hooks/misc/useTrackExperimentExposure.ts": ["files"]
\`\`\`
`ignoreIssues` (not `ignore`) is the right knob per the config's own
guidance — it suppresses only the "unused file" issue for this specific
path, while knip still traces the file's imports so anything it depends
on stays honestly tracked.
## Test plan
- [ ] `pnpm knip --workspace apps/studio` still clean
- [ ] With no experiment referencing the hook, knip does not report it
Makes knip a CI gate for Studio so dead files and unused dependencies
fail the PR instead of piling up. Third PR in the stack, on top of
#49719 (dead code) and #49720 (unused deps), which get Studio to a clean
run.
**Changed:**
- knip `pnpx knip@~5.50.0` → root devDependency `knip@6.32.3`, `pnpm
knip` now runs it. The old `pnpx` form was actually broken: it resolved
knip's `typescript` peer to TS 7 and crashed with
`ts.getDefaultLibFilePath is not a function`. (6.33.0 is newer but
blocked by `minimumReleaseAge`.)
- `knip.jsonc` rewritten for v6 with a `workspaces["apps/studio"]`
block. Framework-convention files (`router.tsx`, `start.ts`,
`routes/**`, `compat/**`, `api/server.js`) are `entry` rather than
`ignore` — an ignored file's imports aren't traced, which is how
`ShellFallback.tsx` (only imported from `routes/__root.tsx`) was being
reported as dead. knip 6's Next.js plugin already covers
`instrumentation*.ts`, `proxy.ts`, `pages/**`; its tanstack-router
plugin only looks under `src/`, hence the manual entries. Narrow
`ignoreIssues` for graphql-codegen output and the `CONSTRAINT_TYPE`
enum; `ignoreDependencies` for the five implicit deps from #49720, each
with a comment; `ignoreBinaries: ["vercel"]`.
- `apps/studio/CLAUDE.md`: one bullet on the gate and where framework
files go.
**Added:**
- `.github/workflows/studio-knip.yml` — path-filtered to
`apps/studio/**` + knip/pnpm config, mirrors `studio-lint-ratchet.yml`'s
setup (no sparse checkout: knip needs every workspace's `package.json`
to resolve the graph). Runs `pnpm knip --workspace apps/studio
--reporter symbols --reporter github-actions` so findings show up as
inline PR annotations. ~5s locally.
Scope notes: the gate is Studio-only — the full-monorepo run still has
~400 dead files in `www`/`docs`/`blocks`, which is a separate effort.
`exclude: ["types", "exports"]` is kept, so unused exports aren't gated
yet, but `enumMembers`/`duplicates` are (they caught real things in
#49719).
## To test
- `pnpm knip --workspace apps/studio` exits 0 on this branch
- The `Studio Dead Code (knip)` workflow runs on this PR and is green
- Sanity-check the gate bites: add a throwaway
`apps/studio/lib/unused.ts`, run `pnpm knip --workspace apps/studio` →
reports it and exits 1
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **CI**
* Added automated dead-code and unused-dependency checks for the Studio
workspace on relevant pushes and pull requests.
* Results appear in workflow summaries and as inline pull request
annotations.
* **Maintenance**
* Improved analysis of framework-convention files and Studio code.
* Standardized the local code-quality check and updated its
configuration support.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
## Problem
Knip reported some unused dependencies. Some are actually used in
builds, etc but others are not.
## Solution
Remove the really unused dependencies
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Chores**
* Cleaned up unused dependencies and removed some obsolete test/support
files.
* Updated project ignore rules to better match current app structure and
generated files.
* **Bug Fixes**
* No user-facing behavior changed; this release is focused on
maintenance and cleanup.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Problem
We now have `ConnectSheet` and it has been rolled out to everyone.
## Solution
Remove the previous `Connect` components
## Out of scope
There are opportunities to refactor/move the remaining files in the
`apps/studio/components/interfaces/Connect` directory. That will be
addressed in a dedicated PR to ease reviewing.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Refactor**
* Restructured the database connection setup interface and reorganized
framework integration components throughout the application.
* Updated internal architecture for managing connection strings, API
keys, and configuration utilities.
* Modified how framework-specific setup documentation and code examples
are organized and delivered across supported platforms.
* Updated configuration management for code analysis.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
* Remove unneeded code.
* Remove more unused code.
* Update knip.jsonc for ui-library.
* Remove unneeded imports. Change the registry generation to only generate what's needed.
* Cleanup the rehype middleware (it wasn't used). Clean up the example blocks generation.
* Don't show the "show code" button in all dropzone examples.
* Add knip as dev dependency.
* Add config and script for knip.
* Add additional ignores to the file list.
* Remove knip as a dependency, download and run it :).