Skip to content

change some stuff#544

Merged
ingoau merged 14 commits intomainfrom
notexp-redesign
Sep 30, 2025
Merged

change some stuff#544
ingoau merged 14 commits intomainfrom
notexp-redesign

Conversation

@ingoau
Copy link
Member

@ingoau ingoau commented Sep 30, 2025

Summary by CodeRabbit

  • New Features

    • Added a header Search button that opens the Command menu.
    • Introduced an experimental sidebar and layout, toggleable via Experimental Features in preferences.
    • Particle background now appears only when Experimental Features are enabled.
  • Improvements

    • Command menu behavior is more consistent; it opens from multiple entry points and clears the input when closed.
    • Navigation and footer interactions align with the command menu for smoother flows.
  • Style

    • Subtle visual refinements to the header and background when Experimental Features are enabled.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 30, 2025

Walkthrough

Introduces a new commandOpen state (object with current) in state.svelte.ts and refactors app-sidebar.svelte to bind/open the command dialog via commandOpen.current with input reset on close. Adds feature-flagged rendering paths across sidebar, layout header, and home page, including a new search button that sets commandOpen.current.

Changes

Cohort / File(s) Summary
State: command palette open state
src/lib/state.svelte.ts
Added exported store commandOpen = $state({ current: false }) alongside existing state.
Sidebar: command dialog and feature-flag paths
src/lib/components/app-sidebar.svelte
Replaced boolean command open handling with commandOpen.current; bound dialog open to it; added onOpenChangeComplete to clear local commandInput on close; gated experimental sidebar rendering with $preferencesStore.experimentalFeatures; updated navigation/handlers to use commandOpen.current.
Layout: header/search trigger with feature flag
src/routes/+layout.svelte
Imported Search and commandOpen; when experimental features disabled, render header bar with ghost icon button that sets commandOpen.current = true; when enabled, render decorative div; preserved children rendering.
Home page: conditional particles and layout padding
src/routes/+page.svelte
Wrapped Particles background in $preferencesStore.experimentalFeatures check; used clsx to conditionally apply md:pl-0 when feature enabled; no other logic changes.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Layout as +layout.svelte
  participant State as state.svelte.ts\n(commandOpen)
  participant Sidebar as app-sidebar.svelte
  participant Cmd as CommandDialog

  rect rgba(200,200,255,0.15)
  note over Layout,Sidebar: Feature flag: $preferencesStore.experimentalFeatures
  alt experimentalFeatures = false
    User->>Layout: Click Search button
    Layout->>State: commandOpen.current = true
  else experimentalFeatures = true
    note over Layout: Decorative header only
  end
  end

  Sidebar->>Cmd: bind:open = State.commandOpen.current
  User->>Cmd: Interact / Select
  Cmd-->>State: onOpenChange(open)
  alt Open -> Close
    Cmd->>Sidebar: onOpenChangeComplete
    Sidebar->>Sidebar: commandInput = ""
    State->>State: commandOpen.current = false
  else Still open
    note over Cmd: No reset
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The title “change some stuff” is overly generic and fails to summarize the key updates, which include introducing a new commandOpen store, refactoring command dialog bindings to use .current, and adding experimental feature-flag checks for sidebar and page layouts. Please revise the title to clearly describe the main purpose of the changes, for example: “Introduce commandOpen store and add feature-flagged sidebar rendering.”
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch notexp-redesign

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1578b0b and 56070b3.

📒 Files selected for processing (4)
  • src/lib/components/app-sidebar.svelte (6 hunks)
  • src/lib/state.svelte.ts (1 hunks)
  • src/routes/+layout.svelte (2 hunks)
  • src/routes/+page.svelte (2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.*

⚙️ CodeRabbit configuration file

**/*.*: Do not correct spelling errors or grammar mistakes.

Files:

  • src/lib/state.svelte.ts
  • src/routes/+layout.svelte
  • src/routes/+page.svelte
  • src/lib/components/app-sidebar.svelte
src/routes/+page.svelte

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Update the tools list in src/routes/+page.svelte when adding a new tool

Files:

  • src/routes/+page.svelte
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (13)
src/lib/state.svelte.ts (1)

2-2: LGTM! Clean state declaration.

The commandOpen state export follows the same pattern as settingsOpen and integrates well with the rest of the codebase.

src/routes/+layout.svelte (2)

33-34: LGTM! Appropriate imports for command dialog functionality.

The imports for Search icon and commandOpen state are correctly added to support the new search button and command dialog integration.


86-109: LGTM! Clean feature-flag-driven UI branching.

The conditional rendering based on experimentalFeatures is well-structured:

  • Experimental path: decorative blur effect
  • Standard path: functional header with search capability

The search button correctly sets commandOpen.current = true to open the command dialog.

src/routes/+page.svelte (3)

22-22: LGTM! Consistent conditional styling.

The dynamic class with md:pl-0 when experimental features are enabled aligns with the layout changes and ensures proper spacing in the experimental UI mode.


26-105: LGTM! Clean feature-flag gating for particles.

The particle background is appropriately wrapped in a feature flag check, ensuring it only renders when experimental features are enabled. The particle configuration values are preserved and properly scoped.


115-120: LGTM! Consistent padding logic.

The conditional md:pl-0 class matches the pattern used in the outer container (line 22), maintaining consistent layout behavior when experimental features are toggled.

src/lib/components/app-sidebar.svelte (7)

29-29: LGTM! Correct import for command dialog state.

The import of commandOpen from state.svelte is appropriate and aligns with the refactored state management approach.


46-46: LGTM! Consistent usage of commandOpen.current.

The keyboard shortcut handler correctly uses commandOpen.current to control the command dialog state.


66-66: LGTM! Good state management for input tracking.

The commandInput state is appropriately introduced to track the command dialog input value, enabling features like conditional visibility based on input content.


310-313: LGTM! Proper cleanup on dialog close.

The onOpenChangeComplete handler correctly resets commandInput when the dialog closes, ensuring clean state for the next opening.


324-324: LGTM! Consistent dialog closing on selection.

All command item selections correctly close the dialog by setting commandOpen.current = false, providing good UX.

Also applies to: 337-337, 352-352


359-361: LGTM! Smart conditional visibility for experimental features toggle.

The command item is hidden unless the user types "exp" or experimental features are already enabled, which is a nice UX touch to avoid accidental toggling.


71-307: Confirm that hiding the sidebar under the experimental-features flag is intentional
The entire <Sidebar.Root> is wrapped in {$preferencesStore.experimentalFeatures}, and a search of src/routes/+layout.svelte shows no alternative <nav> or menu fallback. If this isn’t deliberate, add a fallback sidebar or alternative navigation when the flag is false.


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
🧪 Early access (Sonnet 4.5): enabled

We are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience.

Note:

  • Public repositories are always opted into early access features.
  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.

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

@cloudflare-workers-and-pages
Copy link

Deploying edutools-testing with  Cloudflare Pages  Cloudflare Pages

Latest commit: c860dad
Status: ✅  Deploy successful!
Preview URL: https://7d7ec792.edutools-testing.pages.dev
Branch Preview URL: https://main.edutools-testing.pages.dev

View logs

@ingoau ingoau merged commit 734304e into main Sep 30, 2025
6 checks passed
@ingoau ingoau deleted the notexp-redesign branch September 30, 2025 08:11
This was referenced Oct 1, 2025
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.

1 participant