Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
Revert "chore(sql-editor): allow to pin/unpin tabs (#10072)" (#10074)
boojackc00bb623ef13
diff --git a/backend/api/v1/sheet_service.go b/backend/api/v1/sheet_service.goindex 021f604281..c02fc830e0 100644--- a/backend/api/v1/sheet_service.go+++ b/backend/api/v1/sheet_service.go@@ -250,18 +250,6 @@ func (s *SheetService) SearchSheets(ctx context.Context, request *v1pb.SearchShedefault:return nil, status.Errorf(codes.InvalidArgument, fmt.Sprintf("invalid value %q for starred", spec.value))}- case "pinned":- if spec.operator != comparatorTypeEqual {- return nil, status.Errorf(codes.InvalidArgument, fmt.Sprintf("invalid operator %q for pinned", spec.operator))- }- switch spec.value {- case "true":- sheetFind.OrganizerPrincipalIDPinned = &principalID- case "false":- sheetFind.OrganizerPrincipalIDNotPinned = &principalID- default:- return nil, status.Errorf(codes.InvalidArgument, fmt.Sprintf("invalid value %q for pinned", spec.value))- }case "source":switch spec.operator {case comparatorTypeEqual:@@ -676,7 +664,6 @@ func (s *SheetService) convertToAPISheetMessage(ctx context.Context, sheet *storSource: source,Type: tp,Starred: sheet.Starred,- Pinned: sheet.Pinned,PushEvent: v1PushEvent,Payload: v1SheetPayload,}, nildiff --git a/backend/store/sheet.go b/backend/store/sheet.goindex d7037be57c..2185007d8a 100644--- a/backend/store/sheet.go+++ b/backend/store/sheet.go@@ -105,10 +105,9 @@ type FindSheetMessage struct {Type *SheetTypePayloadType *string// Used to find (un)starred/pinned sheet list, could be PRIVATE/PROJECT/PUBLIC sheet.+ // For now, we only need the starred sheets.OrganizerPrincipalIDStarred *intOrganizerPrincipalIDNotStarred *int- OrganizerPrincipalIDPinned *int- OrganizerPrincipalIDNotPinned *int// Used to find a sheet list from projects containing PrincipalID as an active member.// When finding a shared PROJECT/PUBLIC sheets, this value should be present.PrincipalID *int@@ -213,12 +212,6 @@ func (s *Store) ListSheets(ctx context.Context, find *FindSheetMessage, currentPif v := find.OrganizerPrincipalIDNotStarred; v != nil {where, args = append(where, fmt.Sprintf("sheet.id IN (SELECT sheet_id FROM sheet_organizer WHERE principal_id = $%d AND starred = false)", len(args)+1)), append(args, *v)}- if v := find.OrganizerPrincipalIDPinned; v != nil {- where, args = append(where, fmt.Sprintf("sheet.id IN (SELECT sheet_id FROM sheet_organizer WHERE principal_id = $%d AND pinned = true)", len(args)+1)), append(args, *v)- }- if v := find.OrganizerPrincipalIDNotPinned; v != nil {- where, args = append(where, fmt.Sprintf("sheet.id IN (SELECT sheet_id FROM sheet_organizer WHERE principal_id = $%d AND pinned = false)", len(args)+1)), append(args, *v)- }if v := find.Source; v != nil {where, args = append(where, fmt.Sprintf("sheet.source = $%d", len(args)+1)), append(args, *v)diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex e93034dde2..a7106ae46c 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -279,9 +279,7 @@"view-details": "View details","force-verb": "Force {verb}","nothing-changed": "Nothing changed",- "untitled": "Untitled",- "pin": "Pin",- "unpin": "Unpin"+ "untitled": "Untitled"},"error-page": {"go-back-home": "Go back home"diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex f679d52fce..f9bbe2ce09 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -279,9 +279,7 @@"view-details": "Ver detalles","force-verb": "forzar {verbo}","nothing-changed": "nada ha cambiado",- "untitled": "Intitulado",- "pin": "Fijar",- "unpin": "Desanclar"+ "untitled": "Intitulado"},"error-page": {"go-back-home": "Volver al inicio"diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex 7e5207b38d..20bbb29f42 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -277,9 +277,7 @@"view-details": "查看详情","force-verb": "强制{verb}","nothing-changed": "没有改变",- "untitled": "未命名",- "pin": "置顶",- "unpin": "取消置顶"+ "untitled": "未命名"},"error-page": {"go-back-home": "回到主页"diff --git a/frontend/src/store/modules/tab.ts b/frontend/src/store/modules/tab.tsindex dc16ec1ec2..8f86085e4d 100644--- a/frontend/src/store/modules/tab.ts+++ b/frontend/src/store/modules/tab.ts@@ -11,7 +11,6 @@ import {WebStorageHelper,isDisconnectedTab,} from "@/utils";-import { createTabFromSheet } from "@/views/sql-editor/Sheet";import { useWebTerminalV1Store } from "./v1";import { useSheetV1Store } from "./v1/sheet";@@ -34,7 +33,6 @@ const PERSISTENT_TAB_FIELDS = ["sheetName","mode","batchQueryContext",- "pinned",] as const;type PersistentTabInfo = Pick<TabInfo, typeof PERSISTENT_TAB_FIELDS[number]>;@@ -141,12 +139,6 @@ export const useTabStore = defineStore("tab", () => {addTab(newTab);}};- const reorderTabs = () => {- const sortedTabs = Array.from(tabs.value.values()).sort((a, b) => {- return a.pinned === b.pinned ? 0 : a.pinned ? -1 : 1;- });- tabIdList.value = sortedTabs.map((tab) => tab.id);- };const _cleanup = (tabIdList: string[]) => {const prefix = `${LOCAL_STORAGE_KEY_PREFIX}.tab.`;const keys = storage.keys().filter((key) => key.startsWith(prefix));@@ -183,30 +175,13 @@ export const useTabStore = defineStore("tab", () => {// Load session from local storage.// Reset if failed.- const init = async () => {- const sheetV1Store = useSheetV1Store();+ const init = () => {// Load tabIdList and currentTabIdtabIdList.value = storage.load(KEYS.tabIdList, []);currentTabId.value = storage.load(KEYS.currentTabId, INITIAL_TAB.id);-if (tabIdList.value.length === 0) {- const pinnedSheets = await sheetV1Store.fetchPinnedSheetList(- true /* silent */- );- if (pinnedSheets.length > 0) {- for (const sheet of pinnedSheets) {- const newTab = await createTabFromSheet(sheet);- if (!newTab) {- continue;- }- tabs.value.set(newTab.id, newTab);- watchTab(newTab, true);- }- tabIdList.value = Array.from(tabs.value.keys());- } else {- // tabIdList is empty accidentally.- tabIdList.value = [INITIAL_TAB.id];- }+ // tabIdList is empty accidentally+ tabIdList.value = [INITIAL_TAB.id];}if (tabIdList.value.indexOf(currentTabId.value) < 0) {// currentTabId is not in tabIdList accidentally@@ -236,6 +211,7 @@ export const useTabStore = defineStore("tab", () => {});// Fetch opening sheets if needed+ const sheetV1Store = useSheetV1Store();tabList.value.forEach((tab) => {if (tab.sheetName) {sheetV1Store.getOrFetchSheetByName(tab.sheetName);@@ -282,7 +258,6 @@ export const useTabStore = defineStore("tab", () => {setCurrentTabId,selectOrAddTempTab,selectOrAddSimilarTab,- reorderTabs,reset,};});@@ -310,12 +285,8 @@ const maybeMigrateLegacyTab = (};export const isTabClosable = (tab: TabInfo) => {- // Pinned tabs are not closable by default. User needs to unpin it first.- if (tab.pinned) {- return false;- }-const { tabList } = useTabStore();+if (tabList.length > 1) {// Not the only one tabreturn true;diff --git a/frontend/src/store/modules/v1/sheet.ts b/frontend/src/store/modules/v1/sheet.tsindex 070b6c4b3f..d8ec94cb8c 100644--- a/frontend/src/store/modules/v1/sheet.ts+++ b/frontend/src/store/modules/v1/sheet.ts@@ -190,20 +190,6 @@ export const useSheetV1Store = defineStore("sheet_v1", () => {setSheetList(sheets);return sheets;};- const fetchPinnedSheetList = async (silent = false) => {- const me = useCurrentUserV1();- const { sheets } = await sheetServiceClient.searchSheets(- {- parent: "projects/-",- filter: `creator = users/${me.value.email} && pinned = true && source != BYTEBASE_ARTIFACT`,- },- {- silent,- }- );- setSheetList(sheets);- return sheets;- };const fetchStarredSheetList = async () => {const { sheets } = await sheetServiceClient.searchSheets({parent: "projects/-",@@ -240,20 +226,19 @@ export const useSheetV1Store = defineStore("sheet_v1", () => {};const upsertSheetOrganizer = async (- organizer: Partial<SheetOrganizer>,- updateMask: string[]+ organizer: Pick<SheetOrganizer, "sheet" | "starred">) => {- if (!organizer.sheet) {- return;- }-await sheetServiceClient.updateSheetOrganizer({organizer,- updateMask,+ // for now we only support change the `starred` field.+ updateMask: ["starred"],});- // Fetch the latest sheet by name.- await fetchSheetByName(organizer.sheet);+ // Update local sheet values+ const sheet = getSheetByName(organizer.sheet);+ if (sheet) {+ sheet.starred = organizer.starred;+ }};return {@@ -270,7 +255,6 @@ export const useSheetV1Store = defineStore("sheet_v1", () => {fetchMySheetList,fetchSharedSheetList,fetchStarredSheetList,- fetchPinnedSheetList,patchSheet,deleteSheetByName,upsertSheetOrganizer,diff --git a/frontend/src/types/proto/v1/sheet_service.ts b/frontend/src/types/proto/v1/sheet_service.tsindex c322ae7f62..50c64f7d2b 100644--- a/frontend/src/types/proto/v1/sheet_service.ts+++ b/frontend/src/types/proto/v1/sheet_service.ts@@ -176,8 +176,6 @@ export interface Sheet {type: Sheet_Type;/** starred indicates whether the sheet is starred by the current authenticated user. */starred: boolean;- /** pinned indicates whether the sheet is pinned by the current authenticated user. */- pinned: boolean;payload: SheetPayload | undefined;pushEvent: PushEvent | undefined;}@@ -984,7 +982,6 @@ function createBaseSheet(): Sheet {source: 0,type: 0,starred: false,- pinned: false,payload: undefined,pushEvent: undefined,};@@ -1028,14 +1025,11 @@ export const Sheet = {if (message.starred === true) {writer.uint32(96).bool(message.starred);}- if (message.pinned === true) {- writer.uint32(104).bool(message.pinned);- }if (message.payload !== undefined) {- SheetPayload.encode(message.payload, writer.uint32(114).fork()).ldelim();+ SheetPayload.encode(message.payload, writer.uint32(106).fork()).ldelim();}if (message.pushEvent !== undefined) {- PushEvent.encode(message.pushEvent, writer.uint32(122).fork()).ldelim();+ PushEvent.encode(message.pushEvent, writer.uint32(114).fork()).ldelim();}return writer;},@@ -1132,24 +1126,17 @@ export const Sheet = {message.starred = reader.bool();continue;case 13:- if (tag !== 104) {+ if (tag !== 106) {break;}- message.pinned = reader.bool();+ message.payload = SheetPayload.decode(reader, reader.uint32());continue;case 14:if (tag !== 114) {break;}- message.payload = SheetPayload.decode(reader, reader.uint32());- continue;- case 15:- if (tag !== 122) {- break;- }-message.pushEvent = PushEvent.decode(reader, reader.uint32());continue;}@@ -1175,7 +1162,6 @@ export const Sheet = {source: isSet(object.source) ? sheet_SourceFromJSON(object.source) : 0,type: isSet(object.type) ? sheet_TypeFromJSON(object.type) : 0,starred: isSet(object.starred) ? globalThis.Boolean(object.starred) : false,- pinned: isSet(object.pinned) ? globalThis.Boolean(object.pinned) : false,payload: isSet(object.payload) ? SheetPayload.fromJSON(object.payload) : undefined,pushEvent: isSet(object.pushEvent) ? PushEvent.fromJSON(object.pushEvent) : undefined,};@@ -1219,9 +1205,6 @@ export const Sheet = {if (message.starred === true) {obj.starred = message.starred;}- if (message.pinned === true) {- obj.pinned = message.pinned;- }if (message.payload !== undefined) {obj.payload = SheetPayload.toJSON(message.payload);}@@ -1250,7 +1233,6 @@ export const Sheet = {message.source = object.source ?? 0;message.type = object.type ?? 0;message.starred = object.starred ?? false;- message.pinned = object.pinned ?? false;message.payload = (object.payload !== undefined && object.payload !== null)? SheetPayload.fromPartial(object.payload): undefined;diff --git a/frontend/src/types/tab.ts b/frontend/src/types/tab.tsindex 48c987b257..d316cfa753 100644--- a/frontend/src/types/tab.ts+++ b/frontend/src/types/tab.ts@@ -47,13 +47,12 @@ export interface TabInfo {selectedStatement: string;mode: TabMode;editMode: EditMode;- isExecutingSQL: boolean;- pinned?: boolean;executeParams?: {query: string;config: ExecuteConfig;option?: Partial<ExecuteOption>;};+ isExecutingSQL: boolean;sheetName?: string;isFreshNew?: boolean;// batchQueryContext saves the context of batch query, including the selected labels.diff --git a/frontend/src/views/sql-editor/Sheet/SheetTable/Dropdown.vue b/frontend/src/views/sql-editor/Sheet/SheetTable/Dropdown.vueindex 2a1b0c3cfd..fda7415fa3 100644--- a/frontend/src/views/sql-editor/Sheet/SheetTable/Dropdown.vue+++ b/frontend/src/views/sql-editor/Sheet/SheetTable/Dropdown.vue@@ -94,13 +94,10 @@ const handleAction = async (key: string) => {showIcon: true,});} else if (key === "star" || key === "unstar") {- await sheetV1Store.upsertSheetOrganizer(- {- sheet: sheet.name,- starred: key === "star",- },- ["starred"]- );+ await sheetV1Store.upsertSheetOrganizer({+ sheet: sheet.name,+ starred: key === "star",+ });emit("refresh");} else if (key === "duplicate") {const dialogInstance = dialog.create({diff --git a/frontend/src/views/sql-editor/Sheet/common/Dropdown.vue b/frontend/src/views/sql-editor/Sheet/common/Dropdown.vueindex 48174358d4..6bba2f9d84 100644--- a/frontend/src/views/sql-editor/Sheet/common/Dropdown.vue+++ b/frontend/src/views/sql-editor/Sheet/common/Dropdown.vue@@ -108,13 +108,10 @@ const handleAction = async (key: string) => {showIcon: true,});} else if (key === "star" || key === "unstar") {- await sheetV1Store.upsertSheetOrganizer(- {- sheet: sheet.name,- starred: key === "star",- },- ["starred"]- );+ await sheetV1Store.upsertSheetOrganizer({+ sheet: sheet.name,+ starred: key === "star",+ });events.emit("refresh", { views: ["starred"] });} else if (key === "duplicate") {const dialogInstance = dialog.create({diff --git a/frontend/src/views/sql-editor/Sheet/context.ts b/frontend/src/views/sql-editor/Sheet/context.tsindex 39dcabef9e..8fff6874a5 100644--- a/frontend/src/views/sql-editor/Sheet/context.ts+++ b/frontend/src/views/sql-editor/Sheet/context.ts@@ -7,11 +7,10 @@ import {useSheetV1Store,useTabStore,} from "@/store";-import { TabInfo } from "@/types";+import { AnyTabInfo, UNKNOWN_ID } from "@/types";import { Sheet } from "@/types/proto/v1/sheet_service";import {emptyConnection,- getDefaultTab,getSheetStatement,getSuggestedTabNameFromConnection,isSheetReadableV1,@@ -109,7 +108,12 @@ export const provideSheetContext = () => {return context;};-export const createTabFromSheet = async (sheet: Sheet) => {+export const openSheet = async (sheet: Sheet, forceNewTab = false) => {+ const tabStore = useTabStore();+ const openingSheetTab = tabStore.tabList.find(+ (tab) => tab.sheetName == sheet.name+ );+if (!isSheetReadableV1(sheet)) {pushNotification({module: "bytebase",@@ -118,50 +122,50 @@ export const createTabFromSheet = async (sheet: Sheet) => {});return false;}-- const newTab: TabInfo = {- ...getDefaultTab(),+ const statement = getSheetStatement(sheet);+ const newTab: AnyTabInfo = {sheetName: sheet.name,name: sheet.title,- statement: getSheetStatement(sheet),- pinned: sheet.pinned,+ statement,};+ if (openingSheetTab) {+ // Switch to a sheet tab if it's open already.+ tabStore.setCurrentTabId(openingSheetTab.id);+ return true;+ } else if (forceNewTab) {+ tabStore.addTab(newTab, true /* beside */);+ } else {+ // Open the sheet in a "temp" tab otherwise.+ tabStore.addTab(newTab);+ }++ let insId = String(UNKNOWN_ID);+ let dbId = String(UNKNOWN_ID);if (sheet.database) {try {const database = await useDatabaseV1Store().getOrFetchDatabaseByName(sheet.database,true /* silent */);- newTab.connection = {- ...emptyConnection(),- instanceId: database.instanceEntity.uid,- databaseId: database.uid,- };+ insId = database.instanceEntity.uid;+ dbId = database.uid;} catch {// Skip.}}- return newTab;-};--export const openSheet = async (sheet: Sheet, forceNewTab = false) => {- const tabStore = useTabStore();- const openingSheetTab = tabStore.tabList.find(- (tab) => tab.sheetName == sheet.name- );-- if (openingSheetTab) {- // Switch to a sheet tab if it's open already.- tabStore.setCurrentTabId(openingSheetTab.id);- return true;- } else {- const newTab = await createTabFromSheet(sheet);- if (!newTab) {- return false;- }- tabStore.addTab(newTab, forceNewTab);- }+ tabStore.updateCurrentTab({+ sheetName: sheet.name,+ name: sheet.title,+ statement,+ isSaved: true,+ connection: {+ ...emptyConnection(),+ // TODO: legacy instance id.+ instanceId: insId,+ databaseId: dbId,+ },+ });return true;};diff --git a/frontend/src/views/sql-editor/TabList/ContextMenu.vue b/frontend/src/views/sql-editor/TabList/ContextMenu.vueindex 5eb742b2a0..1228844b9c 100644--- a/frontend/src/views/sql-editor/TabList/ContextMenu.vue+++ b/frontend/src/views/sql-editor/TabList/ContextMenu.vue@@ -17,12 +17,10 @@import { NDropdown, DropdownOption } from "naive-ui";import { computed, nextTick } from "vue";import { useI18n } from "vue-i18n";-import { useTabStore } from "@/store";import { TabInfo, TabMode } from "@/types";import { CloseTabAction, useTabListContext } from "./context";const { t } = useI18n();-const tabStore = useTabStore();const { contextMenu: state, events } = useTabListContext();const options = computed((): DropdownOption[] => {@@ -30,53 +28,50 @@ const options = computed((): DropdownOption[] => {return [];}+ const CLOSE: DropdownOption = {+ key: "CLOSE",+ label: t("sql-editor.tab.context-menu.actions.close"),+ };+ const CLOSE_OTHERS: DropdownOption = {+ key: "CLOSE_OTHERS",+ label: t("sql-editor.tab.context-menu.actions.close-others"),+ };+ const CLOSE_TO_THE_RIGHT: DropdownOption = {+ key: "CLOSE_TO_THE_RIGHT",+ label: t("sql-editor.tab.context-menu.actions.close-to-the-right"),+ };+ const CLOSE_SAVED: DropdownOption = {+ key: "CLOSE_SAVED",+ label: t("sql-editor.tab.context-menu.actions.close-saved"),+ };+ const CLOSE_ALL: DropdownOption = {+ key: "CLOSE_ALL",+ label: t("sql-editor.tab.context-menu.actions.close-all"),+ };++ const options = [+ CLOSE,+ CLOSE_OTHERS,+ CLOSE_TO_THE_RIGHT,+ CLOSE_SAVED,+ CLOSE_ALL,+ ];+const { tab } = state.value;- const options: (DropdownOption & { hide?: boolean })[] = [- {- key: "PIN",- label: t("common.pin"),- hide: tab.pinned,- },- {- key: "UNPIN",- label: t("common.unpin"),- hide: !tab.pinned,- },- {- key: "CLOSE",- label: t("sql-editor.tab.context-menu.actions.close"),- hide: tab.pinned,- },- {- key: "CLOSE_OTHERS",- label: t("sql-editor.tab.context-menu.actions.close-others"),- },- {- key: "CLOSE_TO_THE_RIGHT",- label: t("sql-editor.tab.context-menu.actions.close-to-the-right"),- },- {- key: "CLOSE_SAVED",- label: t("sql-editor.tab.context-menu.actions.close-saved"),- },- {- key: "CLOSE_ALL",- label: t("sql-editor.tab.context-menu.actions.close-all"),- hide: tab.pinned,- },- {+ if (tab.mode === TabMode.ReadOnly) {+ const DIVIDER: DropdownOption = {type: "divider",key: "DIVIDER",- hide: tab.mode !== TabMode.ReadOnly,- },- {+ };+ const RENAME: DropdownOption = {key: "RENAME",label: t("sql-editor.tab.context-menu.actions.rename"),- hide: tab.mode !== TabMode.ReadOnly,- },- ];+ };++ options.push(DIVIDER, RENAME);+ }- return options.filter((option) => !option.hide);+ return options;});const show = (tab: TabInfo, index: number, e: MouseEvent) => {@@ -104,17 +99,13 @@ const handleUpdateShow = (show: boolean) => {}};-const handleSelect = (action: CloseTabAction | "RENAME" | "PIN" | "UNPIN") => {+const handleSelect = (action: CloseTabAction | "RENAME") => {if (!state.value) return;const { tab, index } = state.value;if (action === "RENAME") {events.emit("rename-tab", { tab, index });- } else if (action.startsWith("CLOSE")) {- action = action as CloseTabAction;+ } else {events.emit("close-tab", { tab, index, action });- } else if (action === "PIN" || action === "UNPIN") {- tabStore.updateTab(tab.id, { pinned: action === "PIN" });- tabStore.reorderTabs();}};diff --git a/frontend/src/views/sql-editor/TabList/TabItem/Suffix.vue b/frontend/src/views/sql-editor/TabList/TabItem/Suffix.vueindex db7f5f5bc9..3c4ee780ca 100644--- a/frontend/src/views/sql-editor/TabList/TabItem/Suffix.vue+++ b/frontend/src/views/sql-editor/TabList/TabItem/Suffix.vue@@ -12,8 +12,7 @@@mouseenter="state.hovering = true"@mouseleave="state.hovering = false">- <PinIcon v-if="icon === 'pinned'" class="w-4 h-auto" />- <carbon:dot-mark v-else-if="icon === 'unsaved'" class="icon unsaved" />+ <carbon:dot-mark v-if="icon === 'unsaved'" class="icon unsaved" /><heroicons-solid:xv-else-if="icon === 'close'"class="icon close"@@ -24,7 +23,6 @@</template><script lang="ts" setup>-import { PinIcon } from "lucide-vue-next";import { computed, PropType, reactive } from "vue";import { isTabClosable } from "@/store";import type { TabInfo } from "@/types";@@ -35,7 +33,7 @@ type LocalState = {hovering: boolean;};-type IconType = "pinned" | "unsaved" | "close";+type IconType = "unsaved" | "close";const props = defineProps({tab: {@@ -61,9 +59,6 @@ const closable = computed(() => {});const icon = computed((): IconType | undefined => {- if (props.tab.pinned) {- return "pinned";- }if (state.hovering && closable.value) {return "close";}diff --git a/frontend/src/views/sql-editor/TabList/TabItem/TabItem.vue b/frontend/src/views/sql-editor/TabList/TabItem/TabItem.vueindex a6abb23bca..d93d7912d4 100644--- a/frontend/src/views/sql-editor/TabList/TabItem/TabItem.vue+++ b/frontend/src/views/sql-editor/TabList/TabItem/TabItem.vue@@ -28,9 +28,8 @@<script lang="ts" setup>import { storeToRefs } from "pinia";-import { computed, PropType, reactive, watch } from "vue";-import { useSheetV1Store, useTabStore } from "@/store";-import { getProjectAndSheetId } from "@/store/modules/v1/common";+import { computed, PropType, reactive } from "vue";+import { useTabStore } from "@/store";import type { TabInfo } from "@/types";import { TabMode } from "@/types";import { isDisconnectedTab, sheetTypeForTab } from "@/utils";@@ -64,32 +63,9 @@ const state = reactive<LocalState>({});const tabStore = useTabStore();-const sheetStore = useSheetV1Store();const { currentTabId } = storeToRefs(tabStore);const isCurrentTab = computed(() => props.tab.id === currentTabId.value);--watch(- () => props.tab.pinned,- async (pinned) => {- if (!props.tab.sheetName) {- return;- }-- // Update sheet pinned state after tab pinned state is changed.- const [_, sheetId] = getProjectAndSheetId(props.tab.sheetName);- if (!sheetId) {- return;- }- await sheetStore.upsertSheetOrganizer(- {- sheet: props.tab.sheetName,- pinned,- },- ["pinned"]- );- }-);</script><style scoped lang="postcss">diff --git a/frontend/src/views/sql-editor/TabList/TabList.vue b/frontend/src/views/sql-editor/TabList/TabList.vueindex f9838e5916..6403f91b2e 100644--- a/frontend/src/views/sql-editor/TabList/TabList.vue+++ b/frontend/src/views/sql-editor/TabList/TabList.vue@@ -16,7 +16,7 @@}"ghost-class="ghost"@start="state.dragging = true"- @end="handleTagDragEnd"+ @end="state.dragging = false"@scroll="recalculateScrollState"><template@@ -60,7 +60,7 @@ import { useI18n } from "vue-i18n";import Draggable from "vuedraggable";import ProfileDropdown from "@/components/ProfileDropdown.vue";import { useEmitteryEventListener } from "@/composables/useEmitteryEventListener";-import { useTabStore, useActuatorV1Store, isTabClosable } from "@/store";+import { useTabStore, useActuatorV1Store } from "@/store";import type { TabInfo } from "@/types";import { TabMode } from "@/types";import {@@ -214,20 +214,6 @@ const recalculateScrollState = () => {}};-const handleTagDragEnd = (event: any) => {- const draggingTab = tabStore.getTabById(event.clone.dataset.tabId);- if (draggingTab) {- // If the tab is pinned, unpin it after drop.- if (draggingTab.pinned) {- tabStore.updateTab(draggingTab.id, {- pinned: false,- });- }- }-- state.dragging = false;-};-watch(() => tabStore.currentTabId,(id) => {@@ -256,10 +242,6 @@ useEmitteryEventListener(const tabList = tabStore.tabList;const remove = async (tab: TabInfo, index: number) => {- if (!isTabClosable(tab)) {- return;- }-await handleRemoveTab(tab, index, true);await new Promise((r) => requestAnimationFrame(r));};diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 36a9506161..fa848bc263 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -9440,7 +9440,6 @@ When paginating, all other parameters provided to `SearchSheets` must match the| source | [Sheet.Source](#bytebase-v1-Sheet-Source) | | The source of the sheet. || type | [Sheet.Type](#bytebase-v1-Sheet-Type) | | The type of the sheet. || starred | [bool](#bool) | | starred indicates whether the sheet is starred by the current authenticated user. |-| pinned | [bool](#bool) | | pinned indicates whether the sheet is pinned by the current authenticated user. || payload | [SheetPayload](#bytebase-v1-SheetPayload) | | || push_event | [PushEvent](#bytebase-v1-PushEvent) | | |diff --git a/proto/generated-go/v1/sheet_service.pb.go b/proto/generated-go/v1/sheet_service.pb.goindex 13523d0504..73fbadb0da 100644--- a/proto/generated-go/v1/sheet_service.pb.go+++ b/proto/generated-go/v1/sheet_service.pb.go@@ -765,11 +765,9 @@ type Sheet struct {// The type of the sheet.Type Sheet_Type `protobuf:"varint,11,opt,name=type,proto3,enum=bytebase.v1.Sheet_Type" json:"type,omitempty"`// starred indicates whether the sheet is starred by the current authenticated user.- Starred bool `protobuf:"varint,12,opt,name=starred,proto3" json:"starred,omitempty"`- // pinned indicates whether the sheet is pinned by the current authenticated user.- Pinned bool `protobuf:"varint,13,opt,name=pinned,proto3" json:"pinned,omitempty"`- Payload *SheetPayload `protobuf:"bytes,14,opt,name=payload,proto3" json:"payload,omitempty"`- PushEvent *PushEvent `protobuf:"bytes,15,opt,name=push_event,json=pushEvent,proto3" json:"push_event,omitempty"`+ Starred bool `protobuf:"varint,12,opt,name=starred,proto3" json:"starred,omitempty"`+ Payload *SheetPayload `protobuf:"bytes,13,opt,name=payload,proto3" json:"payload,omitempty"`+ PushEvent *PushEvent `protobuf:"bytes,14,opt,name=push_event,json=pushEvent,proto3" json:"push_event,omitempty"`}func (x *Sheet) Reset() {@@ -888,13 +886,6 @@ func (x *Sheet) GetStarred() bool {return false}-func (x *Sheet) GetPinned() bool {- if x != nil {- return x.Pinned- }- return false-}-func (x *Sheet) GetPayload() *SheetPayload {if x != nil {return x.Payload@@ -1045,7 +1036,7 @@ var file_v1_sheet_service_proto_rawDesc = []byte{0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x52, 0x06, 0x73, 0x68, 0x65, 0x65, 0x74,0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74,0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74,- 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x8c, 0x07, 0x0a, 0x05, 0x53, 0x68,+ 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xef, 0x06, 0x0a, 0x05, 0x53, 0x68,0x65, 0x65, 0x74, 0x12, 0x1a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,0x09, 0x42, 0x06, 0xe0, 0x41, 0x02, 0xe0, 0x41, 0x05, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,@@ -1078,103 +1069,101 @@ var file_v1_sheet_service_proto_rawDesc = []byte{0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x2e, 0x54,0x79, 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1d,0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x42,- 0x03, 0xe0, 0x41, 0x03, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x12, 0x1b, 0x0a,- 0x06, 0x70, 0x69, 0x6e, 0x6e, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0,- 0x41, 0x03, 0x52, 0x06, 0x70, 0x69, 0x6e, 0x6e, 0x65, 0x64, 0x12, 0x33, 0x0a, 0x07, 0x70, 0x61,- 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x50,- 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12,- 0x35, 0x0a, 0x0a, 0x70, 0x75, 0x73, 0x68, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x0f, 0x20,- 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,- 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x09, 0x70, 0x75, 0x73,- 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x6f, 0x0a, 0x0a, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69,- 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49,- 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00,- 0x12, 0x15, 0x0a, 0x11, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50,- 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x56, 0x49, 0x53, 0x49, 0x42,- 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54, 0x10, 0x02, 0x12,- 0x16, 0x0a, 0x12, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52,- 0x49, 0x56, 0x41, 0x54, 0x45, 0x10, 0x03, 0x22, 0x53, 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63,- 0x65, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50,- 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x4f, 0x55,- 0x52, 0x43, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x42, 0x41, 0x53, 0x45, 0x10, 0x01, 0x12, 0x1c,- 0x0a, 0x18, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x42, 0x41, 0x53,- 0x45, 0x5f, 0x41, 0x52, 0x54, 0x49, 0x46, 0x41, 0x43, 0x54, 0x10, 0x02, 0x22, 0x2a, 0x0a, 0x04,- 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53,- 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x59,- 0x50, 0x45, 0x5f, 0x53, 0x51, 0x4c, 0x10, 0x01, 0x22, 0x90, 0x02, 0x0a, 0x0c, 0x53, 0x68, 0x65,- 0x65, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x32, 0x0a, 0x04, 0x74, 0x79, 0x70,- 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f,- 0x61, 0x64, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x44, 0x0a,- 0x0f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,- 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e,- 0x66, 0x69, 0x67, 0x52, 0x0e, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e,- 0x66, 0x69, 0x67, 0x12, 0x55, 0x0a, 0x18, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x5f,- 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18,- 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,- 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66,- 0x69, 0x67, 0x52, 0x16, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x61, 0x74, 0x61,- 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x2f, 0x0a, 0x04, 0x54, 0x79,- 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45,- 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x43, 0x48, 0x45,- 0x4d, 0x41, 0x5f, 0x44, 0x45, 0x53, 0x49, 0x47, 0x4e, 0x10, 0x01, 0x32, 0xc8, 0x06, 0x0a, 0x0c,- 0x53, 0x68, 0x65, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x80, 0x01, 0x0a,- 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x12, 0x1f, 0x2e, 0x62,- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,- 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e,- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65,- 0x74, 0x22, 0x3c, 0xda, 0x41, 0x0c, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x73, 0x68, 0x65,- 0x65, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x3a, 0x05, 0x73, 0x68, 0x65, 0x65, 0x74, 0x22,- 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f,- 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x12,- 0x6b, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x53, 0x68, 0x65, 0x65, 0x74, 0x12, 0x1c, 0x2e, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x68, 0x65,- 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x62, 0x79, 0x74, 0x65,- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x22, 0x2d, 0xda,- 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x76,- 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73,- 0x2f, 0x2a, 0x2f, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x82, 0x01, 0x0a,- 0x0c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x68, 0x65, 0x65, 0x74, 0x73, 0x12, 0x20, 0x2e,- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72,- 0x63, 0x68, 0x53, 0x68, 0x65, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,- 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65,- 0x61, 0x72, 0x63, 0x68, 0x53, 0x68, 0x65, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,- 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f, 0x76, 0x31, 0x2f,- 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73,- 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63,- 0x68, 0x12, 0x8b, 0x01, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x65, 0x65,- 0x74, 0x12, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,- 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,- 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,- 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x22, 0x47, 0xda, 0x41, 0x11, 0x73, 0x68, 0x65, 0x65, 0x74,- 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93,- 0x02, 0x2d, 0x3a, 0x05, 0x73, 0x68, 0x65, 0x65, 0x74, 0x32, 0x24, 0x2f, 0x76, 0x31, 0x2f, 0x7b,- 0x73, 0x68, 0x65, 0x65, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65,+ 0x03, 0xe0, 0x41, 0x03, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x72, 0x65, 0x64, 0x12, 0x33, 0x0a,+ 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65,+ 0x65, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f,+ 0x61, 0x64, 0x12, 0x35, 0x0a, 0x0a, 0x70, 0x75, 0x73, 0x68, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74,+ 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x09,+ 0x70, 0x75, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x6f, 0x0a, 0x0a, 0x56, 0x69, 0x73,+ 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x49, 0x53, 0x49, 0x42,+ 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45,+ 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54,+ 0x59, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x56, 0x49,+ 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x4a, 0x45, 0x43, 0x54,+ 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59,+ 0x5f, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x10, 0x03, 0x22, 0x53, 0x0a, 0x06, 0x53, 0x6f,+ 0x75, 0x72, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55,+ 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f,+ 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x42, 0x41, 0x53, 0x45, 0x10,+ 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45,+ 0x42, 0x41, 0x53, 0x45, 0x5f, 0x41, 0x52, 0x54, 0x49, 0x46, 0x41, 0x43, 0x54, 0x10, 0x02, 0x22,+ 0x2a, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f,+ 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a,+ 0x08, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x51, 0x4c, 0x10, 0x01, 0x22, 0x90, 0x02, 0x0a, 0x0c,+ 0x53, 0x68, 0x65, 0x65, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x32, 0x0a, 0x04,+ 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x62, 0x79, 0x74,+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x50, 0x61,+ 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,+ 0x12, 0x44, 0x0a, 0x0f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e,+ 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65,+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,+ 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,+ 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x55, 0x0a, 0x18, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69,+ 0x6e, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66,+ 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43,+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x16, 0x62, 0x61, 0x73, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x44,+ 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x2f, 0x0a,+ 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e,+ 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x53,+ 0x43, 0x48, 0x45, 0x4d, 0x41, 0x5f, 0x44, 0x45, 0x53, 0x49, 0x47, 0x4e, 0x10, 0x01, 0x32, 0xc8,+ 0x06, 0x0a, 0x0c, 0x53, 0x68, 0x65, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,+ 0x80, 0x01, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x12,+ 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72,+ 0x65, 0x61, 0x74, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,+ 0x1a, 0x12, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53,+ 0x68, 0x65, 0x65, 0x74, 0x22, 0x3c, 0xda, 0x41, 0x0c, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c,+ 0x73, 0x68, 0x65, 0x65, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x3a, 0x05, 0x73, 0x68, 0x65,+ 0x65, 0x74, 0x22, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d,+ 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x68, 0x65, 0x65,+ 0x74, 0x73, 0x12, 0x6b, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x53, 0x68, 0x65, 0x65, 0x74, 0x12, 0x1c,+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74,+ 0x53, 0x68, 0x65, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x62,+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74,+ 0x22, 0x2d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12,+ 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65,0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x12,- 0xbd, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x4f,- 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x28, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x65,- 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65,- 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,- 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x22,- 0x5e, 0xda, 0x41, 0x15, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x2c, 0x75, 0x70,- 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x40, 0x3a,- 0x09, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x1a, 0x33, 0x2f, 0x76, 0x31, 0x2f,- 0x7b, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x73, 0x68, 0x65, 0x65, 0x74,- 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x68, 0x65, 0x65,- 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x12,- 0x75, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x12, 0x1f,- 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c,- 0x65, 0x74, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,- 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,- 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2d, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65,- 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x2a, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d,- 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x68, 0x65,- 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,- 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,- 0x33,+ 0x82, 0x01, 0x0a, 0x0c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x68, 0x65, 0x65, 0x74, 0x73,+ 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53,+ 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x68, 0x65, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,+ 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,+ 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x68, 0x65, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73,+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x12, 0x25, 0x2f,+ 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65,+ 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x3a, 0x73, 0x65,+ 0x61, 0x72, 0x63, 0x68, 0x12, 0x8b, 0x01, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53,+ 0x68, 0x65, 0x65, 0x74, 0x12, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,+ 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x52, 0x65,+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,+ 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x22, 0x47, 0xda, 0x41, 0x11, 0x73, 0x68,+ 0x65, 0x65, 0x74, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82,+ 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x3a, 0x05, 0x73, 0x68, 0x65, 0x65, 0x74, 0x32, 0x24, 0x2f, 0x76,+ 0x31, 0x2f, 0x7b, 0x73, 0x68, 0x65, 0x65, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72,+ 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x2f,+ 0x2a, 0x7d, 0x12, 0xbd, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x68, 0x65,+ 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x28, 0x2e, 0x62, 0x79,+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,+ 0x53, 0x68, 0x65, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x52, 0x65,+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,+ 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x68, 0x65, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,+ 0x65, 0x72, 0x22, 0x5e, 0xda, 0x41, 0x15, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72,+ 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93,+ 0x02, 0x40, 0x3a, 0x09, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x1a, 0x33, 0x2f,+ 0x76, 0x31, 0x2f, 0x7b, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x73, 0x68,+ 0x65, 0x65, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x73,+ 0x68, 0x65, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,+ 0x65, 0x72, 0x12, 0x75, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x68, 0x65, 0x65,+ 0x74, 0x12, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,+ 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x68, 0x65, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,+ 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2d, 0xda, 0x41, 0x04, 0x6e,+ 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x2a, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x7b,+ 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f,+ 0x73, 0x68, 0x65, 0x65, 0x74, 0x73, 0x2f, 0x2a, 0x7d, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e,+ 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72,+ 0x6f, 0x74, 0x6f, 0x33,}var (diff --git a/proto/v1/sheet_service.proto b/proto/v1/sheet_service.protoindex 050be79a69..d894f709ab 100644--- a/proto/v1/sheet_service.proto+++ b/proto/v1/sheet_service.proto@@ -223,12 +223,9 @@ message Sheet {// starred indicates whether the sheet is starred by the current authenticated user.bool starred = 12 [(google.api.field_behavior) = OUTPUT_ONLY];- // pinned indicates whether the sheet is pinned by the current authenticated user.- bool pinned = 13 [(google.api.field_behavior) = OUTPUT_ONLY];+ SheetPayload payload = 13;- SheetPayload payload = 14;-- PushEvent push_event = 15;+ PushEvent push_event = 14;}message SheetPayload {