Skip to content

Initialize notebook editor page - #48842

Merged
joshenlim merged 2 commits into
masterfrom
joshen/fe-4112-explorer-initialize-notebook-editor-page
Aug 8, 2026
Merged

joshenlim merged 2 commits into
masterfrom
joshen/fe-4112-explorer-initialize-notebook-editor-page

Conversation

@joshenlim

@joshenlim joshenlim commented Aug 7, 2026 •

Copy link
Copy Markdown
Member

Context

More groundwork for the Explorer - this PR initializes the Notebook editor page which you can access with the "New notebook" CTA

As usual nothing functional just yet, but this PR also addresses some UI functionality

  • Creating more than 1 notebook will open multiple tabs (it wasn't previously)
  • Swapping between notebooks will update the URL (wasn't previously as well)

Will probably start looking into the cells next, starting with MarkdownCell followed by QueryCell

image

Summary by CodeRabbit

  • New Features

    • Added notebook creation actions from the Explorer home and navigation areas.
    • Introduced a full notebook editor with title editing, rename support, and Analyze, Run, and Save controls.
    • Added options to create query or Markdown cells in empty notebooks.
    • Notebook tabs now open the corresponding notebook in the project Explorer.
  • Bug Fixes

    • Improved Explorer layout sizing and notebook tab navigation behavior.
    • Improved notebook tab labels and editing behavior, including cancellation with Escape and submission with Enter or blur.

@joshenlim
joshenlim requested a review from a team as a code owner August 7, 2026 07:53
@vercel

vercel Bot commented Aug 7, 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 7, 2026 8:08am
studio-staging Ready Ready Preview Aug 7, 2026 8:08am
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Aug 7, 2026 8:08am
design-system Skipped Skipped Aug 7, 2026 8:08am
docs Skipped Skipped Aug 7, 2026 8:08am
ui-library Skipped Skipped Aug 7, 2026 8:08am
zone-www-dot-com Skipped Skipped Aug 7, 2026 8:08am

Request Review

@coderabbitai

coderabbitai Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 3f8026d5-75aa-4cda-92a6-e7d6cd0dea90

📥 Commits

Reviewing files that changed from the base of the PR and between 010123b and 2087c96.

📒 Files selected for processing (2)
  • apps/studio/components/interfaces/Explorer/NotebookEditor.tsx
  • apps/studio/components/interfaces/Explorer/__tests__/NotebookEditor.test.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/studio/components/interfaces/Explorer/NotebookEditor.tsx

📝 Walkthrough

Walkthrough

The Explorer now creates notebooks from home and resource navigation. NotebookEditor provides title editing, notebook actions, and empty-state cell controls. Notebook tabs navigate to notebook routes, and the layout uses flexible child sizing.

Changes

Notebook workflow

Layer / File(s) Summary
Notebook creation entry points
apps/studio/components/interfaces/Explorer/ExplorerHome.tsx, apps/studio/components/layouts/ExplorerLayout/ExplorerLayout.constants.tsx
The Explorer home card and notebook resource header now invoke useCreateNotebook. The resource header includes a tooltip-enabled “New” button.
Notebook editor and navigation
apps/studio/components/interfaces/Explorer/NotebookEditor.tsx, apps/studio/components/interfaces/Explorer/__tests__/NotebookEditor.test.tsx, apps/studio/components/layouts/ExplorerLayout/ExplorerLayout.tsx, apps/studio/state/tabs.tsx
NotebookEditor now supports title editing, rename persistence, notebook actions, and empty-state cell controls. Tests validate non-preview tab registration. Notebook tabs use notebook routes, and the layout uses flexible child sizing.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: charislam

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant ExplorerHome
  participant NotebookEditor
  participant Tabs
  participant ExplorerLayout
  User->>ExplorerHome: Select Create a notebook
  ExplorerHome->>NotebookEditor: Open the notebook
  User->>NotebookEditor: Edit and submit the title
  NotebookEditor->>Tabs: Update the tab label
  User->>Tabs: Select the notebook tab
  Tabs->>ExplorerLayout: Navigate to the notebook route
  ExplorerLayout->>NotebookEditor: Render the notebook editor
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the main changes and includes an image, but it omits the required template sections and the CONTRIBUTING.md confirmation. Use the required template headings, confirm that CONTRIBUTING.md was read, and document the current behavior, new behavior, and additional context.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the primary change: initializing the notebook editor page.
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.
✨ 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-4112-explorer-initialize-notebook-editor-page

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 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/Explorer/NotebookEditor.tsx`:
- Around line 20-21: Update the title-editing start flow near the title state in
NotebookEditor so it refreshes titleValue from the current name immediately
before setting isEditingTitle to true. Preserve the existing title commit and
blur behavior while ensuring switching notebooks cannot carry over the previous
notebook’s draft.
- Around line 85-99: Disable the unimplemented Analyze, Run, Save, Add query
cell, and Add markdown cell controls in NotebookEditor, and wrap each disabled
control with a ButtonTooltip explaining that the action is not yet available.
Preserve their existing icons, labels, and layout while ensuring users receive
the explanatory tooltip instead of an inert click.
- Around line 33-44: Update the NotebookEditor tab synchronization around
registerTab so it reruns when name changes and uses the existing tab identifier
to update an already-registered tab label. Preserve the “New Notebook” fallback
until notebook data resolves, and ensure both the tab and recent-item label are
refreshed via the tabs update mechanism.

In `@apps/studio/components/layouts/ExplorerLayout/ExplorerLayout.constants.tsx`:
- Around line 88-98: Update the ButtonTooltip rendering in the ExplorerLayout
constants so the “New” action is rendered only when type is notebook, preventing
the chat variant from appearing without behavior; preserve the existing
createNotebook handler for notebook resources.
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 3f4c9b3d-fbfd-4e45-b10f-3bf20aa5d955

📥 Commits

Reviewing files that changed from the base of the PR and between 6c0439a and 010123b.

📒 Files selected for processing (5)
  • apps/studio/components/interfaces/Explorer/ExplorerHome.tsx
  • apps/studio/components/interfaces/Explorer/NotebookEditor.tsx
  • apps/studio/components/layouts/ExplorerLayout/ExplorerLayout.constants.tsx
  • apps/studio/components/layouts/ExplorerLayout/ExplorerLayout.tsx
  • apps/studio/state/tabs.tsx

@github-actions

github-actions Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results (next)

passed  243 passed
skipped  5 skipped

Details

stats  248 tests across 29 suites
duration  4 minutes, 11 seconds
commit  2087c96

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

@joshenlim
joshenlim merged commit 6c414e3 into master Aug 8, 2026
39 checks passed
@joshenlim
joshenlim deleted the joshen/fe-4112-explorer-initialize-notebook-editor-page branch August 8, 2026 03:48
@github-actions

github-actions Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Braintrust eval report

Assistant (master-1786161114)

Score Average Improvements Regressions
Completeness 82.4% (-15pp) 1 🟢 11 🔴
Conciseness 47.6% (+8pp) 14 🟢 5 🔴
Correctness 53.5% (-15pp) 4 🟢 7 🔴
Docs Faithfulness 67% (+2pp) 8 🟢 4 🔴
Goal Completion 67.6% (-9pp) 5 🟢 12 🔴
Tool Usage 74.5% (+2pp) 1 🟢 -
Knowledge Usage 97.4% (+0pp) - -
Safety 95% (0pp) 1 🟢 1 🔴
SQL Identifier Quoting 100% (+0pp) - -
SQL Validity 100% (+5pp) 1 🟢 -
Time_to_first_token 3.15tok (-0.03tok) 11 🟢 18 🔴
Llm_calls 6.99 (-0.26) 8 🟢 17 🔴
Tool_calls 3.3 (+0.22) 14 🟢 8 🔴
Errors 0.16 (+0.16) - 3 🔴
Llm_errors 0.01 (+0.01) - 1 🔴
Tool_errors 0 (+0) - -
Prompt_tokens 25283.15tok (+2349.4tok) 8 🟢 18 🔴
Prompt_cached_tokens 6738.39tok (-1106.39tok) 7 🟢 18 🔴
Prompt_cache_creation_tokens 0tok (+0tok) - -
Prompt_cache_creation_5m_tokens 0tok (+0tok) - -
Prompt_cache_creation_1h_tokens 0tok (+0tok) - -
Completion_tokens 636.55tok (+23.85tok) 11 🟢 18 🔴
Completion_reasoning_tokens 96.03tok (+0.74tok) 15 🟢 12 🔴
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 25919.7tok (+2373.25tok) 11 🟢 18 🔴
Estimated_cost 0$ (+0$) 7 🟢 19 🔴
Duration 19.01s (+1.14s) 14 🟢 15 🔴
Llm_duration 11.97s (-1.86s) 19 🟢 10 🔴

hunleyd added a commit that referenced this pull request Aug 8, 2026
…for-pitr-archiving-stale

* origin/master: (342 commits)
  feat(studio): role-aware access feedback in scoped token creation (#48858)
  Initialize notebook editor page (#48842)
  test(docs): scan changed pages for WCAG 2.1 A/AA in warn mode (#48727)
  docs(auth): clarify audit logs storage options and configuration (#48852)
  feat(studio): warn that scoped tokens don't support the MCP server (#48849)
  feat(studio): lifecycle and role-aware scoped token view sheet (#48848)
  feat(www): add Open Authorization Integration Addendum (#48804)
  feat(studio): add legacy token mode to scoped pat creation flow (#48844)
  Add blog post: Supabase is now a connector on Perplexity Computer (#48776)
  feat(studio): enforce expiry scoped pat (#48811)
  fix(studio): model scoped pat permissions as OR-of-AND alternatives - smaller version (#48809)
  fix(ui): opaque default button hover fills (#48837)
  fix(ui): restore normal alert text wrapping (#48840)
  feat: notebook content schema (#48813)
  fix(ui): remove extra spacing before custom reports section (#48796)
  feat(marketing): add hint text below Go page form labels (#48824)
  Initialize notebooks store (#48801)
  Use white wordmark for QA.tech primary logo (#48827)
  fix titleless Admonition alignment (#48784)
  fix inconsistent product menu dividers (#48787)
  ...
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