Repository navigation
Studio: keep lone asterisks and backticks in finished chat replies - #14391
Conversation
[skip ci]
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Review + reproduction evidencePinned review: I reproduced a normal chat with a connected OpenAI-compatible model on the merge base
Conclusion: real defect on main, fixed; waiting only on the PR's CI run for |
|
That run merged into |
## Problem `studio/backend/tests/test_text_io_encoding.py::test_text_io_names_its_encoding` fails on main, so the `(Python 3.13, rest)` backend shard is red on every PR built on top of #14374 (for example #14391): ``` AssertionError: Text I/O without an explicit encoding falls back to locale.getencoding(), ... hardware.py:165: subprocess(text = True) without encoding ``` #14374 added `_running_under_rosetta()`, which runs `sysctl -n hw.optional.arm64` with `text = True` and no encoding. The guard is right. Every other `subprocess` call in `hardware.py` names its encoding, and a bare `text = True` decodes with the locale codec (ASCII under a C or POSIX locale). ## Fix Pass `encoding = "utf-8", errors = "replace"`, as the other probes in this file do. The probe only reads `0` or `1`, so behaviour is unchanged. ## Verification - `studio/backend/tests/test_text_io_encoding.py`: fails on main (the line above); with this change, 857 passed. - `test_chat_only_reason.py`, `test_export_capability.py` and `test_video_capability.py`, which exercise the Rosetta check: 64 passed.
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review |
1 similar comment
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c92fefa538
ℹ️ 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".
| const cut = useAuiState( | ||
| ({ message }) => | ||
| message.status?.type !== "running" && | ||
| !!readIncompleteInfo(message.metadata) && |
There was a problem hiding this comment.
Treat content-filter terminal responses as cut
When an OpenAI-compatible provider ends a partial response with finish_reason: "content_filter" (or another truncating non-length reason), this condition leaves cut false: chat-adapter.ts:8021-8024 clears incompleteReason for every non-length finish reason, so the final metadata contains no incomplete stamp. If filtering happens midway through bold, code, a link, or an image, the response is therefore given FINISHED_TEXT_REMEND, which disables the repairs that the previous settled path applied and exposes the unfinished Markdown; stamp these terminal reasons as incomplete or otherwise include them in cut detection.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Not changing: Studio does not treat content_filter as incomplete anywhere (no stamp, no Continue bar), so such a reply is settled and shown exactly as the provider sent it; nothing is dropped, an unclosed marker just stays literal.
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
# Conflicts: # studio/frontend/scripts/check-bundle-budget.ts

Once a chat reply finished, a lone asterisk, double asterisk or backtick in ordinary text was deleted and the rest of the sentence was restyled: "Add .pyc to .gitignore." showed as "Add .pyc to .gitignore." in italics, and "Press the ` key" turned the rest of the line into code. When the reply ended with a line break, a stray "" or "**" was added at the end instead: "Use **kwargs to forward them." showed as "Use **kwargs to forward them. **". It stayed that way after reopening the chat, while Copy still gave the original text.
The repair that closes half-written Markdown now runs only on a reply that was cut short (Stop, the Max Tokens limit, or an error), right away and after a reload. A reply that finished normally is shown exactly as written.
Known limits, unchanged from before: a cut reply can still restyle a lone marker earlier in it, and thinking text over about 16,000 characters is still repaired piece by piece.
Before / after
Five finished replies, one lone marker each, the same bytes sent to a Studio built from the merge base (left) and from this branch (right). Before:
**kwargsturns bold,***argsturns bold-italic, the line after a lone backtick becomes code, and~~is appended to~~ 5 dollars.After: every reply reads exactly as sent.