Skip to content

Fix regressions from the iD editor upgrade and cross-editor bleed fix (#7279) - #7291

Merged
ramyaragupathy merged 2 commits into
developfrom
fix/id-editor-sandbox-editor-global-bleed
Jul 10, 2026
Merged

Fix regressions from the iD editor upgrade and cross-editor bleed fix (#7279)#7291
ramyaragupathy merged 2 commits into
developfrom
fix/id-editor-sandbox-editor-global-bleed

Conversation

@sumitdahal7

@sumitdahal7 sumitdahal7 commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation
  • 🧑‍💻 Refactor
  • ✅ Test
  • 🤖 Build or CI
  • ❓ Other (please specify)

Describe this PR

After #7279 (the @openstreetmap/id 2.38.0 → 2.41.2 upgrade + the fix for OSM iD / Sandbox editors bleeding into each other), new issues showed up, and this PR addresses one without reverting the original fix.

1. Recently-saved edits not showing without a hard reload
#7279 fixed the bleed by nulling the context on every unmount, forcing a brand new one on every reopen but that also meant a task you just edited and saved would come back from a cold, empty cache instead of the warm one that used to show your own recent changes. On top of that, a fresh context's initial tile fetch could get aborted by our own cache reset, with nothing left to re-request it.

  • Contexts are now tagged by which editor built them and only replaced when the type actually changes, so same-editor reopens stay warm; a fresh context's view is explicitly redrawn after its connection is set up, so the task's own data reliably gets re-fetched instead of staying blank.

2. Replace Risky Stylesheet toggling with tagged iD contexts
The stylesheet-disable mechanism from the previous commit could tag the wrong in a real session and bleed the whole app's CSS.

  • Replaced with tagging each context by which editor built it, reused only when the type matches.

Updates
Shared logic is extracted into utils/idEditorContext.js (also resolves theSonarCloud duplication).

@sonarqubecloud

Copy link
Copy Markdown

@ramyaragupathy
ramyaragupathy merged commit a1e8fe4 into develop Jul 10, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants