@jskit-ai/agent-docs 0.1.386 → 0.1.388

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.
Files changed (40) hide show
  1. package/guide/agent/app-setup/authentication.md +46 -12
  2. package/guide/agent/framework/client-features.md +4 -0
  3. package/guide/agent/framework/crud-form-actions.md +4 -0
  4. package/guide/agent/framework/material-3.md +38 -11
  5. package/guide/agent/framework/typed-features.md +0 -20
  6. package/guide/agent/framework/ui-operations.md +23 -0
  7. package/package.json +1 -1
  8. package/patterns/minimal-foundation/example/AGENTS.md +5 -0
  9. package/patterns/minimal-foundation/example/package.json +2 -2
  10. package/patterns/shell-foundation/example/AGENTS.md +5 -0
  11. package/patterns/shell-foundation/example/package.json +3 -3
  12. package/reference/autogen/PATTERN_INDEX.md +37 -37
  13. package/reference/autogen/packages/auth-web.md +11 -0
  14. package/reference/autogen/packages/users-web.md +6 -0
  15. package/skills/jskit/references/client-features.md +4 -0
  16. package/skills/jskit/references/crud-form-actions.md +4 -0
  17. package/skills/jskit/references/material-3.md +38 -11
  18. package/skills/jskit/references/pattern-index.md +37 -37
  19. package/skills/jskit/references/patterns/app/minimal-foundation/example/AGENTS.md +5 -0
  20. package/skills/jskit/references/patterns/app/minimal-foundation/example/package.json +2 -2
  21. package/skills/jskit/references/patterns/app/shell-foundation/example/AGENTS.md +5 -0
  22. package/skills/jskit/references/patterns/app/shell-foundation/example/package.json +3 -3
  23. package/skills/jskit/references/patterns/auth/accounts-hub/example/package.json +3 -3
  24. package/skills/jskit/references/patterns/auth/auth-surface/PATTERN.md +7 -4
  25. package/skills/jskit/references/patterns/auth/auth-surface/example/src/components/AppBrand.vue +58 -3
  26. package/skills/jskit/references/patterns/auth/oidc-sign-in/example/package.json +2 -2
  27. package/skills/jskit/references/patterns/connectors/calendar-cli/example/package.json +4 -4
  28. package/skills/jskit/references/patterns/crud/crud-feature-package/example/packages/books/package.json +1 -1
  29. package/skills/jskit/references/patterns/database/mysql-application/example/package.json +2 -2
  30. package/skills/jskit/references/patterns/database/postgres-application/example/package.json +2 -2
  31. package/skills/jskit/references/patterns/realtime/realtime-application/example/package.json +2 -2
  32. package/skills/jskit/references/patterns/users/account-settings/PATTERN.md +59 -10
  33. package/skills/jskit/references/patterns/users/account-settings/example/src/components/account/settings/AccountSettingsNotificationsSection.vue +25 -12
  34. package/skills/jskit/references/patterns/users/account-settings/example/src/components/account/settings/AccountSettingsPreferencesSection.vue +25 -19
  35. package/skills/jskit/references/patterns/users/account-settings/example/src/components/account/settings/AccountSettingsProfileSection.vue +74 -54
  36. package/skills/jskit/references/patterns/users/account-settings/example/src/components/account/settings/AccountSettingsSignInMethodsSection.vue +7 -2
  37. package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/package.json +2 -2
  38. package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/package.json +4 -4
  39. package/skills/jskit/references/typed-features.md +0 -20
  40. package/skills/jskit/references/ui-operations.md +23 -0
@@ -44,8 +44,8 @@ section keeps what the person changed and has not saved, and takes every other
44
44
  field; its fields stay editable while the read runs. A section's `conflicts`
45
45
  (a ref) lists the fields whose server value changed under the person's change,
46
46
  as `{ key, value }` with the server's value; `acceptServerValue(key)` takes it
47
- and `keepOwnValue(key)` keeps theirs. The example sections show them after
48
- their Save button with `EditConflictNotice` from
47
+ and `keepOwnValue(key)` keeps theirs. The example sections show them at the
48
+ end of their form with `EditConflictNotice` from
49
49
  `@jskit-ai/http-web/client/components/EditConflictNotice`, which takes
50
50
  `{ key, label, value }` items, `value` the server's value as the field shows it.
51
51
 
