Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Joshen/fe 3213 make rls tester feedback callout more obvious#45820

Open
joshenlim wants to merge 3 commits into
masterfrom
joshen/fe-3213-make-rls-tester-feedback-callout-more-obvious
Open

Joshen/fe 3213 make rls tester feedback callout more obvious#45820
joshenlim wants to merge 3 commits into
masterfrom
joshen/fe-3213-make-rls-tester-feedback-callout-more-obvious

Conversation

@joshenlim
Copy link
Copy Markdown
Member

@joshenlim joshenlim commented May 12, 2026

Context

Minor nit to adjust the "Give feedback" button at the bottom to use default type + external link icon
image

Also added telemetry for the "Run query" button

Summary by CodeRabbit

  • New Features

    • Added analytics tracking for RLS Tester query runs to better understand how the feature is used.
  • Style

    • Updated the "Give feedback" button in the RLS Tester to use the default button style and display an external-link icon for clarity.

Review Change Stack

@joshenlim joshenlim requested review from a team as code owners May 12, 2026 09:00
@vercel
Copy link
Copy Markdown

vercel Bot commented May 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
design-system Ready Ready Preview, Comment May 12, 2026 9:17am
docs Ready Ready Preview, Comment, Open in v0 May 12, 2026 9:17am
studio-self-hosted Ready Ready Preview, Comment May 12, 2026 9:17am
studio-staging Ready Ready Preview, Comment May 12, 2026 9:17am
ui-library Ready Ready Preview, Comment May 12, 2026 9:17am
zone-www-dot-com Ready Ready Preview, Comment, Open in v0 May 12, 2026 9:17am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
studio Ignored Ignored May 12, 2026 9:17am

Request Review

@supabase
Copy link
Copy Markdown

supabase Bot commented May 12, 2026

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 0c656e39-1418-4f7a-969c-d6f841414460

📥 Commits

Reviewing files that changed from the base of the PR and between cf1c904 and 95c1637.

📒 Files selected for processing (2)
  • apps/studio/components/interfaces/Auth/RLSTester/RLSTesterSheet.tsx
  • packages/common/telemetry-constants.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/common/telemetry-constants.ts

📝 Walkthrough

Walkthrough

Adds a new telemetry event type rls_tester_run_query_clicked and emits it from RLSTesterSheet when "Run query" runs (type = 'inferred' for format === 'lib', else 'raw'); updates the sheet footer feedback button to default with an ExternalLink icon.

Changes

RLS Tester Telemetry

Layer / File(s) Summary
Telemetry event contract definition
packages/common/telemetry-constants.ts
Adds RLSTesterRunQueryClickedEvent interface for action rls_tester_run_query_clicked with properties.type constrained to 'raw' | 'inferred', and extends TelemetryEvent union to include it.
RLSTesterSheet telemetry integration and UI update
apps/studio/components/interfaces/Auth/RLSTester/RLSTesterSheet.tsx
Imports ExternalLink icon and useTrack, initializes track, emits rls_tester_run_query_clicked with { type: 'inferred' } when format === 'lib' else { type: 'raw' } on Run Query, and changes the feedback footer button to type="default" with ExternalLink icon.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped into the tester's lair,
And tracked each query with careful care,
Inferred or raw, a little chime,
Events recorded, one at a time,
Feedback gleams with an external link flair!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description deviates significantly from the template structure and is missing key required sections like 'What kind of change', 'Current behavior', and 'New behavior'. Follow the repository template by including all required sections: confirm CONTRIBUTING.md acknowledgment, specify change type (feature/improvement), explain current vs new behavior, and add context with screenshots.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is directly related to the main UI improvement: making the RLS tester feedback callout more obvious by updating the 'Give feedback' button styling and icon.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch joshen/fe-3213-make-rls-tester-feedback-callout-more-obvious

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/studio/components/interfaces/Auth/RLSTester/RLSTesterSheet.tsx`:
- Line 45: The component currently imports and uses useSendEventMutation (and
likely calls sendEvent with manually set groups) — replace that usage with the
standard Studio telemetry hook useTrack from 'lib/telemetry/track' in
RLSTesterSheet.tsx; remove the direct useSendEventMutation import and any manual
groups construction, call the returned track function (or the hook's API) to
emit the same event name/payload so built-in context/groups are applied
automatically, and only pass explicit group overrides if absolutely required;
update all occurrences referenced (the import at the top and the event calls
where sendEvent/useSendEventMutation is invoked).

In `@packages/common/telemetry-constants.ts`:
- Around line 3448-3450: Rename the telemetry action in the
RLSTesterQueryRanEvent interface from 'rls_tester_query_ran' to an approved verb
form like 'rls_tester_query_submitted', update the interface declaration
(RLSTesterQueryRanEvent) accordingly, and search for and update all
emitters/usages that reference the old action string so they emit the new
'rls_tester_query_submitted' value; ensure any tests or telemetry mapping that
rely on the previous action are updated to the new name to keep interface and
emitters aligned.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: eb7fff46-f55f-4fba-95a4-bfbca0d90db8

📥 Commits

Reviewing files that changed from the base of the PR and between bdc8d07 and cf1c904.

📒 Files selected for processing (2)
  • apps/studio/components/interfaces/Auth/RLSTester/RLSTesterSheet.tsx
  • packages/common/telemetry-constants.ts

Comment thread apps/studio/components/interfaces/Auth/RLSTester/RLSTesterSheet.tsx Outdated
Comment thread packages/common/telemetry-constants.ts Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

🎭 Playwright Test Results

passed  204 passed
flaky  3 flaky
skipped  5 skipped

Details

stats  212 tests across 23 suites
duration  4 minutes, 44 seconds
commit  95c1637

Flaky tests

Features › database-webhooks.spec.ts › Database Webhooks › preserves webhook URL path and custom headers after editing
Features › sql-editor.spec.ts › SQL Editor › should check if SQL editor is working as expected
Features › sql-editor.spec.ts › SQL Editor › does not warn on CREATE FUNCTION with plpgsql SELECT..INTO variable assignment

Skipped tests

Features › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled
Features › sql-editor.spec.ts › SQL Editor › snippet favourite works as expected
Features › sql-editor.spec.ts › SQL Editor › share with team works as expected
Features › sql-editor.spec.ts › SQL Editor › folders works as expected
Features › sql-editor.spec.ts › SQL Editor › other SQL snippets actions work as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants