@1agh/maude 2.1.0 → 2.1.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/apps/studio/access/request.ts +1 -0
- package/apps/studio/actions/agents.ts +27 -0
- package/apps/studio/actions/defs/app.ts +28 -1
- package/apps/studio/actions/defs/sync.ts +4 -0
- package/apps/studio/actions.manifest.json +60 -2
- package/apps/studio/actions.parity.json +13 -1
- package/apps/studio/bin/_curl-local.mjs +7 -4
- package/apps/studio/client/app.jsx +16 -4
- package/apps/studio/client/home/HomeAccountsRow.jsx +221 -0
- package/apps/studio/client/home/HomeConnection.jsx +111 -0
- package/apps/studio/client/home/home-accounts-model.js +110 -1
- package/apps/studio/client/home/home-api.js +6 -2
- package/apps/studio/client/home/home-app.jsx +74 -12
- package/apps/studio/client/home/home-model.js +40 -1
- package/apps/studio/client/home/home-where-model.js +105 -0
- package/apps/studio/client/home/home.css +233 -1
- package/apps/studio/client/hooks/use-palette-and-panels.jsx +3 -1
- package/apps/studio/client/hooks/use-tabs.jsx +11 -4
- package/apps/studio/client/panels/TeamProjects.jsx +137 -134
- package/apps/studio/client/share-link.js +12 -0
- package/apps/studio/client/styles/_index.css +4 -0
- package/apps/studio/client/v2/diagnostics/diagnostics-host.jsx +1 -0
- package/apps/studio/client/v2/diagnostics/diagnostics-model.js +32 -2
- package/apps/studio/client/v2/diagnostics/diagnostics-sheet.jsx +35 -8
- package/apps/studio/client/v2/diagnostics/diagnostics.css +34 -0
- package/apps/studio/client/v2/diagnostics/sync-details/sync-details-model.js +94 -3
- package/apps/studio/client/v2/diagnostics/sync-details/sync-details.jsx +187 -4
- package/apps/studio/client/v2/link-server/LinkServerDialog.jsx +492 -0
- package/apps/studio/client/v2/link-server/LinkServerHost.jsx +42 -0
- package/apps/studio/client/v2/link-server/link-server-api.js +142 -0
- package/apps/studio/client/v2/link-server/link-server-model.js +438 -0
- package/apps/studio/client/v2/link-server/link-server.css +109 -0
- package/apps/studio/client/v2/onboarding/AdvancedSheets.jsx +31 -86
- package/apps/studio/client/v2/onboarding/onboarding-model.js +1 -18
- package/apps/studio/client/v2/search/search-keywords.js +3 -2
- package/apps/studio/client/v2/settings/account.jsx +4 -2
- package/apps/studio/client/v2/settings/advanced-section.jsx +245 -148
- package/apps/studio/client/v2/settings/connection-row.jsx +3 -59
- package/apps/studio/client/v2/settings/connections-section.jsx +118 -425
- package/apps/studio/client/v2/settings/general-section.jsx +138 -43
- package/apps/studio/client/v2/settings/project-sync-settings.jsx +4 -3
- package/apps/studio/client/v2/settings/reset-section.jsx +14 -3
- package/apps/studio/client/v2/settings/settings-card.jsx +142 -0
- package/apps/studio/client/v2/settings/settings-cards.js +220 -0
- package/apps/studio/client/v2/settings/settings-handlers.js +7 -6
- package/apps/studio/client/v2/settings/settings-model.js +91 -31
- package/apps/studio/client/v2/settings/settings-sheet.jsx +25 -6
- package/apps/studio/client/v2/settings/settings.css +374 -64
- package/apps/studio/client/v2/settings/this-project-card.jsx +730 -0
- package/apps/studio/client/v2/settings/this-project-model.js +172 -0
- package/apps/studio/client/v2/settings/use-connections.js +3 -2
- package/apps/studio/client/v2/settings/use-open-card.js +37 -0
- package/apps/studio/client/v2/shell/connection-state.js +197 -0
- package/apps/studio/client/v2/shell/menu-runner.js +7 -2
- package/apps/studio/client/v2/shell/project-account-bus.js +36 -0
- package/apps/studio/client/v2/shell/project-account-card.jsx +357 -148
- package/apps/studio/client/v2/shell/project-account-model.js +272 -149
- package/apps/studio/client/v2/shell/project-account-toast.js +66 -0
- package/apps/studio/client/v2/shell/project-account.css +237 -0
- package/apps/studio/client/v2/shell/share-cluster-host.jsx +166 -83
- package/apps/studio/client/v2/shell/shell-parity.js +3 -2
- package/apps/studio/client/v2/shell/shell-parity.json +40 -26
- package/apps/studio/client/v2/shell/use-account.js +2 -0
- package/apps/studio/client/v2/signin/use-signin.js +1 -1
- package/apps/studio/cloud/endpoints.ts +29 -4
- package/apps/studio/dist/client.bundle.js +834 -834
- package/apps/studio/dist/styles.css +1 -1
- package/apps/studio/home/accounts.ts +30 -11
- package/apps/studio/home/cloud.ts +6 -1
- package/apps/studio/home/hub-health.ts +76 -0
- package/apps/studio/home/routes.ts +9 -3
- package/apps/studio/http.ts +8 -0
- package/apps/studio/migrate/hub.ts +8 -1
- package/apps/studio/routes/hub-link-folder.ts +334 -0
- package/apps/studio/routes/hub-signin.ts +78 -1
- package/apps/studio/routes/index.ts +4 -0
- package/apps/studio/routes/sync.ts +22 -4
- package/apps/studio/shell/api-key.ts +11 -0
- package/apps/studio/sync/accepted-cold-start.ts +144 -8
- package/apps/studio/sync/action-stage.ts +18 -1
- package/apps/studio/sync/ctl-heal.ts +58 -0
- package/apps/studio/sync/file-ledger.ts +38 -4
- package/apps/studio/sync/file-plane.ts +226 -19
- package/apps/studio/sync/held-deletes.ts +86 -5
- package/apps/studio/sync/hub-link.ts +8 -0
- package/apps/studio/sync/index.ts +68 -4
- package/apps/studio/sync/link-consent.ts +22 -75
- package/apps/studio/sync/link-survey.ts +252 -0
- package/apps/studio/sync/local-kernel.ts +16 -1
- package/apps/studio/sync/seed-progress.ts +12 -0
- package/apps/studio/sync/source-recovery.ts +18 -2
- package/apps/studio/sync/status.ts +11 -1
- package/apps/studio/sync/writer-registry.ts +5 -0
- package/apps/studio/whats-new.json +18 -0
- package/cli/lib/bash-guard.mjs +19 -0
- package/cli/lib/design-help.gen.mjs +1 -1
- package/package.json +9 -8
- package/apps/studio/client/v2/onboarding/HubSheet.jsx +0 -212
- package/apps/studio/client/v2/shell/account-card-model.js +0 -114
- package/apps/studio/client/v2/shell/account-card.jsx +0 -189
|
@@ -3,9 +3,12 @@
|
|
|
3
3
|
// shell command a sheet's button runs. Each sheet is a view (exported from ./index.js for S11.14), so Settings ›
|
|
4
4
|
// Connections mounts the same sheets with its own wiring.
|
|
5
5
|
//
|
|
6
|
-
// hub →
|
|
7
|
-
//
|
|
8
|
-
// the
|
|
6
|
+
// hub → the one "Link your server" dialog (2.1.1 T5, v2/link-server/; it replaced HubSheet):
|
|
7
|
+
// /_home/hub/test as the address is typed; Sign in (#204 K2) → /_home/hub/signin/start,
|
|
8
|
+
// the shell opens the hub's own page (`open_team_server_signin`; with an invite, the hub's
|
|
9
|
+
// invite page), poll until the browser came back, then /_home/hub/prepare and Home's own
|
|
10
|
+
// open of the managed copy. Home has no sign-in-key or folder path (named gap), so the
|
|
11
|
+
// dialog draws no Advanced here.
|
|
9
12
|
// folder-github → the shell's folder picker (`open_project_folder`); "From GitHub" (S6.10) → Rust's
|
|
10
13
|
// github_repos / home_github_sign_in / github_clone / github_create, then `open_project({root})`
|
|
11
14
|
// ai → /_home/ai/{status,connect} (install Claude Code, then the browser sign-in)
|
|
@@ -16,7 +19,7 @@
|
|
|
16
19
|
// own page in the browser takes it, issue #204); the AI sign-in is the person's browser; nothing here stores
|
|
17
20
|
// a token.
|
|
18
21
|
|
|
19
|
-
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
22
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
20
23
|
|
|
21
24
|
import {
|
|
22
25
|
aiConnect,
|
|
@@ -39,9 +42,9 @@ import { ConnectAiSheet } from './ConnectAiSheet.jsx';
|
|
|
39
42
|
import { CliSheet } from './CliSheet.jsx';
|
|
40
43
|
import { FigmaSheet } from './FigmaSheet.jsx';
|
|
41
44
|
import { FolderGithubSheet } from './FolderGithubSheet.jsx';
|
|
42
|
-
import {
|
|
45
|
+
import { answerOf, checkAnswerOf } from '../link-server/link-server-model.js';
|
|
46
|
+
import { LinkServerDialog } from '../link-server/LinkServerDialog.jsx';
|
|
43
47
|
import { connectClaudeHome } from './connect-ai-home.js';
|
|
44
|
-
import { HUB_WORDS } from './onboarding-model.js';
|
|
45
48
|
|
|
46
49
|
const CLI_POLL_MS = 1500;
|
|
47
50
|
|
|
@@ -189,89 +192,31 @@ function FigmaHost({ target, onClose, startFigma }) {
|
|
|
189
192
|
export const HUB_POLL_MS = 1500;
|
|
190
193
|
|
|
191
194
|
/**
|
|
192
|
-
*
|
|
193
|
-
*
|
|
195
|
+
* Home's "Link your server" API (2.1.1 T5): the same dialog a project tab opens, wired to Home's own routes
|
|
196
|
+
* for `profile`. `finish` prepares the managed copy and opens it as a tab (Home's `openPrepared`).
|
|
194
197
|
*/
|
|
195
|
-
function
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
198
|
+
export function homeLinkApi({ profile, openPrepared }) {
|
|
199
|
+
return {
|
|
200
|
+
context: 'home',
|
|
201
|
+
folders: false,
|
|
202
|
+
check: async (url) => checkAnswerOf(await hubTest(url)),
|
|
203
|
+
signInStart: async (url, invite) => answerOf(await hubSignInStart(profile, url, invite)),
|
|
204
|
+
signInPoll: async (id) => answerOf(await hubSignInPoll(id)),
|
|
205
|
+
signInCancel: (id) => hubSignInCancel(id),
|
|
206
|
+
openSignIn: openTeamServerSignIn,
|
|
207
|
+
finish: async (url) => {
|
|
208
|
+
const r = await hubPrepare(profile, url);
|
|
209
|
+
if (!r.ok || !r.json?.ok) return { ok: false, error: r.json?.error };
|
|
210
|
+
await openPrepared(r, r.json.name, profile);
|
|
211
|
+
return { ok: true };
|
|
205
212
|
},
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
const waitForBrowser = (id) =>
|
|
210
|
-
new Promise((resolve) => {
|
|
211
|
-
let timer = null;
|
|
212
|
-
const stop = (r) => {
|
|
213
|
-
clearTimeout(timer);
|
|
214
|
-
resolve(r);
|
|
215
|
-
};
|
|
216
|
-
attempt.current = { id, stop };
|
|
217
|
-
const tick = async () => {
|
|
218
|
-
const p = await hubSignInPoll(id);
|
|
219
|
-
if (attempt.current?.id !== id) return; // cancelled meanwhile
|
|
220
|
-
if (p.json?.pending) {
|
|
221
|
-
timer = setTimeout(tick, pollMs);
|
|
222
|
-
return;
|
|
223
|
-
}
|
|
224
|
-
attempt.current = null;
|
|
225
|
-
stop(
|
|
226
|
-
p.ok && p.json?.ok && p.json.url
|
|
227
|
-
? { ok: true, url: p.json.url }
|
|
228
|
-
: { ok: false, error: p.json?.error || HUB_WORDS.unreachable }
|
|
229
|
-
);
|
|
230
|
-
};
|
|
231
|
-
timer = setTimeout(tick, 0); // the first ask at once, then every pollMs
|
|
232
|
-
});
|
|
213
|
+
};
|
|
214
|
+
}
|
|
233
215
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
const r = await hubTest(url);
|
|
239
|
-
return r.json?.ok
|
|
240
|
-
? { ok: true, version: r.json.version ?? null }
|
|
241
|
-
: { ok: false, error: r.json?.error || HUB_WORDS.unreachable };
|
|
242
|
-
}}
|
|
243
|
-
onSignIn={async ({ url, invite, onWaiting }) => {
|
|
244
|
-
const s = await hubSignInStart(profile, url, invite);
|
|
245
|
-
if (!s.ok || !s.json?.ok)
|
|
246
|
-
return { ok: false, error: s.json?.error || HUB_WORDS.unreachable };
|
|
247
|
-
const id = s.json.id;
|
|
248
|
-
const opened = await openTeamServerSignIn(s.json.signInUrl);
|
|
249
|
-
if (opened !== 'ok') {
|
|
250
|
-
void hubSignInCancel(id);
|
|
251
|
-
return {
|
|
252
|
-
ok: false,
|
|
253
|
-
error: opened === 'refused' ? HUB_WORDS.refused : HUB_WORDS.noBrowser,
|
|
254
|
-
};
|
|
255
|
-
}
|
|
256
|
-
onWaiting();
|
|
257
|
-
const done = await waitForBrowser(id);
|
|
258
|
-
if (!done.ok) return done;
|
|
259
|
-
const r = await hubPrepare(profile, done.url);
|
|
260
|
-
if (!r.ok || !r.json?.ok)
|
|
261
|
-
return { ok: false, error: r.json?.error || HUB_WORDS.unreachable };
|
|
262
|
-
await openPrepared(r, r.json.name, profile);
|
|
263
|
-
onClose();
|
|
264
|
-
return { ok: true };
|
|
265
|
-
}}
|
|
266
|
-
onAbortSignIn={() => {
|
|
267
|
-
const a = attempt.current;
|
|
268
|
-
attempt.current = null;
|
|
269
|
-
if (!a) return;
|
|
270
|
-
void hubSignInCancel(a.id);
|
|
271
|
-
a.stop({ ok: false, cancelled: true });
|
|
272
|
-
}}
|
|
273
|
-
/>
|
|
274
|
-
);
|
|
216
|
+
/** #204 K2 + 2.1.1 T5 — the hub row's host: the one dialog with Home's API. `pollMs` is a test seam. */
|
|
217
|
+
function HubHost({ onClose, profile, openPrepared, pollMs = HUB_POLL_MS }) {
|
|
218
|
+
const api = useMemo(() => homeLinkApi({ profile, openPrepared }), [profile, openPrepared]);
|
|
219
|
+
return <LinkServerDialog api={api} onClose={onClose} pollMs={pollMs} />;
|
|
275
220
|
}
|
|
276
221
|
|
|
277
222
|
/**
|
|
@@ -3,24 +3,7 @@
|
|
|
3
3
|
// main button ("Connect to your own hub" → Connect). Advanced language (addresses, commands, keys) is allowed
|
|
4
4
|
// here and only here (the canvas's note 15).
|
|
5
5
|
|
|
6
|
-
//
|
|
7
|
-
export const HUB_WORDS = {
|
|
8
|
-
title: 'Sign in to your own hub',
|
|
9
|
-
verb: 'Sign in',
|
|
10
|
-
busy: 'Signing in…',
|
|
11
|
-
addressLabel: 'Hub address',
|
|
12
|
-
test: 'Test connection',
|
|
13
|
-
testing: 'Testing…',
|
|
14
|
-
reachable: (version) => (version ? `Reachable — hub ${version}` : 'Reachable'),
|
|
15
|
-
inviteLabel: 'Invite link or key (if you have one)',
|
|
16
|
-
invitePlaceholder: 'Invite link or key',
|
|
17
|
-
waiting: 'Finish signing in in your browser.',
|
|
18
|
-
refused: 'That address can’t be opened. Check the hub address.',
|
|
19
|
-
noBrowser: 'The browser didn’t open. Try again.',
|
|
20
|
-
fine: 'Sign in opens the hub’s own sign-in page in your browser. Maude Cloud stays signed in too.',
|
|
21
|
-
unreachable: "Couldn't reach that hub. Check the address, or whether it's online.",
|
|
22
|
-
};
|
|
23
|
-
|
|
6
|
+
// The hub sheet's words moved with it to the one "Link your server" dialog (2.1.1 T5, v2/link-server/).
|
|
24
7
|
export const FOLDER_WORDS = {
|
|
25
8
|
title: 'Open a folder or a GitHub project',
|
|
26
9
|
verb: 'Open',
|
|
@@ -114,8 +114,9 @@ export const SETTINGS_SEARCH = Object.freeze({
|
|
|
114
114
|
keywords: ['hub', 'cloud', 'server', 'url', 'self hosted'],
|
|
115
115
|
},
|
|
116
116
|
'settings-team-server-add': {
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
// 2.1.1 T6 (canvas 17 · 09): General › This project's own words
|
|
118
|
+
label: 'Link your server…',
|
|
119
|
+
keywords: ['hub', 'self hosted', 'server', 'team', 'invite', 'add a team server'],
|
|
119
120
|
},
|
|
120
121
|
'settings-app-version': { label: 'Version', keywords: ['app version', 'about', 'build'] },
|
|
121
122
|
'settings-update-restart': {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
// client/v2/settings/account.jsx — S9.20:
|
|
1
|
+
// client/v2/settings/account.jsx — S9.20: the account block (02 ob-settings, left card). 2.1.1 T6: on the
|
|
2
|
+
// desktop it sits in Settings › General › This project › Sync details › Maude Cloud; a cloud tab (no This
|
|
3
|
+
// project card) keeps it as General's Account card.
|
|
2
4
|
//
|
|
3
5
|
// Account
|
|
4
6
|
// (Y) you@studio.cz · Signed in to cloud.maude.sh
|
|
@@ -107,7 +109,7 @@ export function AccountBlock({
|
|
|
107
109
|
{ownAccount && (
|
|
108
110
|
<Row
|
|
109
111
|
label={signedIn ? (who ?? 'You') : host}
|
|
110
|
-
hint={signedIn ? undefined : 'Sign in
|
|
112
|
+
hint={signedIn ? undefined : 'Sign in to Maude Cloud above to sync projects.'}
|
|
111
113
|
>
|
|
112
114
|
<span data-testid="settings-account-state">
|
|
113
115
|
{signedIn ? `Signed in to ${host}` : 'Not signed in'}
|