@@ -56,11 +56,58 @@ Sections are pages of the account surface, in Material 3's list-detail layout
56
56
  `/account/preferences`), both rendering `AccountSettingsClientElement`, which
57
57
  reads the section from the route's `section` param. The section page's parent
58
58
  is the list, the surface's `"/"`. A phone or medium window shows the list or one
59
- section, and Up returns from the section to the list; an expanded or large
59
+ section, and the bar returns from the section to the list (a form's close, a
60
+ section that is no form its Up arrow); an expanded or large
60
61
  window shows the list beside the open section, or beside the first section on
61
- the list's own page. A link to a section is its path, `/account/invites`, with
62
+ the list's own page, and both draw the same bar, with Done as the way out. A link to a section is its path, `/account/invites`, with
62
63
  `returnTo` in the query for Done.
63
64
 
65
+ The section list is headed by the account as saved (`runtime.account.saved`,
66
+ while the profile form holds what the person types): its avatar in
67
+ `primary-container`, a tile's size, with the account control's initials (one
68
+ letter for a one-word name), its name in a headline role and its email, the avatar lined up with the
69
+ list's tiles and the name with their titles and, on a phone, with the page's
70
+ margin. Each entry of the list is a Material 3 list item headed by its icon on a
71
+ tonal tile: its title in body-large, with a line under it in body-medium saying
72
+ what the section holds (the link's description; its name is the title), 72dp
73
+ tall. A section's placement names them in
74
+ `props.icon`, an icon alias such as `"$mail"`, and `props.summary`, plain text,
75
+ a message key or `{ key, fallback }`, beside `value` and `title`; the four
76
+ example sections have users-web's (`$person`, `$tune`, `$notifications`, `$key`,
77
+ and a summary each), and a section that names none has the settings icon and
78
+ its title alone. Where the list is alone (compact and medium windows) each entry
79
+ ends in a chevron, as it opens a page. The open section's label is bold, and
80
+ its tile joins its `secondary-container` pill, its icon in
81
+ `on-secondary-container`. Beside the list, the open section is headed by its
82
+ tile and its title (an `h2`; the app bar's title, "Account settings", is the
83
+ page's `h1`), its tile lined up with the account's, and its form keeps a
84
+ readable width, at most 600px. A section open alone (compact and medium
85
+ windows) adds no heading: the app bar's title is the section's, under Up to the
86
+ list. A section's content starts at the page's margin, with no side padding of
87
+ its own.
88
+
89
+ A section's form is an edit form, as the guide's forms are. Its Save is the app
90
+ bar's primary action: `<ShellPageActions>` holds a
91
+ `<ShellPageAction primary label="Save profile" type="submit" form="…">` that
92
+ submits the section's form by its id, with `loading` and `pending` while it
93
+ saves. Save says what it saves and stays off until a field changes: each form
94
+ in the runtime has `hasUnsavedEdits` (a ref), true while a field differs from
95
+ what the form last took from the server. The section calls
96
+ `useShellPageClose({ label: "Cancel", close: () => navigation.finish() })`, so
97
+ the bar's Up arrow is its close (X), which leaves for the list; Sign-in methods,
98
+ no form, keeps the arrow. Leaving a form with unsaved edits asks first: its
99
+ close, Done, another section and the browser's Back open
100
+ `AccountSettingsClientElement`'s "Discard unsaved changes?" dialog (Keep
101
+ editing stays; Discard gives the form its saved values back and goes on), and
102
+ closing or reloading the tab asks through the browser. The runtime's
103
+ `hasUnsavedEdits` and `discardEdits()` cover its three forms; a section with a
104
+ form of its own asks the same way only through its own guard. The example profile section shows the
105
+ avatar in `primary-container` with **Change avatar** (**Add avatar** without
106
+ one), a filled tonal button in `secondary-container`, beside it, Display name
107
+ with its leading icon in Material 3's 56dp outlined field, and the email, which
108
+ the sign-in account manages, as a detail row to read: the address first, then
109
+ "Email" and who manages it, its icon and text on the field's keylines.
110
+
64
111
  `runtime.signInMethods.methods` lists the auth provider's OAuth sign-in
65
112
  methods as `{ provider, label, linked, canLink, canUnlink }`, read from the
66
113
  settings security status. `link(provider)` leaves for the provider through
@@ -82,10 +129,10 @@ provider offers provider linking (`providerLinking` in its capabilities).
82
129
  - The route and placement owner agree.
83
130
  - The account surface renders in its own layout, `src/pages/account.vue`
84
131
  (`ShellLayout` around `<RouterView />`, `meta.jskit.surface: "account"`), so
85
- the settings page's title and Up arrow are in the top app bar. Up is the
86
- page's only way out; `AccountSettingsClientElement` adds a Done action only
87
- where Up can't go back (no parent, a section beside the list on a wide
88
- window, or a returnTo on another origin).
132
+ the settings page's title and Up arrow are in the top app bar. Up (a form's
133
+ close) is the page's only way out; `AccountSettingsClientElement` adds a Done
134
+ action only where Up can't go back (no parent, a wide window, where a section
135
+ shows beside the list, or a returnTo on another origin).
89
136
  With no navigation items, the surface shows no navigation bar, rail or drawer.
90
137
  - Each section has its own address, `/account/<section>`, served by
91
138
  `src/pages/account/[section].vue` with parent `"/"`; nothing selects a
@@ -108,8 +155,10 @@ notification vocabulary while keeping server-owned validation authoritative.
108
155
  Navigate away and back with warm cache, exercise browser back/forward, save and
109
156
  clear fields, verify toast errors, inspect skeleton geometry, and test keyboard
110
157
  operation at compact and expanded widths. At 390 px check that the list and a
111
- section show one at a time and Up returns from the section to the list; at
112
- 1280 px that the list shows beside the open section, with no Up.
158
+ section show one at a time and the bar's close (X) returns from a form section
159
+ to the list; at 1280 px that the list shows beside the open section, with no Up.
160
+ Check that Save stays off until a field changes, and that leaving a changed form
161
+ by its close, another section, Back or closing the tab asks first.
113
162
 
114
163
  ## Avoid
115
164
 
@@ -1,7 +1,10 @@
1
1
  <script setup>
2
2
  import { computed } from "vue";
3
3
  import EditConflictNotice from "@jskit-ai/http-web/client/components/EditConflictNotice";
4
- import { vPending } from "@jskit-ai/shell-web/client/directives/vPending";
4
+ import ShellPageAction from "@jskit-ai/shell-web/client/components/ShellPageAction";
5
+ import ShellPageActions from "@jskit-ai/shell-web/client/components/ShellPageActions";
6
+ import { useShellPageClose } from "@jskit-ai/shell-web/client/composables/useShellPageClose";
7
+ import { useShellNavigation } from "@jskit-ai/shell-web/client/navigation/useShellNavigation";
5
8
 
