attempt to fix irreproducable bug with board context loading - AI assisted

This commit is contained in:
marlon-erler
2026-04-13 11:05:39 +00:00
parent 1a8d40b184
commit 537592fae9
2 changed files with 9 additions and 7 deletions
+3 -2
View File
@@ -3491,15 +3491,16 @@
this.openLastUsedBoard(); this.openLastUsedBoard();
}; };
this.chatViewModel = chatViewModel; this.chatViewModel = chatViewModel;
this.chatViewModel.registerContext("tasks" /* Tasks */, this);
this.selectedBoardId.subscribeSilent(this.updateContexts);
this.loadData(); this.loadData();
boardsAndTasksModel.boardHandlerManager.addHandler( boardsAndTasksModel.boardHandlerManager.addHandler(
(boardInfoFileContent) => { (boardInfoFileContent) => {
this.showBoardInList(boardInfoFileContent); this.showBoardInList(boardInfoFileContent);
this.updateBoardIndices(); this.updateBoardIndices();
this.updateContexts();
} }
); );
this.chatViewModel.registerContext("tasks" /* Tasks */, this);
this.selectedBoardId.subscribeSilent(this.updateContexts);
this.registerKeyStroke("." /* Options */, this.toggleBoardList); this.registerKeyStroke("." /* Options */, this.toggleBoardList);
} }
// context // context
+6 -5
View File
@@ -45,7 +45,7 @@ export default class TaskPageViewModel extends ContextHost<string> {
); );
} }
get contextSelection(): string { get contextSelection(): string | undefined {
return this.selectedBoardId.value; return this.selectedBoardId.value;
} }
@@ -170,6 +170,10 @@ export default class TaskPageViewModel extends ContextHost<string> {
this.chatViewModel = chatViewModel; this.chatViewModel = chatViewModel;
// context
this.chatViewModel.registerContext(ChatPageTypes.Tasks, this);
this.selectedBoardId.subscribeSilent(this.updateContexts);
this.loadData(); this.loadData();
// handlers // handlers
@@ -177,13 +181,10 @@ export default class TaskPageViewModel extends ContextHost<string> {
(boardInfoFileContent: BoardInfoFileContent) => { (boardInfoFileContent: BoardInfoFileContent) => {
this.showBoardInList(boardInfoFileContent); this.showBoardInList(boardInfoFileContent);
this.updateBoardIndices(); this.updateBoardIndices();
this.updateContexts();
}, },
); );
// context
this.chatViewModel.registerContext(ChatPageTypes.Tasks, this);
this.selectedBoardId.subscribeSilent(this.updateContexts);
// keystrokes // keystrokes
this.registerKeyStroke(CommonKeys.Options, this.toggleBoardList); this.registerKeyStroke(CommonKeys.Options, this.toggleBoardList);
} }