Uh oh!
There was an error while loading. Please reload this page.
fix(RenameFile): prevent scene title freezing on Next navigation - #733
Open
garfolino wants to merge 2 commits into
Open
fix(RenameFile): prevent scene title freezing on Next navigation#733garfolino wants to merge 2 commits into
garfolino wants to merge 2 commits into
Conversation
The scene title is rendered by a React-controlled TruncatedText component. The plugin replaced its contents with an <a> element (innerHTML = ''), which detached the text node React updates. Navigating to another scene with Next then left the previous title displayed while every other field updated. Switch to event delegation: a single document-level click listener reads the title at click time, so React's DOM is never restructured. The styling class and tooltip are now applied non-destructively (attributes only). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
discourse-stashapp
commented
Jun 27, 2026
This pull request has been mentioned on Stash Forum. There might be relevant details there: |
DogmaDragon
requested changes
Aug 29, 2026
DogmaDragon
left a comment
Contributor
There was a problem hiding this comment.
Need to bump the version in the .yml file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Fixes#551
When the RenameFile plugin is active on a scene detail page, pressing Next to navigate to another scene leaves the previous scene's title displayed. Every other field updates correctly; only the title is frozen. Disabling the plugin restores normal behavior.
Root cause: The scene title is rendered by a React-controlled
TruncatedTextcomponent.wrapElement()replaced its contents with an<a>element viaelement.innerHTML = '', which detaches the text node React tracks. On navigation, React writes the new title into that now-orphaned node, so the visible title never updates. This is a DOM-ownership conflict, not a caching issue (reproduces across browsers).Solution
Stop restructuring React's DOM. Instead:
document-levelclicklistener resolves the title viaevent.target.closest('.scene-header div.TruncatedText')and reads the text at click time. React renders/updates the title freely; we never touch its structure..renamefileclass and tooltip are applied viaclassList.add/setAttributeonly (no child mutation), so React's text node stays intact..renamefilenow usescursor: pointer+ hover underline on the title element itself.All four interaction modes (click / Ctrl / Shift / Alt) are preserved through the unchanged
AppendTitleField.Version bumped
1.0.0→1.0.1.🤖 Generated with Claude Code