@milesroxas/design-hub 0.11.1 → 0.11.2
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/core/review/model.ts +12 -3
- package/core/review/service.test.ts +16 -0
- package/core/review/service.ts +11 -4
- package/dist/core/review/model.d.ts +3 -1
- package/dist/core/review/model.js +10 -2
- package/dist/core/review/service.d.ts +3 -1
- package/dist/core/review/service.js +11 -4
- package/dist/scripts/lib/review.d.ts +5 -2
- package/dist/scripts/lib/review.js +8 -2
- package/dist/scripts/people.d.ts +1 -1
- package/dist/scripts/people.js +6 -3
- package/dist/scripts/share.js +1 -1
- package/package.json +1 -1
- package/shell/review/People.tsx +1 -12
- package/shell/review/client.ts +3 -2
- package/skills/miles-deploy/SKILL.md +2 -2
- package/skills/miles-design-hub/SKILL.md +1 -1
- package/skills/miles-review/SKILL.md +1 -1
- package/templates/studio/README.md +1 -1
- package/templates/studio/package.json +1 -1
package/core/review/model.ts
CHANGED
|
@@ -273,13 +273,14 @@ export function checkAccess(input: unknown): Checked<Access> {
|
|
|
273
273
|
return isAccess(input) ? { ok: true, value: input } : { ok: false, problems: [ACCESS_PROBLEM] };
|
|
274
274
|
}
|
|
275
275
|
|
|
276
|
-
|
|
276
|
+
/** `team` absent: the service fills it, the studio's name for Studio and the client's for a Client. */
|
|
277
|
+
export type PersonInput = Pick<Person, 'name' | 'kind'> & { team?: string; access: Access | null };
|
|
277
278
|
|
|
278
279
|
export function checkPersonInput(input: unknown): Checked<PersonInput> {
|
|
279
280
|
const i = (input ?? {}) as Record<string, unknown>;
|
|
280
281
|
const problems: string[] = [];
|
|
281
282
|
const name = text(i.name, 'name', LIMITS.name, problems);
|
|
282
|
-
const team = text(i.team, 'team', LIMITS.team, problems);
|
|
283
|
+
const team = i.team === undefined ? undefined : text(i.team, 'team', LIMITS.team, problems);
|
|
283
284
|
// Most people added are on the client's side; Studio is the deliberate choice.
|
|
284
285
|
const kind = i.kind ?? 'client';
|
|
285
286
|
if (!PERSON_KINDS.includes(kind as PersonKind)) problems.push(`kind: one of ${PERSON_KINDS.join(', ')}`);
|
|
@@ -288,7 +289,15 @@ export function checkPersonInput(input: unknown): Checked<PersonInput> {
|
|
|
288
289
|
if (access !== null && !isAccess(access)) problems.push(ACCESS_PROBLEM);
|
|
289
290
|
return problems.length
|
|
290
291
|
? { ok: false, problems }
|
|
291
|
-
: {
|
|
292
|
+
: {
|
|
293
|
+
ok: true,
|
|
294
|
+
value: {
|
|
295
|
+
name,
|
|
296
|
+
...(team === undefined ? {} : { team }),
|
|
297
|
+
kind: kind as PersonKind,
|
|
298
|
+
access: access as Access | null,
|
|
299
|
+
},
|
|
300
|
+
};
|
|
292
301
|
}
|
|
293
302
|
|
|
294
303
|
export type ClientInput = Pick<Client, 'slug' | 'host' | 'name'>;
|
|
@@ -81,6 +81,22 @@ beforeEach(async () => {
|
|
|
81
81
|
await review.setAudience(A, studio, anchor.prototype, 'client');
|
|
82
82
|
});
|
|
83
83
|
|
|
84
|
+
test('without a team, a Studio person gets the studio’s, from whoever adds them, and a Client their client’s name', async () => {
|
|
85
|
+
const mo = (await review.addPerson(A, studio, { name: 'Mo', kind: 'studio' })).person;
|
|
86
|
+
assert.equal(mo.team, studio.team);
|
|
87
|
+
const kim = (await review.addPerson(A, studio, { name: 'Kim' })).person;
|
|
88
|
+
assert.equal(kim.team, 'acme');
|
|
89
|
+
assert.equal((await review.addPerson(B, studio, { name: 'Lu' })).person.team, 'bravo');
|
|
90
|
+
// A team given still wins, and an empty one is still refused.
|
|
91
|
+
assert.equal(
|
|
92
|
+
(await review.addPerson(A, studio, { name: 'Jo', team: 'Freelance' })).person.team,
|
|
93
|
+
'Freelance',
|
|
94
|
+
);
|
|
95
|
+
await rejects(review.addPerson(A, studio, { name: 'Al', team: ' ' }), 'invalid');
|
|
96
|
+
// The studio's first person has no one to take a team from.
|
|
97
|
+
await rejects(review.addStudioPerson(studio, { name: 'Owner' }), 'invalid');
|
|
98
|
+
});
|
|
99
|
+
|
|
84
100
|
test('a link works once, and looking at it uses nothing up', async () => {
|
|
85
101
|
assert.equal((await review.peekLink(A, clientToken))?.id, client.id);
|
|
86
102
|
assert.equal((await review.peekLink(A, clientToken))?.id, client.id);
|
package/core/review/service.ts
CHANGED
|
@@ -320,10 +320,13 @@ export function createReview(kv: KV, overrides: Partial<Deps> = {}) {
|
|
|
320
320
|
|
|
321
321
|
/** A new Studio person, with no link yet; their records live with the studio. */
|
|
322
322
|
async function newStudioPerson(input: unknown): Promise<Person> {
|
|
323
|
-
const { access, ...fields } = valid(checkPersonInput({ ...(input as object), kind: 'studio' }));
|
|
323
|
+
const { access, team, ...fields } = valid(checkPersonInput({ ...(input as object), kind: 'studio' }));
|
|
324
|
+
// The studio's first person names the studio's team: there is no one to take it from.
|
|
325
|
+
if (!team) throw new ReviewError('invalid', 'Name the team.', ['team: required']);
|
|
324
326
|
const p: Person = {
|
|
325
327
|
id: newId(),
|
|
326
328
|
...fields,
|
|
329
|
+
team,
|
|
327
330
|
client: null,
|
|
328
331
|
email: null,
|
|
329
332
|
accessEndsAt: accessEnd(access ?? 'open', deps.now()),
|
|
@@ -797,16 +800,20 @@ export function createReview(kv: KV, overrides: Partial<Deps> = {}) {
|
|
|
797
800
|
/**
|
|
798
801
|
* A new person and their first link: a Client of the scope's client, or a
|
|
799
802
|
* Studio person. Without an access length, a Client gets the default and
|
|
800
|
-
* Studio is open-ended.
|
|
803
|
+
* Studio is open-ended. Without a team, a Studio person gets the studio's,
|
|
804
|
+
* which every Studio person carries, so the adder's; a Client gets their
|
|
805
|
+
* client's name.
|
|
801
806
|
*/
|
|
802
807
|
async addPerson(scope: Scope, actor: Person | null, input: unknown): Promise<Issued> {
|
|
803
|
-
await allow(scope, actor, 'people', NO_PERSON);
|
|
804
|
-
const { access, ...fields } = valid(checkPersonInput(input));
|
|
808
|
+
const by = await allow(scope, actor, 'people', NO_PERSON);
|
|
809
|
+
const { access, team, ...fields } = valid(checkPersonInput(input));
|
|
805
810
|
// S13: the person's own length, else (a Client) the client's default, then the studio's, then 3m.
|
|
806
811
|
const length = access ?? (fields.kind === 'studio' ? 'open' : await readDefault(scope));
|
|
807
812
|
const p: Person = {
|
|
808
813
|
id: newId(),
|
|
809
814
|
...fields,
|
|
815
|
+
team:
|
|
816
|
+
team ?? (fields.kind === 'studio' ? by.team : ((await clientAt(scope.client))?.name ?? 'Client')),
|
|
810
817
|
client: fields.kind === 'studio' ? null : scope.client,
|
|
811
818
|
email: null,
|
|
812
819
|
accessEndsAt: accessEnd(length, deps.now()),
|
|
@@ -199,7 +199,9 @@ export type Checked<T> = {
|
|
|
199
199
|
problems: string[];
|
|
200
200
|
};
|
|
201
201
|
export declare function checkAccess(input: unknown): Checked<Access>;
|
|
202
|
-
|
|
202
|
+
/** `team` absent: the service fills it, the studio's name for Studio and the client's for a Client. */
|
|
203
|
+
export type PersonInput = Pick<Person, 'name' | 'kind'> & {
|
|
204
|
+
team?: string;
|
|
203
205
|
access: Access | null;
|
|
204
206
|
};
|
|
205
207
|
export declare function checkPersonInput(input: unknown): Checked<PersonInput>;
|
|
@@ -145,7 +145,7 @@ export function checkPersonInput(input) {
|
|
|
145
145
|
const i = (input ?? {});
|
|
146
146
|
const problems = [];
|
|
147
147
|
const name = text(i.name, 'name', LIMITS.name, problems);
|
|
148
|
-
const team = text(i.team, 'team', LIMITS.team, problems);
|
|
148
|
+
const team = i.team === undefined ? undefined : text(i.team, 'team', LIMITS.team, problems);
|
|
149
149
|
// Most people added are on the client's side; Studio is the deliberate choice.
|
|
150
150
|
const kind = i.kind ?? 'client';
|
|
151
151
|
if (!PERSON_KINDS.includes(kind))
|
|
@@ -156,7 +156,15 @@ export function checkPersonInput(input) {
|
|
|
156
156
|
problems.push(ACCESS_PROBLEM);
|
|
157
157
|
return problems.length
|
|
158
158
|
? { ok: false, problems }
|
|
159
|
-
: {
|
|
159
|
+
: {
|
|
160
|
+
ok: true,
|
|
161
|
+
value: {
|
|
162
|
+
name,
|
|
163
|
+
...(team === undefined ? {} : { team }),
|
|
164
|
+
kind: kind,
|
|
165
|
+
access: access,
|
|
166
|
+
},
|
|
167
|
+
};
|
|
160
168
|
}
|
|
161
169
|
/** A new client: a client slug, the host name it is served on (lower case), and its name. */
|
|
162
170
|
export function checkClientInput(input) {
|
|
@@ -166,7 +166,9 @@ export declare function createReview(kv: KV, overrides?: Partial<Deps>): {
|
|
|
166
166
|
/**
|
|
167
167
|
* A new person and their first link: a Client of the scope's client, or a
|
|
168
168
|
* Studio person. Without an access length, a Client gets the default and
|
|
169
|
-
* Studio is open-ended.
|
|
169
|
+
* Studio is open-ended. Without a team, a Studio person gets the studio's,
|
|
170
|
+
* which every Studio person carries, so the adder's; a Client gets their
|
|
171
|
+
* client's name.
|
|
170
172
|
*/
|
|
171
173
|
addPerson(scope: Scope, actor: Person | null, input: unknown): Promise<Issued>;
|
|
172
174
|
/** Another one-time link, for another device. Their sessions and other unused links stay. */
|
|
@@ -227,10 +227,14 @@ export function createReview(kv, overrides = {}) {
|
|
|
227
227
|
}
|
|
228
228
|
/** A new Studio person, with no link yet; their records live with the studio. */
|
|
229
229
|
async function newStudioPerson(input) {
|
|
230
|
-
const { access, ...fields } = valid(checkPersonInput({ ...input, kind: 'studio' }));
|
|
230
|
+
const { access, team, ...fields } = valid(checkPersonInput({ ...input, kind: 'studio' }));
|
|
231
|
+
// The studio's first person names the studio's team: there is no one to take it from.
|
|
232
|
+
if (!team)
|
|
233
|
+
throw new ReviewError('invalid', 'Name the team.', ['team: required']);
|
|
231
234
|
const p = {
|
|
232
235
|
id: newId(),
|
|
233
236
|
...fields,
|
|
237
|
+
team,
|
|
234
238
|
client: null,
|
|
235
239
|
email: null,
|
|
236
240
|
accessEndsAt: accessEnd(access ?? 'open', deps.now()),
|
|
@@ -673,16 +677,19 @@ export function createReview(kv, overrides = {}) {
|
|
|
673
677
|
/**
|
|
674
678
|
* A new person and their first link: a Client of the scope's client, or a
|
|
675
679
|
* Studio person. Without an access length, a Client gets the default and
|
|
676
|
-
* Studio is open-ended.
|
|
680
|
+
* Studio is open-ended. Without a team, a Studio person gets the studio's,
|
|
681
|
+
* which every Studio person carries, so the adder's; a Client gets their
|
|
682
|
+
* client's name.
|
|
677
683
|
*/
|
|
678
684
|
async addPerson(scope, actor, input) {
|
|
679
|
-
await allow(scope, actor, 'people', NO_PERSON);
|
|
680
|
-
const { access, ...fields } = valid(checkPersonInput(input));
|
|
685
|
+
const by = await allow(scope, actor, 'people', NO_PERSON);
|
|
686
|
+
const { access, team, ...fields } = valid(checkPersonInput(input));
|
|
681
687
|
// S13: the person's own length, else (a Client) the client's default, then the studio's, then 3m.
|
|
682
688
|
const length = access ?? (fields.kind === 'studio' ? 'open' : await readDefault(scope));
|
|
683
689
|
const p = {
|
|
684
690
|
id: newId(),
|
|
685
691
|
...fields,
|
|
692
|
+
team: team ?? (fields.kind === 'studio' ? by.team : ((await clientAt(scope.client))?.name ?? 'Client')),
|
|
686
693
|
client: fields.kind === 'studio' ? null : scope.client,
|
|
687
694
|
email: null,
|
|
688
695
|
accessEndsAt: accessEnd(length, deps.now()),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Scope } from '../../core/review/model.ts';
|
|
1
|
+
import type { Person, Scope } from '../../core/review/model.ts';
|
|
2
2
|
import { type Review } from '../../core/review/service.ts';
|
|
3
3
|
import { type ProjectDeps } from './linked.ts';
|
|
4
4
|
/** Where a linked project's command acts: the studio, the client and its host, and the project. */
|
|
@@ -8,15 +8,18 @@ type Where = {
|
|
|
8
8
|
host: string;
|
|
9
9
|
project: string;
|
|
10
10
|
};
|
|
11
|
+
/** `actor` is who the CLI acts as: Studio, on the studio's team in a linked project, so the people it adds are too. */
|
|
11
12
|
export type CliReview = {
|
|
12
13
|
review: Review;
|
|
13
14
|
store: 'local';
|
|
14
15
|
scope: Scope;
|
|
16
|
+
actor: Person;
|
|
15
17
|
studio?: undefined;
|
|
16
18
|
} | {
|
|
17
19
|
review: Review;
|
|
18
20
|
store: 'studio';
|
|
19
21
|
scope: Scope;
|
|
22
|
+
actor: Person;
|
|
20
23
|
studio: Where;
|
|
21
24
|
};
|
|
22
25
|
/**
|
|
@@ -24,5 +27,5 @@ export type CliReview = {
|
|
|
24
27
|
* project's studio, else this machine's. --local is always this machine's.
|
|
25
28
|
*/
|
|
26
29
|
export declare function cliReview(local: boolean, deps?: ProjectDeps): Promise<CliReview>;
|
|
27
|
-
export declare const cliActor: () =>
|
|
30
|
+
export declare const cliActor: () => Person;
|
|
28
31
|
export {};
|
|
@@ -10,7 +10,12 @@ import { isStudioFolder } from './studios.js';
|
|
|
10
10
|
/** This machine's store, the dev server's, in its one scope. */
|
|
11
11
|
function localReview(root) {
|
|
12
12
|
const triage = jevTriager(readEnv(root).TYPESAFE_API_KEY ?? '', checks);
|
|
13
|
-
return {
|
|
13
|
+
return {
|
|
14
|
+
review: createReview(fileKV(LOCAL_STORE), { triage }),
|
|
15
|
+
store: 'local',
|
|
16
|
+
scope: LOCAL_SCOPE,
|
|
17
|
+
actor: cliActor(),
|
|
18
|
+
};
|
|
14
19
|
}
|
|
15
20
|
/**
|
|
16
21
|
* The store a review command acts on, and the scope it acts in: a linked
|
|
@@ -28,11 +33,12 @@ export async function cliReview(local, deps = realProjectDeps()) {
|
|
|
28
33
|
});
|
|
29
34
|
return localReview(deps.root);
|
|
30
35
|
}
|
|
31
|
-
const { review, scope, client } = await openLinked(deps, link);
|
|
36
|
+
const { review, scope, client, studio } = await openLinked(deps, link);
|
|
32
37
|
return {
|
|
33
38
|
review,
|
|
34
39
|
store: 'studio',
|
|
35
40
|
scope,
|
|
41
|
+
actor: localStudio('cli', studio.config.name),
|
|
36
42
|
studio: { studio: link.studio, client: client.slug, host: client.host, project: link.project },
|
|
37
43
|
};
|
|
38
44
|
}
|
package/dist/scripts/people.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export declare const spec: {
|
|
|
18
18
|
};
|
|
19
19
|
readonly team: {
|
|
20
20
|
readonly type: 'string';
|
|
21
|
-
readonly description: "For add: the studio
|
|
21
|
+
readonly description: "For add: shown beside their name. Absent, the studio's name for studio and the client's name for client.";
|
|
22
22
|
};
|
|
23
23
|
readonly kind: {
|
|
24
24
|
readonly type: 'string';
|
package/dist/scripts/people.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { ACCESS, PERSON_KINDS } from '../core/review/model.js';
|
|
10
10
|
import { CliError } from './lib/cli.js';
|
|
11
11
|
import { realProjectDeps } from './lib/linked.js';
|
|
12
|
-
import {
|
|
12
|
+
import { cliReview } from './lib/review.js';
|
|
13
13
|
export const spec = {
|
|
14
14
|
name: 'people',
|
|
15
15
|
summary: 'List or add the people who comment on the deployed prototypes, give them sign-in links, sign them out, revoke them, and set how long they keep access.',
|
|
@@ -22,7 +22,10 @@ export const spec = {
|
|
|
22
22
|
],
|
|
23
23
|
flags: {
|
|
24
24
|
name: { type: 'string', description: 'For add: their name as it shows on comments.' },
|
|
25
|
-
team: {
|
|
25
|
+
team: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
description: "For add: shown beside their name. Absent, the studio's name for studio and the client's name for client.",
|
|
28
|
+
},
|
|
26
29
|
kind: {
|
|
27
30
|
type: 'string',
|
|
28
31
|
default: 'client',
|
|
@@ -98,7 +101,7 @@ export async function run({ positionals: [action = 'list', id], flags }, deps) {
|
|
|
98
101
|
const found = await cliReview(flags.local, deps);
|
|
99
102
|
const { review, store, scope } = found;
|
|
100
103
|
// A linked project's links sign in on its client's own host, and nowhere else.
|
|
101
|
-
const done = await act({ review, scope, actor:
|
|
104
|
+
const done = await act({ review, scope, actor: found.actor, flags, id, host: found.studio?.host });
|
|
102
105
|
return {
|
|
103
106
|
store,
|
|
104
107
|
...(found.studio ? { studio: found.studio } : {}),
|
package/dist/scripts/share.js
CHANGED
|
@@ -101,7 +101,7 @@ export async function run({ flags }, deps) {
|
|
|
101
101
|
...(guide ? { guide: `${address}${guide}` } : {}),
|
|
102
102
|
})),
|
|
103
103
|
...(await prune(store, scope)),
|
|
104
|
-
next: `Send ${address} with each person’s own sign-in link: pnpm people add --name "<name>"
|
|
104
|
+
next: `Send ${address} with each person’s own sign-in link: pnpm people add --name "<name>" prints one on ${client.host}. Someone already signed in there sees the project at once. A link signs in one device, then stops working.`,
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
107
|
finally {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milesroxas/design-hub",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"description": "The Design Hub product: the hub that lists and serves prototypes, the review panel and its API, the sign-in gate, the kit, and the design-hub CLI. A project installs it and keeps only its prototypes, kit materials and docs.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
package/shell/review/People.tsx
CHANGED
|
@@ -59,7 +59,7 @@ function AddForm({
|
|
|
59
59
|
setBusy(true);
|
|
60
60
|
act(
|
|
61
61
|
store
|
|
62
|
-
.addPerson(name,
|
|
62
|
+
.addPerson(name, kind, access === 'default' ? null : (access as Access))
|
|
63
63
|
.then((href) => {
|
|
64
64
|
onLink({ name, href });
|
|
65
65
|
form.reset();
|
|
@@ -80,17 +80,6 @@ function AddForm({
|
|
|
80
80
|
data-autofocus=""
|
|
81
81
|
/>
|
|
82
82
|
</label>
|
|
83
|
-
<label className="field">
|
|
84
|
-
<span className="field-label">Team</span>
|
|
85
|
-
<input
|
|
86
|
-
className="input"
|
|
87
|
-
name="team"
|
|
88
|
-
required
|
|
89
|
-
maxLength={LIMITS.team}
|
|
90
|
-
autoComplete="off"
|
|
91
|
-
placeholder="Studio, or the client’s company"
|
|
92
|
-
/>
|
|
93
|
-
</label>
|
|
94
83
|
<div className="field">
|
|
95
84
|
<span id={kindLabel} className="field-label">
|
|
96
85
|
Kind
|
package/shell/review/client.ts
CHANGED
|
@@ -229,8 +229,9 @@ export function createReviewStore(prototype: string) {
|
|
|
229
229
|
set({ people, access });
|
|
230
230
|
}),
|
|
231
231
|
/** A new person; `access` null takes the default for their kind. Resolves to their link. */
|
|
232
|
-
|
|
233
|
-
|
|
232
|
+
/** The server names their team: the studio's for Studio, the client's for a Client. */
|
|
233
|
+
addPerson: (name: string, kind: PersonKind, access: Access | null) =>
|
|
234
|
+
linkOf(call('people.add', { name, kind, ...(access ? { access } : {}) })),
|
|
234
235
|
/** Another one-time link, for another device. */
|
|
235
236
|
newLink: (id: string) => linkOf(call('people.link', { id })),
|
|
236
237
|
/** Ends every session and unused link; resolves to the one new link. */
|
|
@@ -121,10 +121,10 @@ Before the handover, check that each prototype it names is switched to client-fa
|
|
|
121
121
|
People belong to the linked project's client. Each gets their own link, on the client's address:
|
|
122
122
|
|
|
123
123
|
```bash
|
|
124
|
-
pnpm people add --name "<name>"
|
|
124
|
+
pnpm people add --name "<name>"
|
|
125
125
|
```
|
|
126
126
|
|
|
127
|
-
A Client is the default kind. `--kind studio` makes a Studio person, who sees every client of the studio; the command says so in `notice`. Studio adds people from the People tab too (the round comments button, then **⋯**, **People**).
|
|
127
|
+
A Client is the default kind. Their team, shown beside their name, is the client's name; a Studio person's is the studio's. `--team` overrides it, only for someone outside both (a freelancer's own company). `--kind studio` makes a Studio person, who sees every client of the studio; the command says so in `notice`. Studio adds people from the People tab too (the round comments button, then **⋯**, **People**).
|
|
128
128
|
|
|
129
129
|
- **A link signs in one device, then stops working.** Opening it shows who it is for and a Continue button; Continue uses it up. Why: a mail or chat preview opens links too, and must not use one up. An unused link lasts 14 days.
|
|
130
130
|
- **Another device, or a link that stopped working:** `pnpm people link <id>` gives one more link. Their other devices stay signed in.
|
|
@@ -92,7 +92,7 @@ The user does nothing in a terminal here; each step that needs them is one link
|
|
|
92
92
|
1. A new client, with the owner's word: `pnpm --dir <path> signin` first (signed out, it prints a `url`: send it to the user, then `pnpm --dir <path> signin --wait 300`), then `pnpm --dir <path> client add <client> --studio <studio> --name "<client name>" --person "<client's first person>" --team "<their company>"`. `links.client` is for that person only: put it in a message addressed to them, and tell the user not to open it, since it signs in whoever opens it first. `links.studio` is the studio owner's link on the client's address: it is the user's when they are the owner. `miles-deploy` has the rest.
|
|
93
93
|
2. `pnpm --dir <path> project link --studio <studio> --client <client> --project <name>`, then commit `.design-hub/studio.json`.
|
|
94
94
|
3. `pnpm --dir <path> share`. On `ok: false`, follow `stage` and `fix` (the pre-flight steps are in `miles-deploy`).
|
|
95
|
-
4. The user's own Studio link, unless `links.studio` was theirs: when `pnpm --dir <path> people` lists them, `pnpm --dir <path> people link <id>`; else `pnpm --dir <path> people add --name "<user>" --
|
|
95
|
+
4. The user's own Studio link, unless `links.studio` was theirs: when `pnpm --dir <path> people` lists them, `pnpm --dir <path> people link <id>`; else `pnpm --dir <path> people add --name "<user>" --kind studio`.
|
|
96
96
|
|
|
97
97
|
Give the user the `address` and their own `link` in the closing message, say the link signs in one device and then stops working, that each prototype is internal until they switch it to client-facing, and that the address shows the samples until the first feature replaces them.
|
|
98
98
|
|
|
@@ -32,7 +32,7 @@ Each thread line starts with its label and its audience: `- #I3 (internal) Ed (S
|
|
|
32
32
|
|
|
33
33
|
- Every person is **Studio** or **Client**. Both comment, reply, edit their own words, and resolve or reopen any thread they can see. A Client sees client-facing threads only; Studio sees all, internal ones included. A thread's audience never changes: to tell the client what an internal thread says, Studio writes a new client-facing comment in the panel. Never paste internal words into a client-facing one without the user's say. Studio also deletes any comment, sorts comments and manages people; a Client deletes only their own. The studio's team are Studio; everyone on the client's side is Client, the default.
|
|
34
34
|
- **Team** is the company: `Studio`, or the client's name. It shows beside every name, so a reviewer reads who said what.
|
|
35
|
-
- People belong to the linked project's client. The studio's owner gets a link on each new client's address from `client add`; anyone else comes from `pnpm people add --name <n>
|
|
35
|
+
- People belong to the linked project's client. The studio's owner gets a link on each new client's address from `client add`; anyone else comes from `pnpm people add --name <n> [--kind studio]`, or from the People tab.
|
|
36
36
|
- A link signs in one device, then stops working; unused, it lasts 14 days. `pnpm people link <id>` gives another for another device, `sign-out <id>` ends every session and gives one new link, and `revoke <id>` ends their access everywhere within five minutes. `miles-deploy` holds the rest: access length, the handover.
|
|
37
37
|
- Never paste a link into a commit, a document, a ticket or a comment. Why: whoever opens it first signs in as that person.
|
|
38
38
|
|
|
@@ -34,7 +34,7 @@ In a project, once its studio is listed on the machine:
|
|
|
34
34
|
```bash
|
|
35
35
|
design-hub project link --studio <studio> --client <client> --project <project> # commit .design-hub/studio.json
|
|
36
36
|
design-hub share # prints https://<client host>/<project>/
|
|
37
|
-
design-hub people add --name "<name>"
|
|
37
|
+
design-hub people add --name "<name>" # a link on the client's host
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
- **DNS.** `vercel`: the apex is on Vercel's nameservers and one wildcard serves
|