@unson/brainbase-mcp 0.17.0 → 0.17.1
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/package.json +2 -2
- package/ui/graph-projects-view.js +22 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unson/brainbase-mcp",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.1",
|
|
4
4
|
"description": "Local-first Brainbase judgment OS that lets supported AI agents reuse a user's approved goals, priorities, decisions, and judgment criteria.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -359,5 +359,5 @@
|
|
|
359
359
|
"engines": {
|
|
360
360
|
"node": ">=20"
|
|
361
361
|
},
|
|
362
|
-
"gitHead": "
|
|
362
|
+
"gitHead": "e7f165e9a2dd0ebbcb0a561160f927afbad95b95"
|
|
363
363
|
}
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
* Built on the organization edition's screen pattern (workspace kit): the
|
|
6
6
|
* workspace has the page head, the source notice, summary metrics and the
|
|
7
7
|
* project ledger; the right rail has the selected project — its outline, each
|
|
8
|
-
* 関係者 and the corrections. The first project is selected on load
|
|
8
|
+
* 関係者 and the corrections. The first project is selected on load when the
|
|
9
|
+
* host has not provided a selection.
|
|
9
10
|
*
|
|
10
11
|
* Reads `GET {base}/projects` and `GET {base}/projects/:id` and corrects
|
|
11
12
|
* through `POST {base}/corrections` (see `graph-view-shared.js`). 「関係者」
|
|
@@ -209,8 +210,9 @@ function normalizeProjectSummary(value) {
|
|
|
209
210
|
* history). Called synchronously on every rail render while a project is selected, with the read
|
|
210
211
|
* project detail, or null while it loads or when it could not be read. A throw or a value that is
|
|
211
212
|
* not a node is shown as a small danger notice instead of breaking the rail.
|
|
212
|
-
* @param {string} [options.selectedId] The project to select first.
|
|
213
|
-
*
|
|
213
|
+
* @param {string} [options.selectedId] The project to select first. When it
|
|
214
|
+
* is absent, the first project is selected. When it is not in the list, the
|
|
215
|
+
* requested id stays selected and the rail shows not found.
|
|
214
216
|
* @param {(id: string) => void} [options.onSelect] Called when the view changes the selection itself
|
|
215
217
|
* (a ledger row, or the automatic first project). Not called for `select(id)`.
|
|
216
218
|
* @param {{ basePath: string, fetcher?: Function, label?: string }} [options.ownShare]
|
|
@@ -810,7 +812,7 @@ export function createGraphProjectsView({
|
|
|
810
812
|
return state.list;
|
|
811
813
|
}
|
|
812
814
|
const { projects } = state.list.payload;
|
|
813
|
-
if (!state.selectedId
|
|
815
|
+
if (!state.selectedId) {
|
|
814
816
|
if (correction.form) correction.close();
|
|
815
817
|
state.panelAt = null;
|
|
816
818
|
state.detail = null;
|
|
@@ -825,7 +827,22 @@ export function createGraphProjectsView({
|
|
|
825
827
|
if (viewDestroyed || request !== hostListRequest) return state.list;
|
|
826
828
|
return state.list;
|
|
827
829
|
}
|
|
828
|
-
} else if (
|
|
830
|
+
} else if (!projects.some((project) => project.id === state.selectedId)) {
|
|
831
|
+
// An explicit host selection, or a project selected by the user, must
|
|
832
|
+
// never be replaced with the first row when the refreshed list no
|
|
833
|
+
// longer contains it. Keeping the id makes the missing target visible
|
|
834
|
+
// and lets the host decide whether its identity or access changed.
|
|
835
|
+
if (correction.form) correction.close();
|
|
836
|
+
detailRequest += 1;
|
|
837
|
+
state.panelAt = null;
|
|
838
|
+
state.detail = {
|
|
839
|
+
id: state.selectedId,
|
|
840
|
+
state: 'not_found',
|
|
841
|
+
reason: 'このプロジェクトは一覧から見つかりません。一覧を読み直してください。',
|
|
842
|
+
};
|
|
843
|
+
state.context = null;
|
|
844
|
+
contextRequest += 1;
|
|
845
|
+
} else if (state.detail?.id !== state.selectedId || state.detail?.state === 'not_found') {
|
|
829
846
|
// The project the host asked for is listed; read it for the rail.
|
|
830
847
|
if (viewDestroyed || request !== hostListRequest) return state.list;
|
|
831
848
|
await controller.loadDetail(state.selectedId);
|