Skip to content

fix(studio): show selected custom time range in SQL editor time range menu - #48709

Merged
charislam merged 1 commit into
masterfrom
charis/fe-4035-sql-editor-show-selected-custom-time-range-in-secondary-text
Aug 4, 2026
Merged

charislam merged 1 commit into
masterfrom
charis/fe-4035-sql-editor-show-selected-custom-time-range-in-secondary-text

Conversation

@charislam

@charislam charislam commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

What

Display the actual selected custom date range in the Time Range dropdown's secondary text, instead of the static "Custom range" label. The range is formatted as DD MMM, HH:mm - DD MMM, HH:mm to match the existing format in the Logs Explorer's date-picker trigger button, ensuring visual consistency across the Logs UI.

Fixes FE-4035

Test plan

  • Typecheck passes: pnpm typecheck
  • Manually verify: Open SQL Editor with sqlEditorLogsSource flag enabled, open the Time Range dropdown menu, select a Custom range, and confirm the dropdown's secondary text now displays the selected date range instead of "Custom range"

Summary by CodeRabbit

  • New Features
    • Custom time ranges now display formatted start and end timestamps for clearer time selection.
    • Preset time ranges continue to show their existing helper text.

… menu

Display the actual selected date range (DD MMM, HH:mm - DD MMM, HH:mm) in the Time Range dropdown's secondary text when a custom range is selected, instead of the static "Custom range" label. Fixes FE-4035.
@charislam
charislam requested a review from a team as a code owner August 4, 2026 16:54
@vercel

vercel Bot commented Aug 4, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
studio-self-hosted Ready Ready Preview Aug 4, 2026 4:59pm
studio-staging Ready Ready Preview Aug 4, 2026 4:59pm
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Aug 4, 2026 4:59pm
design-system Skipped Skipped Aug 4, 2026 4:59pm
docs Skipped Skipped v0 Aug 4, 2026 4:59pm
ui-library Skipped Skipped Aug 4, 2026 4:59pm
zone-www-dot-com Skipped Skipped v0 Aug 4, 2026 4:59pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The time-range submenu now formats custom range start and end timestamps. Preset ranges continue to display their existing helper text.

Changes

Time-range label formatting

Layer / File(s) Summary
Format custom range labels
apps/studio/components/interfaces/SQLEditor/UtilityPanel/QuerySourceMenu/TimeRangeSubMenu.tsx
The submenu imports dayjs and displays custom range timestamps in DD MMM, HH:mm format. Preset ranges retain their existing labels.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: alaister

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly and concisely describes the main change: showing the selected custom time range in the SQL Editor menu.
Description check ✅ Passed The description explains the current and new behavior, references the issue, and includes a clear test plan, but omits some template headings.
✨ 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 charis/fe-4035-sql-editor-show-selected-custom-time-range-in-secondary-text

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.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results (next)

passed  239 passed
flaky  4 flaky
skipped  5 skipped

Details

stats  248 tests across 29 suites
duration  7 minutes, 52 seconds
commit  80cd56c

Flaky tests

Features › column-editor-types.spec.ts › column editor complex types › FK selector flags a mismatch between same-named enums from different schemas
Features › column-editor-types.spec.ts › column editor complex types › FK selector allows and creates a relation between two matching array columns
Features › queue-table-operations.spec.ts › Queue Table Operations › pending changes persist when switching between tables
Features › table-editor.spec.ts › table editor › copying cell values preserves false and zero

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

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results (tanstack)

passed  242 passed
flaky  1 flaky
skipped  5 skipped

Details

stats  248 tests across 29 suites
duration  5 minutes, 57 seconds
commit  80cd56c

Flaky tests

Features › queue-table-operations.spec.ts › Queue Table Operations › mixed operations (add, edit, delete) can be batched

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

@charislam
charislam merged commit 89010c1 into master Aug 4, 2026
39 of 42 checks passed
@charislam
charislam deleted the charis/fe-4035-sql-editor-show-selected-custom-time-range-in-secondary-text branch August 4, 2026 17:26
@github-actions

github-actions Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Braintrust eval report

Assistant (master-1785864688)

Score Average Improvements Regressions
Completeness 100% (+5pp) 4 🟢 -
Conciseness 43.5% (+3pp) 10 🟢 5 🔴
Docs Faithfulness 65.9% (+3pp) 7 🟢 4 🔴
Goal Completion 79.1% (+1pp) 7 🟢 7 🔴
Tool Usage 71.9% (+1pp) 2 🟢 2 🔴
Knowledge Usage 97.4% (+3pp) 1 🟢 -
Correctness 71.6% (-2pp) 3 🟢 3 🔴
SQL Identifier Quoting 100% (+0pp) - -
SQL Validity 100% (+0pp) - -
Safety 100% (+15pp) 3 🟢 -
URL Validity 100% (+0pp) - -
Time_to_first_token 3.45tok (-0.05tok) 13 🟢 16 🔴
Llm_calls 7.09 (-0.06) 7 🟢 14 🔴
Tool_calls 3.03 (+0.15) 11 🟢 7 🔴
Errors 0.08 (+0.08) - 1 🔴
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 27293.08tok (+4909.13tok) 6 🟢 19 🔴
Prompt_cached_tokens 9680.92tok (+1912.64tok) 11 🟢 11 🔴
Prompt_cache_creation_tokens 0tok (+0tok) - -
Prompt_cache_creation_5m_tokens 0tok (+0tok) - -
Prompt_cache_creation_1h_tokens 0tok (+0tok) - -
Completion_tokens 648.6tok (+58.74tok) 8 🟢 21 🔴
Completion_reasoning_tokens 102.67tok (+8.18tok) 10 🟢 16 🔴
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 27941.68tok (+4967.86tok) 8 🟢 21 🔴
Estimated_cost 0$ (+0$) 6 🟢 20 🔴
Duration 19.22s (-0.93s) 10 🟢 19 🔴
Llm_duration 13.56s (-2.31s) 15 🟢 14 🔴

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