Skip to content

Commit 1841ffb

Browse files
osortegaCopilot
andcommitted
Remove unrelated changes and PWA support from mobile PR
- Revert copilot package-lock.json to main (unrelated npm artifact) - Revert agentHost remoteAgentHostProtocolClient.ts (diffs field not mobile-related) - Revert agentHost sessionTransport.ts (protocol cleanup not mobile-related) - Remove theme-color meta element creation and dynamic updates (PWA) - Remove apple-touch-startup-image link injection (PWA) - Remove PWA & Viewport section from MOBILE.md - Keep viewport-fit=cover as it is needed for safe-area-inset CSS on mobile Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 95fd748 commit 1841ffb

5 files changed

Lines changed: 9 additions & 37 deletions

File tree

extensions/copilot/package-lock.json

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/vs/platform/agentHost/browser/remoteAgentHostProtocolClient.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ export class RemoteAgentHostProtocolClient extends Disposable implements IAgentC
270270
workingDirectory: typeof s.workingDirectory === 'string' ? toAgentHostUri(URI.parse(s.workingDirectory), this._connectionAuthority) : undefined,
271271
isRead: s.isRead,
272272
isDone: s.isDone,
273-
diffs: s.diffs,
274273
}));
275274
}
276275

src/vs/platform/agentHost/common/state/sessionTransport.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import { Event } from '../../../../base/common/event.js';
1414
import { IDisposable } from '../../../../base/common/lifecycle.js';
15-
import type { IProtocolMessage, IAhpServerNotification, IJsonRpcResponse, IJsonRpcRequest } from './sessionProtocol.js';
15+
import type { IProtocolMessage, IAhpServerNotification, IJsonRpcNotification, IJsonRpcResponse, IJsonRpcRequest } from './sessionProtocol.js';
1616

1717
/**
1818
* A bidirectional transport for protocol messages. Implementations handle
@@ -33,7 +33,7 @@ export interface IProtocolTransport extends IDisposable {
3333
* - `IAhpServerNotification` — server→client notifications.
3434
* - `IJsonRpcResponse` — dynamically-constructed success/error responses.
3535
*/
36-
send(message: IProtocolMessage | IAhpServerNotification | IJsonRpcResponse | IJsonRpcRequest): void;
36+
send(message: IProtocolMessage | IAhpServerNotification | IJsonRpcNotification | IJsonRpcResponse | IJsonRpcRequest): void;
3737
}
3838

3939
/**

src/vs/sessions/MOBILE.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,6 @@ The workbench toggles CSS classes (`phone-layout`, `mobile-layout`) on `layout()
141141
| `src/vs/sessions/browser/parts/media/sidebarPart.css` | Sidebar drawer overlay CSS: 85% width, z-index 250, slide-in animation, backdrop. |
142142
| `src/vs/sessions/browser/media/style.css` | Mobile overscroll containment, 44px touch targets, quick pick bottom sheets, context menu action sheets, dialog sizing, notification positioning, hover card suppression, editor modal full-screen. |
143143

144-
### PWA & Viewport
145-
146-
| File | Purpose |
147-
|------|---------|
148-
| `src/vs/code/browser/workbench/workbench.html` | `viewport-fit=cover` meta tag, `theme-color` meta tag. |
149-
| `resources/server/manifest.json` | PWA manifest: `background_color`, `theme_color`, `orientation`. |
150-
151144
## Remaining Work
152145

153146
- **Session title sync**: MobileTopBar shows hardcoded "New Session" — needs to subscribe to `sessionsManagementService.activeSession` and update title when session changes.

src/vs/sessions/browser/workbench.ts

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,6 @@ export class Workbench extends Disposable implements IAgentWorkbenchLayoutServic
209209
private _mainContainerDimension!: IDimension;
210210
get mainContainerDimension(): IDimension { return this._mainContainerDimension; }
211211

212-
private readonly _themeColorMeta: HTMLMetaElement;
213-
214212
get activeContainerDimension(): IDimension {
215213
return this.getContainerDimension(this.activeContainer);
216214
}
@@ -302,27 +300,14 @@ export class Workbench extends Disposable implements IAgentWorkbenchLayoutServic
302300
) {
303301
super();
304302

305-
// Cache the theme-color meta element for dynamic updates
306-
const themeColorMeta = mainWindow.document.createElement('meta');
307-
themeColorMeta.name = 'theme-color';
308-
themeColorMeta.content = '#1e1e1e';
309-
mainWindow.document.head.appendChild(themeColorMeta);
310-
this._themeColorMeta = themeColorMeta;
311-
312-
// Sessions-scoped mobile/PWA viewport tweaks. These are applied here
303+
// Sessions-scoped mobile viewport tweaks. These are applied here
313304
// (rather than in the shared workbench.html) so that the regular
314305
// code-web workbench — which does not handle safe-area insets — is
315306
// not affected on notched mobile devices.
316307
const viewportMeta = mainWindow.document.querySelector<HTMLMetaElement>('meta[name="viewport"]');
317308
if (viewportMeta && !viewportMeta.content.includes('viewport-fit=')) {
318309
viewportMeta.content = `${viewportMeta.content}, viewport-fit=cover`;
319310
}
320-
if (!mainWindow.document.querySelector('link[rel="apple-touch-startup-image"]')) {
321-
const startupImage = mainWindow.document.createElement('link');
322-
startupImage.rel = 'apple-touch-startup-image';
323-
startupImage.href = `${mainWindow.document.baseURI}favicon.ico`;
324-
mainWindow.document.head.appendChild(startupImage);
325-
}
326311

327312
// Perf: measure workbench startup time
328313
mark('code/willStartWorkbench');
@@ -1236,16 +1221,6 @@ export class Workbench extends Disposable implements IAgentWorkbenchLayoutServic
12361221

12371222
// Emit as event
12381223
this.handleContainerDidLayout(this.mainContainer, this._mainContainerDimension);
1239-
1240-
// Update mobile status bar theme color to match current theme
1241-
this.updateThemeColor();
1242-
}
1243-
1244-
private updateThemeColor(): void {
1245-
const bgColor = mainWindow.getComputedStyle(this.mainContainer).backgroundColor;
1246-
if (bgColor && bgColor !== 'rgba(0, 0, 0, 0)') {
1247-
this._themeColorMeta.content = bgColor;
1248-
}
12491224
}
12501225

12511226
private layoutMobileSidebar(): void {

0 commit comments

Comments
 (0)