Skip to content

Studio: add right-to-left chat layout - #16534

Open
Aafimalek wants to merge 11 commits into
unslothai:mainfrom
Aafimalek:feat/issue-16161-chat-layout
Open

Aafimalek wants to merge 11 commits into
unslothai:mainfrom
Aafimalek:feat/issue-16161-chat-layout

Conversation

@Aafimalek

Copy link
Copy Markdown
Contributor

Summary

Add an opt-in Right-to-left chat layout setting. It mirrors the chat controls without changing the direction of the rest of Studio, persists the preference, and keeps greeting text independently directional. Existing automatic direction for chat messages remains in place.

Related to #16161. The application navigation outside the chat page is not mirrored by this setting.

Verification

  • Frontend typecheck and strict translation parity check passed.
  • Nine focused tests passed, including the chat preference, bidirectional Markdown, and reply-rendering tests.
  • A model-free Chrome test passed at desktop and mobile widths. It checks control placement, persistence after reload, mixed Arabic/English input, and the attachments menu. The browser smoke test is included in the existing UI workflow.
  • The full frontend test suite did not pass on Windows: it included a timezone assertion that received GMT instead of UTC, and a Markdown rendering test timed out under load. The Markdown test passed when rerun separately. The affected-files lint command also reports existing upstream findings.

danielhanchen added a commit that referenced this pull request Nov 3, 2026
)

## Summary

`Repo tests (CPU, studio-install)` is still red on main after #16532.
That PR fixed the shared no-torch harness in
`test_no_torch_filtering.py`. A second test class has the same problem:
it runs `install_python_stack()` in no-torch mode with `subprocess.run`
mocked. It failed on #16534 and #16527, both of which ran on top of
#16532:

```
tests/studio/install/test_rocm_support.py::TestProgressStepCountMatchesTotal::test_progress_reaches_total_without_torch[linux-False]
tests/studio/install/test_rocm_support.py::TestProgressStepCountMatchesTotal::test_progress_reaches_total_without_torch[windows-False]
tests/studio/install/test_rocm_support.py::TestProgressStepCountMatchesTotal::test_progress_reaches_total_without_torch[macos_arm-False]
E   RuntimeError: Could not resolve a compatible unsloth / unsloth-zoo pair for no-torch mode
```

The cause is the same as in #16532. Since #16157, a no-torch install
resolves a compatible Unsloth / Zoo pair from wheel metadata, and it
refuses only when the feed has no such pair. That is right for users,
since such an install would fail anyway. `_run_stack` mocks
`subprocess.run` to return nothing, so the probe finds no metadata and
the full-pass (`SKIP_STUDIO_BASE=0`) cases stop before they reach the
progress count they check.

## Change

`tests/studio/install/test_rocm_support.py`,
`TestProgressStepCountMatchesTotal._run_stack` only: `_no_torch_pair`
returns a compatible pair, which models a feed that serves one. This is
the same model as #16532.

`NO_TORCH` and the new patch share one `patch.multiple`. That `with`
statement already holds 20 context managers, which is Python's limit on
nested blocks: a 21st `patch.object` makes the whole file fail to import
with `SyntaxError: too many statically nested blocks`. The patched
values are otherwise unchanged.

## Testing

`tests/studio/install/test_rocm_support.py`:
- main: 3 failed, 686 passed (the three cases above);
- this branch: 689 passed, 2 skipped.

I also ran `tests/studio/install` plus `tests/python` on this branch.
"Could not resolve a compatible" no longer appears anywhere. 22 other
tests fail locally, in `test_dependency_pass_skips.py` and
`test_e2e_no_torch_sandbox.py`, and they fail the same way on main here.
CI passes them in the same shard, so the cause is this host's
environment.
…-layout

# Conflicts:
#	.github/workflows/studio-ui-smoke.yml
@Aafimalek

Copy link
Copy Markdown
Contributor Author

I investigated the macOS Edge composer failure. This run failed twice at the multiline-input assertion: the second line was truncated. The earlier macOS run on a different branch failed at the same assertion, and its retry also stopped at Secon with the same Edge version. The branches have diverged, and this PR does not change the standalone composer smoke harness.

That points to a shared failure, though it does not establish the root cause. I could not rerun the failed job from this account. Could a maintainer rerun it or advise on the existing macOS Edge failure?

This branch has not been deployed

No deployments
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