wcz-layout 10.1.2 → 10.1.7

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 (85) hide show
  1. package/dist/{AggregatedCell-C7nAQyMO.mjs → AggregatedCell-CqGptV6i.mjs} +199 -150
  2. package/dist/AggregatedCell-CqGptV6i.mjs.map +1 -0
  3. package/dist/Approval-DoD-GRRH.mjs.map +1 -1
  4. package/dist/DialogsContext-DLqA8RJ_.mjs.map +1 -1
  5. package/dist/Email-BzQQkbe9.mjs.map +1 -1
  6. package/dist/FileMeta-DDqUju1Y.mjs.map +1 -1
  7. package/dist/{LayoutTable-DX9IaO8V.d.mts → LayoutTable-CRo43iWr.d.mts} +7 -3
  8. package/dist/{RouterListItemButton-ULMlaQh6.mjs → RouterListItemButton-ke6iPKkL.mjs} +9 -9
  9. package/dist/RouterListItemButton-ke6iPKkL.mjs.map +1 -0
  10. package/dist/{approval-DiNOXd4B.mjs → approval-L09uPzTU.mjs} +2 -2
  11. package/dist/approval-L09uPzTU.mjs.map +1 -0
  12. package/dist/auth.d.mts +1 -0
  13. package/dist/auth.mjs +15 -12
  14. package/dist/auth.mjs.map +1 -1
  15. package/dist/components.d.mts +1 -1
  16. package/dist/components.mjs +594 -361
  17. package/dist/components.mjs.map +1 -1
  18. package/dist/{createApi-DGJJ4I_R.mjs → createApi-BhNkG4jz.mjs} +3 -3
  19. package/dist/createApi-BhNkG4jz.mjs.map +1 -0
  20. package/dist/data/client.mjs +3 -3
  21. package/dist/data/client.mjs.map +1 -1
  22. package/dist/data/server.mjs +4 -4
  23. package/dist/data/server.mjs.map +1 -1
  24. package/dist/{file-C14fhUeg.mjs → file-Chlljz3o.mjs} +4 -4
  25. package/dist/file-Chlljz3o.mjs.map +1 -0
  26. package/dist/{file-C5BOj1q8.mjs → file-Dl8JCcqy.mjs} +4 -4
  27. package/dist/file-Dl8JCcqy.mjs.map +1 -0
  28. package/dist/hooks.d.mts +2 -1
  29. package/dist/hooks.mjs +541 -591
  30. package/dist/hooks.mjs.map +1 -1
  31. package/dist/index.d.mts +9 -0
  32. package/dist/index.mjs +438 -428
  33. package/dist/index.mjs.map +1 -1
  34. package/dist/middleware.mjs +2 -2
  35. package/dist/middleware.mjs.map +1 -1
  36. package/dist/models.mjs.map +1 -1
  37. package/dist/{peoplesoft-BkJMCcHb.mjs → peoplesoft-BhintHQz.mjs} +3 -3
  38. package/dist/peoplesoft-BhintHQz.mjs.map +1 -0
  39. package/dist/{providers-DrairEO2.mjs → providers-BvuZWkpD.mjs} +2 -2
  40. package/dist/providers-BvuZWkpD.mjs.map +1 -0
  41. package/dist/{tokens-BLRreL1j.mjs → tokens-XuFhVbh5.mjs} +9 -6
  42. package/dist/tokens-XuFhVbh5.mjs.map +1 -0
  43. package/dist/{utils-BUpDoqme.mjs → utils-CaeVFWF-.mjs} +18 -7
  44. package/dist/utils-CaeVFWF-.mjs.map +1 -0
  45. package/dist/utils.mjs +1 -1
  46. package/dist/vite.mjs +11 -0
  47. package/dist/vite.mjs.map +1 -1
  48. package/package.json +131 -130
  49. package/skills/client-db/SKILL.md +136 -136
  50. package/skills/db-schema/SKILL.md +98 -98
  51. package/skills/dialogs/SKILL.md +74 -74
  52. package/skills/forms/SKILL.md +122 -122
  53. package/skills/general/SKILL.md +127 -127
  54. package/skills/general/references/exports.md +6 -1
  55. package/skills/migrations/SKILL.md +57 -57
  56. package/skills/migrations/versions/migrate-v10-to-v11.md +2 -1
  57. package/skills/migrations/versions/migrate-v9-to-v10.md +582 -582
  58. package/skills/routing/SKILL.md +87 -87
  59. package/skills/server-functions/SKILL.md +95 -95
  60. package/skills/services/SKILL.md +34 -34
  61. package/skills/services/docs/email.md +32 -32
  62. package/skills/services/docs/file.md +108 -108
  63. package/skills/services/docs/peoplesoft.md +114 -114
  64. package/skills/start/SKILL.md +52 -52
  65. package/skills/start/steps/01-git-setup.md +10 -10
  66. package/skills/start/steps/02-project-name-setup.md +19 -19
  67. package/skills/start/steps/03-apm-setup.md +97 -208
  68. package/skills/start/steps/04-wicop-setup.md +105 -105
  69. package/skills/start/steps/05-database-setup.md +52 -52
  70. package/skills/start/steps/06-entra-setup.md +96 -96
  71. package/skills/start/steps/07-vault-setup.md +115 -115
  72. package/skills/start/steps/08-generate-favicon.md +8 -8
  73. package/skills/start/steps/09-gitlab-ci.md +25 -25
  74. package/skills/start/steps/10-commit.md +15 -15
  75. package/skills/table/SKILL.md +266 -264
  76. package/dist/AggregatedCell-C7nAQyMO.mjs.map +0 -1
  77. package/dist/RouterListItemButton-ULMlaQh6.mjs.map +0 -1
  78. package/dist/approval-DiNOXd4B.mjs.map +0 -1
  79. package/dist/createApi-DGJJ4I_R.mjs.map +0 -1
  80. package/dist/file-C14fhUeg.mjs.map +0 -1
  81. package/dist/file-C5BOj1q8.mjs.map +0 -1
  82. package/dist/peoplesoft-BkJMCcHb.mjs.map +0 -1
  83. package/dist/providers-DrairEO2.mjs.map +0 -1
  84. package/dist/tokens-BLRreL1j.mjs.map +0 -1
  85. package/dist/utils-BUpDoqme.mjs.map +0 -1
