Commit Graph
32989 Commits
Author SHA1 Message Date
Sean Oliver 723054e96e prettier 2025-10-14 12:50:13 -07:00
Sean Oliver e4ee50d5fb Apply prettier formatting 2025-10-14 12:20:55 -07:00
Sean Oliver 81ddc5d60c Clean up table quickstart implementation
- Remove unnecessary custom streaming headers (X-AI-Stream-*)
- Improve type safety (replace any with unknown, add type guards)
- Remove unused code (modelError variable, isForeign/references properties)
- Remove obvious comments that don't add value
- Move MAX_RETRIES to top-level constant
- Remove hardcoded toast durations
2025-10-14 11:59:09 -07:00
Sean Oliver 95cf6ebc77 remove custom headers (not used) 2025-10-14 10:44:56 -07:00
Sean Oliver d6ec5cc673 move max retries to the top of the file 2025-10-14 10:42:02 -07:00
Sean Oliver c5e10d62ab say app instead of application 2025-10-14 10:40:40 -07:00
Sean Oliver b5a97225c8 Simplify table quickstart API endpoint
Remove unnecessary abstraction layers and dead code:
- Combine handler and handlePost into single function
- Remove shouldStream function and non-streaming path
- Always stream responses (only path client uses)
- Clean up imports in TableEditor
2025-10-14 10:37:22 -07:00
Sean Oliver c10c075ca4 Remove foreign key handling from table quickstart
- Remove isForeign and references fields from Zod schema
- Remove relationships from TableSchema
- Update system prompt to not generate foreign key constraints
- Remove TableRelationship type and relationships from TableSuggestion
- Clean up all FK handling in conversion logic
- Simplify getColumnDescription to only handle primary keys
2025-10-14 10:22:42 -07:00
Sean Oliver 8ab841e6c0 Fix AI icon layout and add loading animation to Generate button
- Display icons inline with text using flex layout in quick ideas
- Pass loading prop to Generate button icon for animated state during generation
- Quick ideas icons remain static (no loading animation)
2025-10-14 10:07:41 -07:00
Sean Oliver 9e13573770 Replace Wand2 icon with AI Assistant icon for visual consistency 2025-10-14 09:56:43 -07:00
Sean Oliver b12ee0d5fb Replace hasTables gate with isRecentProject (7-day) gate to match master 2025-10-14 09:45:23 -07:00
Sean Oliver ad01244349 Merge remote-tracking branch 'origin/master' into feat/table-quickstart-view-system
# Conflicts:
#	apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableEditor.tsx
#	apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableQuickstart/TableTemplateSelector.tsx
#	apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableQuickstart/constants.ts
#	apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/TableQuickstart/types.ts
2025-10-14 09:41:48 -07:00
Sean Oliver e1703d4429 feat: add basic table template infrastructure (1 of 3) (#38933)
* Use useLocalStorage hook for quickstart dismiss state

* Standardize varchar to text and remove local storage keys

* Remove gen_random_uuid() defaults from templates

* feat(studio): flatten table quickstart selector; show for any new table\n\n- Flattened category→template flow into single-step with category chips\n- Removed first-table-only guard so panel appears for all new tables when flag is on

* add comments to clarify diff btwn false and undefined in feature flag response type

* refactor: improve performance and type safety in table quickstart

- Memoize categories and displayed templates to prevent unnecessary re-renders
- Use generic type parameter instead of type assertion for feature flag
- Simplify dismiss handler with inline function
- Add JSDoc comment explaining feature flag return states

* Mark variant param as intentionally unused for future PR

* chore: clean up unused import in TableEditor

Remove unused useTablesQuery import after switching to localStorage-based dismissal.

* add 7 day project creation gate and fixed uuid default

* Improve table template selector UX with success feedback and clearer copy

- Add success toast when template is applied
- Update heading from "Quickstart: choose a template" to "Start faster with a table template"
- Improve subheading to explain time-saving benefit
- Use monospace font for table names to match code convention
- Update template rationales to be more descriptive and specific
- Increase font sizes for better readability
- Remove redundant category display
- Reorder imports alphabetically

* Apply prettier formatting to TableTemplateSelector
2025-10-14 16:12:36 +00:00
Charis 92a79d5156 fix(support form): project selector, test timeout (#39529)
* fix(support form): fetch projects on mount

The OrganizationProjectSelector was updated to only fetch when opened to
save on API requests. This causes a problem for the Support Form, which
expects the projects to be fetched immediately so it can fall back to
the first project if no project was paused in the URL.

Added a fetchOnMount prop to OrganizationProjectSelector, which defaults
to false, so we can override this behaviour for the Support Form.

* fix(tests): increase timeout on support form tests
2025-10-14 10:52:05 -04:00
Alaister Young c6a09b3fcf chore: hideable legal org documents tab (#39531) 2025-10-14 10:49:51 -04:00
Alaister Young 2d986e5b7f chore: hideable TOS link on sign in/up page (#39530) 2025-10-14 10:48:12 -04:00
Kevin Grüneberg 15c9a6ced3 perf: pass org slug / project ref to resource warnings endpoint (#39471)
Based on https://github.com/supabase/infrastructure/pull/26483 - pass in project ref / org slug to ensure we filter down and not query across all orgs unnecessarily
2025-10-14 18:27:34 +08:00
Eliot Whalan fab4750d4d docs: add eliot whalan to humans.txt (#39524) 2025-10-14 09:55:05 +00:00
Andrey A. 63051cb5fd docs: add andrey to humans (#39521) 2025-10-14 17:25:51 +08:00
Andrey A. 31a50408a8 chore: add aantti to codeowners for ./docker (#39523) 2025-10-14 17:23:20 +08:00
Joshen Lim 63b4f1d838 OrganizationProjectSelector to only fetch projects when its opened (#39516)
* OrganizationProjectSelector to only fetch projects when its opened

* Nit
2025-10-14 16:04:49 +08:00
Gregor 143007979b docs: adding gregor vand to humans.txt (#39503) 2025-10-14 15:46:59 +08:00
Timothy Lim ff93547913 fix(docs): use regular image markdown to fix doc sync (#39513) 2025-10-14 15:05:44 +08:00
Stojan DimitrovskiandJoshen Lim 0a3f4184a7 feat: optimized users page (#39349)
* feat: optimized users page

* Update UI

* Reinstate footer with count if mode is freeform

* Simplify disabled sort in performance mode

* Clean

* Small fix

* Final fixes

* Shift users SQL query to packages/pg-meta

* Nit unrelated: Clear query params from useLogsUrlState when going to logs tab of a selected user

* Shift user count SQL and get count estimate SQL into packages/pg-meta

* Fix

* Nit

* Nit

* Minor nits

* Refactor UX for searching

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-10-14 15:02:00 +08:00
CharisandJoshen Lim f5ff10e195 refactor,tests(support form) (#39410)
* refactor: refactor support form

Refactor support form to make it easier to maintain:
- Split up large components into smaller components and hooks
- Lift state up so we don't have to do complex child/parent
state-syncing via useEffect
- Use nuqs parsing for consistent serialization/deserialization of
support form prefilled fields

* test: support form

Add comprehensive tests for support form

* fix(support form): project and org empty state

* Nit clean up

* More clean up

* cleannnn

* fix(support form): allow case-insensitive category in url

* clean(support form tests): remove unused param

* fix(support form): incorrect logic for sending affected services in payload

* clean(support form): use NO_ORG_MARKER and NO_PROJECT_MARKER instead of strings

* fix(support form): don't show upgrade cta if already on enterprise

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-10-14 11:04:33 +08:00
Matt JohnstonandJoshen Lim 68fbcad6cf fix: omit quotes in values when .env contents are pasted into input (#39497)
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-10-14 10:42:00 +08:00
Sean Oliver a71326fdeb Remove redundant query parameters from streaming API
Headers alone are sufficient to determine streaming behavior.
2025-10-13 17:38:21 -07:00
Sean Oliver c4eda1d987 Add ARIA labels for better accessibility
Add aria-label and aria-pressed attributes to interactive elements for screen reader support.
2025-10-13 17:34:40 -07:00
Sean Oliver 76091696d3 refactor: clean up AI table generation code for production readiness
- Improve error messages with more user-friendly language
- Convert all functions to arrow functions for consistency
- Extract duplicate logic into helper functions (isPrimaryColumn, getColumnDescription)
- Remove unnecessary try-catch wrapper
- Simplify user-facing copy for better clarity
- Align coding patterns with project conventions
2025-10-13 17:09:50 -07:00
Sean Oliver 3de0dcde94 Merge feat/table-quickstart-streaming into feat/table-quickstart-view-system 2025-10-13 16:54:44 -07:00
Sean Oliver 19a5aa00de Improve table generation performance and reliability
- Switch from OpenAI gpt-5-mini to AWS Bedrock gpt-oss-120b-1:0 for faster response times (~5s vs ~67s)
- Update Zod schema to handle model's inconsistent output formats (relationships can be array or object)
- Add automatic retry logic for intermittent empty model responses
- Improve error messages for better user experience
- Clean up validation logic and remove verbose logging
2025-10-13 16:54:37 -07:00
Saxon FletcherandJoshen Lim 622486f750 Refresh report and status update (#39473)
* refresh report

* project status

* prettier

* Minor refactors

* add back refreshing

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-10-14 08:09:48 +10:00
Sean Oliver 610b085acd Switch table quickstart to gpt-oss-120b via Bedrock
Replace gpt-5-mini (reasoning model) with openai.gpt-oss-120b-1:0 via Bedrock provider to improve generation performance from ~67s to ~5-10s while maintaining quality.
2025-10-13 13:00:47 -07:00
Sean Oliver d2c5ccd5ef Simplify table quickstart UX by consolidating variants into single view
- Restore simple templates variant with category tabs (no dropdown navigation)
- Add AI variant with direct input field and quick idea chips
- Remove complex multi-view navigation system
- Delete 5 unnecessary component files (Initial/Category/AIInput/Results/Shared)
- Remove ViewMode enum from types
- Consolidate all logic into single TableTemplateSelector component
2025-10-13 10:43:48 -07:00
Jordi Enric b36792aa49 Auth Overview fixes (#39483)
* rm arrows

* clean

* add overview table

* add errors sql

* add overview monitoring section

* update overview usage rm monitoring from it

* add monitoring to overview page

* reusable link

* text-foreground-light

* links to header

* fix links

* fix links

* width fix
2025-10-13 18:50:59 +02:00
Han Qiao e5bab8208e fix: set 24h format when converting postgres timestamp (#39494) 2025-10-14 00:42:30 +08:00
kemal.earth 1e1b7a05b8 chore(studio): update auth overview light mode images (#39484)
chore: update auth overview light mode images

This provides image alternatives for light mode on the Learn More cards.
2025-10-13 12:22:50 +01:00
Alaister Young d30e4d3aa0 chore(studio): custom docs rls guide path (#39480)
* chore(studio): custom docs rls guide path

* required keys
2025-10-13 19:20:31 +08:00
Joshen LimandAlaister Young 0c08d5867f Refactor methods from projects query (#39475)
* Refactor methods from projects query

* Deprecate org-projects.ts

* Clean up

* Update apps/studio/components/interfaces/Organization/Usage/UsageSection/DiskUsage.tsx

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>

* Update apps/studio/components/interfaces/Organization/Usage/UsageSection/DiskUsage.tsx

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>

---------

Co-authored-by: Alaister Young <alaister@users.noreply.github.com>
2025-10-13 18:08:30 +08:00
Danny WhiteandIvan Vasilov 839db84398 chore(studio): better new org and project forms (#39422)
* basic fixes

* improve form contents

* fix border clipping

* remove redundant animation and classes

* polish confirm org

* improvements

* fix header rounding

* prevent password managers from appearing

* Fix the handling of token when redirecting back. Use nuqs for getting URL params. Simplify some logic.

* Minor fix to the useEffect for org name.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-10-13 10:04:41 +02:00
Timothy Lim 0da31409ca fix(docs): Remove invalid database_id to fix doc sync (#39467)
Remove invalid database_id to fix doc sync
2025-10-13 08:01:34 +00:00
Greg Richardson 2e097ee5be feat(prompts): add cursor prompt deeplinks to docs (#39439)
* feat(prompts): add cursor prompt deeplinks to docs

* fix: trim whitespace from prompt markdown content
2025-10-13 09:59:51 +02:00
Han Qiao 6026a824a3 fix: update queries for local edge function and cron logs (#39388) 2025-10-13 15:20:23 +08:00
Joshen Lim 7ebb7af1f6 Chore/projects pagination part 07 (#39353)
* CmdK OrgProjectSwitcher to swap useProjectsQuery with useProjectsInfiniteQuery

* Remove usage of useProjectsQuery in ProjectDropdown

* Remove usage of useProjectsQuery in NotificationsPopover

* Remove usage of useProjectsQuery in NotificationsFilter

* Remove usage of useProjectsQuery from LoadingState

* Clean

* Remove usage of getProjects from org-ai-details and fix missing key props in AIOnboarding

* Remove useAutoProjectsPrefetch from org/[slug]/index

* Fix TS  + clean up

* Clean

* Remove usage of useProjectsQuery in NewOrgForm

* Remove usage of useProjectsQuery in SupportForm -> AIAssistantOption

* Remove usage of useProjectsQuery in PlanUpdateSidePanel

* Remove usage of useProjectsQuery in NoProjectsOnPaidPlan

* Remove useProjectsQuery in IntegrationPanels

* Remove useProjectsQuery from IntegrationPanels 2

* Remove useProjectsQuery from IntegrationConnection

* Remove useProjectsQuery from ProjectLinker, SidePanelVercelProjectLinker, and choose-project

* Clean up

* Remove useProjectsQuery in AwsMarketplaceLinkExistingOrg

* Clean

* chore/projects pagination part 08 (#39355)

Optimize useProjectsQuery for Team settings

* Remove console log
2025-10-13 13:39:31 +08:00
Pamela Chia 6bb26fdd51 fix: series e number (#39450) 2025-10-11 23:11:19 -07:00
Danny White e406beaccb chore(www): remove Select banner and callout (#39253)
chore: remove Select stuff
2025-10-11 11:31:30 +11:00
Sean Oliver 767e646f68 clear unneeded comment 2025-10-10 17:13:39 -07:00
Sean Oliver c140b78836 Fix critical bugs and simplify view rendering
- Fix stale closure bug in quick ideas (was completely broken)
- Fix memory leak in useAITableGeneration hook
- Remove all 'any' types, add proper TypeScript definitions
- Add runtime null checks to prevent crashes
- Use LIMITS constants throughout instead of hardcoded values
- Consolidate error state management (use apiError directly)
- Add input validation to Enter key handler
- Simplify view rendering with straightforward if/else instead of over-engineered viewConfig map
2025-10-10 17:12:12 -07:00
Sean Oliver 90939679a5 feat: add view system supporting templates and AI table generation (2 of 3)
Combines view system and AI generation into a unified PR for better reviewability.

This adds a flexible view system that supports both template selection and
AI-powered table generation variants:

- View config architecture for managing different UI flows
- Template selection via category dropdown
- AI generation with prompt input and quick ideas
- Shared UI components (template lists, navigation)
- API endpoint for AI schema generation using OpenRouter

The view system architecture is justified by supporting both variants with
their distinct UIs while sharing common components.

Related: #38933 (basic templates), #38932 (telemetry tracking)
2025-10-10 16:33:18 -07:00
Sean Oliver 87e0e43cbb feat: add AI generation feature for table quickstart (3 of 4)
- Add useAITableGeneration hook for AI-powered table generation
- Implement AI input view with prompt handling and quick ideas
- Add API endpoint for generating table schemas with OpenAI
- Extend view configuration to support AI-specific views
- Update feature flag to support both 'templates' and 'ai' variants
- Add error handling and loading states for AI generation
2025-10-10 16:11:29 -07:00