Skip to content

Studio: keep chat text out of the header with Glass or a background - #17429

Merged
danielhanchen merged 3 commits into
unslothai:mainfrom
NilayYadav:chat-top-bar-bleed
Nov 11, 2026
Merged

danielhanchen merged 3 commits into
unslothai:mainfrom
NilayYadav:chat-top-bar-bleed

Conversation

@NilayYadav

@NilayYadav NilayYadav commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

With the Glass theme or a background image on, the chat header is see-through, so scrolled replies showed through the model name, project name and chat title.

The conversation now fades out just below the header, as it does on the plain theme.

Screenshots

Before (main) After (this PR)
Glass theme
Background image

Rendered check (merge base vs this PR)

A long chat scrolled under the header, measured as the header pixels that change when the thread is hidden (thread text showing through the header). macOS glass is set through its data-glass="macos" attribute, since native vibrancy only exists in the Mac app.

Engine macOS glass, header rows Background image, header rows
Chromium 2272 -> 0 2909 -> 0 (378 left are the header label's own anti-aliasing)
Firefox 2403 -> 0 2325 -> 0
WebKit 2461 -> 0 2411 -> 0

The thread now fades out over the 24px band below the header, as on the plain theme. The plain theme, compare panes and the full-view dock are unchanged.

macOS glass, before (left) and after (right):

Background image, before (left) and after (right):

@NilayYadav

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T08:39:22.147978Z e5900cd Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: e13cfe9d57

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@NilayYadav

Copy link
Copy Markdown
Collaborator Author

pre-commit.ci run

danielhanchen added a commit that referenced this pull request Nov 10, 2026
…helper (#17442)

## Summary

`Source lint` fails on main since #17256, and on every PR based on it
(seen on #17429 and #17435):

```
duplicate definitions (1):
  studio/backend/core/inference/tools.py:9806: _substitution_end is defined twice (def at line 6738, def here)
```

These are not two copies of one function. They are two different helpers
that ended up with the same name:

| | Added by | Returns for `$( ... )` | Unterminated | Quotes inside |
|---|---|---|---|---|
| line 6738 | #17256 (heredoc screening), used by `_quote_end` | one
past the `)` | `-1` | `_quote_end`, which handles `\"` and nested `$(` |
| line 9806 | #17010 (Windows `2>nul` rewrite), used by
`_bash_nul_to_dev_null` | the index of the `)` | `len(command)` | naive
`find` of the same quote |

The later definition wins at module scope. So since #17256 merged, its
`_quote_end` has been running #17010's helper rather than the one
written for it, while #17010's nul rewrite keeps its own. The lint is
right, and both PRs are correct on their own. The fix is to give
#17256's helper its own name.

The practical effect is small but real: the two disagree on some
quoting. For example, `"( )'$("`")"` reads as unterminated with the
intended helper and as closed with the shadowing one, which changes how
the Terminal heredoc screen splits that command.

## Change

- The helper at line 6738 is renamed `_quoted_substitution_end`, and its
one caller in `_quote_end` uses it. That is the function #17256 wrote
and tested.
- #17010's `_substitution_end` and the nul rewrite are untouched.
- `test_the_heredoc_quote_scanner_keeps_its_own_substitution_helper` in
`studio/backend/tests/test_permission_mode.py` pins both contracts:
- `_quoted_substitution_end` returns one past the `)` and `-1` when
unterminated;
- `_quote_end` closes `"$(echo "a)")"` at its last quote and keeps the
case above unterminated;
  - `_substitution_end` keeps the nul rewrite's own return values.

  It fails on main, where the name is shadowed.

## Testing

- `scripts/lint_duplicate_definitions.py` on `tools.py`: flags main,
clean here
- `studio/backend/tests/test_permission_mode.py` and
`test_windows_bash_nul_redirect.py`: 2637 passed, 1 skipped. The new
test fails on main.
- `tests/test_lint_duplicate_definitions.py`: 12 passed
@danielhanchen danielhanchen self-assigned this Nov 11, 2026
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: e5900cd7f0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 11, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 11, 2026
@danielhanchen
danielhanchen merged commit 4bd4ea5 into unslothai:main Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants