Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
1207065
initial draft
kanadgupta Jul 28, 2026
f5d1090
Merge branch 'develop' into kanad-claude-2026-07-22/feedback-command
kanadgupta Jul 28, 2026
8ab5d2c
chore: add config layer so we have access to user agent
kanadgupta Jul 29, 2026
4a1d765
feat: claude pass at wiring up supabase-js
kanadgupta Jul 29, 2026
8edaba5
chore: regen
kanadgupta Jul 29, 2026
d30c03f
Merge branch 'develop' into kanad-claude-2026-07-22/feedback-command
kanadgupta Jul 29, 2026
6971e04
chore: claude DRY pass
kanadgupta Jul 29, 2026
8c53f2e
chore: exclude .repos from vscode search
kanadgupta Jul 29, 2026
4cbc747
Revert "chore: exclude .repos from vscode search"
kanadgupta Jul 29, 2026
656f13a
fix(cli): resolve linked project ref from .temp/project-ref in feedback
kanadgupta Jul 29, 2026
830e565
Merge branch 'develop' into kanad-claude-2026-07-22/feedback-command
kanadgupta Jul 29, 2026
ae5d202
Merge branch 'develop' into kanad-claude-2026-07-22/feedback-command
kanadgupta Jul 30, 2026
eec4d20
feat(cli): move feedback submission to feedback add and drop the btw …
kanadgupta Aug 13, 2026
4ca265f
Merge remote-tracking branch 'origin/develop' into kanad-claude-2026-…
kanadgupta Aug 13, 2026
c239cdb
refactor: shuffle things around so we're exporting less
kanadgupta Aug 13, 2026
409bbd8
chore: refresh types
kanadgupta Aug 13, 2026
5c01daf
fix: metadata tweaks
kanadgupta Aug 13, 2026
87463fa
feat(cli): submit feedback via RPC and add feedback delete command
kanadgupta Aug 14, 2026
742632b
Merge remote-tracking branch 'origin/develop' into kanad-claude/cli-f…
kanadgupta Aug 14, 2026
c4ae2b2
feat(cli): include supabase user id in feedback context payload (#6190)
kanadgupta Aug 14, 2026
e4d8b8e
Merge remote-tracking branch 'origin/develop' into kanad-claude/merge…
kanadgupta Aug 14, 2026
a3d67e5
fix(cli): address feedback command review findings
kanadgupta Aug 14, 2026
a01d436
Merge branch 'develop' into kanad-claude-2026-07-22/feedback-command
kanadgupta Aug 18, 2026
9760ee7
chore: add script for regenerating types
kanadgupta Aug 18, 2026
8b17e91
chore: add note specifying 1000 character limit
kanadgupta Aug 18, 2026
ac97fba
chore: more script changes, remove non-public schemas
kanadgupta Aug 18, 2026
85479ec
chore: lockfile
kanadgupta Aug 18, 2026
ded7f43
chore: use this config instead
kanadgupta Aug 18, 2026
d8a427e
chore: use production endpoint
kanadgupta Aug 18, 2026
c38af45
fix: preserve WHATWG Headers through the --dns-resolver https rewrite
kanadgupta Aug 19, 2026
4ab24af
fix: redact the delete_token filter from --debug request logs
kanadgupta Aug 19, 2026
04c4e2a
feat: reject over-limit feedback messages client-side
kanadgupta Aug 19, 2026
972df73
test: clean up the live feedback row in a finally block
kanadgupta Aug 20, 2026
129e3d6
Merge branch 'develop' into kanad-claude-2026-07-22/feedback-command
kanadgupta Aug 20, 2026
0c11b16
fix: validate feedback project refs against the ref pattern
kanadgupta Aug 20, 2026
db5e615
fix: require a TTY stdin before the feedback delete confirmation
kanadgupta Aug 20, 2026
fead113
docs: remove feedback rows from the frozen divergence ledger
kanadgupta Aug 20, 2026
281e791
docs: describe the feedback commands in their own terms
kanadgupta Aug 20, 2026
6234f41
fix: settle feedback spinners on interruption
kanadgupta Aug 20, 2026
3c41e19
fix: cap piped feedback input instead of buffering the whole pipe
kanadgupta Aug 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .oxfmtrc.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"ignorePatterns": [
".repos/**",
// Autogenerated files that must stay byte-identical to their generator's output (never reformat)
"apps/cli/src/shared/feedback/database.types.ts",
],
}
19 changes: 10 additions & 9 deletions apps/cli/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,16 @@ Always check `src/shared/` before writing new infrastructure. Do not duplicate w

