* fix(studio): maintenance banner separate from incident banner
Right now, scheduled maintenance events also show up as incidents.
Created a separate banner for them so maintenance doesn't show up as an
incident.
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* feat(telemetry): add security settings to project creation event
Add dataApiEnabled, useApiSchema, and useOrioleDb properties to
project_creation_simple_version_submitted event to track user
security and configuration choices during project creation.
* feat(studio): track security settings on project creation
Include dataApiEnabled, useApiSchema, and useOrioleDb in the
project_creation_simple_version_submitted telemetry event to capture
user's security and configuration choices.
* feat(telemetry): add security settings to confirm modal event
Include dataApiEnabled, useApiSchema, and useOrioleDb in the
project_creation_simple_version_confirm_modal_opened event for
consistency with the submitted event.
* refactor(telemetry): remove extra properties from confirm modal event
Remove dataApiEnabled, useApiSchema, and useOrioleDb from
project_creation_simple_version_confirm_modal_opened as these
are not needed for this event.
* Validate against empty name in FileExplorerRowEditing.tsx
* Update test
* Fix
* Opt to revert changes if saving empty string
* Nit
* Attempt to write tests with claude
* Trim whitespace in FileExplorerRowEditing when saving
* validation errors
* improvements
* deprecate notice bar
* consolidate upgrade warnings
* type fixes
* rabbit
* 📝 Add docstrings to `dnywh/chore/link-to-dropped-objects` (#41528)
* 📝 Add docstrings to `dnywh/chore/link-to-dropped-objects`
Docstrings generation was requested by @dnywh.
* https://github.com/supabase/supabase/pull/41527#issuecomment-3680610884
The following files were modified:
* `apps/studio/data/config/project-upgrade-eligibility-query.ts`
* New line
---------
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>
* Use API types instead
* Update API types
* Add manage replicas CTA to upgrade warning if unified replication and project has replicas
* Nit
* use actionable language
* gap
* simplify
* prettier
* Add URL
* better links
* add tables and encode links
* remove replication link
* nit ordering
* rabbit
* Small simplify
---------
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
The command menu search option uses the unpaginated version of the
buckets endpoint, which times out / causes jankiness when users have
tends of thousands of buckets.
Switch to using the paginated version. The old behaviour is preserved,
where only the first 10 results are shown, and the user has to specify a
more specific search query to get other buckets. This is for UX
simplicity, since this is a convenience feature, and fully
infinite-loading search is available in the full Storage interface.
* fix(studio): check job_run_details size in cron display
When cron.job_run_details grows too large (200k+ rows), loading the
cron jobs overview can timeout and affect other queries by pulling
excessive data into shared buffers.
This change:
- Estimates table size using pg_stat before fetching cron jobs data
- Shows a cleanup notice when the table exceeds the threshold
- Provides batched deletion using ctid ranges to avoid buffer pollution
- Allows scheduling an automated daily cleanup cron job
- Handles timeout errors gracefully with a "suspected overflow" state
The useCronJobsData hook now returns a discriminated union status that
tracks loading, estimate-error, overflow-confirmed, overflow-suspected,
and ready states, allowing the UI to respond appropriately to each case.
* fix(studio): use index when querying cron.job_run_details
cron.job_run_details is only indexed by runid, not by start_time. Change
the query to use the runid index (which gives the same result, since
runid is auto-incrementing).
* feat: replace usage metric cards with new charts
* feat: use new chart components for auth api and error codes
* style: some tweaks to the two tables
* fix: padding around empty states
* feat: smol adjustment
* fix: add aria label to go to logs tooltip
* fix: diff value
* fix: status code method font colour
* fix: actions onClick
* query perf improvements
* info tooltips
* filter fixes
* prettier wont work in cursor for some reason
* fix type error
* rm clear all filters button, its too much
* prettier
PostHog migration from boolean to string variants is complete.
The helper was only useful during migration - now it's just
`value === 'new-home'` which is trivial to inline.
- Delete apps/studio/lib/featureFlags/ folder
- Inline flag check at 3 call sites
* handling and mock data support
* admonition
* only show in empty state
* rabbit
* mock without local overrides
* remove admonition
* make incident banner more prominent
* remove mock data
* move to tool
* prettier
* fix(studio): get_active_incidents tool
---------
Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
* fix: do not include reports for CLI and self-hosted
* fix: do not display empty product reports
* fix: do not include api gw and custom reports for self-hosted
* fix: ran prettier
* feat: add support for dropping and auto-extracting zip files in Edge Functions editor
* fix: add type assertions for readonly array includes checks in zip extraction
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* feat: add support for PDF and image files in zip extraction
- Moved wasm from ALLOWED_EXTENSIONS to ALLOWED_BINARY_EXTENSIONS
- Added PDF support for document files
- Added common image formats: jpg, jpeg, png, gif, svg, bmp, ico, webp
- Binary files are extracted and preserved but show "Cannot Edit" message in editor
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* refactor: remove file extension validation from zip extraction
Makes zip extraction behavior consistent with regular file drops.
Now all file types are accepted in both cases, matching the
permissive behavior users expect.
Removed:
- ALLOWED_EXTENSIONS and ALLOWED_BINARY_EXTENSIONS arrays
- isAllowedExtension() and isAllowedBinaryFile() validation functions
- getFileExtension() helper (no longer needed)
- Extension-based rejection logic from extractZipFile()
Kept:
- File size validation (individual and total limits)
- Hidden file filtering (.DS_Store, __MACOSX, etc.)
- Binary file detection for proper content reading
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix: correct file replacement detection in addDroppedFiles
Bug: The condition `updatedFiles !== files` always evaluated to true
because updatedFiles is created via files.map() which always returns
a new array reference, even when no files were actually modified.
This caused onFilesChange to be called unnecessarily when dropping
zip files that only contained files with names not matching any
existing files.
Fix: Track whether any existing files were actually replaced using
a hasReplacedFiles flag that is set to true only when we modify
files in the updatedFiles array during zip extraction.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix: add graceful error handling for zip file extraction
Replaced dangerous non-null assertion operator (!) with proper error
handling for entry.getData() calls.
Changes:
- Check entry.directory and entry.getData before extraction
- Wrap getData calls in try-catch to handle extraction failures
- Track failed files and include them in error reporting
- Skip files that can't be extracted instead of crashing
This prevents runtime errors when:
- Zip entries are directories (defensive check)
- Zip entries don't have getData method (corrupted/unusual entries)
- File extraction fails for any reason (encoding issues, etc.)
- Binary/text file reading encounters errors
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* refactor: improve file processing logic with enum and switch statement
Replaced if-else chain with cleaner enum-based approach per PR feedback.
Changes:
- Added FileAction enum (CREATE_NEW, REPLACE_EXISTING, REPLACE_NEW)
- Created getFileAction() helper function that returns action + index
- Refactored file processing loop to use switch statement
- Eliminated duplicate findIndex() calls (was calling it twice)
- Reduced variable count from 2 (existingFileIndex, newFileIndex) to 1 (actionResult)
Benefits:
- More readable and maintainable code
- Single source of truth for file lookup logic
- Better type safety with discriminated union
- Easier to extend with new file actions in the future
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* prettier
* fix: add guard for undefined entry.uncompressedSize in zip extraction
Prevents NaN from bypassing size validation when entry.uncompressedSize
is undefined.
Issue:
- entry.uncompressedSize can be undefined in malformed/corrupted zips
- Without guard: totalExtractedSize + undefined = NaN
- NaN comparisons always return false, bypassing MAX_TOTAL_EXTRACTED_SIZE
- Security risk: allows extraction of files with unknown sizes
Fix:
- Check if uncompressedSize is undefined or NaN before any arithmetic
- Skip files with unknown sizes and add to oversizedFiles array
- Provide descriptive error message: "unknown size - metadata unavailable"
- Ensures size validation always runs safely
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Refactor to streamline handling of regular and zip files in FileExplorerAndEditor
* Address rabbit feedback
* Nit
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>