fix(sqllab,extensions): populate Tab.backendId and guard northPane storage

Wire the backend-assigned tabViewId through to the public Tab.backendId
field so extensions can correlate tabs with tabstateview rows, and wrap
the northPane localStorage access in try/catch so a storage-restricted
browser can't crash the editor mount.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Evan
2026-06-22 11:03:21 -07:00
parent 7af82a9041
commit d817a3be77
3 changed files with 53 additions and 13 deletions

View File

@@ -34,6 +34,8 @@ export class Panel implements sqlLabType.Panel {
export class Tab implements sqlLabType.Tab {
id: string;
backendId?: string;
title: string;
databaseId: number;
@@ -54,6 +56,7 @@ export class Tab implements sqlLabType.Tab {
schema: string | null = null,
editorGetter: () => Promise<sqlLabType.Editor>,
panels: Panel[] = [],
backendId?: string,
) {
this.id = id;
this.title = title;
@@ -62,6 +65,7 @@ export class Tab implements sqlLabType.Tab {
this.schema = schema;
this.editorGetter = editorGetter;
this.panels = panels;
this.backendId = backendId;
}
getEditor(): Promise<sqlLabType.Editor> {