feat: workspaces without pat.#129
Merged
knightedcodemonkey merged 2 commits intomainfrom May 3, 2026
Merged
Conversation
Owner
knightedcodemonkey
commented
May 3, 2026
- closes Enable Workspaces drawer without GitHub PAT for Local-only workflow #107
- fixes css modules type checks and formatting in preview
Contributor
There was a problem hiding this comment.
Pull request overview
This PR decouples the Workspaces drawer from GitHub PAT gating so local-only workspace workflows remain available offline, while also tightening CSS module support in preview/type diagnostics. It fits into the app’s workspace/state-restoration flow by making no-PAT mode explicitly local-only instead of hiding the Workspaces entry point.
Changes:
- Makes the Workspaces toggle always available and forces the drawer into Local-only mode when no GitHub token is present.
- Restricts startup workspace restore to local candidates in no-PAT mode and wires token availability into workspace context restore logic.
- Fixes CSS module type declarations and removes preview CSS alias rewriting, with updated Playwright coverage.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/styles/layout-shell.css | Reorganizes top-control layout to group Workspaces with Diagnostics. |
| src/styles/ai-controls.css | Adjusts Workspaces toggle/drawer responsive styling for the new placement. |
| src/modules/workspace/workspaces-drawer/drawer.js | Forces repository filter into disabled Local-only mode when no writable repos exist. |
| src/modules/preview/render-runtime.js | Removes CSS-module selector alias rewriting from preview style compilation. |
| src/modules/diagnostics/type-diagnostics.js | Adds *.module.css ambient typing as a class-map export. |
| src/modules/app-core/workspace-controllers-setup.js | Threads token-availability dependency into workspace context restore setup. |
| src/modules/app-core/workspace-context-controller.js | Filters restore candidates to local workspaces when no PAT is available. |
| src/modules/app-core/github-pr-context-ui.js | Stops PAT visibility logic from hiding/disabling the Workspaces control. |
| src/index.html | Moves the Workspaces button into the always-visible top controls area. |
| src/app.js | Adds a shared hasCurrentGitHubToken helper and passes it into workspace setup. |
| playwright/rendering-modes/core.spec.ts | Expands CSS module preview assertions and tidies an existing null check. |
| playwright/github-byot-ai.spec.ts | Adds no-PAT Workspaces behavior coverage and PAT-connect preservation coverage. |
| playwright/diagnostics.spec.ts | Adds typecheck coverage for CSS module class-map imports. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 free
to 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.