6
9
  const props = defineProps({
7
10
  runtime: {
@@ -12,6 +15,11 @@ const props = defineProps({
12
15
 
13
16
  const notifications = props.runtime.notifications;
14
17
 
18
+ // An edit form, as the guide's forms are: the app bar's Up arrow is its close (X), Cancel, which leaves for the list;
19
+ // the settings ask first when the form has unsaved edits.
20
+ const navigation = useShellNavigation();
21
+ useShellPageClose({ label: "Cancel", close: () => navigation.finish() });
22
+
15
23
  // The settings read again (another session saved them) keep what the person switched; the notice names each switch
16
24
  // whose server value changed meanwhile.
17
25
  const FIELD_LABELS = Object.freeze({ productUpdates: "Product updates", accountActivity: "Account activity alerts" });
@@ -23,7 +31,20 @@ const conflictItems = computed(() =>
23
31
  <template>
24
32
  <div class="account-settings-section">
25
33
  <div class="account-settings-section__body">
26
- <v-form @submit.prevent="notifications.submit" novalidate>
34
+ <!-- Save is the app bar's primary action, as Material 3 puts a form's Save; it submits this form by its id. It says
35
+ what it saves, and stays off until a field changes. -->
36
+ <ShellPageActions>
37
+ <ShellPageAction
38
+ primary
39
+ label="Save notifications"
40
+ type="submit"
41
+ form="account-settings-notifications-form"
42
+ :loading="notifications.isSaving.value"
43
+ :pending="notifications.isSaving.value || notifications.isRefreshing.value"
44
+ :disabled="!notifications.hasUnsavedEdits.value"
45
+ />
46
+ </ShellPageActions>
47
+ <v-form id="account-settings-notifications-form" @submit.prevent="notifications.submit" novalidate>
27
48
  <v-switch
28
49
  v-model="notifications.form.productUpdates"
29
50
  label="Product updates"
@@ -47,15 +68,6 @@ const conflictItems = computed(() =>
47
68
  hide-details
48
69
  disabled
49
70
  />
50
- <v-btn
51
- type="submit"
52
- color="primary"
53
- class="mt-4"
54
- :loading="notifications.isSaving.value"
55
- v-pending="notifications.isSaving.value || notifications.isRefreshing.value"
56
- >
57
- Save notification settings
58
- </v-btn>
59
71
  <EditConflictNotice
60
72
  :items="conflictItems"
61
73
  @accept="notifications.acceptServerValue"
@@ -71,7 +83,8 @@ const conflictItems = computed(() =>
71
83
  overflow: hidden;
72
84
  }
73
85
 
86
+ /* The section starts at the page's margin, under the bar's Up arrow: no side padding of its own. */
74
87
  .account-settings-section__body {
75
- padding: 1rem;
88
+ padding: 1rem 0;
76
89
  }
77
90
  </style>
@@ -1,7 +1,10 @@
1
1
  <script setup>
2
2
  import { computed } from "vue";
3
3
  import EditConflictNotice from "@jskit-ai/http-web/client/components/EditConflictNotice";
4
- import { vPending } from "@jskit-ai/shell-web/client/directives/vPending";
4
+ import ShellPageAction from "@jskit-ai/shell-web/client/components/ShellPageAction";
5
+ import ShellPageActions from "@jskit-ai/shell-web/client/components/ShellPageActions";
6
+ import { useShellPageClose } from "@jskit-ai/shell-web/client/composables/useShellPageClose";
7
+ import { useShellNavigation } from "@jskit-ai/shell-web/client/navigation/useShellNavigation";
5
8
 
6
9
  const props = defineProps({
7
10
  runtime: {
@@ -12,6 +15,11 @@ const props = defineProps({
12
15
 
13
16
  const preferences = props.runtime.preferences;
14
17
 
18
+ // An edit form, as the guide's forms are: the app bar's Up arrow is its close (X), Cancel, which leaves for the list;
19
+ // the settings ask first when the form has unsaved edits.
20
+ const navigation = useShellNavigation();
21
+ useShellPageClose({ label: "Cancel", close: () => navigation.finish() });
22
+
15
23
  // The settings read again (another session saved them) keep what the person chose; the notice names each field whose
16
24
  // server value changed meanwhile, with that value as its list shows it.
17
25
  const FIELDS = Object.freeze({
@@ -35,7 +43,20 @@ const conflictItems = computed(() =>
35
43
  <template>
36
44
  <div class="account-settings-section">
37
45
  <div class="account-settings-section__body">
38
- <v-form @submit.prevent="preferences.submit" novalidate>
46
+ <!-- Save is the app bar's primary action, as Material 3 puts a form's Save; it submits this form by its id. It says
47
+ what it saves, and stays off until a field changes. -->
48
+ <ShellPageActions>
49
+ <ShellPageAction
50
+ primary
51
+ label="Save preferences"
52
+ type="submit"
53
+ form="account-settings-preferences-form"
54
+ :loading="preferences.isSaving.value"
55
+ :pending="preferences.isSaving.value || preferences.isRefreshing.value"
56
+ :disabled="!preferences.hasUnsavedEdits.value"
57
+ />
58
+ </ShellPageActions>
59
+ <v-form id="account-settings-preferences-form" @submit.prevent="preferences.submit" novalidate>
39
60
  <v-row>
40
61
  <v-col cols="12" md="4">
41
62
  <!-- readable-check: allow selection-field - data: the account settings runtime holds these as fixed lists, so nothing loads -->
@@ -46,7 +67,6 @@ const conflictItems = computed(() =>
46
67
  item-title="title"
47
68
  item-value="value"
48
69
  variant="outlined"
49
- density="comfortable"
50
70
  :disabled="preferences.isSaving.value"
51
71
  :error-messages="preferences.fieldErrors.theme"
52
72
  />
@@ -61,7 +81,6 @@ const conflictItems = computed(() =>
61
81
  item-title="title"
62
82
  item-value="value"
63
83
  variant="outlined"
64
- density="comfortable"
65
84
  :disabled="preferences.isSaving.value"
66
85
  :error-messages="preferences.fieldErrors.locale"
67
86
  />
@@ -74,7 +93,6 @@ const conflictItems = computed(() =>
74
93
  label="Time zone"
75
94
  :items="preferences.options.timeZone"
76
95
  variant="outlined"
77
- density="comfortable"
78
96
  :disabled="preferences.isSaving.value"
79
97
  :error-messages="preferences.fieldErrors.timeZone"
80
98
  />
@@ -89,7 +107,6 @@ const conflictItems = computed(() =>
89
107
  item-title="title"
90
108
  item-value="value"
91
109
  variant="outlined"
92
- density="comfortable"
93
110
  :disabled="preferences.isSaving.value"
94
111
  :error-messages="preferences.fieldErrors.dateFormat"
95
112
  />
@@ -104,7 +121,6 @@ const conflictItems = computed(() =>
104
121
  item-title="title"
105
122
  item-value="value"
106
123
  variant="outlined"
107
- density="comfortable"
108
124
  :disabled="preferences.isSaving.value"
109
125
  :error-messages="preferences.fieldErrors.numberFormat"
110
126
  />
@@ -117,7 +133,6 @@ const conflictItems = computed(() =>
117
133
  label="Currency"
118
134
  :items="preferences.options.currency"
119
135
  variant="outlined"
120
- density="comfortable"
121
136
  :disabled="preferences.isSaving.value"
122
137
  :error-messages="preferences.fieldErrors.currencyCode"
123
138
  />
@@ -130,22 +145,12 @@ const conflictItems = computed(() =>
130
145
  label="Avatar size"
131
146
  :items="preferences.options.avatarSize"
132
147
  variant="outlined"
133
- density="comfortable"
134
148
  :disabled="preferences.isSaving.value"
135
149
  :error-messages="preferences.fieldErrors.avatarSize"
136
150
  />
137
151
  </v-col>
138
152
  </v-row>
139
153
 
140
- <v-btn
141
- type="submit"
142
- color="primary"
143
- class="mt-4"
144
- :loading="preferences.isSaving.value"
145
- v-pending="preferences.isSaving.value || preferences.isRefreshing.value"
146
- >
147
- Save preferences
148
- </v-btn>
149
154
  <EditConflictNotice
150
155
  :items="conflictItems"
151
156
  @accept="preferences.acceptServerValue"
@@ -161,7 +166,8 @@ const conflictItems = computed(() =>
161
166
  overflow: hidden;
162
167
  }
163
168
 
169
+ /* The section starts at the page's margin, under the bar's Up arrow: no side padding of its own. */
164
170
  .account-settings-section__body {
165
- padding: 1rem;
171
+ padding: 1rem 0;
166
172
  }
167
173
  </style>
@@ -1,7 +1,10 @@
1
1
  <script setup>
2
2
  import { computed } from "vue";
3
3
  import EditConflictNotice from "@jskit-ai/http-web/client/components/EditConflictNotice";
4
- import { vPending } from "@jskit-ai/shell-web/client/directives/vPending";
4
+ import ShellPageAction from "@jskit-ai/shell-web/client/components/ShellPageAction";
5
+ import ShellPageActions from "@jskit-ai/shell-web/client/components/ShellPageActions";
6
+ import { useShellPageClose } from "@jskit-ai/shell-web/client/composables/useShellPageClose";
7
+ import { useShellNavigation } from "@jskit-ai/shell-web/client/navigation/useShellNavigation";
5
8
 
6
9
  const props = defineProps({
7
10
  runtime: {
@@ -12,6 +15,11 @@ const props = defineProps({
12
15
 
13
16
  const profile = props.runtime.profile;
14
17
 
18
+ // An edit form, as the guide's forms are: the app bar's Up arrow is its close (X), Cancel, which leaves for the list;
19
+ // the settings ask first when the form has unsaved edits.
20
+ const navigation = useShellNavigation();
21
+ useShellPageClose({ label: "Cancel", close: () => navigation.finish() });
22
+
15
23
  // The settings read again (another session saved them) keep what the person typed; the notice names each field whose
16
24
  // server value changed meanwhile.
17
25
  const FIELD_LABELS = Object.freeze({ displayName: "Display name", email: "Email" });
@@ -23,25 +31,36 @@ const conflictItems = computed(() =>
23
31
  <template>
24
32
  <div class="account-settings-section">
25
33
  <div class="account-settings-section__body">
26
- <v-form @submit.prevent="profile.submit" novalidate>
27
- <v-row class="mb-2">
28
- <v-col cols="12" md="4" class="d-flex flex-column align-center justify-center">
29
- <v-avatar :size="profile.avatar.size" color="surface-variant" rounded="circle" class="mb-3">
30
- <v-img v-if="profile.avatar.effectiveUrl" :src="profile.avatar.effectiveUrl" cover />
31
- <span v-else class="text-title-large">{{ profile.initials.value }}</span>
32
- </v-avatar>
33
- <div class="text-body-small on-surface-variant">Preview size: {{ profile.avatar.size }} px</div>
34
- </v-col>
34
+ <!-- Save is the app bar's primary action, as Material 3 puts a form's Save; it submits this form by its id. It says
35
+ what it saves, and stays off until a field changes. -->
36
+ <ShellPageActions>
37
+ <ShellPageAction
38
+ primary
39
+ label="Save profile"
40
+ type="submit"
41
+ form="account-settings-profile-form"
42
+ :loading="profile.isSaving.value"
43
+ :pending="profile.isSaving.value || profile.isRefreshing.value"
44
+ :disabled="!profile.hasUnsavedEdits.value || profile.isDeletingAvatar.value"
45
+ />
46
+ </ShellPageActions>
47
+ <v-form id="account-settings-profile-form" @submit.prevent="profile.submit" novalidate>
48
+ <!-- The avatar in a container colour, at the size the person chose, with its actions beside it. -->
49
+ <div class="d-flex flex-wrap align-center ga-4 mb-6">
50
+ <v-avatar :size="profile.avatar.size" color="primary-container" rounded="circle">
51
+ <v-img v-if="profile.avatar.effectiveUrl" :src="profile.avatar.effectiveUrl" cover />
52
+ <span v-else class="text-title-large">{{ profile.initials.value }}</span>
53
+ </v-avatar>
35
54
 
36
- <v-col cols="12" md="8">
37
- <div class="d-flex flex-wrap ga-2 mb-2">
55
+ <div>
56
+ <div class="d-flex flex-wrap ga-2">
38
57
  <v-btn
39
- variant="tonal"
40
- color="secondary"
58
+ variant="flat"
59
+ color="secondary-container"
41
60
  :disabled="profile.isSaving.value || profile.isDeletingAvatar.value || profile.isRefreshing.value"
42
61
  @click="profile.openAvatarEditor"
43
62
  >
44
- Replace avatar
63
+ {{ profile.avatar.hasUploadedAvatar ? "Change avatar" : "Add avatar" }}
45
64
  </v-btn>
46
65
  <v-btn
47
66
  v-if="profile.avatar.hasUploadedAvatar"
@@ -55,48 +74,32 @@ const conflictItems = computed(() =>
55
74
  </v-btn>
56
75
  </div>
57
76
 
58
- <div v-if="profile.selectedAvatarFileName.value" class="text-body-small on-surface-variant mb-2">
77
+ <div v-if="profile.selectedAvatarFileName.value" class="text-body-small on-surface-variant mt-2">
59
78
  Selected file: {{ profile.selectedAvatarFileName.value }}
60
79
  </div>
61
- </v-col>
62
- </v-row>
80
+ </div>
81
+ </div>
63
82
 
64
- <v-row>
65
- <v-col cols="12">
66
- <v-text-field
67
- v-model="profile.form.displayName"
68
- label="Display name"
69
- variant="outlined"
70
- density="comfortable"
71
- autocomplete="nickname"
72
- :readonly="profile.isSaving.value"
73
- :error-messages="profile.fieldErrors.displayName"
74
- />
75
- </v-col>
83
+ <v-text-field
84
+ v-model="profile.form.displayName"
85
+ label="Display name"
86
+ variant="outlined"
87
+ autocomplete="nickname"
88
+ prepend-inner-icon="$person"
89
+ :readonly="profile.isSaving.value"
90
+ :error-messages="profile.fieldErrors.displayName"
91
+ />
76
92
 
77
- <v-col cols="12">
78
- <v-text-field
79
- v-model="profile.form.email"
80
- label="Email"
81
- variant="outlined"
82
- density="comfortable"
83
- readonly
84
- hint="Managed by your sign-in account"
85
- persistent-hint
86
- />
87
- </v-col>
88
- </v-row>
89
-
90
- <v-btn
91
- type="submit"
92
- color="primary"
93
- class="mt-4"
94
- :loading="profile.isSaving.value"
95
- v-pending="profile.isSaving.value || profile.isRefreshing.value"
96
- :disabled="profile.isDeletingAvatar.value"
97
- >
98
- Save profile
99
- </v-btn>
93
+ <!-- The sign-in account manages the email: a detail row to read, not a field to type in. The address is its
94
+ title, what it is and who manages it the lines under it, on the field's icon and text keylines above. -->
95
+ <div class="account-email" data-testid="account-email">
96
+ <v-icon icon="$mail" color="on-surface-variant" />
97
+ <div class="account-email__text">
98
+ <div class="account-email__value text-body-large">{{ profile.form.email }}</div>
99
+ <div class="text-body-medium on-surface-variant">Email</div>
100
+ <div class="text-body-medium on-surface-variant">Managed by your sign-in account</div>
101
+ </div>
102
+ </div>
100
103
  <EditConflictNotice :items="conflictItems" @accept="profile.acceptServerValue" @keep="profile.keepOwnValue" />
101
104
  </v-form>
102
105
  </div>
@@ -108,7 +111,24 @@ const conflictItems = computed(() =>
108
111
  overflow: hidden;
109
112
  }
110
113
 
114
+ /* The section starts at the page's margin, under the bar's Up arrow: no side padding of its own. */
111
115
  .account-settings-section__body {
112
- padding: 1rem;
116
+ padding: 1rem 0;
117
+ }
118
+
119
+ .account-email {
120
+ display: flex;
121
+ align-items: flex-start;
122
+ gap: 6px;
123
+ padding-inline: 12px;
124
+ }
125
+
126
+ .account-email__text {
127
+ min-width: 0;
128
+ }
129
+
130
+ /* A long address wraps rather than hiding its end. */
131
+ .account-email__value {
132
+ overflow-wrap: anywhere;
113
133
  }
114
134
  </style>
@@ -11,7 +11,7 @@ const signInMethods = props.runtime.signInMethods;
11
11
 
12
12
  <template>
13
13
  <div class="account-settings-section">
14
- <v-list lines="two" class="py-0">
14
+ <v-list lines="two" class="account-settings-section__methods py-0">
15
15
  <v-list-item
16
16
  v-for="method in signInMethods.methods.value"
17
17
  :key="method.provider"
@@ -55,7 +55,12 @@ const signInMethods = props.runtime.signInMethods;
55
55
  overflow: hidden;
56
56
  }
57
57
 
58
+ /* The methods and the hint start at the page's margin, as every section's content does. */
59
+ .account-settings-section__methods .v-list-item {
60
+ padding-inline: 0;
61
+ }
62
+
58
63
  .account-settings-section__hint {
59
- padding: 0 1rem 1rem;
64
+ padding: 0 0 1rem;
60
65
  }
61
66
  </style>
@@ -10,9 +10,9 @@
10
10
  "./shared": "./src/shared/index.js"
11
11
  },
12
12
  "dependencies": {
13
- "@jskit-ai/crud-core": "0.2.69",
13
+ "@jskit-ai/crud-core": "0.2.70",
14
14
  "@jskit-ai/resource-crud-core": "0.1.232",
15
- "@jskit-ai/users-core": "0.2.80"
15
+ "@jskit-ai/users-core": "0.2.81"
16
16
  },
17
17
  "jskit": {
18
18
  "kind": "runtime",
@@ -10,14 +10,14 @@
10
10
  "./shared": "./src/shared/index.js"
11
11
  },
12
12
  "dependencies": {
13
- "@jskit-ai/crud-core": "0.2.69",
13
+ "@jskit-ai/crud-core": "0.2.70",
14
14
  "@jskit-ai/resource-crud-core": "0.1.232",
15
- "@jskit-ai/users-core": "0.2.80",
16
- "@jskit-ai/workspaces-core": "0.2.80"
15
+ "@jskit-ai/users-core": "0.2.81",
16
+ "@jskit-ai/workspaces-core": "0.2.81"
17
17
  },
18
18
  "peerDependencies": {
19
19
  "@jskit-ai/kernel": "0.2.38",
20
- "@jskit-ai/resource-runtime": "0.2.62"
20
+ "@jskit-ai/resource-runtime": "0.2.63"
21
21
  },
22
22
  "jskit": {
23
23
  "kind": "runtime",
@@ -1162,26 +1162,6 @@ the last run's largest app server reached.**
1162
1162
  each test signing in. `jskit check` fails a webServer that runs the development server
1163
1163
  (`npm run develop`, `vite`), one webServer shared by every worker, and a
1164
1164
  config without a `globalTimeout`.
1165
- - Every test of a worker reaches its server from 127.0.0.1, as a different
1166
- person each time, so the servers `jskit browser tests` starts count no
1167
- per-address rate limit: a route's `rateLimit`, auth's sign-in limits and the
1168
- accounts hub's per-address counters. The launcher sets
1169
- `JSKIT_BROWSER_TEST_SERVER=1`, and a server with it whose `APP_ENV` is not
1170
- `test` refuses to start. Prove a limit with a Node test against an ordinary
1171
- server.
1172
- - A failed test keeps its trace with DOM snapshots. To take them, Playwright
1173
- runs a script in every frame, and Chromium logs `Blocked script execution in
1174
- 'about:srcdoc' because the document's frame is sandboxed and the
1175
- 'allow-scripts' permission is not set.` for each frame sandboxed without
1176
- `allow-scripts`, such as an email preview: the sandbox at work, not the app.
1177
- A test that fails on console errors leaves out that line, and only that line.
1178
- - JSKIT's realtime connects by WebSocket only, which `page.route()` and
1179
- `context.route()` never see, so an HTTP route that aborts `/socket.io`
1180
- changes nothing. A test that must run without live updates closes the socket
1181
- with `context.routeWebSocket(/\/socket\.io\//, (socket) => socket.close())`
1182
- before its page opens. Any HTTP route also turns the browser's cache off for
1183
- its page or context, so a guard that only watches requests listens to
1184
- `page.on("request")` instead.
1185
1165
  - A file that truly cannot run beside others, because it holds a resource of
1186
1166
  the whole machine, says why on its first line,
1187
1167
  `// jskit-test: alone - <reason>`. `jskit test` runs it after the others,
@@ -118,6 +118,13 @@ without it adds:
118
118
  - Ready when: `GET` `/api/health` returns `200`
119
119
  ```
120
120
 
121
+ Every test of a worker reaches its server from one address, 127.0.0.1, as a
122
+ different person each time, so a browser test server counts no per-address
123
+ rate limit: a route's `rateLimit`, auth's sign-in limits and the accounts hub's
124
+ per-address counters. The servers' launcher sets `JSKIT_BROWSER_TEST_SERVER=1`,
125
+ and a server with it whose `APP_ENV` is not `test` refuses to start. Prove a
126
+ limit with a Node test against an ordinary server.
127
+
121
128
  The build and the snapshot are reused while their sources are unchanged, so a
122
129
  focused check never rebuilds them. After a change to the browser-test setup,
123
130
  run the suite twice: the second run says `Frontend build unchanged, reused` and
@@ -134,3 +141,19 @@ directly:
134
141
  ```bash
135
142
  npx playwright test <test-file> -g "<changed behavior>"
136
143
  ```
144
+
145
+ A test that must run without live updates closes the realtime socket with
146
+ `context.routeWebSocket(/\/socket\.io\//, (socket) => socket.close())` before
147
+ its page opens. JSKIT's realtime connects by WebSocket only, which
148
+ `page.route()` and `context.route()` never see, so an HTTP route that aborts
149
+ `/socket.io` changes nothing. Any HTTP route also turns the browser's cache off
150
+ for its page or context, so a guard that only watches requests listens to
151
+ `page.on("request")` instead.
152
+
153
+ `browserTestConfig()` keeps a failed test's trace with DOM snapshots. To take
154
+ them, Playwright runs a script in every frame, and Chromium logs `Blocked script
155
+ execution in 'about:srcdoc' because the document's frame is sandboxed and the
156
+ 'allow-scripts' permission is not set.` for each frame sandboxed without
157
+ `allow-scripts`, such as an email preview. That is the sandbox doing its job,
158
+ not the app failing: a test that fails on console errors leaves out that line,
159
+ and only that line.