Skip to content

[pull] master from supabase:master#1088

Merged
pull[bot] merged 7 commits into
code:masterfrom
supabase:master
Jul 17, 2026
Merged

[pull] master from supabase:master#1088
pull[bot] merged 7 commits into
code:masterfrom
supabase:master

Conversation

@pull

@pull pull Bot commented Jul 17, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

jeremenichelli and others added 7 commits July 17, 2026 14:58
Audited all proxy()/useSnapshot() usage against the v1→v2 migration
guide; no breaking changes apply (no reused proxy() inputs, no
promise-valued state, all consumers already client components).

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
* Updated the Valtio dependency to a newer version for improved
compatibility.

* **Bug Fixes**
* Improved AI assistant persistence in IndexedDB so chat sessions
reliably save (while keeping only the most recent 20 messages per chat).
* Hardened tabs restoration from storage to fall back to fresh defaults
when data is missing, invalid, or fails validation.

* **Refactor**
* Switched multiple studio panels to use fresh initial-state factories
for initialization and reset reliability.
* Updated advisor state so the derived notification filter count is no
longer exposed.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Problem

When creating a new scoped PAT, if users didn't add at least one
permission or have a misconfigured permission (no access selected), the
form does not submit but no error message is shown. The UI looks broken.

## Solution

This is because there's a zod validation happening but its messages are
not displayed for permissions.
The proper fix is to use react-hook-form field array.

<img width="541" height="633" alt="image"
src="https://github.com/user-attachments/assets/89cab58d-761e-4131-9bce-460625067f8a"
/>

<img width="540" height="594" alt="image"
src="https://github.com/user-attachments/assets/ed95cee0-06b5-4233-9a23-6819fb0e1a17"
/>

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Improved permission selection and toggling behavior in the scoped
access token flow.
* Enhanced validation feedback for permission rows and action
selections, keeping error states in sync after changes.
* Updated error handling to surface permission-related messages more
reliably.
* **Refactor**
* Reworked the permissions UI to use a more reliable control-based
rendering approach for rows, selection changes, and error presentation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
#46189)

Extend the "Copy as Markdown" feature in the Schema Visualizer to
include Custom Types/Enums and Row Level Security (RLS) Policies in the
generated output.

Closes https://github.com/orgs/supabase/discussions/46108

## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Feature — extend Copy as Markdown to include enums and RLS policies

## What is the current behavior?

The "Copy as Markdown" function in the Schema Visualizer generates a
SCHEMA.md that only includes tables, columns, and entity relationships.
Custom Types/Enums and RLS Policies are missing, making the output an
incomplete representation of the schema.

Related: https://github.com/orgs/supabase/discussions/46108

## What is the new behavior?

The generated markdown now includes two additional sections:

**Custom Types / Enums:**
- Lists each enum type with its ordered permitted values
- Filtered by the currently selected schema

**RLS Policies:**
- Grouped by table for self-contained readability
- Includes policy name, command (SELECT/INSERT/UPDATE/DELETE/ALL),
roles, action (PERMISSIVE/RESTRICTIVE), USING expression, and WITH CHECK
expression

**Example output:**
```markdown
## Custom Types / Enums

### `order_status`

`pending` | `processing` | `shipped` | `delivered`

## RLS Policies

### `orders`

| Policy | Command | Roles | Action | USING | WITH CHECK |
|--------|---------|-------|--------|-------|------------|
| `users_own_orders` | SELECT | authenticated | PERMISSIVE | `auth.uid() = user_id` | — |
```

## Additional context

- 3 files changed: `Schemas.utils.ts`, `SchemaGraph.tsx`,
`Schemas.utils.test.ts`
- New utility functions `getEnumsAsMarkdown()` and
`getPoliciesAsMarkdown()` with unit tests
- Reuses existing `useEnumeratedTypesQuery` and
`useDatabasePoliciesQuery` hooks
- No breaking changes — existing markdown output is preserved, new
sections are appended

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* "Copy as Markdown" now includes enumerated types and database policies
alongside existing schema/table content; policies are included with
their rule details and grouped by table.

* **Tests**
* Added tests covering enum and policy markdown generation, including
matching/non-matching schema cases and policy formatting.

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46189?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Gildas Garcia <1122076+djhi@users.noreply.github.com>
## What kind of change does this PR introduce?

UI polish / bug fix for the shared Calendar range selection and Logs
date picker.

## What is the current behavior?

- Selected date ranges use opaque `brand-400` / `brand-500` fills that
read too loud in light mode, with black text that is hard to read on
darker endpoints.
- Start/end days are squared off on the connecting edge without
intentional outer rounding.
- Outside days in a selected range are dimmed with `opacity-50`, which
can tint the range wash incorrectly when a range starts in the prior
month.
- The large-range warning in `LogsDatePicker` is a full-bleed yellow
banner that feels too heavy for the popover.
- Time inputs show a clock icon that adds visual noise.

## What is the new behavior?

- Range middle uses a softer `brand-200` wash; start/end stay on
stronger brand fills with readable foreground text.
- Start days round on the left (`rounded-l-md`), end days on the right
(`rounded-r-md`); day hover keeps `rounded-md`.
- Selected outside days and “today” no longer fight the range wash
colours.
- Large-range warning is quiet inline `text-warning` copy that wraps to
the calendar column width.
- Clock icon removed from `TimeSplitInput`.

