## 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?
Improving accessibility for icon-only buttons
## What is the current behavior?
Icon-only buttons do not have explicit accessible names for screen
readers.
## What is the new behavior?
All icon-only buttons now have explicit accessible names using visually
hidden text (sr-only), ensuring proper screen reader support.
## Additional context
Tooltip text is preserved for visual users.
No visual changes were introduced.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Added/updated aria-labels across refresh buttons, sidebar controls,
dropdown triggers, and navigation links for better accessibility.
* Added conditional aria-labels for the “Create with Assistant” control
to reflect permission states.
* Improved screen-reader descriptions for sidebar toggle and other
stateful controls to better convey status changes.
<!-- review_stack_entry_start -->
[](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/45981)
<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
* 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
* Update perms checking in audit logs
* Deprecate useCheckPermissions, useIsPermissionsLoaded and useCheckProjectPermissions as they're no longer used
* Rename useAsyncCheckProjectPermissions to useAsyncCheckPermissions
* Fix TS
* refine the policies page
* minor fixes
* Fix TS
* Do not transform table name in policy row table header
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* Part 1 of swapping useCheckPermissions with useAsyncCheckProjectPermissions
* Update apps/studio/hooks/misc/useCheckPermissions.ts
Co-authored-by: Drake Costa <drake@saeris.io>
* Address feedback
---------
Co-authored-by: Drake Costa <drake@saeris.io>
* add assistant chats
* refactoring
* refactor
* refactor to use onfinish
* fix ts
* dependencies removal
* Update useAssistant.ts
* ts
* refactor useAssistant hook to valtio store
* Minor tweaks
* Add name param to newChat, and add names to each call of newChat
---------
Co-authored-by: Alaister Young <a@alaisteryoung.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* start
* added panels
* remove stuff
* fixes and refinements
* clean up
* remove old assistant panel
* resizable assistant kinda
* use icon
* Add missing package
* remove canvas
* add suggestions
* updated empty state if no tables exist
* fix table condition
* Implement diffing if using assistant in sql editor
* Reinstate old assistant in SQL editor if feature preview is off
* pane size adjustment
* assistant button corners
* Add SQL snippet content to assistant if opening assistant in sql editor
* Add the necessary checks for opt in and hipaa
* revert adding snippet to assistant when opening assistant in sql editor
* Add cmd i shortcut
* Add admonitions for when disablePrompt is toggled on, and if no api key is set. Add footer note RE rate limitation
* Bump ai package in packages
* some fixes for backwards compability depending on feature preview toggled
* Rename feature preview property for new assistant
* Smol fix
* Prevent SQL snippet from running until message is finished
* only loading last message
* fix z-index
* save chat state to global state
* add debug to failed ai queries
* Add basic contextual invalidation
* Add explain code action to SQL editor
* Add link to abort ongoing queries from SqlSnippet
* Update feature preview content
* Fix
* Fix
* Fix
* Te4st
* Fix tests
* ONly show ai button within a project
* Fix PH tracking
* Beef up a bit more event tracking
* Rough fix to padding when assistant is open
* A bit more telemetry stuff
* Update prompts
* fix rls editing via assistant
* Update generate-v3.ts
prompt to get auth schema too
* Add policy satement to assistant when editing
* Address all comments
* fixc
* Fix SqlSnippet not taking full width on larger viewports
* Adjust max width
---------
Co-authored-by: Saxon Fletcher <saxonafletcher@gmail.com>
* Hook up RLS to new assistant if feature flag is enabled
* Reset conversation if opening a different entity
* Add prompt to use alter policy if policy definition is provided
* Remove console log
* Init AiAssistantPanel
* Temp
* Temp
* iterating on assistant ux
* More spiking
* Tweaking...
* Moar tweaking..
* Even more tweaking
* Tweek
* More tweaks
* Final tweaking...
* TWEAK
* Spelling
* Fix
* Assistant error handling and small bug fix in context for message
* Add feature flag
* Fix
* Address all feedback
* Minor
* Inital setup
* Add suggest feature to the RLS Assistant
* Add AI button
* Use existing policies in AI editor
* Remove old feature preview
* Cleanup
* Tooltip
* Update
* Change panel width
* Fix type
* Fix types again
* Flag cleanup
* Add tooltip
* Cleanup
* Add a clear history button
* Use ButtonTooltip component for create policy CTAs
* Use ButtonTooltip component in PolicyRow
* Remove use of old tooltip component in PolicyRow
* Update Auth policies to allow read only to access edit policy UI but prevent saving from there
* Fix
* Add queries and mutations for realtime channels.
* Change the layout, add a link for policies and modal for creating a channel.
* Add a page for policies.
* Add templates for realtime tables.
* Fix the spacing in the PolicyDetails component. Add better types.
* Pass templateData to the template generating functions.
* Various CSS fixes.
* Add components for rendering the realtime policies page.
* Fix the editing policy flow.
* Fix refetching when adding or deleting policies.
* Minor various fixes.
* Remove an old console.log.
* More fixes for templates.
* Make the realtime policies open by default when clicking on realtime.
* Update the realtime policy templates.
* Use a dropdown button for the three types of policies.
* Fix a copy-paste mistake.
* Fix icons.
* Fix the toast.
* Clean up the previous components.
* Clean up more unneeded code.
* Remove templateData prop.
* Remove unneeded queries and mutations.
* More cleanup.
* Reuse the components from the Auth Policies.
* Minor fixes for the new components.
* Add a feature flag for AuthZ.
* Revert some changes.
* Fix a build error.
* Fix all definitions.
* Fix an issue with copying large lines which from templates which are word-wrapped.
* Addressed various comments by Joshen.
* Revert the UI changes in the Policy Editor.
* Update the template names.
* Small style fix
---------
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
* Midway checking on hybrid rls assistant
* Demo
* Midway
* Polish + hook up everything for policy creation
* Temp fix for open in sql editor
* Resolve conflicts
* Support updating policies with new hybrid ui
* Fix generateQuery for altering policies
* Update to support feature preview
* Fix spelling lint
* Addressing small bugs
* Fix
* Clean upo
* Add new MultiSelectV2 in ui-patterns, use in RLS editor
* More clean uo
* Fix RadioGroupLargeItem label cursor state when disabled
* Lint lowercase sql
* Have rls ai assistant sit in feature preview + shown via feature flag
* Support editing existing policy in new AI assistant panel
* Beef up feature preview
* Shift AI settings modal to components/ui and add AI settings to RLS AI assistant panel
* Update apps/studio/components/interfaces/App/FeaturePreview/RLSAIAssistantPreview.tsx
Co-authored-by: Copple <10214025+kiwicopple@users.noreply.github.com>
* Update apps/studio/components/interfaces/App/FeaturePreview/RLSAIAssistantPreview.tsx
Co-authored-by: Copple <10214025+kiwicopple@users.noreply.github.com>
---------
Co-authored-by: Copple <10214025+kiwicopple@users.noreply.github.com>
* Move all studio files from /studio to /apps/studio.
* Move studio specific prettier ignores.
* Fix the ui references from studio.
* Fix the css imports.
* Fix all package.json issues.
* Fix the prettier setup for the studio app.
* Add .turbo folder to prettierignore.
* Fix the github workflows.