* Add event tracking for table quickstart experiment
Implements telemetry instrumentation for the table quickstart experiment
to measure exposure and engagement across AI, Templates, and Assistant variations.
Events added:
- table_quickstart_viewed: Exposure tracking for variant assignment
- table_quickstart_ai_prompt_submitted: AI prompt submissions
- table_quickstart_ai_generation_completed: AI generation success/failure
- table_quickstart_template_selected: Template selection (unified for AI and templates)
- table_quickstart_quick_idea_clicked: Quick idea button clicks
- table_quickstart_category_selected: Template category navigation
- table_quickstart_assistant_opened: Assistant chat creation
All events use type-safe useTrack() hook with automatic project/org context.
Conversion tracking intentionally omitted - relying on joins with existing
table_created events for post-analysis.
* event name cleanup
* Address code review feedback
- Use nullish coalescing operator (??) instead of logical OR (||) for categoryName fallback
- Refactor handleGenerateTables to accept object parameter for improved call site readability
* prettier
* action key name alignment with event name
* Migrate all uses of invalidateQueries to use object syntax.
* Migrate the remainder of useInfiniteQuery.
* Migrate all setQueriesData.
* Migrate all fetchQuery uses.
* Migrate some leftover functions from RQ.
* Fix issues found by Charis.
When opening the usage page with a projectRef param (filter by project), it lead to some odd behaviour where the project is not preselected and then after picking a project, it would end up showing the initially filtered project from the URL.
PR removes the odd all-projects logic and uses nuqs for URL state mgmt
* feat: rewrite auth audit logs toggle to be in the positive sense
* Light edit
* Copy update
---------
Co-authored-by: Terry Sutton <saltcod@gmail.com>
* fix: p95 calculation
Something seemed off so had another stab at it using resp_calls
* feat: simplified weighted avg p95
* feat: tweak it slightly
* feat: try one with a fallback
* feat: add test for percentile calculating
* Break down new project page into smaller components
* Fix types
* Address comments
* Add min length check for project name in project settings
* Fix tests
* chore: user v2 content count query for search
Instead of using two different endpoint versions, we can rely on v2 for all cases.
* Update SearchList.tsx
* If the auth id has already been used for approving the same org, ignore the error.
* Accidentally committed the wrong code while testing.
* Disable the choose org button if the org can't add more free projects.
* Hide the tooltip if the condition is met.
---------
Co-authored-by: Wen Bo Xie <wenbox323@gmail.com>
* fix: confirmation modal org creation
The button when confirming org creation was not working as it was just returning early.
The submit handler is triggered both on initially clicking the "Create organization" button and on the confirmation button, but it always early returns if the customer has other free plan orgs with projects, so it doesn't let the customer submit the form
12:44
How to reproduce:
- Create a free plan org with an active project
- Create a new paid plan organization
- Confirmation modal appears
- Clicking the button just closes the modal and does not create the org as there is an early return in the onSubmit handler
Moved away from ConfirmationModal to an inline info instead
* Update NewOrgForm.tsx
* Nit refactor
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
feat: add assistant variation to table quickstart experiment
Adds ASSISTANT variant to table quickstart that opens AI assistant with
pre-populated conversation to guide users through creating their first
database table.
Changes:
- Add QuickstartVariant.ASSISTANT enum value
- Add 'Create with Assistant' card for new projects (<7 days old)
- Implement handleOpenAssistant with proper loading states and error handling
- Add pre-populated messages to guide table creation workflow
The assistant card appears only for users bucketed into the assistant
variation of the tableQuickstart experiment on new projects.
Adds a clean, type-safe wrapper for telemetry event tracking that automatically injects project and organization context.
- Export TelemetryGroups type from telemetry-constants
- Add useTrack() hook with full TypeScript event validation
- Refactor project creation events to use new API
- Reduces boilerplate from ~10 lines to ~2 lines per event
* updated to support on close and duplicate
* updated formatting
* added confirmation panel for triggers
* updated form to select the correct table for defaults
* updated to support trigger intial tables selected
* updated to mark select field as dirty
* Update apps/studio/components/interfaces/Database/Triggers/TriggerSheet.tsx
Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
* Update apps/studio/components/interfaces/Database/Triggers/TriggerSheet.tsx
Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
* updated to remove undefined error
---------
Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
* perf(storage menu): virtualize and memoize bucket rows
The Storage Menu fails to render properly when the user has thousands of
buckets. Virtualizing and memoizing BucketRows to reduce rendering work.
* refactor(bucket list): only virtualize bucket list when more than 50 buckets
* style(storage menu): improve styling for virtualized and unvirtualized lists
* added feature to duplicate functions
* updated formatting for index file
* removed unused ai assitant code
---------
Co-authored-by: Ali Waseem <awaseem@Alis-MacBook-Pro.local>
The log snapshot is properly cut off at support form navigation in the
preview, but not when it is actually uploaded. That happens because we
try to take ownership of the current log snapshot twice, so the second
time it falls back to the non-snapshotted logs. Changed to take the
snapshot once when the support form is mounted and then pass it to child
components/handlers.
* Add table quickstart with templates and AI generation
Implement table quickstart feature with two variants:
- Template-based: Pre-built schemas across multiple categories (social, ecommerce, content, productivity)
- AI-powered: Generate custom table schemas from natural language prompts
Key features:
- Template selector with category tabs and schema previews
- AI generation using gpt-oss-120b via Bedrock for fast response times
- Streaming responses with real-time table generation
- Quick idea chips for common use cases
- Success feedback and seamless integration with table editor
- Feature flag gated (tableQuickstart) with 7-day new project window
- Comprehensive error handling and retry logic
- ARIA labels and accessibility improvements
Technical implementation:
- Custom React hooks for AI generation and state management
- Zod schema validation for type-safe streaming
- API endpoint with structured object streaming
- localStorage-based dismissal state
- Consistent styling with existing UI patterns
* Refactor and optimize AI table generation
Refactor to use AI SDK streaming with structured object generation:
- Use streamObject() with Zod schema validation for type-safe streaming
- Add 50KB buffer limit to prevent memory issues from oversized responses
- Replace custom stream parsing with Object.assign() for efficient merging
- Use fetchHandler utility for consistent error messages across codebase
- Clean up comments and unused code
* Update quickstart widget styling to match action card
- Changed background from bg-surface-75 to bg-surface-100
- Changed hover background to bg-surface-200
- Applied to AI widget, template widget, and quick idea buttons
* Address PR review feedback
- Persist AI results to localStorage so users can create multiple tables from same generation
- Remove unnecessary isMountedRef checks before synchronous state updates
- Change Quick ideas label to semantic h4 element for accessibility
- Add TODO comment about migrating to experimental_useObject() hook
* Clean up table quickstart implementation
- Match SQL Editor ActionCard styling with circular icons
- Implement smart Generate/Regenerate button logic
- Add tooltips for column counts
- Persist prompt to localStorage
- Fix React hook dependency warnings
- Remove debugging artifacts
* add coming up state to new project home
* handle redirect correctly
* tweak spinner/laben logic
* show empty state in advisor whiel coming up
* prevent query while advisor is forcing empty state
* fix enabled
* rm state dep
* move complex bool to variable
* feat: overview usage card match homepage
This matches the tiles for auth overview usage to the card styling on the homepage.
* style: smol tweak to card header
* style: table empty state
* style: table row styling
* feat: remove dummy test codes
* chore: remove ai slop empty file
* nit: remove border top from spacer
* chore: remove loading label from table cards
* fix: loading state for stat cards
* style: skeleton loader of cards tidy
* Add threshold value to persist sort by in auth users
* Update apps/studio/components/interfaces/Auth/Users/UsersV2.tsx
Co-authored-by: Ali Waseem <waseema393@gmail.com>
* Fix local storage values getting overriden when landing on auth users page directly, and merge useEffect for loading local storage values
* Nit
* Fix
* Update warning
* Fix
---------
Co-authored-by: Ali Waseem <waseema393@gmail.com>
* fix(policies search): replace useUrlState with nuqs
There is a bug when typing quickly into the search field on the policies
page: because useUrlState naively uses router.replace, which is
asynchronous, the search term can get corrupted, e.g., searching for
"dummy" might end up with a final value of "dum". Switched to nuqs for
better handling.
* perf(policies page): memoize and optimize for projects with many tables
A project with hundreds of tables will have extremely slow search
performance for the policies page, because of heavy rerendering. Made
some optimizations:
- Memoized to reduce rerendering
- Hid filtered-out tables instead of unmounting, so we don't have to
remount when the search is cleared
* refactor(policies page): pass policies info through context
Avoid having a mess of props by creating a PoliciesDataContext to share
policy information.
* cleanup(policies pages): minor code cleanup, no user-facing changes