kanban-lite 1.0.53 → 1.0.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -0
- package/dist/cli.js +99 -2
- package/dist/extension.js +79 -2
- package/dist/mcp-server.js +57 -0
- package/dist/sdk/index.cjs +40 -0
- package/dist/sdk/index.mjs +40 -0
- package/dist/sdk/sdk/KanbanSDK.d.ts +16 -0
- package/dist/sdk/sdk/modules/columns.d.ts +9 -0
- package/dist/sdk/shared/config.d.ts +2 -0
- package/dist/sdk/shared/types.d.ts +5 -0
- package/dist/standalone-webview/index.js +34 -34
- package/dist/standalone-webview/index.js.map +1 -1
- package/dist/standalone-webview/style.css +1 -1
- package/dist/standalone.js +71 -1
- package/package.json +1 -1
- package/src/cli/index.ts +11 -1
- package/src/extension/KanbanPanel.ts +7 -1
- package/src/mcp-server/index.ts +18 -0
- package/src/sdk/KanbanSDK.ts +22 -0
- package/src/sdk/modules/columns.ts +27 -0
- package/src/shared/config.ts +2 -0
- package/src/shared/types.ts +2 -1
- package/src/standalone/server.ts +32 -1
- package/src/webview/App.tsx +26 -5
- package/src/webview/components/DrawerResizeHandle.tsx +12 -4
- package/src/webview/components/KanbanBoard.tsx +7 -0
- package/src/webview/components/SettingsPanel.tsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
### Added
|
|
11
11
|
- **Active card lookup**: Added `getActiveCard(boardId?)` to the SDK plus matching REST API, CLI, and MCP support for retrieving the currently active/open card tracked by the UI.
|
|
12
|
+
- **Persisted minimized columns**: Minimized column state is now saved to `.kanban.json` per board (`minimizedColumnIds`), surviving extension reloads and panel restores. SDK exposes `getMinimizedColumns(boardId?)` and `setMinimizedColumns(columnIds, boardId?)`; REST `PUT /api/columns/minimized`; CLI `kl columns set-minimized <id...>`; MCP `set_minimized_columns` tool.
|
|
12
13
|
- **Configurable card panel layout**: Added the `panelMode` setting to switch card creation and detail flows between a right-side drawer and a centered popup.
|
|
13
14
|
- **Adjustable drawer width**: Added the `drawerWidth` setting (20–80%) so drawer mode can be tuned per workspace; board layout and card visibility calculations now respect the configured width.
|
|
14
15
|
- **Clickable label filters**: Clicking a label on a board card or in the card detail panel now applies that label as the active board filter.
|
package/dist/cli.js
CHANGED
|
@@ -7401,6 +7401,26 @@ function reorderColumns(ctx, columnIds, boardId) {
|
|
|
7401
7401
|
writeConfig(ctx.workspaceRoot, config3);
|
|
7402
7402
|
return board.columns;
|
|
7403
7403
|
}
|
|
7404
|
+
function getMinimizedColumns(ctx, boardId) {
|
|
7405
|
+
const config3 = readConfig(ctx.workspaceRoot);
|
|
7406
|
+
const resolvedId = boardId || config3.defaultBoard;
|
|
7407
|
+
const board = config3.boards[resolvedId];
|
|
7408
|
+
if (!board)
|
|
7409
|
+
throw new Error(`Board not found: ${resolvedId}`);
|
|
7410
|
+
return board.minimizedColumnIds ?? [];
|
|
7411
|
+
}
|
|
7412
|
+
function setMinimizedColumns(ctx, columnIds, boardId) {
|
|
7413
|
+
const config3 = readConfig(ctx.workspaceRoot);
|
|
7414
|
+
const resolvedId = boardId || config3.defaultBoard;
|
|
7415
|
+
const board = config3.boards[resolvedId];
|
|
7416
|
+
if (!board)
|
|
7417
|
+
throw new Error(`Board not found: ${resolvedId}`);
|
|
7418
|
+
const validIds = new Set(board.columns.map((c) => c.id));
|
|
7419
|
+
const sanitized = [...new Set(columnIds.filter((id) => validIds.has(id)))];
|
|
7420
|
+
board.minimizedColumnIds = sanitized.length > 0 ? sanitized : void 0;
|
|
7421
|
+
writeConfig(ctx.workspaceRoot, config3);
|
|
7422
|
+
return sanitized;
|
|
7423
|
+
}
|
|
7404
7424
|
var init_columns = __esm({
|
|
7405
7425
|
"src/sdk/modules/columns.ts"() {
|
|
7406
7426
|
"use strict";
|
|
@@ -8711,6 +8731,26 @@ var init_KanbanSDK = __esm({
|
|
|
8711
8731
|
reorderColumns(columnIds, boardId) {
|
|
8712
8732
|
return reorderColumns(this, columnIds, boardId);
|
|
8713
8733
|
}
|
|
8734
|
+
/**
|
|
8735
|
+
* Returns the minimized column IDs for a board.
|
|
8736
|
+
*
|
|
8737
|
+
* @param boardId - Board to query (uses default board if omitted).
|
|
8738
|
+
* @returns Array of column IDs currently marked as minimized.
|
|
8739
|
+
*/
|
|
8740
|
+
getMinimizedColumns(boardId) {
|
|
8741
|
+
return getMinimizedColumns(this, boardId);
|
|
8742
|
+
}
|
|
8743
|
+
/**
|
|
8744
|
+
* Sets the minimized column IDs for a board, persisting the state to the
|
|
8745
|
+
* workspace config file. Stale or invalid IDs are silently dropped.
|
|
8746
|
+
*
|
|
8747
|
+
* @param columnIds - Column IDs to mark as minimized.
|
|
8748
|
+
* @param boardId - Board to update (uses default board if omitted).
|
|
8749
|
+
* @returns The sanitized list of minimized column IDs that was saved.
|
|
8750
|
+
*/
|
|
8751
|
+
setMinimizedColumns(columnIds, boardId) {
|
|
8752
|
+
return setMinimizedColumns(this, columnIds, boardId);
|
|
8753
|
+
}
|
|
8714
8754
|
// --- Settings management (global) ---
|
|
8715
8755
|
/**
|
|
8716
8756
|
* Returns the global card display settings for the workspace.
|
|
@@ -48372,6 +48412,23 @@ async function main() {
|
|
|
48372
48412
|
};
|
|
48373
48413
|
}
|
|
48374
48414
|
);
|
|
48415
|
+
server.tool(
|
|
48416
|
+
"set_minimized_columns",
|
|
48417
|
+
"Persist the minimized column IDs for a board to the config file. Pass an empty array to clear all minimized columns.",
|
|
48418
|
+
{
|
|
48419
|
+
columnIds: external_exports4.array(external_exports4.string()).describe("Column IDs to mark as minimized. Pass [] to clear."),
|
|
48420
|
+
boardId: external_exports4.string().optional().describe("Board ID (uses default board if omitted)")
|
|
48421
|
+
},
|
|
48422
|
+
async ({ columnIds, boardId }) => {
|
|
48423
|
+
const minimized = sdk.setMinimizedColumns(columnIds, boardId);
|
|
48424
|
+
return {
|
|
48425
|
+
content: [{
|
|
48426
|
+
type: "text",
|
|
48427
|
+
text: JSON.stringify({ minimizedColumnIds: minimized }, null, 2)
|
|
48428
|
+
}]
|
|
48429
|
+
};
|
|
48430
|
+
}
|
|
48431
|
+
);
|
|
48375
48432
|
server.tool(
|
|
48376
48433
|
"cleanup_column",
|
|
48377
48434
|
"Move all cards in a column to the deleted (soft-delete) column. The column itself is kept.",
|
|
@@ -54236,7 +54293,8 @@ function startServer(kanbanDir, port, webviewDir) {
|
|
|
54236
54293
|
port: config3.port,
|
|
54237
54294
|
configVersion: config3.version
|
|
54238
54295
|
},
|
|
54239
|
-
labels: sdk.getLabels()
|
|
54296
|
+
labels: sdk.getLabels(),
|
|
54297
|
+
minimizedColumnIds: sdk.getMinimizedColumns(currentBoardId)
|
|
54240
54298
|
};
|
|
54241
54299
|
}
|
|
54242
54300
|
function broadcast(message) {
|
|
@@ -54611,6 +54669,21 @@ function startServer(kanbanDir, port, webviewDir) {
|
|
|
54611
54669
|
case "cleanupColumn":
|
|
54612
54670
|
await doCleanupColumn(msg.columnId);
|
|
54613
54671
|
break;
|
|
54672
|
+
case "reorderColumns": {
|
|
54673
|
+
const columnIds = msg.columnIds;
|
|
54674
|
+
const boardId = msg.boardId;
|
|
54675
|
+
if (Array.isArray(columnIds)) {
|
|
54676
|
+
sdk.reorderColumns(columnIds, boardId);
|
|
54677
|
+
broadcast(buildInitMessage());
|
|
54678
|
+
}
|
|
54679
|
+
break;
|
|
54680
|
+
}
|
|
54681
|
+
case "setMinimizedColumns": {
|
|
54682
|
+
const columnIds = msg.columnIds;
|
|
54683
|
+
const boardId = msg.boardId;
|
|
54684
|
+
sdk.setMinimizedColumns(Array.isArray(columnIds) ? columnIds : [], boardId);
|
|
54685
|
+
break;
|
|
54686
|
+
}
|
|
54614
54687
|
case "removeAttachment": {
|
|
54615
54688
|
const cardId = msg.cardId;
|
|
54616
54689
|
const card = await doRemoveAttachment(cardId, msg.attachment);
|
|
@@ -55591,6 +55664,20 @@ function startServer(kanbanDir, port, webviewDir) {
|
|
|
55591
55664
|
return jsonError(res, 500, String(err));
|
|
55592
55665
|
}
|
|
55593
55666
|
}
|
|
55667
|
+
params = route("PUT", "/api/columns/minimized");
|
|
55668
|
+
if (params) {
|
|
55669
|
+
try {
|
|
55670
|
+
const boardId = url3.searchParams.get("boardId") ?? void 0;
|
|
55671
|
+
const body = await readBody(req);
|
|
55672
|
+
const { columnIds } = body;
|
|
55673
|
+
if (!Array.isArray(columnIds))
|
|
55674
|
+
return jsonError(res, 400, "columnIds must be an array");
|
|
55675
|
+
const minimized = sdk.setMinimizedColumns(columnIds, boardId);
|
|
55676
|
+
return jsonOk(res, { minimizedColumnIds: minimized });
|
|
55677
|
+
} catch (err) {
|
|
55678
|
+
return jsonError(res, 500, String(err));
|
|
55679
|
+
}
|
|
55680
|
+
}
|
|
55594
55681
|
params = route("PUT", "/api/columns/:id");
|
|
55595
55682
|
if (params) {
|
|
55596
55683
|
try {
|
|
@@ -57542,9 +57629,19 @@ async function cmdColumns(sdk, positional, flags) {
|
|
|
57542
57629
|
console.log(green("Columns reordered."));
|
|
57543
57630
|
break;
|
|
57544
57631
|
}
|
|
57632
|
+
case "set-minimized": {
|
|
57633
|
+
const columnIds = positional.slice(1);
|
|
57634
|
+
sdk.setMinimizedColumns(columnIds, boardId);
|
|
57635
|
+
if (columnIds.length === 0) {
|
|
57636
|
+
console.log(green("Cleared all minimized columns."));
|
|
57637
|
+
} else {
|
|
57638
|
+
console.log(green(`Minimized columns set: ${columnIds.join(", ")}`));
|
|
57639
|
+
}
|
|
57640
|
+
break;
|
|
57641
|
+
}
|
|
57545
57642
|
default:
|
|
57546
57643
|
console.error(red(`Unknown columns subcommand: ${subcommand}`));
|
|
57547
|
-
console.error("Available: list, add, update, remove, cleanup, reorder");
|
|
57644
|
+
console.error("Available: list, add, update, remove, cleanup, reorder, set-minimized");
|
|
57548
57645
|
process.exit(1);
|
|
57549
57646
|
}
|
|
57550
57647
|
}
|
package/dist/extension.js
CHANGED
|
@@ -11064,6 +11064,26 @@ function reorderColumns(ctx, columnIds, boardId) {
|
|
|
11064
11064
|
writeConfig(ctx.workspaceRoot, config);
|
|
11065
11065
|
return board.columns;
|
|
11066
11066
|
}
|
|
11067
|
+
function getMinimizedColumns(ctx, boardId) {
|
|
11068
|
+
const config = readConfig(ctx.workspaceRoot);
|
|
11069
|
+
const resolvedId = boardId || config.defaultBoard;
|
|
11070
|
+
const board = config.boards[resolvedId];
|
|
11071
|
+
if (!board)
|
|
11072
|
+
throw new Error(`Board not found: ${resolvedId}`);
|
|
11073
|
+
return board.minimizedColumnIds ?? [];
|
|
11074
|
+
}
|
|
11075
|
+
function setMinimizedColumns(ctx, columnIds, boardId) {
|
|
11076
|
+
const config = readConfig(ctx.workspaceRoot);
|
|
11077
|
+
const resolvedId = boardId || config.defaultBoard;
|
|
11078
|
+
const board = config.boards[resolvedId];
|
|
11079
|
+
if (!board)
|
|
11080
|
+
throw new Error(`Board not found: ${resolvedId}`);
|
|
11081
|
+
const validIds = new Set(board.columns.map((c) => c.id));
|
|
11082
|
+
const sanitized = [...new Set(columnIds.filter((id) => validIds.has(id)))];
|
|
11083
|
+
board.minimizedColumnIds = sanitized.length > 0 ? sanitized : void 0;
|
|
11084
|
+
writeConfig(ctx.workspaceRoot, config);
|
|
11085
|
+
return sanitized;
|
|
11086
|
+
}
|
|
11067
11087
|
|
|
11068
11088
|
// src/sdk/modules/settings.ts
|
|
11069
11089
|
init_config();
|
|
@@ -12337,6 +12357,26 @@ var KanbanSDK = class {
|
|
|
12337
12357
|
reorderColumns(columnIds, boardId) {
|
|
12338
12358
|
return reorderColumns(this, columnIds, boardId);
|
|
12339
12359
|
}
|
|
12360
|
+
/**
|
|
12361
|
+
* Returns the minimized column IDs for a board.
|
|
12362
|
+
*
|
|
12363
|
+
* @param boardId - Board to query (uses default board if omitted).
|
|
12364
|
+
* @returns Array of column IDs currently marked as minimized.
|
|
12365
|
+
*/
|
|
12366
|
+
getMinimizedColumns(boardId) {
|
|
12367
|
+
return getMinimizedColumns(this, boardId);
|
|
12368
|
+
}
|
|
12369
|
+
/**
|
|
12370
|
+
* Sets the minimized column IDs for a board, persisting the state to the
|
|
12371
|
+
* workspace config file. Stale or invalid IDs are silently dropped.
|
|
12372
|
+
*
|
|
12373
|
+
* @param columnIds - Column IDs to mark as minimized.
|
|
12374
|
+
* @param boardId - Board to update (uses default board if omitted).
|
|
12375
|
+
* @returns The sanitized list of minimized column IDs that was saved.
|
|
12376
|
+
*/
|
|
12377
|
+
setMinimizedColumns(columnIds, boardId) {
|
|
12378
|
+
return setMinimizedColumns(this, columnIds, boardId);
|
|
12379
|
+
}
|
|
12340
12380
|
// --- Settings management (global) ---
|
|
12341
12381
|
/**
|
|
12342
12382
|
* Returns the global card display settings for the workspace.
|
|
@@ -14342,7 +14382,8 @@ function startServer(kanbanDir, port, webviewDir) {
|
|
|
14342
14382
|
port: config.port,
|
|
14343
14383
|
configVersion: config.version
|
|
14344
14384
|
},
|
|
14345
|
-
labels: sdk.getLabels()
|
|
14385
|
+
labels: sdk.getLabels(),
|
|
14386
|
+
minimizedColumnIds: sdk.getMinimizedColumns(currentBoardId)
|
|
14346
14387
|
};
|
|
14347
14388
|
}
|
|
14348
14389
|
function broadcast(message) {
|
|
@@ -14717,6 +14758,21 @@ function startServer(kanbanDir, port, webviewDir) {
|
|
|
14717
14758
|
case "cleanupColumn":
|
|
14718
14759
|
await doCleanupColumn(msg.columnId);
|
|
14719
14760
|
break;
|
|
14761
|
+
case "reorderColumns": {
|
|
14762
|
+
const columnIds = msg.columnIds;
|
|
14763
|
+
const boardId = msg.boardId;
|
|
14764
|
+
if (Array.isArray(columnIds)) {
|
|
14765
|
+
sdk.reorderColumns(columnIds, boardId);
|
|
14766
|
+
broadcast(buildInitMessage());
|
|
14767
|
+
}
|
|
14768
|
+
break;
|
|
14769
|
+
}
|
|
14770
|
+
case "setMinimizedColumns": {
|
|
14771
|
+
const columnIds = msg.columnIds;
|
|
14772
|
+
const boardId = msg.boardId;
|
|
14773
|
+
sdk.setMinimizedColumns(Array.isArray(columnIds) ? columnIds : [], boardId);
|
|
14774
|
+
break;
|
|
14775
|
+
}
|
|
14720
14776
|
case "removeAttachment": {
|
|
14721
14777
|
const cardId = msg.cardId;
|
|
14722
14778
|
const card = await doRemoveAttachment(cardId, msg.attachment);
|
|
@@ -15697,6 +15753,20 @@ function startServer(kanbanDir, port, webviewDir) {
|
|
|
15697
15753
|
return jsonError(res, 500, String(err));
|
|
15698
15754
|
}
|
|
15699
15755
|
}
|
|
15756
|
+
params = route("PUT", "/api/columns/minimized");
|
|
15757
|
+
if (params) {
|
|
15758
|
+
try {
|
|
15759
|
+
const boardId = url.searchParams.get("boardId") ?? void 0;
|
|
15760
|
+
const body = await readBody(req);
|
|
15761
|
+
const { columnIds } = body;
|
|
15762
|
+
if (!Array.isArray(columnIds))
|
|
15763
|
+
return jsonError(res, 400, "columnIds must be an array");
|
|
15764
|
+
const minimized = sdk.setMinimizedColumns(columnIds, boardId);
|
|
15765
|
+
return jsonOk(res, { minimizedColumnIds: minimized });
|
|
15766
|
+
} catch (err) {
|
|
15767
|
+
return jsonError(res, 500, String(err));
|
|
15768
|
+
}
|
|
15769
|
+
}
|
|
15700
15770
|
params = route("PUT", "/api/columns/:id");
|
|
15701
15771
|
if (params) {
|
|
15702
15772
|
try {
|
|
@@ -16256,6 +16326,12 @@ var KanbanPanel = class _KanbanPanel {
|
|
|
16256
16326
|
this._sendCardsToWebview();
|
|
16257
16327
|
break;
|
|
16258
16328
|
}
|
|
16329
|
+
case "setMinimizedColumns": {
|
|
16330
|
+
if (!this._sdk)
|
|
16331
|
+
break;
|
|
16332
|
+
this._sdk.setMinimizedColumns(message.columnIds, message.boardId);
|
|
16333
|
+
break;
|
|
16334
|
+
}
|
|
16259
16335
|
case "cleanupColumn":
|
|
16260
16336
|
await this._cleanupColumn(message.columnId);
|
|
16261
16337
|
break;
|
|
@@ -17105,7 +17181,8 @@ var KanbanPanel = class _KanbanPanel {
|
|
|
17105
17181
|
settings,
|
|
17106
17182
|
boards,
|
|
17107
17183
|
currentBoard,
|
|
17108
|
-
labels: sdk ? sdk.getLabels() : {}
|
|
17184
|
+
labels: sdk ? sdk.getLabels() : {},
|
|
17185
|
+
minimizedColumnIds: sdk ? sdk.getMinimizedColumns(this._currentBoardId) : []
|
|
17109
17186
|
});
|
|
17110
17187
|
}
|
|
17111
17188
|
_addColumn(column) {
|
package/dist/mcp-server.js
CHANGED
|
@@ -7350,6 +7350,26 @@ function reorderColumns(ctx, columnIds, boardId) {
|
|
|
7350
7350
|
writeConfig(ctx.workspaceRoot, config);
|
|
7351
7351
|
return board.columns;
|
|
7352
7352
|
}
|
|
7353
|
+
function getMinimizedColumns(ctx, boardId) {
|
|
7354
|
+
const config = readConfig(ctx.workspaceRoot);
|
|
7355
|
+
const resolvedId = boardId || config.defaultBoard;
|
|
7356
|
+
const board = config.boards[resolvedId];
|
|
7357
|
+
if (!board)
|
|
7358
|
+
throw new Error(`Board not found: ${resolvedId}`);
|
|
7359
|
+
return board.minimizedColumnIds ?? [];
|
|
7360
|
+
}
|
|
7361
|
+
function setMinimizedColumns(ctx, columnIds, boardId) {
|
|
7362
|
+
const config = readConfig(ctx.workspaceRoot);
|
|
7363
|
+
const resolvedId = boardId || config.defaultBoard;
|
|
7364
|
+
const board = config.boards[resolvedId];
|
|
7365
|
+
if (!board)
|
|
7366
|
+
throw new Error(`Board not found: ${resolvedId}`);
|
|
7367
|
+
const validIds = new Set(board.columns.map((c) => c.id));
|
|
7368
|
+
const sanitized = [...new Set(columnIds.filter((id) => validIds.has(id)))];
|
|
7369
|
+
board.minimizedColumnIds = sanitized.length > 0 ? sanitized : void 0;
|
|
7370
|
+
writeConfig(ctx.workspaceRoot, config);
|
|
7371
|
+
return sanitized;
|
|
7372
|
+
}
|
|
7353
7373
|
|
|
7354
7374
|
// src/sdk/modules/settings.ts
|
|
7355
7375
|
init_config();
|
|
@@ -8623,6 +8643,26 @@ var KanbanSDK = class {
|
|
|
8623
8643
|
reorderColumns(columnIds, boardId) {
|
|
8624
8644
|
return reorderColumns(this, columnIds, boardId);
|
|
8625
8645
|
}
|
|
8646
|
+
/**
|
|
8647
|
+
* Returns the minimized column IDs for a board.
|
|
8648
|
+
*
|
|
8649
|
+
* @param boardId - Board to query (uses default board if omitted).
|
|
8650
|
+
* @returns Array of column IDs currently marked as minimized.
|
|
8651
|
+
*/
|
|
8652
|
+
getMinimizedColumns(boardId) {
|
|
8653
|
+
return getMinimizedColumns(this, boardId);
|
|
8654
|
+
}
|
|
8655
|
+
/**
|
|
8656
|
+
* Sets the minimized column IDs for a board, persisting the state to the
|
|
8657
|
+
* workspace config file. Stale or invalid IDs are silently dropped.
|
|
8658
|
+
*
|
|
8659
|
+
* @param columnIds - Column IDs to mark as minimized.
|
|
8660
|
+
* @param boardId - Board to update (uses default board if omitted).
|
|
8661
|
+
* @returns The sanitized list of minimized column IDs that was saved.
|
|
8662
|
+
*/
|
|
8663
|
+
setMinimizedColumns(columnIds, boardId) {
|
|
8664
|
+
return setMinimizedColumns(this, columnIds, boardId);
|
|
8665
|
+
}
|
|
8626
8666
|
// --- Settings management (global) ---
|
|
8627
8667
|
/**
|
|
8628
8668
|
* Returns the global card display settings for the workspace.
|
|
@@ -9790,6 +9830,23 @@ async function main() {
|
|
|
9790
9830
|
};
|
|
9791
9831
|
}
|
|
9792
9832
|
);
|
|
9833
|
+
server.tool(
|
|
9834
|
+
"set_minimized_columns",
|
|
9835
|
+
"Persist the minimized column IDs for a board to the config file. Pass an empty array to clear all minimized columns.",
|
|
9836
|
+
{
|
|
9837
|
+
columnIds: import_zod.z.array(import_zod.z.string()).describe("Column IDs to mark as minimized. Pass [] to clear."),
|
|
9838
|
+
boardId: import_zod.z.string().optional().describe("Board ID (uses default board if omitted)")
|
|
9839
|
+
},
|
|
9840
|
+
async ({ columnIds, boardId }) => {
|
|
9841
|
+
const minimized = sdk.setMinimizedColumns(columnIds, boardId);
|
|
9842
|
+
return {
|
|
9843
|
+
content: [{
|
|
9844
|
+
type: "text",
|
|
9845
|
+
text: JSON.stringify({ minimizedColumnIds: minimized }, null, 2)
|
|
9846
|
+
}]
|
|
9847
|
+
};
|
|
9848
|
+
}
|
|
9849
|
+
);
|
|
9793
9850
|
server.tool(
|
|
9794
9851
|
"cleanup_column",
|
|
9795
9852
|
"Move all cards in a column to the deleted (soft-delete) column. The column itself is kept.",
|
package/dist/sdk/index.cjs
CHANGED
|
@@ -6547,6 +6547,26 @@ function reorderColumns(ctx, columnIds, boardId) {
|
|
|
6547
6547
|
writeConfig(ctx.workspaceRoot, config);
|
|
6548
6548
|
return board.columns;
|
|
6549
6549
|
}
|
|
6550
|
+
function getMinimizedColumns(ctx, boardId) {
|
|
6551
|
+
const config = readConfig(ctx.workspaceRoot);
|
|
6552
|
+
const resolvedId = boardId || config.defaultBoard;
|
|
6553
|
+
const board = config.boards[resolvedId];
|
|
6554
|
+
if (!board)
|
|
6555
|
+
throw new Error(`Board not found: ${resolvedId}`);
|
|
6556
|
+
return board.minimizedColumnIds ?? [];
|
|
6557
|
+
}
|
|
6558
|
+
function setMinimizedColumns(ctx, columnIds, boardId) {
|
|
6559
|
+
const config = readConfig(ctx.workspaceRoot);
|
|
6560
|
+
const resolvedId = boardId || config.defaultBoard;
|
|
6561
|
+
const board = config.boards[resolvedId];
|
|
6562
|
+
if (!board)
|
|
6563
|
+
throw new Error(`Board not found: ${resolvedId}`);
|
|
6564
|
+
const validIds = new Set(board.columns.map((c) => c.id));
|
|
6565
|
+
const sanitized = [...new Set(columnIds.filter((id) => validIds.has(id)))];
|
|
6566
|
+
board.minimizedColumnIds = sanitized.length > 0 ? sanitized : void 0;
|
|
6567
|
+
writeConfig(ctx.workspaceRoot, config);
|
|
6568
|
+
return sanitized;
|
|
6569
|
+
}
|
|
6550
6570
|
|
|
6551
6571
|
// src/sdk/modules/settings.ts
|
|
6552
6572
|
init_config();
|
|
@@ -7820,6 +7840,26 @@ var KanbanSDK = class {
|
|
|
7820
7840
|
reorderColumns(columnIds, boardId) {
|
|
7821
7841
|
return reorderColumns(this, columnIds, boardId);
|
|
7822
7842
|
}
|
|
7843
|
+
/**
|
|
7844
|
+
* Returns the minimized column IDs for a board.
|
|
7845
|
+
*
|
|
7846
|
+
* @param boardId - Board to query (uses default board if omitted).
|
|
7847
|
+
* @returns Array of column IDs currently marked as minimized.
|
|
7848
|
+
*/
|
|
7849
|
+
getMinimizedColumns(boardId) {
|
|
7850
|
+
return getMinimizedColumns(this, boardId);
|
|
7851
|
+
}
|
|
7852
|
+
/**
|
|
7853
|
+
* Sets the minimized column IDs for a board, persisting the state to the
|
|
7854
|
+
* workspace config file. Stale or invalid IDs are silently dropped.
|
|
7855
|
+
*
|
|
7856
|
+
* @param columnIds - Column IDs to mark as minimized.
|
|
7857
|
+
* @param boardId - Board to update (uses default board if omitted).
|
|
7858
|
+
* @returns The sanitized list of minimized column IDs that was saved.
|
|
7859
|
+
*/
|
|
7860
|
+
setMinimizedColumns(columnIds, boardId) {
|
|
7861
|
+
return setMinimizedColumns(this, columnIds, boardId);
|
|
7862
|
+
}
|
|
7823
7863
|
// --- Settings management (global) ---
|
|
7824
7864
|
/**
|
|
7825
7865
|
* Returns the global card display settings for the workspace.
|
package/dist/sdk/index.mjs
CHANGED
|
@@ -6503,6 +6503,26 @@ function reorderColumns(ctx, columnIds, boardId) {
|
|
|
6503
6503
|
writeConfig(ctx.workspaceRoot, config);
|
|
6504
6504
|
return board.columns;
|
|
6505
6505
|
}
|
|
6506
|
+
function getMinimizedColumns(ctx, boardId) {
|
|
6507
|
+
const config = readConfig(ctx.workspaceRoot);
|
|
6508
|
+
const resolvedId = boardId || config.defaultBoard;
|
|
6509
|
+
const board = config.boards[resolvedId];
|
|
6510
|
+
if (!board)
|
|
6511
|
+
throw new Error(`Board not found: ${resolvedId}`);
|
|
6512
|
+
return board.minimizedColumnIds ?? [];
|
|
6513
|
+
}
|
|
6514
|
+
function setMinimizedColumns(ctx, columnIds, boardId) {
|
|
6515
|
+
const config = readConfig(ctx.workspaceRoot);
|
|
6516
|
+
const resolvedId = boardId || config.defaultBoard;
|
|
6517
|
+
const board = config.boards[resolvedId];
|
|
6518
|
+
if (!board)
|
|
6519
|
+
throw new Error(`Board not found: ${resolvedId}`);
|
|
6520
|
+
const validIds = new Set(board.columns.map((c) => c.id));
|
|
6521
|
+
const sanitized = [...new Set(columnIds.filter((id) => validIds.has(id)))];
|
|
6522
|
+
board.minimizedColumnIds = sanitized.length > 0 ? sanitized : void 0;
|
|
6523
|
+
writeConfig(ctx.workspaceRoot, config);
|
|
6524
|
+
return sanitized;
|
|
6525
|
+
}
|
|
6506
6526
|
|
|
6507
6527
|
// src/sdk/modules/settings.ts
|
|
6508
6528
|
init_config();
|
|
@@ -7776,6 +7796,26 @@ var KanbanSDK = class {
|
|
|
7776
7796
|
reorderColumns(columnIds, boardId) {
|
|
7777
7797
|
return reorderColumns(this, columnIds, boardId);
|
|
7778
7798
|
}
|
|
7799
|
+
/**
|
|
7800
|
+
* Returns the minimized column IDs for a board.
|
|
7801
|
+
*
|
|
7802
|
+
* @param boardId - Board to query (uses default board if omitted).
|
|
7803
|
+
* @returns Array of column IDs currently marked as minimized.
|
|
7804
|
+
*/
|
|
7805
|
+
getMinimizedColumns(boardId) {
|
|
7806
|
+
return getMinimizedColumns(this, boardId);
|
|
7807
|
+
}
|
|
7808
|
+
/**
|
|
7809
|
+
* Sets the minimized column IDs for a board, persisting the state to the
|
|
7810
|
+
* workspace config file. Stale or invalid IDs are silently dropped.
|
|
7811
|
+
*
|
|
7812
|
+
* @param columnIds - Column IDs to mark as minimized.
|
|
7813
|
+
* @param boardId - Board to update (uses default board if omitted).
|
|
7814
|
+
* @returns The sanitized list of minimized column IDs that was saved.
|
|
7815
|
+
*/
|
|
7816
|
+
setMinimizedColumns(columnIds, boardId) {
|
|
7817
|
+
return setMinimizedColumns(this, columnIds, boardId);
|
|
7818
|
+
}
|
|
7779
7819
|
// --- Settings management (global) ---
|
|
7780
7820
|
/**
|
|
7781
7821
|
* Returns the global card display settings for the workspace.
|
|
@@ -1119,6 +1119,22 @@ export declare class KanbanSDK {
|
|
|
1119
1119
|
* ```
|
|
1120
1120
|
*/
|
|
1121
1121
|
reorderColumns(columnIds: string[], boardId?: string): KanbanColumn[];
|
|
1122
|
+
/**
|
|
1123
|
+
* Returns the minimized column IDs for a board.
|
|
1124
|
+
*
|
|
1125
|
+
* @param boardId - Board to query (uses default board if omitted).
|
|
1126
|
+
* @returns Array of column IDs currently marked as minimized.
|
|
1127
|
+
*/
|
|
1128
|
+
getMinimizedColumns(boardId?: string): string[];
|
|
1129
|
+
/**
|
|
1130
|
+
* Sets the minimized column IDs for a board, persisting the state to the
|
|
1131
|
+
* workspace config file. Stale or invalid IDs are silently dropped.
|
|
1132
|
+
*
|
|
1133
|
+
* @param columnIds - Column IDs to mark as minimized.
|
|
1134
|
+
* @param boardId - Board to update (uses default board if omitted).
|
|
1135
|
+
* @returns The sanitized list of minimized column IDs that was saved.
|
|
1136
|
+
*/
|
|
1137
|
+
setMinimizedColumns(columnIds: string[], boardId?: string): string[];
|
|
1122
1138
|
/**
|
|
1123
1139
|
* Returns the global card display settings for the workspace.
|
|
1124
1140
|
*
|
|
@@ -28,3 +28,12 @@ export declare function purgeDeletedCards(ctx: SDKContext, boardId?: string): Pr
|
|
|
28
28
|
* Reorders the columns of a board.
|
|
29
29
|
*/
|
|
30
30
|
export declare function reorderColumns(ctx: SDKContext, columnIds: string[], boardId?: string): KanbanColumn[];
|
|
31
|
+
/**
|
|
32
|
+
* Returns the minimized column IDs for a board.
|
|
33
|
+
*/
|
|
34
|
+
export declare function getMinimizedColumns(ctx: SDKContext, boardId?: string): string[];
|
|
35
|
+
/**
|
|
36
|
+
* Sets the minimized column IDs for a board, persisting the state to config.
|
|
37
|
+
* Only IDs that correspond to existing columns are retained.
|
|
38
|
+
*/
|
|
39
|
+
export declare function setMinimizedColumns(ctx: SDKContext, columnIds: string[], boardId?: string): string[];
|
|
@@ -45,6 +45,8 @@ export interface BoardConfig {
|
|
|
45
45
|
actions?: Record<string, string>;
|
|
46
46
|
/** Metadata keys that are always shown in the card detail panel (before the Advanced section). */
|
|
47
47
|
metadata?: string[];
|
|
48
|
+
/** Column IDs currently minimized (shown as a narrow rail) on this board. */
|
|
49
|
+
minimizedColumnIds?: string[];
|
|
48
50
|
}
|
|
49
51
|
/**
|
|
50
52
|
* Root configuration object for the kanban workspace (v2 format).
|
|
@@ -328,6 +328,7 @@ export type ExtensionMessage = {
|
|
|
328
328
|
currentBoard?: string;
|
|
329
329
|
workspace?: WorkspaceInfo;
|
|
330
330
|
labels?: Record<string, LabelDefinition>;
|
|
331
|
+
minimizedColumnIds?: string[];
|
|
331
332
|
} | ConnectionStatusMessage | {
|
|
332
333
|
type: 'cardsUpdated';
|
|
333
334
|
cards: Card[];
|
|
@@ -438,6 +439,10 @@ export type WebviewMessage = {
|
|
|
438
439
|
type: 'reorderColumns';
|
|
439
440
|
columnIds: string[];
|
|
440
441
|
boardId?: string;
|
|
442
|
+
} | {
|
|
443
|
+
type: 'setMinimizedColumns';
|
|
444
|
+
columnIds: string[];
|
|
445
|
+
boardId?: string;
|
|
441
446
|
} | {
|
|
442
447
|
type: 'addComment';
|
|
443
448
|
cardId: string;
|