Skip to content

feat: add thread info modal with rename + context usage#528

Open
vforsh wants to merge 9 commits intoDimillian:mainfrom
vforsh:feat/thread-info-rename-modal
Open

feat: add thread info modal with rename + context usage#528
vforsh wants to merge 9 commits intoDimillian:mainfrom
vforsh:feat/thread-info-rename-modal

Conversation

@vforsh
Copy link
Contributor

@vforsh vforsh commented Feb 27, 2026

Summary

  • add Thread info modal action in top-right header (left of Copy thread)
  • add rich thread info modal fields: title, thread id (copy), workspace, branch, timestamps, model/effort, context usage
  • add thread title rename flow in dedicated modal:
    • manual rename via multiline textbox + save
    • magic auto-generate title + save
  • format context tokens in compact form (for example 118.1k / 258.4k)
  • improve copy icon visibility for header and thread-id copy buttons

Verification

  • npm run typecheck
  • iOS simulator verification via agent-device:
    • thread info modal appears from header
    • manual rename persists
    • magic auto-rename persists
    • context usage fields render

@vforsh
Copy link
Contributor Author

vforsh commented Feb 27, 2026

SCR-20260227-tdyi SCR-20260227-tdxf SCR-20260227-tgij

@vforsh
Copy link
Contributor Author

vforsh commented Feb 27, 2026

@codex review

@vforsh vforsh marked this pull request as ready for review February 27, 2026 19:17
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a54e5034cb

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

@Dimillian
Copy link
Owner

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 56a4d2410c

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

Comment on lines +597 to +600
{threadInfoOpen &&
activeThreadInfo &&
onRenameActiveThreadName &&
onGenerateActiveThreadName ? (

Choose a reason for hiding this comment

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

P2 Badge Reset thread info modal state when thread context is lost

Because threadInfoOpen is never cleared when activeThreadInfo becomes falsy, the modal can silently unmount (for example when the user navigates to workspace home or the active thread is temporarily unset) while the open flag stays true; as soon as another thread becomes active, the modal reappears automatically without an explicit click. This creates an unexpected cross-thread modal reopen behavior that is user-visible and confusing.

Useful? React with 👍 / 👎.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in bb5c1e3. Added a useEffect in MainHeader to reset threadInfoOpen whenever activeThreadInfo becomes falsy, so the modal cannot silently stay open and auto-reappear on a different thread context.

Comment on lines 195 to 197
onClick={async () => {
await navigator.clipboard.writeText(thread.threadId);
setThreadIdCopied(true);

Choose a reason for hiding this comment

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

P3 Badge Catch clipboard errors in thread info copy handler

This copy action awaits navigator.clipboard.writeText without error handling, so environments where clipboard writes are blocked or unavailable will produce an unhandled rejected promise and no user feedback; the same pattern is also used for the project-directory copy button. Wrapping these writes in try/catch (like existing thread-copy flow) avoids noisy runtime errors and makes failure behavior predictable.

Useful? React with 👍 / 👎.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in c435fa8. Wrapped both thread info copy actions in a shared try/catch clipboard helper, preventing unhandled promise rejections when clipboard write is unavailable, and added inline error feedback (Could not copy to clipboard.).

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.

2 participants