Skip to content

fix(tui): sidebar overlay dismissal, exact slash match, overlay z-index - #103

Merged
DevFlex-AI merged 1 commit into
devfrom
sidebar-dismiss-fixes
Jul 31, 2026
Merged

fix(tui): sidebar overlay dismissal, exact slash match, overlay z-index#103
DevFlex-AI merged 1 commit into
devfrom
sidebar-dismiss-fixes

Conversation

@DevFlex-AI

@DevFlex-AI DevFlex-AI commented Jul 31, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #104

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Follow-up to #89 addressing three review findings that landed after the merge.

Dismissing the narrow-terminal sidebar overlay (Escape or backdrop click) used to write the persisted preference to "hide", so the sidebar never auto-appeared again on wide terminals. Dismissal now only clears the transient open signal, and the home toggle no longer leaves the open signal set when the sidebar shows via the wide-terminal preference:

const toggleSidebar = () => {
  batch(() => {
    const isVisible = sidebarVisible()
    setSidebarPref(() => (isVisible ? "hide" : "auto"))
    setSidebarOpen(isVisible ? false : !wide())
  })
}
const dismissSidebar = () => setSidebarOpen(false)

The session route's overlay backdrop gets the same treatment (drops the setSidebar(() => "hide") write).

Also: the home overlay now sets zIndex={1001} so it paints above the content pane and prompt (zIndex={1000}) and receives backdrop clicks, and the slash autocomplete stable-sorts an exact name match to the top so typing /compact selects /compact instead of fuzzy-ranking it against /compact-view.

How did you verify your code works?

Traced the sidebar preference/open-signal state flow in packages/tui/src/routes/home.tsx and packages/tui/src/routes/session/index.tsx to confirm dismissal no longer touches the persisted preference, and confirmed the autocomplete exact-match sort is stable for non-exact entries. CI (typecheck and tests) runs on this PR.

Screenshots / recordings

Terminal-only state fixes (persisted preference, z-index ordering, autocomplete ranking); no visual layout change to capture.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

View with codesmith

@vercel

vercel Bot commented Jul 31, 2026

Copy link
Copy Markdown

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/adevloper152s-projects?upgradeToPro=build-rate-limit

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@DevFlex-AI, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 48 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7c1773a5-2868-4a85-96d0-6780db615c2d

📥 Commits

Reviewing files that changed from the base of the PR and between aa22f15 and 76ad509.

📒 Files selected for processing (3)
  • packages/tui/src/component/prompt/autocomplete.tsx
  • packages/tui/src/routes/home.tsx
  • packages/tui/src/routes/session/index.tsx

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

@github-actions

Copy link
Copy Markdown

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

1 similar comment
@github-actions

Copy link
Copy Markdown

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown

The following comment was made by an LLM, it may be inaccurate:

@deepsource-io

deepsource-io Bot commented Jul 31, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in aa22f15...76ad509 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

Important

Some issues found as part of this review are outside of the diff in this pull request and aren't shown in the inline review comments due to GitHub's API limitations. You can see those issues on the DeepSource dashboard.

PR Report Card

Overall Grade  

Focus Area: Reliability
Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
JavaScript Jul 31, 2026 5:05p.m. Review ↗
Shell Jul 31, 2026 5:05p.m. Review ↗
Secrets Jul 31, 2026 5:05p.m. Review ↗
Docker Jul 31, 2026 5:05p.m. Review ↗
Python Jul 31, 2026 5:05p.m. Review ↗
CSS Jul 31, 2026 5:05p.m. Review ↗
Rust Jul 31, 2026 5:05p.m. Review ↗
Ruby Jul 31, 2026 5:05p.m. Review ↗
Swift Jul 31, 2026 5:05p.m. Review ↗
PHP Jul 31, 2026 5:05p.m. Review ↗
Lua Jul 31, 2026 5:05p.m. Review ↗
Java Jul 31, 2026 5:05p.m. Review ↗
Go Jul 31, 2026 5:05p.m. Review ↗
C & C++ Jul 31, 2026 5:05p.m. Review ↗
Ansible Jul 31, 2026 5:05p.m. Review ↗
Apex Jul 31, 2026 5:05p.m. Review ↗
Elixir Jul 31, 2026 5:05p.m. Review ↗
Groovy Jul 31, 2026 5:05p.m. Review ↗
Objective-C Jul 31, 2026 5:05p.m. Review ↗
PowerShell Jul 31, 2026 5:05p.m. Review ↗
Terraform Jul 31, 2026 5:05p.m. Review ↗
VB.NET Jul 31, 2026 5:05p.m. Review ↗
SQL Jul 31, 2026 5:05p.m. Review ↗
Scala Jul 31, 2026 5:05p.m. Review ↗
Perl Jul 31, 2026 5:05p.m. Review ↗
Kotlin Jul 31, 2026 5:05p.m. Review ↗
Helm Jul 31, 2026 5:05p.m. Review ↗
Erlang Jul 31, 2026 5:05p.m. Review ↗
Dart Jul 31, 2026 5:05p.m. Review ↗
C# Jul 31, 2026 5:05p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@github-actions

Copy link
Copy Markdown

Thanks for updating your PR! It now meets our contributing guidelines. 👍

left={0}
right={0}
bottom={0}
zIndex={1001}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Unknown property 'zIndex' found


React components use JSX, not HTML.
So we need to use JSX attributes and React replicate the respective HTML property/attribute while rendering.
Use of HTML property in JSX can sometimes lead to errors.
For example, class is a keyword in JavaScript (JSX is an extension of JavaScript), so it will throw an error.
However, in HTML it is a valid attribute.

Note: If you use React with Web Components, use the class attribute instead.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

False positive: this is a SolidJS + opentui TUI <box> element, not React DOM. zIndex is a valid opentui layout prop (used elsewhere in the codebase, e.g. the content pane at zIndex={1000}), so the react/no-unknown-property rule does not apply.

@DevFlex-AI
DevFlex-AI merged commit d023a48 into dev Jul 31, 2026
48 of 50 checks passed
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.

Sidebar overlay dismissal persists hide preference, overlay z-index, and slash exact-match ranking

1 participant