@@ -1,96 +1,96 @@
1
- # Entra ID Setup
2
-
3
- Ask the user only through the **AskUserQuestion** pop-up, never as chat text
4
- waiting for a typed reply, and never with a single `Continue`-style option —
5
- that is a wait, not a question. Ask only when there is a real choice, always
6
- with at least two concrete options; enable free text only for open-ended
7
- values (client ID, user count), not for yes/no decisions.
8
-
9
- To wait for something the user does in the browser — signing in, filling a
10
- field, clicking Submit — poll in a tool loop: wait ~5 s, re-read the page,
11
- repeat until the expected state appears or ~5 minutes pass, then carry
12
- straight on. Never end your turn while waiting; announcing "I'll continue
13
- once you have signed in" and stopping ends the session, and nothing resumes
14
- it. A page that renders blank is usually still loading or still on the
15
- sign-in gate — keep polling instead of reporting it as a problem.
16
-
17
- ---
18
-
19
- Ask via **AskUserQuestion** once, before anything else: **"What do you need for the Entra ID application?"** — options `Request a new application` / `Configure an existing application`. Run only the matching part and never ask this again: `Request a new application` → **Part A**; `Configure an existing application` → **Part B**.
20
-
21
- ---
22
-
23
- ## Part A — Application Creation
24
-
25
- Open `https://itsr.wistron.com/homepage/apply` in the browser and perform the request with the user:
26
-
27
- 1. Click **Select Service Type**. The dialog holds hundreds of radios — never read the full snapshot. Type `Azure AD - Application Management` into its search box, click the matching `Add or Modify` radio, then click the **Submit** at the bottom of the dialog (the page's own Submit stays disabled until later).
28
- 2. Select Add Application → Add Applicant.
29
- 3. Fill in the required application details:
30
- - Set the English application name from the chat context. Do not ask the user for it. If it is absent from the context, read the `name` property in `package.json` and convert it to spaced Pascal Case. Every name carries a company prefix in UPPERCASE: if the name already starts with `SMS` (any casing), uppercase that prefix and keep it — `sms-my-project` becomes `SMS My Project`. Otherwise prefix it with `WCZ` — `my-project` becomes `WCZ My Project`.
31
- - Write a concise, single-sentence reason for creating the application based on its name and purpose. Do not ask the user for this.
32
- - Ask via **AskUserQuestion** for the expected user count, and separately: **"Who can reach the app?"** — options `Internal network only (OA)` / `Also from the public internet`. Do not choose either value on their behalf. In the ITSR form, `Internal network only` is the OA-restricted choice.
33
- - Application Manager: never ask. Take the signed-in user's name from the page header (top-right), type it into the **Application Manager** field, click its search button, and verify the resolved `<employee-id> (<dept><name>)` line appears under the field.
34
- 4. Once every field is filled, click Submit yourself to add the applicant. The applicant appears in the page's summary table and enables the page-level final Submit.
35
- 5. On the summary page, ask via **AskUserQuestion**: **"Submit the ITSR request?"** — options `Submit` / `Add another application`.
36
- - `Add another application` → click **+ Add Applicant** above the summary table, fill the dialog exactly as in step 3, submit the dialog so the new row joins the table, then return to this question. Ask again for the new application's name, its expected user count, and its access scope — these are unique per application, so never carry them over from an existing row. Write its reason yourself.
37
- - `Submit` → click the page-level final Submit and confirm the portal accepted the request.
38
-
39
- Repeat until the user answers `Submit`. Only that answer may trigger the final Submit — the request goes to approvers.
40
-
41
- When the portal needs sign-in, poll until the ITSR request form is visible and continue — do not end the turn.
42
-
43
- Once the request is submitted, close the ITSR browser session and continue to the next step — the applications do not exist until the request is approved, so Part B cannot run yet.
44
-
45
- ---
46
-
47
- ## Part B — Application Configuration
48
-
49
- Open `https://entra.microsoft.com/` and complete every Part B step in one uninterrupted run. Reuse this signed-in tab and the portal's own navigation; for slow controls, poll and re-read the current blade instead of reloading or opening another tab. Deep-linking a blade by URL hash is unreliable — some bounce back to **Overview** — so click the left-nav item instead. Derive every value from the app name and the fixed values below. Do not ask for owners; the owner list is fixed. Ask only before an explicitly user-approved irreversible action.
50
-
51
- Gradually write all the data to `.env.local` with exactly these keys — keep any values already set by earlier steps (if this file does not exist, create it). If empty - fill `SESSION_SECRET` with a freshly generated value, and leave the rest empty until you know the values:
52
-
53
- ```dotenv
54
- ENTRA_CLIENT_ID=
55
- ENTRA_TENANT_ID=
56
- ENTRA_CLIENT_SECRET=
57
- SESSION_SECRET=<generated-64-char-hex>
58
- ```
59
-
60
- **Left navigation: App Registrations:**
61
-
62
- 1. Use the application's display name already present in chat context. Ask via **AskUserQuestion** only if it is genuinely absent; otherwise open **App registrations**, filter by the exact name, and click the matching row. Its **Overview** page shows **Application (client) ID** and **Directory (tenant) ID** — read both and write them to `.env.local` as `ENTRA_CLIENT_ID` and `ENTRA_TENANT_ID` straight away, before configuring anything else. Never ask the user for these two values. Leave `ENTRA_CLIENT_SECRET` empty only until the client secret is created in step 3.
63
- 2. **Authentication (Preview)** — the left-nav item is named that, and it opens on the **Redirect URI configuration** tab. Three URIs are needed, where `<app-name>` is the app's display name in kebab-case — usually identical to the `name` in `package.json`:
64
- - `http://localhost:3000/auth/callback`
65
- - `https://<app-name>.wcz-sat-qas-01.k8s.wistron.com/auth/callback`
66
- - `https://<app-name>.wcz-sat-prd-01.k8s.wistron.com/auth/callback`
67
-
68
- The portal only accepts them one panel at a time:
69
-
70
- a. **+ Add Redirect URI** → platform picker → **Web** → **Select**. The login flow is server-side (confidential client), so never pick **Single-page application**.
71
- b. The panel takes a single URI. Enter the localhost one and click **Configure**. A success toast appears and the platform picker reopens — click **Cancel** to return to the list.
72
- c. The list now shows a **Web** group row with an **Edit** link. Click **Edit**: the panel lists the saved URIs plus one empty row, and filling a row spawns another empty row below it. Add the `qas` and `prd` URIs, then click **Configure**.
73
- d. Verify all three appear as Web rows in the list.
74
-
75
- 3. **Certificates & secrets:** open the **Client secrets** tab → **+ New client secret**. Leave **Description** empty and set **Expires** to `730 days (24 months)` — always these values, never ask the user — then click **Add**. **CRITICAL — one chance only:** the new row's **Value** column holds the secret and is shown _only_ immediately after creation; once you leave or reload the blade it is masked forever and the app must get a brand-new secret. Read that **Value** from the row's textbox in the page snapshot, and write it into `ENTRA_CLIENT_SECRET` in `.env.local` as your very next action, before any other click or navigation. The neighbouring **Secret ID** column is a plain GUID and is _not_ the secret — writing it there is a silent, unrecoverable mistake. The cell renders truncated with `…`, so take the textbox's full value from the snapshot, and never print it in chat or a commit.
76
- 4. **Token configuration:** click **Add groups claim**. In the panel tick **Security groups** only, then expand each of **ID**, **Access**, and **SAML** in "Customize token properties by type" and switch the radio from `Group ID` to `sAMAccountName`. Click **Add**. The list should then show a `groups` claim with token type `ID, Access, SAML`.
77
- 5. **Expose an API:** next to **Application ID URI** click **Add** (or **Edit** if one exists). The portal prefills `api://<client-id>` — replace it with `api://wistron.com/<app-name>` (for `wh-fg-preparation`: `api://wistron.com/wh-fg-preparation`) and **Save**. Then **+ Add a scope** named `access_as_user`, set **Who can consent?** to `Admins and users`, and fill only the two required fields — **Admin consent display name** and **Admin consent description**. Leave the user consent fields empty (optional) and **State** on `Enabled`, then click **Add scope**. Do not navigate away or report progress as complete until the saved `api://wistron.com/<app-name>` URI and enabled `access_as_user` scope are both visible in the portal. Then set the `api` key in `src/lib/auth/scopes.ts` to the plain string `"api://wistron.com/<app-name>/access_as_user"` (`Scope` is `string | Partial<Record<ProviderId, string>>` — an array fails `satisfies Scopes`), matching the scope exactly as the portal lists it; leave the other keys untouched.
78
- 6. **Owners:** first read the current table once. Add only missing people from this fixed list: Radim Staworowski, Martin Husar, Dalibor Homola, Patrik Lorenc, Tien Thanh Tran, Sebastian Ondruska. In the picker, search each missing full name, wait for the exact name and Wistron UPN match, select it, then replace the search text with the next name without closing the picker. Submit the batch once and verify all six names in the refreshed table.
79
- 7. **Manifest:** the page opens the **Microsoft Graph App Manifest (New)** JSON in a Monaco editor. Do not retype the JSON — click into the editor, press `Ctrl+H`, and run Replace All twice: `"acceptMappedClaims": null` → `"acceptMappedClaims": true`, then `"requestedAccessTokenVersion": null` → `"requestedAccessTokenVersion": 2` (both live in the `api` object, one match each). Verify both edited lines, then click **Save**.
80
-
81
- **Left navigation: Enterprise Applications:**
82
-
83
- 1. Open **Enterprise apps → All applications** and search with the exact display name already resolved in App Registrations; do not ask for it again.
84
- 2. **Owners:** repeat the batched owner process from App Registrations. Inspect the table once, keep the picker open while searching and selecting every missing exact Wistron record, and confirm the selected-user count increments after each selection. Click **Select** once, wait for `Owner assignment succeeded`, then verify all six names in the refreshed table. The toolbar and table may load after the heading; keep polling until both appear.
85
- 3. **Single sign-on** opens as **OIDC-based Sign-on**; there is no SAML wizard. Wait for the embedded OIDC content, then click the visible **Edit** pencil under **② Attributes & Claims**. If its reference is stale, re-read this page and click the new reference. Ignore background `400`/`403` console messages while the requested controls remain usable. Confirm the claims list already holds `groups → user.groups`, then add each missing row with **+ Add new claim**:
86
-
87
- | Claim Name | Source Attribute |
88
- | ------------------ | --------------------------- |
89
- | `department` | `user.department` |
90
- | `employeeId` | `user.extensionattribute5` |
91
- | `employeeCategory` | `user.extensionattribute13` |
92
- | `companyName` | `user.companyname` |
93
-
94
- For each one: type the claim name in **Name** and leave **Source** on `Attribute`. **Source attribute** is a dropdown, not a text field: click it, use its filter input when needed, and select the plain unquoted attribute option (never the quoted constant). Click **Save**, then wait for the editor to close and verify the exact name/value row in **Additional claims** before adding the next claim. The claims table can lag a save by several reads — keep re-reading, and reload the blade once if the new row still has not appeared. During the close transition the old form may briefly mark every field invalid even though the save succeeded; the refreshed claims row or `Successfully saved SSO user claims` notification is authoritative. Leave **Claim conditions** and **Advanced SAML claims options** untouched. Finish by verifying all four rows plus the existing `groups → user.groups` row in one claims-table read.
95
-
96
- 4. After all owners and claims are verified, close the Entra browser session and report Part B complete.
1
+ # Entra ID Setup
2
+
3
+ Ask the user only through the **AskUserQuestion** pop-up, never as chat text
4
+ waiting for a typed reply, and never with a single `Continue`-style option —
5
+ that is a wait, not a question. Ask only when there is a real choice, always
6
+ with at least two concrete options; enable free text only for open-ended
7
+ values (client ID, user count), not for yes/no decisions.
8
+
9
+ To wait for something the user does in the browser — signing in, filling a
10
+ field, clicking Submit — poll in a tool loop: wait ~5 s, re-read the page,
11
+ repeat until the expected state appears or ~5 minutes pass, then carry
12
+ straight on. Never end your turn while waiting; announcing "I'll continue
13
+ once you have signed in" and stopping ends the session, and nothing resumes
14
+ it. A page that renders blank is usually still loading or still on the
15
+ sign-in gate — keep polling instead of reporting it as a problem.
16
+
17
+ ---
18
+
19
+ Ask via **AskUserQuestion** once, before anything else: **"What do you need for the Entra ID application?"** — options `Request a new application` / `Configure an existing application`. Run only the matching part and never ask this again: `Request a new application` → **Part A**; `Configure an existing application` → **Part B**.
20
+
21
+ ---
22
+
23
+ ## Part A — Application Creation
24
+
25
+ Open `https://itsr.wistron.com/homepage/apply` in the browser and perform the request with the user:
26
+
27
+ 1. Click **Select Service Type**. The dialog holds hundreds of radios — never read the full snapshot. Type `Azure AD - Application Management` into its search box, click the matching `Add or Modify` radio, then click the **Submit** at the bottom of the dialog (the page's own Submit stays disabled until later).
28
+ 2. Select Add Application → Add Applicant.
29
+ 3. Fill in the required application details:
30
+ - Set the English application name from the chat context. Do not ask the user for it. If it is absent from the context, read the `name` property in `package.json` and convert it to spaced Pascal Case. Every name carries a company prefix in UPPERCASE: if the name already starts with `SMS` (any casing), uppercase that prefix and keep it — `sms-my-project` becomes `SMS My Project`. Otherwise prefix it with `WCZ` — `my-project` becomes `WCZ My Project`.
31
+ - Write a concise, single-sentence reason for creating the application based on its name and purpose. Do not ask the user for this.
32
+ - Ask via **AskUserQuestion** for the expected user count, and separately: **"Who can reach the app?"** — options `Internal network only (OA)` / `Also from the public internet`. Do not choose either value on their behalf. In the ITSR form, `Internal network only` is the OA-restricted choice.
33
+ - Application Manager: never ask. Take the signed-in user's name from the page header (top-right), type it into the **Application Manager** field, click its search button, and verify the resolved `<employee-id> (<dept><name>)` line appears under the field.
34
+ 4. Once every field is filled, click Submit yourself to add the applicant. The applicant appears in the page's summary table and enables the page-level final Submit.
35
+ 5. On the summary page, ask via **AskUserQuestion**: **"Submit the ITSR request?"** — options `Submit` / `Add another application`.
36
+ - `Add another application` → click **+ Add Applicant** above the summary table, fill the dialog exactly as in step 3, submit the dialog so the new row joins the table, then return to this question. Ask again for the new application's name, its expected user count, and its access scope — these are unique per application, so never carry them over from an existing row. Write its reason yourself.
37
+ - `Submit` → click the page-level final Submit and confirm the portal accepted the request.
38
+
39
+ Repeat until the user answers `Submit`. Only that answer may trigger the final Submit — the request goes to approvers.
40
+
41
+ When the portal needs sign-in, poll until the ITSR request form is visible and continue — do not end the turn.
42
+
43
+ Once the request is submitted, close the ITSR browser session and continue to the next step — the applications do not exist until the request is approved, so Part B cannot run yet.
44
+
45
+ ---
46
+
47
+ ## Part B — Application Configuration
48
+
49
+ Open `https://entra.microsoft.com/` and complete every Part B step in one uninterrupted run. Reuse this signed-in tab and the portal's own navigation; for slow controls, poll and re-read the current blade instead of reloading or opening another tab. Deep-linking a blade by URL hash is unreliable — some bounce back to **Overview** — so click the left-nav item instead. Derive every value from the app name and the fixed values below. Do not ask for owners; the owner list is fixed. Ask only before an explicitly user-approved irreversible action.
50
+
51
+ Gradually write all the data to `.env.local` with exactly these keys — keep any values already set by earlier steps (if this file does not exist, create it). If empty - fill `SESSION_SECRET` with a freshly generated value, and leave the rest empty until you know the values:
52
+
53
+ ```dotenv
54
+ ENTRA_CLIENT_ID=
55
+ ENTRA_TENANT_ID=
56
+ ENTRA_CLIENT_SECRET=
57
+ SESSION_SECRET=<generated-64-char-hex>
58
+ ```
59
+
60
+ **Left navigation: App Registrations:**
61
+
62
+ 1. Use the application's display name already present in chat context. Ask via **AskUserQuestion** only if it is genuinely absent; otherwise open **App registrations**, filter by the exact name, and click the matching row. Its **Overview** page shows **Application (client) ID** and **Directory (tenant) ID** — read both and write them to `.env.local` as `ENTRA_CLIENT_ID` and `ENTRA_TENANT_ID` straight away, before configuring anything else. Never ask the user for these two values. Leave `ENTRA_CLIENT_SECRET` empty only until the client secret is created in step 3.
63
+ 2. **Authentication (Preview)** — the left-nav item is named that, and it opens on the **Redirect URI configuration** tab. Three URIs are needed, where `<app-name>` is the app's display name in kebab-case — usually identical to the `name` in `package.json`:
64
+ - `http://localhost:3000/auth/callback`
65
+ - `https://<app-name>.wcz-sat-qas-01.k8s.wistron.com/auth/callback`
66
+ - `https://<app-name>.wcz-sat-prd-01.k8s.wistron.com/auth/callback`
67
+
68
+ The portal only accepts them one panel at a time:
69
+
70
+ a. **+ Add Redirect URI** → platform picker → **Web** → **Select**. The login flow is server-side (confidential client), so never pick **Single-page application**.
71
+ b. The panel takes a single URI. Enter the localhost one and click **Configure**. A success toast appears and the platform picker reopens — click **Cancel** to return to the list.
72
+ c. The list now shows a **Web** group row with an **Edit** link. Click **Edit**: the panel lists the saved URIs plus one empty row, and filling a row spawns another empty row below it. Add the `qas` and `prd` URIs, then click **Configure**.
73
+ d. Verify all three appear as Web rows in the list.
74
+
75
+ 3. **Certificates & secrets:** open the **Client secrets** tab → **+ New client secret**. Leave **Description** empty and set **Expires** to `730 days (24 months)` — always these values, never ask the user — then click **Add**. **CRITICAL — one chance only:** the new row's **Value** column holds the secret and is shown _only_ immediately after creation; once you leave or reload the blade it is masked forever and the app must get a brand-new secret. Read that **Value** from the row's textbox in the page snapshot, and write it into `ENTRA_CLIENT_SECRET` in `.env.local` as your very next action, before any other click or navigation. The neighbouring **Secret ID** column is a plain GUID and is _not_ the secret — writing it there is a silent, unrecoverable mistake. The cell renders truncated with `…`, so take the textbox's full value from the snapshot, and never print it in chat or a commit.
76
+ 4. **Token configuration:** click **Add groups claim**. In the panel tick **Security groups** only, then expand each of **ID**, **Access**, and **SAML** in "Customize token properties by type" and switch the radio from `Group ID` to `sAMAccountName`. Click **Add**. The list should then show a `groups` claim with token type `ID, Access, SAML`.
77
+ 5. **Expose an API:** next to **Application ID URI** click **Add** (or **Edit** if one exists). The portal prefills `api://<client-id>` — replace it with `api://wistron.com/<app-name>` (for `wh-fg-preparation`: `api://wistron.com/wh-fg-preparation`) and **Save**. Then **+ Add a scope** named `access_as_user`, set **Who can consent?** to `Admins and users`, and fill only the two required fields — **Admin consent display name** and **Admin consent description**. Leave the user consent fields empty (optional) and **State** on `Enabled`, then click **Add scope**. Do not navigate away or report progress as complete until the saved `api://wistron.com/<app-name>` URI and enabled `access_as_user` scope are both visible in the portal. Then set the `api` key in `src/lib/auth/scopes.ts` to the plain string `"api://wistron.com/<app-name>/access_as_user"` (`Scope` is `string | Partial<Record<ProviderId, string>>` — an array fails `satisfies Scopes`), matching the scope exactly as the portal lists it; leave the other keys untouched.
78
+ 6. **Owners:** first read the current table once. Add only missing people from this fixed list: Radim Staworowski, Martin Husar, Dalibor Homola, Patrik Lorenc, Tien Thanh Tran, Sebastian Ondruska. In the picker, search each missing full name, wait for the exact name and Wistron UPN match, select it, then replace the search text with the next name without closing the picker. Submit the batch once and verify all six names in the refreshed table.
79
+ 7. **Manifest:** the page opens the **Microsoft Graph App Manifest (New)** JSON in a Monaco editor. Do not retype the JSON — click into the editor, press `Ctrl+H`, and run Replace All twice: `"acceptMappedClaims": null` → `"acceptMappedClaims": true`, then `"requestedAccessTokenVersion": null` → `"requestedAccessTokenVersion": 2` (both live in the `api` object, one match each). Verify both edited lines, then click **Save**.
80
+
81
+ **Left navigation: Enterprise Applications:**
82
+
83
+ 1. Open **Enterprise apps → All applications** and search with the exact display name already resolved in App Registrations; do not ask for it again.
84
+ 2. **Owners:** repeat the batched owner process from App Registrations. Inspect the table once, keep the picker open while searching and selecting every missing exact Wistron record, and confirm the selected-user count increments after each selection. Click **Select** once, wait for `Owner assignment succeeded`, then verify all six names in the refreshed table. The toolbar and table may load after the heading; keep polling until both appear.
85
+ 3. **Single sign-on** opens as **OIDC-based Sign-on**; there is no SAML wizard. Wait for the embedded OIDC content, then click the visible **Edit** pencil under **② Attributes & Claims**. If its reference is stale, re-read this page and click the new reference. Ignore background `400`/`403` console messages while the requested controls remain usable. Confirm the claims list already holds `groups → user.groups`, then add each missing row with **+ Add new claim**:
86
+
87
+ | Claim Name | Source Attribute |
88
+ | ------------------ | --------------------------- |
89
+ | `department` | `user.department` |
90
+ | `employeeId` | `user.extensionattribute5` |
91
+ | `employeeCategory` | `user.extensionattribute13` |
92
+ | `companyName` | `user.companyname` |
93
+
94
+ For each one: type the claim name in **Name** and leave **Source** on `Attribute`. **Source attribute** is a dropdown, not a text field: click it, use its filter input when needed, and select the plain unquoted attribute option (never the quoted constant). Click **Save**, then wait for the editor to close and verify the exact name/value row in **Additional claims** before adding the next claim. The claims table can lag a save by several reads — keep re-reading, and reload the blade once if the new row still has not appeared. During the close transition the old form may briefly mark every field invalid even though the save succeeded; the refreshed claims row or `Successfully saved SSO user claims` notification is authoritative. Leave **Claim conditions** and **Advanced SAML claims options** untouched. Finish by verifying all four rows plus the existing `groups → user.groups` row in one claims-table read.
95
+
96
+ 4. After all owners and claims are verified, close the Entra browser session and report Part B complete.
@@ -1,115 +1,115 @@
1
- # Vault Setup
2
-
3
- Move local-development secrets into Vault, then shrink `.env.local` to the Vault connection.
4
-
5
- Before starting, ask the user via **AskUserQuestion** which environment(s) to
6
- set up: **QAS**, **PRD** or **both**. Both environments follow the same steps —
7
- the login credentials, the Vault path (QAS lives under `sat-qas-01`, PRD under
8
- `sat-prd-01`; each has its own Vault account and password) and a few
9
- environment-specific payload values differ (see Part 2, step 0). When doing
10
- both, run through Parts 1–2 once per environment. In Part 3, always write the
11
- **QAS** connection into `.env.local` (if available).
12
-
13
- To wait for something the user does in the browser — signing in, saving a
14
- secret — poll in a tool loop: wait ~5 s, re-read the page, repeat until the
15
- expected state appears or ~5 minutes pass, then carry straight on. Never end
16
- your turn while waiting; announcing "I'll continue once you have signed in"
17
- and stopping ends the session, and nothing resumes it.
18
-
19
- ## Part 1 — Collect the payload from `.env.local`
20
-
21
- 1. Inspect key names and whether they are set without printing their values. Include keys from `.env` such as `*_BASE_URL`, etc.
22
- 2. If `SESSION_SECRET` is empty or missing, generate it without writing it to command output.
23
- 3. Build a JSON key skeleton from `.env.local`, excluding `DATABASE_AUTO_MIGRATE`.
24
-
25
- ```json
26
- {
27
- "ENTRA_CLIENT_ID": "...",
28
- "ENTRA_TENANT_ID": "...",
29
- "ENTRA_CLIENT_SECRET": "...",
30
- "SESSION_SECRET": "...",
31
- "DATABASE_URL": "..."
32
- }
33
- ```
34
-
35
- ## Part 2 — Write the secrets in the Vault UI
36
-
37
- Repeat this part once per selected environment (QAS and/or PRD) — same steps,
38
- different credentials and path.
39
-
40
- 0. Derive the environment-specific payload. The Part 1 payload reflects the
41
- local/QAS setup — before writing to a given environment, adjust these keys:
42
- - **`*_BASE_URL`** keys: if the host contains `qas` or `dev`, swap the
43
- environment segment for the target environment. The pattern is
44
- `https://<service>-api.wcz-sat-<env>-01.k8s.wistron.com`, e.g.
45
- `https://<service>-api.wcz-sat-qas-01.k8s.wistron.com` becomes
46
- `https://<service>-api.wcz-sat-prd-01.k8s.wistron.com`. Hosts that don't
47
- match this k8s pattern stay untouched. Do this automatically — never ask the user for these.
48
- - **`DATABASE_URL`**: the host is fixed per environment — QAS is always
49
- `10.82.36.60:5432`, PRD is always `10.82.36.50:5432`. Set the host
50
- automatically. The **username and password** cannot be derived: local
51
- usually uses `postgres`, but the provisioned per-app user is
52
- `wcz-<projectname>` with a **different password per environment** (QAS
53
- and PRD passwords differ). Ask the user for the target environment's DB
54
- info block (from the provisioning/WiCOP material, looks like
55
- `name: wcz-<project>-db / username: wcz-<project> / password: ...`) and
56
- substitute both username and password into the URL.
57
- - All other keys (`ENTRA_*`, `SESSION_SECRET`, ...) stay
58
- as-is.
59
- 1. Ask for the screenshot of WiCOP email or the **Vault path**, **Vault Account** and **Vault Password** one-by-one. The password is needed as a
60
- value in Part 3 (`VAULT_PASSWORD`), so it must be given in chat — do not
61
- have the user type it into the browser only. Note that **QAS and PRD live
62
- on different Vault hosts** (QAS is typically `vault-dev.wistron.com:8200`,
63
- PRD `vault-oss-prd.wistron.com:8200`) — the Vault path the user provides
64
- contains the right host; use it as-is.
65
- 2. Open the Vault address in the browser. Login with provided account and password and redirect to provided path:
66
- - The URL already contains the secret path, so it redirects there after login.
67
- - On the "Sign in to Vault" screen, open the **Method** dropdown and select **Userpass** (not the default Token).
68
- - Enter the **Username** (Vault Account), then the **Password**, then click **Sign in**.
69
- - You land on the secret list for the project path, e.g. `release/wcz/sat-<environment>-01/<project>-wcz`, containing a `default` secret.
70
- 3. Update the `default` secret with the derived environment payload from step 0:
71
- - Click the `default` secret to open it, then open the **Secret** tab.
72
- - Click **Create new version**.
73
- - Toggle the **JSON** switch in the toolbar, select all in the JSON editor (`Ctrl+A`) and replace it with the payload JSON from Part 1 (this also removes any pre-existing keys like `cog_test`).
74
- - Click **Save**. Verify the success toast "Successfully saved secret data" and that the new version lists every expected key.
75
- 4. Create the `harborvault` secret:
76
- - In the breadcrumb, click `<projectname>-wcz` to go one level up.
77
- - Click **Create secret**.
78
- - In **Path for this secret**, append `harborvault` to the pre-filled project path (i.e. `wcz/<env>/<projectname>-wcz/harborvault`).
79
- - Toggle the **JSON** switch, then ask the user to copy-paste the harborvault JSON from another project into the JSON editor (contains the `HARBOR_SECRET` key). The same JSON is used for both environments — it
80
- points to the shared PRD harbor registry (`wcz-sat-prd-harbor...`) even in
81
- QAS; that is intentional. Autonomously poll the editor until the content
82
- is there — do not end the session while waiting.
83
- - Click **Save**. Verify the success toast.
84
- 5. Close the Vault browser session.
85
-
86
- ## Part 3 — Rewrite `.env.local`
87
-
88
- Use the **QAS** credentials here when both environments were set up.
89
-
90
- Rewrite the file so it contains **only** these keys. Every app secret is now
91
- served by Vault, so its local value is removed — a leftover value would
92
- override Vault. `DATABASE_URL` stay filled because
93
- drizzle-kit reads them directly and never goes through Vault.
94
-
95
- `VAULT_SECRET_PATH` is the secret path **without** the mount point (`release`)
96
- and **including** the trailing `/default` — the app builds
97
- `/v1/<mount>/data/<VAULT_SECRET_PATH>` (the `viteWczLayout()` plugin from `wcz-layout/vite`
98
- does this).
99
- `VAULT_MOUNT_POINT` defaults to `release` and only needs to be set if the
100
- engine is mounted elsewhere. If `VAULT_ADDRESS` is unset, Vault fetching is
101
- skipped silently (plain local-dev fallback).
102
-
103
- ```dotenv
104
- VAULT_ADDRESS=<scheme://host:port from Part 2, no path>
105
- VAULT_SECRET_PATH=wcz/sat-qas-01/<project>-wcz/default
106
- VAULT_USERNAME=<from Part 2>
107
- VAULT_PASSWORD=<from Part 2>
108
-
109
- DATABASE_URL=<kept — local dev DB or QAS, per user choice>
110
- DATABASE_AUTO_MIGRATE=<kept>
111
- ```
112
-
113
- After writing, verify end-to-end: start the dev server — `viteWczLayout()`
114
- logs in and loads the Vault secrets into `process.env` during `vp dev` — and
115
- confirm that every expected key comes back from Vault.
1
+ # Vault Setup
2
+
3
+ Move local-development secrets into Vault, then shrink `.env.local` to the Vault connection.
4
+
5
+ Before starting, ask the user via **AskUserQuestion** which environment(s) to
6
+ set up: **QAS**, **PRD** or **both**. Both environments follow the same steps —
7
+ the login credentials, the Vault path (QAS lives under `sat-qas-01`, PRD under
8
+ `sat-prd-01`; each has its own Vault account and password) and a few
9
+ environment-specific payload values differ (see Part 2, step 0). When doing
10
+ both, run through Parts 1–2 once per environment. In Part 3, always write the
11
+ **QAS** connection into `.env.local` (if available).
12
+
13
+ To wait for something the user does in the browser — signing in, saving a
14
+ secret — poll in a tool loop: wait ~5 s, re-read the page, repeat until the
15
+ expected state appears or ~5 minutes pass, then carry straight on. Never end
16
+ your turn while waiting; announcing "I'll continue once you have signed in"
17
+ and stopping ends the session, and nothing resumes it.
18
+
19
+ ## Part 1 — Collect the payload from `.env.local`
20
+
21
+ 1. Inspect key names and whether they are set without printing their values. Include keys from `.env` such as `*_BASE_URL`, etc.
22
+ 2. If `SESSION_SECRET` is empty or missing, generate it without writing it to command output.
23
+ 3. Build a JSON key skeleton from `.env.local`, excluding `DATABASE_AUTO_MIGRATE`.
24
+
25
+ ```json
26
+ {
27
+ "ENTRA_CLIENT_ID": "...",
28
+ "ENTRA_TENANT_ID": "...",
29
+ "ENTRA_CLIENT_SECRET": "...",
30
+ "SESSION_SECRET": "...",
31
+ "DATABASE_URL": "..."
32
+ }
33
+ ```
34
+
35
+ ## Part 2 — Write the secrets in the Vault UI
36
+
37
+ Repeat this part once per selected environment (QAS and/or PRD) — same steps,
38
+ different credentials and path.
39
+
40
+ 0. Derive the environment-specific payload. The Part 1 payload reflects the
41
+ local/QAS setup — before writing to a given environment, adjust these keys:
42
+ - **`*_BASE_URL`** keys: if the host contains `qas` or `dev`, swap the
43
+ environment segment for the target environment. The pattern is
44
+ `https://<service>-api.wcz-sat-<env>-01.k8s.wistron.com`, e.g.
45
+ `https://<service>-api.wcz-sat-qas-01.k8s.wistron.com` becomes
46
+ `https://<service>-api.wcz-sat-prd-01.k8s.wistron.com`. Hosts that don't
47
+ match this k8s pattern stay untouched. Do this automatically — never ask the user for these.
48
+ - **`DATABASE_URL`**: the host is fixed per environment — QAS is always
49
+ `10.82.36.60:5432`, PRD is always `10.82.36.50:5432`. Set the host
50
+ automatically. The **username and password** cannot be derived: local
51
+ usually uses `postgres`, but the provisioned per-app user is
52
+ `wcz-<projectname>` with a **different password per environment** (QAS
53
+ and PRD passwords differ). Ask the user for the target environment's DB
54
+ info block (from the provisioning/WiCOP material, looks like
55
+ `name: wcz-<project>-db / username: wcz-<project> / password: ...`) and
56
+ substitute both username and password into the URL.
57
+ - All other keys (`ENTRA_*`, `SESSION_SECRET`, ...) stay
58
+ as-is.
59
+ 1. Ask for the screenshot of WiCOP email or the **Vault path**, **Vault Account** and **Vault Password** one-by-one. The password is needed as a
60
+ value in Part 3 (`VAULT_PASSWORD`), so it must be given in chat — do not
61
+ have the user type it into the browser only. Note that **QAS and PRD live
62
+ on different Vault hosts** (QAS is typically `vault-dev.wistron.com:8200`,
63
+ PRD `vault-oss-prd.wistron.com:8200`) — the Vault path the user provides
64
+ contains the right host; use it as-is.
65
+ 2. Open the Vault address in the browser. Login with provided account and password and redirect to provided path:
66
+ - The URL already contains the secret path, so it redirects there after login.
67
+ - On the "Sign in to Vault" screen, open the **Method** dropdown and select **Userpass** (not the default Token).
68
+ - Enter the **Username** (Vault Account), then the **Password**, then click **Sign in**.
69
+ - You land on the secret list for the project path, e.g. `release/wcz/sat-<environment>-01/<project>-wcz`, containing a `default` secret.
70
+ 3. Update the `default` secret with the derived environment payload from step 0:
71
+ - Click the `default` secret to open it, then open the **Secret** tab.
72
+ - Click **Create new version**.
73
+ - Toggle the **JSON** switch in the toolbar, select all in the JSON editor (`Ctrl+A`) and replace it with the payload JSON from Part 1 (this also removes any pre-existing keys like `cog_test`).
74
+ - Click **Save**. Verify the success toast "Successfully saved secret data" and that the new version lists every expected key.
75
+ 4. Create the `harborvault` secret:
76
+ - In the breadcrumb, click `<projectname>-wcz` to go one level up.
77
+ - Click **Create secret**.
78
+ - In **Path for this secret**, append `harborvault` to the pre-filled project path (i.e. `wcz/<env>/<projectname>-wcz/harborvault`).
79
+ - Toggle the **JSON** switch, then ask the user to copy-paste the harborvault JSON from another project into the JSON editor (contains the `HARBOR_SECRET` key). The same JSON is used for both environments — it
80
+ points to the shared PRD harbor registry (`wcz-sat-prd-harbor...`) even in
81
+ QAS; that is intentional. Autonomously poll the editor until the content
82
+ is there — do not end the session while waiting.
83
+ - Click **Save**. Verify the success toast.
84
+ 5. Close the Vault browser session.
85
+
86
+ ## Part 3 — Rewrite `.env.local`
87
+
88
+ Use the **QAS** credentials here when both environments were set up.
89
+
90
+ Rewrite the file so it contains **only** these keys. Every app secret is now
91
+ served by Vault, so its local value is removed — a leftover value would
92
+ override Vault. `DATABASE_URL` stay filled because
93
+ drizzle-kit reads them directly and never goes through Vault.
94
+
95
+ `VAULT_SECRET_PATH` is the secret path **without** the mount point (`release`)
96
+ and **including** the trailing `/default` — the app builds
97
+ `/v1/<mount>/data/<VAULT_SECRET_PATH>` (the `viteWczLayout()` plugin from `wcz-layout/vite`
98
+ does this).
99
+ `VAULT_MOUNT_POINT` defaults to `release` and only needs to be set if the
100
+ engine is mounted elsewhere. If `VAULT_ADDRESS` is unset, Vault fetching is
101
+ skipped silently (plain local-dev fallback).
102
+
103
+ ```dotenv
104
+ VAULT_ADDRESS=<scheme://host:port from Part 2, no path>
105
+ VAULT_SECRET_PATH=wcz/sat-qas-01/<project>-wcz/default
106
+ VAULT_USERNAME=<from Part 2>
107
+ VAULT_PASSWORD=<from Part 2>
108
+
109
+ DATABASE_URL=<kept — local dev DB or QAS, per user choice>
110
+ DATABASE_AUTO_MIGRATE=<kept>
111
+ ```
112
+
113
+ After writing, verify end-to-end: start the dev server — `viteWczLayout()`
114
+ logs in and loads the Vault secrets into `process.env` during `vp dev` — and
115
+ confirm that every expected key comes back from Vault.
@@ -1,8 +1,8 @@
1
- # Favicon Generation
2
-
3
- 1. Ask the user for the absolute filesystem path to their app logo. Recommend a square PNG, JPG, BMP, or WEBP image at least 512 x 512 pixels, but continue with a smaller image when the user provides one.
4
- 2. Verify that the supplied path exists and is an image file.
5
- 3. Check whether `favicons` is installed globally. If it is missing, run `npm install --global favicons`. Do not add it to this project's dependencies.
6
- 4. Set `NODE_PATH` to the result of `npm root --global` and use a temporary CommonJS Node script to call `favicons(sourcePath, options)`. Enable Android and favicon output, enable Apple output with `background: "transparent"`, and disable Apple startup, Windows, and Yandex assets. Write the returned `images` and `files` entries to `/public`.
7
- 5. Keep only the existing favicon assets that the template owns: `android-chrome-192x192.png`, `android-chrome-512x512.png`, `apple-touch-icon.png`, `favicon-16x16.png`, `favicon-32x32.png`, and `favicon.ico`. Delete any additional generated assets and the temporary script. Leave unrelated public assets unchanged.
8
- 6. Verify that all six favicon assets exist, then report completion to the user.
1
+ # Favicon Generation
2
+
3
+ 1. Ask the user for the absolute filesystem path to their app logo. Recommend a square PNG, JPG, BMP, or WEBP image at least 512 x 512 pixels, but continue with a smaller image when the user provides one.
4
+ 2. Verify that the supplied path exists and is an image file.
5
+ 3. Check whether `favicons` is installed globally. If it is missing, run `npm install --global favicons`. Do not add it to this project's dependencies.
6
+ 4. Set `NODE_PATH` to the result of `npm root --global` and use a temporary CommonJS Node script to call `favicons(sourcePath, options)`. Enable Android and favicon output, enable Apple output with `background: "transparent"`, and disable Apple startup, Windows, and Yandex assets. Write the returned `images` and `files` entries to `/public`.
7
+ 5. Keep only the existing favicon assets that the template owns: `android-chrome-192x192.png`, `android-chrome-512x512.png`, `apple-touch-icon.png`, `favicon-16x16.png`, `favicon-32x32.png`, and `favicon.ico`. Delete any additional generated assets and the temporary script. Leave unrelated public assets unchanged.
8
+ 6. Verify that all six favicon assets exist, then report completion to the user.
@@ -1,25 +1,25 @@
1
- # GitLab CI
2
-
3
- ## SAST And Build Image
4
-
5
- The pipeline includes additional stages beyond this section. Complete the following setup before relying on the first GitLab CI run.
6
-
7
- ### SAST
8
-
9
- The SAST stage requires both the Sonatype SCA and SonarQube projects to be configured.
10
-
11
- #### Sonatype SCA
12
-
13
- 1. Sign in to [Sonatype](https://sca.wistron.com/) with the general development account. Retrieve its credentials from KeePass.
14
- 2. Navigate to **Orgs and policies** > **Applications**.
15
- 3. Select the add-application icon, then choose **New application**.
16
- 4. Set **Application Name** to exactly the GitLab project name, then save the application.
17
-
18
- #### SonarQube
19
-
20
- 1. Sign in to [SonarQube](https://sonarqube.wistron.com/) with your employee ID and domain password.
21
- 2. Select **Create Project** > **Manually**.
22
- 3. Set the project display name to exactly the GitLab project name and set the main branch to `master`.
23
- 4. Generate a project token.
24
- 5. In GitLab, navigate to **Settings** > **CI/CD** > **Variables** and create `SONAR_TOKEN` with the generated token as its value. Do not expose the token in chat, files, or logs.
25
- 6. In SonarQube, navigate to **Project Settings** > **Permissions** and grant the development team the required project permissions.
1
+ # GitLab CI
2
+
3
+ ## SAST And Build Image
4
+
5
+ The pipeline includes additional stages beyond this section. Complete the following setup before relying on the first GitLab CI run.
6
+
7
+ ### SAST
8
+
9
+ The SAST stage requires both the Sonatype SCA and SonarQube projects to be configured.
10
+
11
+ #### Sonatype SCA
12
+
13
+ 1. Sign in to [Sonatype](https://sca.wistron.com/) with the general development account. Retrieve its credentials from KeePass.
14
+ 2. Navigate to **Orgs and policies** > **Applications**.
15
+ 3. Select the add-application icon, then choose **New application**.
16
+ 4. Set **Application Name** to exactly the GitLab project name, then save the application.
17
+
18
+ #### SonarQube
19
+
20
+ 1. Sign in to [SonarQube](https://sonarqube.wistron.com/) with your employee ID and domain password.
21
+ 2. Select **Create Project** > **Manually**.
22
+ 3. Set the project display name to exactly the GitLab project name and set the main branch to `master`.
23
+ 4. Generate a project token.
24
+ 5. In GitLab, navigate to **Settings** > **CI/CD** > **Variables** and create `SONAR_TOKEN` with the generated token as its value. Do not expose the token in chat, files, or logs.
25
+ 6. In SonarQube, navigate to **Project Settings** > **Permissions** and grant the development team the required project permissions.
@@ -1,15 +1,15 @@
1
- # Initial Commit
2
-
3
- ## Actions
4
-
5
- Run sequentially:
6
-
7
- ```shell
8
- git add .
9
- git commit -m "initial project setup"
10
- git push -u origin master
11
- ```
12
-
13
- Wait for completion. Once the push succeeds, output:
14
-
15
- > **✅ Project initialization is complete! Happy coding.**
1
+ # Initial Commit
2
+
3
+ ## Actions
4
+
5
+ Run sequentially:
6
+
7
+ ```shell
8
+ git add .
9
+ git commit -m "initial project setup"
10
+ git push -u origin master
11
+ ```
12
+
13
+ Wait for completion. Once the push succeeds, output:
14
+
15
+ > **✅ Project initialization is complete! Happy coding.**