Skip to content

💺 feat: Hide Tool-Limit Recovery Actions in Read-Only Chats - #18196

Merged
danny-avila merged 1 commit into
devfrom
danny-avila/read-only-contract
Nov 17, 2026
Merged

danny-avila merged 1 commit into
devfrom
danny-avila/read-only-contract

Conversation

@danny-avila

@danny-avila danny-avila commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

ChatContract.readOnly (#18193) lets a chat say the reader takes no turn in it, and a read-only chat's rows already offer no regenerate, edit or continue. One row action is decided elsewhere: the tool-call-limit notice offers Keep going and Answer now from its own gate, which checks only that the chat is live on the tail message. In a conversation that is followed rather than driven, such as a subagent's child thread, both buttons would be drawn and wired to handlers that do nothing.

With this, a read-only chat's notice explains what happened without offering either recovery action.

Eighth in a stack, on #18195.

How it works

 // components/parts/ToolCallLimitNotice.tsx
   const canAct =
     chat?.ask != null &&
+    chat.readOnly !== true &&
     chat.isSubmitting !== true &&
     chat.latestMessageId === message.messageId;

The notice reads chat.readOnly from ChatContext, where it already reads whether the chat is live on the tail message.

The contract field, the row rules and the view provider's read-only mode were part of this PR and moved down into #18193, so the followed view is read-only from the PR that introduces it.

Type of change

  • Feature
  • Tests / tooling / CI

Testing

Tested environments/configuration:

jsdom, with the package's real notice.

Automated tests:

  • ToolCallLimitNotice.spec.tsx: a read-only chat offers neither recovery action. The rule was removed to confirm the test fails.
  • packages/chat: npx jest (3905 tests, run at the top of the stack); npx tsc --noEmit; npm run static-checks -- --against origin/dev.

Screenshots / recordings

No user-facing change: readOnly is absent for every chat the app renders today.

Risk / compatibility

readOnly defaults to absent, which is today's behavior for main chat, the added pane and the shared view.

@danny-avila
danny-avila added this pull request to stack #18259 November 17, 2026 14:36
@danny-avila
danny-avila force-pushed the danny-avila/read-only-contract branch 2 times, most recently from 7abd78d to 6fde7b7 Compare November 17, 2026 15:05
@lia-by-librechat lia-by-librechat Bot changed the title 🔒 feat: Let a Chat Contract Say the Reader Takes No Turns 💺 feat: Add Read-Only Chat Contracts Nov 17, 2026
@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 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-17T17:23:11.487409Z 58aa201 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. 🎉

Reviewed commit: 6fde7b7b41

ℹ️ 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".

@danny-avila
danny-avila force-pushed the danny-avila/read-only-contract branch from 6fde7b7 to e08f56e Compare November 17, 2026 15:33
@danny-avila
danny-avila force-pushed the danny-avila/read-only-contract branch from e08f56e to 7eff19f Compare November 17, 2026 15:34
@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

Head 7eff19f037.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 7eff19f037

ℹ️ 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".

@danny-avila danny-avila changed the title 💺 feat: Add Read-Only Chat Contracts 💺 feat: Hide Tool-Limit Recovery Actions in Read-Only Chats Nov 17, 2026
@danny-avila
danny-avila force-pushed the danny-avila/read-only-contract branch 2 times, most recently from 678c337 to bbde649 Compare November 17, 2026 15:42
@danny-avila
danny-avila force-pushed the danny-avila/read-only-contract branch from bbde649 to c42f28d Compare November 17, 2026 15:48
@danny-avila
danny-avila force-pushed the danny-avila/read-only-contract branch from c42f28d to ce902a5 Compare November 17, 2026 15:54
@danny-avila
danny-avila force-pushed the danny-avila/read-only-contract branch from ce902a5 to 8fdefbd Compare November 17, 2026 16:10
@danny-avila
danny-avila marked this pull request as ready for review November 17, 2026 16:11
@danny-avila
danny-avila force-pushed the danny-avila/read-only-contract branch 4 times, most recently from c7e6d50 to accb97d Compare November 17, 2026 17:03
@danny-avila
danny-avila force-pushed the danny-avila/read-only-contract branch from accb97d to 27e9cef Compare November 17, 2026 17:07
Base automatically changed from danny-avila/chat-side-frames to dev November 17, 2026 17:22
@danny-avila
danny-avila force-pushed the danny-avila/read-only-contract branch from 27e9cef to 58aa201 Compare November 17, 2026 17:22
@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

Head 58aa201 (rebased onto dev after #18195 merged).

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 58aa2015e4

ℹ️ 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".

@danny-avila
danny-avila merged commit b7c12b1 into dev Nov 17, 2026
59 of 60 checks passed
@danny-avila
danny-avila deleted the danny-avila/read-only-contract branch November 17, 2026 17:36
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