| Before | After |
| --- | --- |
| <img width="1096" height="1076" alt="CleanShot 2026-07-16 at 17 59
21@2x"
src="https://github.com/user-attachments/assets/eac38022-ed92-4dbe-9932-55f7bf0af934"
/> | <img width="988" height="1064" alt="CleanShot 2026-07-16 at 17 59
34@2x"
src="https://github.com/user-attachments/assets/3dce30dd-9fd8-4da4-82b3-5663250a4ddc"
/> |

## Additional context

Shared `Calendar` changes apply anywhere range mode is used, not only
logs.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Style**
- Refined the date-picker popover layout for start/end controls with
better fit and max-width handling.
- Updated calendar day and range visuals (selection, outside states,
rounding, and hover behavior) to reduce “ghost” styling and improve
consistency.
  - Restyled the large-range warning to improve spacing and alignment.
- Simplified the time-splitting input UI by removing the leading clock
icon.
- Adjusted the “Copy range” button feedback color for copied/pasted
states.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## What kind of change does this PR introduce?

A11y fix for keyboard focus (esp. Safari), plus a lint rule to keep it
from regressing.

## What is the current behavior?

`Button` already defaults an explicit `tabIndex={0}` (#40458). Other
interactive primitives (Checkbox, bare triggers, etc.) still skip Tab
focus in Safari unless macOS Keyboard navigation is on. Raw `<button>`
call sites have no guardrail.

## What is the new behavior?

- Same explicit `tabIndex` default baked into Checkbox, Accordion
Trigger, Collapsible Trigger, Dropdown Menu / Popover / Dialog / Sheet /
Alert Dialog triggers, Table Head Sort, Command reset, sidebar actions,
and shadcn Button
- `supabase/require-explicit-tabindex` ESLint rule, ratcheted in Studio
(82 existing violations)
- Design-system accessibility docs list which primitives bake this in

Resolves [DEPR-621](https://linear.app/supabase/issue/DEPR-621)

## Additional context

### To test

Use **Safari** with macOS Keyboard navigation **off** (the default).
Chrome once for a sanity pass.

**Storage → Files bucket (list view) — Checkbox**

1. Open an empty folder (or one with only folders). Header “select all”
Checkbox is disabled and skipped by Tab — expected (`columnFiles.length
=== 0`).
2. Upload a file (e.g. an image). Header Checkbox enables.
3. Tab to it and toggle with Space. Row Checkboxes should also be
Tab-reachable.

**Storage → Analytics bucket → bucket details — Accordion Trigger**

On an Analytics bucket with no tables yet, Tab to the “Create your first
table via PyIceberg” Accordion Triggers and open/close with Enter/Space.

**Elsewhere (light smoke)**

- Bare Dropdown / Popover / Collapsible triggers still Tab + activate
- `*Trigger asChild><Button>` (Sheets, Dialogs, menus) still one Tab
stop; open/close fine
- Disabled controls stay out of the Tab order

### Later

Chip-away of the 82 raw Studio buttons (and remove exceptions from
rule). Prefer migrating those to `Button` from `ui` later.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Accessibility Improvements**
* Improved keyboard focus behavior across common interactive controls
(buttons, dialog/popover/dropdown/sheet triggers,
accordions/collapsibles, checkboxes, and sidebar actions).
* Disabled controls now default to `tabIndex={-1}`, while enabled
controls default to `tabIndex={0}`.
* Added explicit `tabIndex` handling for command reset and table sort
header controls.
* **New Features**
* Added a shared `getExplicitTabIndex` utility used by UI components to
standardize focus behavior.
* **Documentation**
* Updated accessibility guidance to clarify which components include
built-in focus/tabIndex handling and which require manual setup.
* **Developer Experience**
* Added an ESLint rule to enforce explicit `tabIndex` on raw button-like
elements, with corresponding baseline updates.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Feature enhancement

## What is the current behavior?

The features page filters search results by simple substring matching,
treating all matches equally. Features are then sorted alphabetically
regardless of search relevance.

## What is the new behavior?

Search results are now ranked by relevance using a weighted scoring
system:
- Title matches starting with the search term score highest (5 points)
- Title substring matches score 4 points
- Subtitle matches score 2 points
- Description matches score 1 point

Results are sorted by relevance score (highest first), with alphabetical
ordering as a tiebreaker. This ensures users see the most relevant
features first when searching.

## Additional context

The implementation adds:
- `SEARCH_WEIGHT` constant defining the relevance weights for different
match types
- `getSearchScore()` function that calculates a feature's relevance to a
search term
- Updated filtering and sorting logic that uses relevance scoring

The weights are carefully chosen so that any title match always ranks
above features that only match in subtitle/description, improving search
quality without requiring complex algorithms.

https://claude.ai/code/session_01573vYv6WZhrboV14NQSuc4

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
  * Improved feature search with relevance-based matching.
* Search results now prioritize matches in feature titles, especially
title prefixes, followed by subtitles and descriptions.
  * Results are displayed in relevance order for faster discovery.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@pull pull Bot locked and limited conversation to collaborators Jul 17, 2026
@pull pull Bot added the ⤵️ pull label Jul 17, 2026
@pull
pull Bot merged commit c914163 into code:master Jul 17, 2026
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jul 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

⤵️ pull documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants