Skip to content

Avoid stuck dimming when translating a single message#14

Merged
Rocket-Space merged 1 commit intomasterfrom
codex/adapt-chat-translation-for-single-messages
Feb 25, 2026
Merged

Avoid stuck dimming when translating a single message#14
Rocket-Space merged 1 commit intomasterfrom
codex/adapt-chat-translation-for-single-messages

Conversation

@Rocket-Space
Copy link
Owner

Motivation

  • Prevent the chat UI from remaining dimmed/unresponsive after using the Translate message context action by making sure per-message translation uses the same UI flow as full-chat translation.

Description

  • Change tryTranslateMessageInline in ChatActivity to always return false, removing the inline shortcut so callers fall back to the existing TranslateAlert2 flow that properly handles dim/undim lifecycle; removed the unused TranslationHelper import.

Testing

  • Ran a local compile attempt with ./gradlew :TMessagesProj:compileDebugJavaWithJavac -x lint, which failed due to the environment JDK/Gradle incompatibility (Unsupported class file major version 69).
  • Verified the change was staged/committed via git status --short and git show --stat --oneline HEAD.

Codex Task

@Rocket-Space Rocket-Space merged commit 530a954 into master Feb 25, 2026
1 check passed
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: 27eb0c26dc

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

return true;
// Force the per-message action to use the same translation UI flow as full chat
// translation, which correctly handles chat dimming lifecycle.
return false;

Choose a reason for hiding this comment

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

P2 Badge Preserve inline translation for "On Message" style

This unconditional return false removes the only inline path for per-message translation, so when SpaceGramConfig.translateProvider != 0 and users select the "On Message" translation style, the context action now always falls back to TranslateAlert2 popup flow. That is a behavior regression for a user-configurable feature (style setting is still exposed in SpaceGram settings), not just a dimming lifecycle change.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant