Skip to content

fix: active pr context on reload and dedupe workspace identity.#88

Merged
knightedcodemonkey merged 3 commits intonextfrom
bananas
Apr 20, 2026
Merged

fix: active pr context on reload and dedupe workspace identity.#88
knightedcodemonkey merged 3 commits intonextfrom
bananas

Conversation

@knightedcodemonkey
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings April 20, 2026 01:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to improve workspace/PR continuity across reloads by ensuring the correct active PR workspace is restored and by deduplicating workspace identities/records when contexts change (notably when promoting an inactive workspace into an active PR context under a different repo).

Changes:

  • Adjust workspace labeling in the Workspaces drawer and update related Playwright expectations.
  • Rekey/dedupe workspace identities for active PR contexts (including PR-number-based dedupe) and prefer active PR workspaces during reload selection.
  • Persist an “active workspace record id” across reloads, remove legacy PR-config localStorage cleanup, and add Playwright coverage for the new reload/dedupe behavior.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/modules/workspace/workspaces-drawer/drawer.js Updates displayed labels for saved workspace options.
src/modules/workspace/workspace-tab-helpers.js Enhances workspace record identity resolution with active PR context awareness.
src/modules/workspace/workspace-active-record-storage.js Adds localStorage-backed persistence for the active workspace record id.
src/modules/app-core/workspace-sync-controller.js Passes PR context state into identity resolution when snapshotting.
src/modules/app-core/workspace-save-controller.js Dedupe logic now handles repo/head duplicates and active-PR-number duplicates.
src/modules/app-core/workspace-context-controller.js Reload selection prefers an active PR workspace over a stale preferred id.
src/modules/app-core/legacy-pr-config-storage.js Removes the legacy localStorage cleanup utility.
src/app.js Integrates persisted active workspace id + session observation flag to avoid clobbering active PR context on reload.
playwright/github-pr-drawer.spec.ts Adds/updates end-to-end coverage for label changes, dedupe on repo change, and reload behavior.
docs/pr-context-storage-matrix.md Documents that no legacy PR-context migration/cleanup path is supported.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/app.js Outdated
Comment thread src/app.js
Comment thread src/modules/workspace/workspace-active-record-storage.js Outdated
@knightedcodemonkey knightedcodemonkey merged commit d3b3365 into next Apr 20, 2026
6 checks passed
@knightedcodemonkey knightedcodemonkey deleted the bananas branch April 20, 2026 02:03
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