Also check the following `legacy/` infrastructure before writing equivalent helpers from scratch:

| Path | What it provides |
| ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `legacy/config/legacy-cli-config.layer.ts` | `LegacyCliConfig` — resolves `SUPABASE_PROFILE` (built-in name **or** YAML file path), `--workdir`, `--experimental`, project-id from `supabase/config.toml` |
| `legacy/config/legacy-project-ref.layer.ts` | `LegacyProjectRefResolver` — `--project-ref` flag → env → `supabase/.temp/project-ref` file → prompt |
| `legacy/telemetry/legacy-telemetry-state.layer.ts` | `LegacyTelemetryState.flush` — writes `~/.supabase/telemetry.json`, runs in every command's `Effect.ensuring` |
| `legacy/telemetry/legacy-linked-project-cache.layer.ts` | `LegacyLinkedProjectCache.cache(ref)` — writes `<workdir>/supabase/.temp/linked-project.json` after `--project-ref` resolves; bypasses generated schema validation (uses raw HTTP client) |
| `legacy/auth/legacy-http-debug.layer.ts` | `legacyHttpClientLayer` — wraps the HTTP transport with a `--debug` stderr logger (`log.LstdFlags`-style timestamp format) |
| `legacy/output/legacy-glamour-table.ts` | `renderGlamourTable(headers, rows)` — the CLI's established ASCII table format |
| `legacy/shared/legacy-upgrade-notice.ts` | `legacyUpgradeNoticeHook` — post-success upgrade notice (GitHub latest-release fetch, 10h `supabase/.temp/cli-latest` cache, `SUPABASE_NO_UPDATE_NOTIFIER` opt-out) |
| Path | What it provides |
| ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `legacy/config/legacy-cli-config.layer.ts` | `LegacyCliConfig` — resolves `SUPABASE_PROFILE` (built-in name **or** YAML file path), `--workdir`, `--experimental`. Its `projectId` is a bare `SUPABASE_PROJECT_ID` env passthrough — it does **not** read `config.toml` or the linked-project file, so it is `None` in a linked project unless that env var is set. Never treat it as "the linked project ref" on its own; see the two rows below |
| `legacy/config/legacy-project-ref.layer.ts` | `LegacyProjectRefResolver` — `--project-ref` flag → env → `supabase/.temp/project-ref` file → prompt. `resolveOptional` is the soft-load variant (no prompt, no error when unlinked). Requires `LegacyPlatformApiFactory` for its prompt path, so commands that must work unauthenticated should read the file directly instead |
| `legacy/shared/legacy-temp-paths.ts` | `legacyTempPaths(path, workdir)` — the `<workdir>/supabase/.temp/*` paths `supabase link` writes; `legacyReadProjectRefFile(fs, path, workdir)` reads the linked ref with no API/TTY dependency (absent or blank file → `None`; other read errors fail) |
| `legacy/telemetry/legacy-telemetry-state.layer.ts` | `LegacyTelemetryState.flush` — writes `~/.supabase/telemetry.json`, runs in every command's `Effect.ensuring` |
| `legacy/telemetry/legacy-linked-project-cache.layer.ts` | `LegacyLinkedProjectCache.cache(ref)` — writes `<workdir>/supabase/.temp/linked-project.json` after `--project-ref` resolves; bypasses generated schema validation (uses raw HTTP client) |
| `legacy/auth/legacy-http-debug.layer.ts` | `legacyHttpClientLayer` — wraps the HTTP transport with a `--debug` stderr logger (`log.LstdFlags`-style timestamp format) |
| `legacy/output/legacy-glamour-table.ts` | `renderGlamourTable(headers, rows)` — the CLI's established ASCII table format |
| `legacy/shared/legacy-upgrade-notice.ts` | `legacyUpgradeNoticeHook` — post-success upgrade notice (GitHub latest-release fetch, 10h `supabase/.temp/cli-latest` cache, `SUPABASE_NO_UPDATE_NOTIFIER` opt-out) |

---

Expand Down
3 changes: 3 additions & 0 deletions apps/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"docs:spec": "bun scripts/generate-docs-spec.ts",
"dev:next": "pnpm exec bun src/next/main.ts",
"dev:legacy": "pnpm exec bun src/legacy/main.ts",
"gen:feedback-types": "pnpm dev:legacy -- gen types typescript --project-id xguihxuzqibwxjnimxev --schema public > src/shared/feedback/database.types.ts",
"test": "nx run-many -t test:core test:e2e --projects=$npm_package_name",
"test:core": "nx run-many -t test:unit test:integration --projects=$npm_package_name --coverage.enabled",
"test:smoke": "bun run tests/smoke-test.ts",
Expand Down Expand Up @@ -59,6 +60,7 @@
"@supabase/pg-topo": "1.0.0-alpha.5",
"@supabase/process-compose": "workspace:*",
"@supabase/stack": "workspace:*",
"@supabase/supabase-js": "^2.110.7",
"@tsconfig/bun": "catalog:",
"@types/bun": "catalog:",
"@types/pg": "^8.21.0",
Expand Down Expand Up @@ -122,6 +124,7 @@
"ignore": [
"scripts/*.ts",
"tests/**/*.ts",
"src/shared/feedback/database.types.ts",
"src/shared/telemetry/event-catalog.ts"
],
"ignoreBinaries": [
Expand Down
2 changes: 2 additions & 0 deletions apps/cli/src/legacy/cli/root.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { legacyConfigCommand } from "../commands/config/config.command.ts";
import { legacyDbCommand } from "../commands/db/db.command.ts";
import { legacyDomainsCommand } from "../commands/domains/domains.command.ts";
import { legacyEncryptionCommand } from "../commands/encryption/encryption.command.ts";
import { legacyFeedbackCommand } from "../commands/feedback/feedback.command.ts";
import { legacyFunctionsCommand } from "../commands/functions/functions.command.ts";
import { legacyGenCommand } from "../commands/gen/gen.command.ts";
import { legacyInitCommand } from "../commands/init/init.command.ts";
Expand Down Expand Up @@ -69,6 +70,7 @@ export const legacyRoot = Command.make("supabase").pipe(
legacyDbCommand,
legacyDomainsCommand,
legacyEncryptionCommand,
legacyFeedbackCommand,
legacyFunctionsCommand,
legacyGenCommand,
legacyInitCommand,
Expand Down
10 changes: 0 additions & 10 deletions apps/cli/src/legacy/commands/db/query/query.format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -573,13 +573,3 @@ export function legacyOrderedKeys(body: string): ReadonlyArray<string> {
}
return keys;
}

/** Agent-mode resolution: `yes`→true, `no`→false, `auto`→agent detected. */
export function legacyResolveAgentMode(
agentFlag: "auto" | "yes" | "no",
aiToolName: Option.Option<string>,
): boolean {
if (agentFlag === "yes") return true;
if (agentFlag === "no") return false;
return Option.isSome(aiToolName);
}
10 changes: 0 additions & 10 deletions apps/cli/src/legacy/commands/db/query/query.format.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
legacyOrderedKeys,
legacyRenderJson,
legacyRenderTablewriter,
legacyResolveAgentMode,
legacyToCsv,
} from "./query.format.ts";

Expand Down Expand Up @@ -353,15 +352,6 @@ describe("legacyFindNonFiniteJsonValue", () => {
});
});

describe("legacyResolveAgentMode", () => {
it("honors the explicit flag and falls back to detection on auto", () => {
expect(legacyResolveAgentMode("yes", Option.none())).toBe(true);
expect(legacyResolveAgentMode("no", Option.some("cursor"))).toBe(false);
expect(legacyResolveAgentMode("auto", Option.some("cursor"))).toBe(true);
expect(legacyResolveAgentMode("auto", Option.none())).toBe(false);
});
});

describe("legacyBuildRlsAdvisory", () => {
it("returns None when no tables are unprotected", () => {
expect(Option.isNone(legacyBuildRlsAdvisory([]))).toBe(true);
Expand Down
2 changes: 1 addition & 1 deletion apps/cli/src/legacy/commands/db/query/query.handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ import {
legacyOrderedKeys,
legacyRenderJson,
legacyRenderTablewriter,
legacyResolveAgentMode,
legacyToCsv,
} from "./query.format.ts";
import { legacyResolveAgentMode } from "../../../shared/legacy-agent-mode.ts";

/** The output formats `db query` selects: `json|table|csv`. */
type LegacyResolvedFormat = "json" | "table" | "csv";
Expand Down
Loading
Loading