wcz-layout 9.6.6 → 9.7.0

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 (33) hide show
  1. package/dist/components.mjs +7 -7
  2. package/dist/components.mjs.map +1 -1
  3. package/dist/data/client.d.mts +2 -1
  4. package/dist/data/client.mjs +2 -2
  5. package/dist/data/client.mjs.map +1 -1
  6. package/dist/data/server.d.mts +1 -1
  7. package/dist/data/server.mjs +2 -2
  8. package/dist/entra-CJSyeQsx.mjs.map +1 -1
  9. package/dist/{file-BTFDDalH.mjs → file-BWcNzq55.mjs} +4 -4
  10. package/dist/file-BWcNzq55.mjs.map +1 -0
  11. package/dist/{file-CuvAmdJW.mjs → file-DimNsRly.mjs} +3 -4
  12. package/dist/{file-CuvAmdJW.mjs.map → file-DimNsRly.mjs.map} +1 -1
  13. package/dist/index.d.mts +1 -0
  14. package/dist/index.mjs +53 -43
  15. package/dist/index.mjs.map +1 -1
  16. package/dist/{peoplesoft-D4w8d4s1.d.mts → peoplesoft-CskGsqd6.d.mts} +2 -1
  17. package/dist/{peoplesoft-DGdM1bws.mjs → peoplesoft-DTPGpN2h.mjs} +2 -2
  18. package/dist/{peoplesoft-DGdM1bws.mjs.map → peoplesoft-DTPGpN2h.mjs.map} +1 -1
  19. package/dist/utils-DjdexspV.mjs.map +1 -1
  20. package/dist/vite.mjs.map +1 -1
  21. package/package.json +128 -127
  22. package/skills/data-grid/SKILL.md +142 -142
  23. package/skills/general/SKILL.md +94 -94
  24. package/skills/migrations/SKILL.md +6 -0
  25. package/skills/migrations/versions/migrate-v9-to-v10.tsx +9 -0
  26. package/skills/services/SKILL.md +31 -31
  27. package/skills/start/SKILL.md +47 -47
  28. package/skills/start/steps/01-git-setup.md +0 -1
  29. package/skills/start/steps/04-wicop-setup.md +105 -80
  30. package/skills/start/steps/05-database-setup.md +52 -44
  31. package/skills/start/steps/06-entra-setup.md +96 -98
  32. package/skills/start/steps/07-vault-setup.md +57 -17
  33. package/dist/file-BTFDDalH.mjs.map +0 -1
@@ -1,94 +1,94 @@
1
- ---
2
- name: general
3
- description: "Use ALWAYS for project-wide conventions and coding standards. It defines the default style, rules, and best practices that apply to every file and feature."
4
- ---
5
-
6
- > This is the default skill. Reference it in combination with more specific skills (e.g., `forms`, `data-grid`, `dialogs`) for targeted tasks.
7
-
8
- ## Preferred Technology Stack
9
-
10
- Favor the established platform before introducing custom code or a new dependency:
11
-
12
- - **TanStack ecosystem:** Use TanStack Start, Router, DB, Form, and Query for their respective application concerns. Consider adjacent TanStack libraries when they directly fit the feature: TanStack AI for AI interactions, TanStack Virtual for large virtualized lists, TanStack Pacer for debouncing, throttling, rate limiting, queuing, and batching, and TanStack Hotkeys for type-safe keyboard shortcuts.
13
- - **Vite+:** Use Vite+ for the development server, formatting, linting and testing.
14
- - **Material UI:** Use Material UI for interface components and icons. When an advanced capability is needed, consider MUI X Charts for data visualization, Tree View for hierarchical data, Scheduler for calendars and timelines, and Chat for AI-powered conversations.
15
-
16
- Before implementing an external library feature, consult the current documentation through Context7 MCP. Do not add a new dependency when one of these platform libraries already covers the requirement.
17
-
18
- When the requirement is not covered above and a well-maintained, popular library solves it, use that library instead of writing your own implementation.
19
-
20
- ## Coding Conventions
21
-
22
- - Generate modern ES6+ TypeScript with explicit types and never use `any`.
23
- - Stick to double quotes, semicolons, and the `~/` alias for `src/` imports.
24
- - Avoid `useMemo` / `useCallback`; the React Compiler handles memoization.
25
- - Keep code self-documenting; only add comments to clarify non-obvious intent.
26
-
27
- ## User Interface
28
-
29
- - Format all client-side dates with `"L LT"` or `"L"`.
30
- - Build skeletons for loading states.
31
- - When building UI, always design for both light and dark mode; this app uses `colorSchemeSelector: "data-mui-color-scheme"`, so prefer `theme.applyStyles("dark", ...)` for mode-specific styling.
32
-
33
- ## File Organization
34
-
35
- Use this ownership model for new application code. Keep feature-specific code close to its route; promote it to a root directory only when it is shared across multiple features. One database table = one file per layer: every `<table>` slot below is the same singular camelCase table name, never grouped with its parent or child tables.
36
-
37
- ```txt
38
- src/ # client-first architecture
39
- ├── components/ # shared components across multiple routes
40
- ├── db-collections/ # TanStack DB collections
41
- │ └── <table>Collection.ts
42
- ├── hooks/ # shared hooks across multiple routes
43
- ├── lib/ # isomorphic/shared logic usable by client and server
44
- │ ├── auth/
45
- │ │ ├── permissions.ts
46
- │ │ └── scopes.ts
47
- │ ├── locales/
48
- │ │ ├── cs.json
49
- │ │ └── en.json
50
- │ └── schemas/ # shared Zod schemas
51
- │ └── <table>.ts
52
- ├── routes/ # TanStack Router file-based routing
53
- │ ├── __root.tsx
54
- │ ├── index.tsx
55
- │ └── features/ # feature folder with multiple routes (kebab-case, plural)
56
- │ ├── -components/ # route-specific components
57
- │ ├── -hooks/ # route-specific hooks
58
- │ ├── index.tsx
59
- │ ├── create.tsx
60
- │ ├── $id.tsx
61
- │ └── edit.$id.tsx
62
- ├── server/ # server-only code
63
- │ ├── actions/
64
- │ │ └── <table>.ts
65
- │ ├── db/
66
- │ │ ├── migrations/
67
- │ │ ├── schemas/ # Drizzle schemas
68
- │ │ │ ├── <table>.ts
69
- │ │ │ └── relations.ts
70
- │ │ └── index.ts
71
- │ └── middleware/
72
- │ └── databaseMiddleware.ts
73
- └── types/
74
- tests/
75
- ├── unit/
76
- │ ├── lib/
77
- │ │ └── schemas/
78
- │ │ └── <table>.test.ts
79
- │ ├── hooks/
80
- │ │ └── useX.test.ts
81
- │ └── routes/
82
- │ └── features/
83
- │ └── -components/
84
- │ └── XCard.test.tsx
85
- ├── integration/
86
- │ ├── server/
87
- │ │ └── actions/
88
- │ │ └── <table>.test.ts
89
- │ └── db-collections/
90
- │ └── <table>Collection.test.ts
91
- └── e2e/
92
- └── features/
93
- └── create.spec.ts
94
- ```
1
+ ---
2
+ name: general
3
+ description: "Use ALWAYS for project-wide conventions and coding standards. It defines the default style, rules, and best practices that apply to every file and feature."
4
+ ---
5
+
6
+ > This is the default skill. Reference it in combination with more specific skills (e.g., `forms`, `data-grid`, `dialogs`) for targeted tasks.
7
+
8
+ ## Preferred Technology Stack
9
+
10
+ Favor the established platform before introducing custom code or a new dependency:
11
+
12
+ - **TanStack ecosystem:** Use TanStack Start, Router, DB, Form, and Query for their respective application concerns. Consider adjacent TanStack libraries when they directly fit the feature: TanStack AI for AI interactions, TanStack Virtual for large virtualized lists, TanStack Pacer for debouncing, throttling, rate limiting, queuing, and batching, and TanStack Hotkeys for type-safe keyboard shortcuts.
13
+ - **Vite+:** Use Vite+ for the development server, formatting, linting and testing.
14
+ - **Material UI:** Use Material UI for interface components and icons. When an advanced capability is needed, consider MUI X Charts for data visualization, Tree View for hierarchical data, Scheduler for calendars and timelines, and Chat for AI-powered conversations.
15
+
16
+ Before implementing an external library feature, consult the current documentation through Context7 MCP. Do not add a new dependency when one of these platform libraries already covers the requirement.
17
+
18
+ When the requirement is not covered above and a well-maintained, popular library solves it, use that library instead of writing your own implementation.
19
+
20
+ ## Coding Conventions
21
+
22
+ - Generate modern ES6+ TypeScript with explicit types and never use `any`.
23
+ - Stick to double quotes, semicolons, and the `~/` alias for `src/` imports.
24
+ - Avoid `useMemo` / `useCallback`; the React Compiler handles memoization.
25
+ - Keep code self-documenting; only add comments to clarify non-obvious intent.
26
+
27
+ ## User Interface
28
+
29
+ - Format all client-side dates with `"L LT"` or `"L"`.
30
+ - Build skeletons for loading states.
31
+ - When building UI, always design for both light and dark mode; this app uses `colorSchemeSelector: "data-mui-color-scheme"`, so prefer `theme.applyStyles("dark", ...)` for mode-specific styling.
32
+
33
+ ## File Organization
34
+
35
+ Use this ownership model for new application code. Keep feature-specific code close to its route; promote it to a root directory only when it is shared across multiple features. One database table = one file per layer: every `<table>` slot below is the same singular camelCase table name, never grouped with its parent or child tables.
36
+
37
+ ```txt
38
+ src/ # client-first architecture
39
+ ├── components/ # shared components across multiple routes
40
+ ├── db-collections/ # TanStack DB collections
41
+ │ └── <table>Collection.ts
42
+ ├── hooks/ # shared hooks across multiple routes
43
+ ├── lib/ # isomorphic/shared logic usable by client and server
44
+ │ ├── auth/
45
+ │ │ ├── permissions.ts
46
+ │ │ └── scopes.ts
47
+ │ ├── locales/
48
+ │ │ ├── cs.json
49
+ │ │ └── en.json
50
+ │ └── schemas/ # shared Zod schemas
51
+ │ └── <table>.ts
52
+ ├── routes/ # TanStack Router file-based routing
53
+ │ ├── __root.tsx
54
+ │ ├── index.tsx
55
+ │ └── features/ # feature folder with multiple routes (kebab-case, plural)
56
+ │ ├── -components/ # route-specific components
57
+ │ ├── -hooks/ # route-specific hooks
58
+ │ ├── index.tsx
59
+ │ ├── create.tsx
60
+ │ ├── $id.tsx
61
+ │ └── edit.$id.tsx
62
+ ├── server/ # server-only code
63
+ │ ├── actions/
64
+ │ │ └── <table>.ts
65
+ │ ├── db/
66
+ │ │ ├── migrations/
67
+ │ │ ├── schemas/ # Drizzle schemas
68
+ │ │ │ ├── <table>.ts
69
+ │ │ │ └── relations.ts
70
+ │ │ └── index.ts
71
+ │ └── middleware/
72
+ │ └── databaseMiddleware.ts
73
+ └── types/
74
+ tests/
75
+ ├── unit/
76
+ │ ├── lib/
77
+ │ │ └── schemas/
78
+ │ │ └── <table>.test.ts
79
+ │ ├── hooks/
80
+ │ │ └── useX.test.ts
81
+ │ └── routes/
82
+ │ └── features/
83
+ │ └── -components/
84
+ │ └── XCard.test.tsx
85
+ ├── integration/
86
+ │ ├── server/
87
+ │ │ └── actions/
88
+ │ │ └── <table>.test.ts
89
+ │ └── db-collections/
90
+ │ └── <table>Collection.test.ts
91
+ └── e2e/
92
+ └── features/
93
+ └── create.spec.ts
94
+ ```
@@ -0,0 +1,6 @@
1
+ ---
2
+ name: migrations
3
+ description: "Use when: when migrating the wcz-layout library to a newer version"
4
+ ---
5
+
6
+ //Read each migration one-by-one
@@ -0,0 +1,9 @@
1
+ // please search for every useNotification
2
+ // this hook is deprecated, I need you to turn them into some beautiful, stunning animation instead of just snackbar.Please place the animation into separate component for each use.
3
+ // success - animation
4
+ // error - alert dialog
5
+ // warning, info - you decide per use-case
6
+
7
+
8
+ // install tanstack-table, virtual, hotkeys
9
+ // delete x-data-grid-premium
@@ -1,31 +1,31 @@
1
- ---
2
- name: services
3
- description: "Use when: working with file, approval, employee or email services into your workflow."
4
- ---
5
-
6
- ## Info
7
-
8
- You can read about each service in the links below. Services are categorized as either client or server exports, depending on their intended usage.
9
-
10
- - **Client exports** — Contains `queryOptions` and `mutationOptions`; use for data fetching/mutations on the client with React Query.
11
- - **Server exports** — Server functions; prefer calling mutations inside other server functions or database transactions.
12
- - Invalidating mutation options take `{ queryClient }` so they can invalidate related queries; read-only ones (e.g. `downloadFileMutationOptions()`, `openFileMutationOptions()`) don't require it.
13
- - Access `queryClient` with `Route.useRouteContext()` in a route file, or `useRouteContext({ from: "path" })` in a component.
14
- - To read about a service, open the linked file in the **File** column directly.
15
-
16
- ## Import Paths
17
-
18
- - Client exports: `wcz-layout/data/client`
19
- - Server exports: `wcz-layout/data/server`
20
- - Schemas & Models: `wcz-layout/models`
21
-
22
- ## Services
23
-
24
- | Service | File | Summary |
25
- | ---------- | ----------------------------------- | ----------------------------------------------------------------------- |
26
- | file | [file.md](docs/file.md) | File metadata, thumbnails, binary download/open, upload, update, delete |
27
- | approval | [approval.md](docs/approval.md) | Approval request lifecycle, approvers, flows, statuses, step results |
28
- | peoplesoft | [peoplesoft.md](docs/peoplesoft.md) | Employee, manager, department, and company general manager lookups |
29
- | email | [email.md](docs/email.md) | Server-only email sending with optional file attachment references |
30
-
31
- > The attendance service is not available yet — do not generate code against it; tell the user it is coming in a future release.
1
+ ---
2
+ name: services
3
+ description: "Use when: working with file, approval, employee or email services into your workflow."
4
+ ---
5
+
6
+ ## Info
7
+
8
+ You can read about each service in the links below. Services are categorized as either client or server exports, depending on their intended usage.
9
+
10
+ - **Client exports** — Contains `queryOptions` and `mutationOptions`; use for data fetching/mutations on the client with React Query.
11
+ - **Server exports** — Server functions; prefer calling mutations inside other server functions or database transactions.
12
+ - Invalidating mutation options take `{ queryClient }` so they can invalidate related queries; read-only ones (e.g. `downloadFileMutationOptions()`, `openFileMutationOptions()`) don't require it.
13
+ - Access `queryClient` with `Route.useRouteContext()` in a route file, or `useRouteContext({ from: "path" })` in a component.
14
+ - To read about a service, open the linked file in the **File** column directly.
15
+
16
+ ## Import Paths
17
+
18
+ - Client exports: `wcz-layout/data/client`
19
+ - Server exports: `wcz-layout/data/server`
20
+ - Schemas & Models: `wcz-layout/models`
21
+
22
+ ## Services
23
+
24
+ | Service | File | Summary |
25
+ | ---------- | ----------------------------------- | ----------------------------------------------------------------------- |
26
+ | file | [file.md](docs/file.md) | File metadata, thumbnails, binary download/open, upload, update, delete |
27
+ | approval | [approval.md](docs/approval.md) | Approval request lifecycle, approvers, flows, statuses, step results |
28
+ | peoplesoft | [peoplesoft.md](docs/peoplesoft.md) | Employee, manager, department, and company general manager lookups |
29
+ | email | [email.md](docs/email.md) | Server-only email sending with optional file attachment references |
30
+
31
+ > The attendance service is not available yet — do not generate code against it; tell the user it is coming in a future release.
@@ -1,47 +1,47 @@
1
- ---
2
- name: start
3
- description: "Use when: bootstrapping a freshly downloaded template into a real project."
4
- ---
5
-
6
- # Project Initialization Orchestrator
7
-
8
- ## Role
9
-
10
- You are an AI assistant helping a developer bootstrap a new project from this template.
11
-
12
- ## Execution Rules
13
-
14
- - Execute steps in order. Read **only** the current step file.
15
- - Run terminal commands and browser actions yourself. When a step needs user input, ask only the required question through the prescribed question tool, consume the answer, and resume in the same turn.
16
- - Do not skip ahead or batch multiple steps.
17
- - When a step has branches (yes/no), follow only the matching branch.
18
- - To read a step, open the linked file in the **File** column directly.
19
-
20
- ## Opening Message
21
-
22
- Begin every conversation with:
23
-
24
- > To make initialization flexible, you can choose:
25
- >
26
- > - ✅ **Full initialization** (recommended for new projects)
27
- > - ✅ **Partial / custom steps** (select specific steps below)
28
-
29
- Then list all steps by name so the user can pick.
30
-
31
- ## Steps
32
-
33
- | # | File | Summary |
34
- | --- | ---------------------------------------------------------- | ------------------------------- |
35
- | 1 | [01-git-setup.md](steps/01-git-setup.md) | Configure remote and branch |
36
- | 2 | [02-project-name-setup.md](steps/02-project-name-setup.md) | Replace placeholder names |
37
- | 3 | [03-apm-setup.md](steps/03-apm-setup.md) | Register the app internally |
38
- | 4 | [04-wicop-setup.md](steps/04-wicop-setup.md) | Request release management (CD) |
39
- | 5 | [05-database-setup.md](steps/05-database-setup.md) | Postgres via Docker or existing |
40
- | 6 | [06-entra-setup.md](steps/06-entra-setup.md) | Azure AD app registration |
41
- | 7 | [07-vault-setup.md](steps/07-vault-setup.md) | Vault secrets configuration |
42
- | 8 | [08-generate-favicon.md](steps/08-generate-favicon.md) | Generate and replace favicon |
43
- | 9 | [09-commit.md](steps/09-commit.md) | Commit and push to origin |
44
-
45
- ## Completion
46
-
47
- After step 9 succeeds, the workflow ends — no further action needed.
1
+ ---
2
+ name: start
3
+ description: "Use when: bootstrapping a freshly downloaded template into a real project."
4
+ ---
5
+
6
+ # Project Initialization Orchestrator
7
+
8
+ ## Role
9
+
10
+ You are an AI assistant helping a developer bootstrap a new project from this template.
11
+
12
+ ## Execution Rules
13
+
14
+ - Execute steps in order. Read **only** the current step file.
15
+ - Run terminal commands and browser actions yourself. When a step needs user input, ask only the required question through the prescribed question tool, consume the answer, and resume in the same turn.
16
+ - Do not skip ahead or batch multiple steps.
17
+ - When a step has branches (yes/no), follow only the matching branch.
18
+ - To read a step, open the linked file in the **File** column directly.
19
+
20
+ ## Opening Message
21
+
22
+ Begin every conversation with:
23
+
24
+ > To make initialization flexible, you can choose:
25
+ >
26
+ > - ✅ **Full initialization** (recommended for new projects)
27
+ > - ✅ **Partial / custom steps** (select specific steps below)
28
+
29
+ Then list all steps by name so the user can pick.
30
+
31
+ ## Steps
32
+
33
+ | # | File | Summary |
34
+ | --- | ---------------------------------------------------------- | ------------------------------- |
35
+ | 1 | [01-git-setup.md](steps/01-git-setup.md) | Configure remote and branch |
36
+ | 2 | [02-project-name-setup.md](steps/02-project-name-setup.md) | Replace placeholder names |
37
+ | 3 | [03-apm-setup.md](steps/03-apm-setup.md) | Register the app internally |
38
+ | 4 | [04-wicop-setup.md](steps/04-wicop-setup.md) | Request release management (CD) |
39
+ | 5 | [05-database-setup.md](steps/05-database-setup.md) | Postgres via Docker or existing |
40
+ | 6 | [06-entra-setup.md](steps/06-entra-setup.md) | Azure AD app registration |
41
+ | 7 | [07-vault-setup.md](steps/07-vault-setup.md) | Vault secrets configuration |
42
+ | 8 | [08-generate-favicon.md](steps/08-generate-favicon.md) | Generate and replace favicon |
43
+ | 9 | [09-commit.md](steps/09-commit.md) | Commit and push to origin |
44
+
45
+ ## Completion
46
+
47
+ After step 9 succeeds, the workflow ends — no further action needed.
@@ -8,4 +8,3 @@
8
8
  2. Run `git branch --show-current`.
9
9
  - **Not `master`** → run `git branch -M master`.
10
10
  - **Already `master`** → continue.
11
- 3. Run `npx vp config` to install the Git hooks (pre-commit checks + automatic version bump). Running it again is a safe no-op.
@@ -1,80 +1,105 @@
1
- # WiCOP 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 (cost center, employee ID), not for yes/no decisions.
8
-
9
- To wait for something the user does in the browser, poll in a tool loop:
10
- wait ~5 s, re-read the page, repeat until the expected state appears or ~5
11
- minutes pass, then carry straight on. Never end your turn while waiting —
12
- announcing "I'll continue once you have signed in" and stopping ends the
13
- session, and nothing resumes it.
14
-
15
- 1. Open [WiCOP](https://wicop.wistron.com/). If the sign-in page appears, do
16
- not ask for any application-form values yet. Say in one line that the user
17
- should finish the Microsoft sign-in, then poll (wait, re-read, repeat)
18
- inside the same turn until the signed-in shell is visible — the user name
19
- in the header and the left navigation — and continue without asking.
20
- 2. Open **Application Forms > New Account Combo Flow > Start**. Select **New
21
- Account Combo**, set **Purpose** to `Initialization of a new application.`,
22
- and select **OK**.
23
- 3. On **IBU Apply**, ask via **AskUserQuestion** for the **Cost Center** and
24
- whether to create **QAS**, **PRD**, or both. Fill the form sequentially from top to bottom;
25
- never interact with a field while a required field above it is incomplete.
26
- Leave prefilled and unneeded fields unchanged. The controls appear on the
27
- page in this order — use these values as each one is reached:
28
- - **I already have an IBU**: keep `No, apply a new IBU`. **IBU Group
29
- (Service Name)** is generated from the fields below; never type into it.
30
- - _Cloud Environment_
31
- - Service Provider: `K8S`
32
- - Application Name (EA ID): the user selects it — see step 4
33
- - Service(System) Alias Name: read `package.json` `name` converted to
34
- uppercase letters and digits only, with spaces and punctuation removed
35
- (`my-app` becomes `MYAPP`)
36
- - Cloud Type: `Satellite Cloud`
37
- - Cloud Site / Plant: `WCZ` / `WCZ`
38
- - Environment: tick only the requested boxes (DEV, QAS, PRD in that
39
- order); each ticked box enables its own **Cloud Cluster ID** and
40
- **Budget (TWD)** below it
41
- - QAS cluster / budget: `wcz-sat-qas-01` / `0`
42
- - PRD cluster / budget: `wcz-sat-prd-01` / `0`
43
- - _Owner information_
44
- - Cost Center: the user-provided value, entered in the editable IBU
45
- control, not the prefilled read-only IBG control
46
- - _Charge Setting_
47
- - Charge Type: `By Fixed Amount (per IBU)`
48
- - Charge Groups: reuse the same Cost Center if its row asks for one
49
- 4. When **Application Name (EA ID)** is reached, leave it entirely to the
50
- user: do not type, search, or select a value. Say in one line that the user
51
- should pick the EA ID, then poll the field until it holds a value and
52
- resume filling the form sequentially. Select **Next >** when complete.
53
- 5. On **IBG Apply**, verify the inherited read-only values and select
54
- **Next >**.
55
- 6. On **Project Apply**, set **Memory (GB)** to `2` for each selected
56
- environment; leave other fields unchanged. Ask via **AskUserQuestion**
57
- before selecting **Next >**.
58
- 7. On **Team Apply**, ask via **AskUserQuestion** for the GitLab team manager's
59
- name or ID.
60
- Populate all other team fields automatically. Add `C0708003`, `C1107048`,
61
- `C2503017`, `C2404003`, `C2404002`, and `C2508015` as GitLab members,
62
- excluding the selected manager from the member list. Use **Copy & Paste
63
- Now** for all other teams. Create a JSM team and select its license-charge
64
- agreement when requested, then copy the GitLab team to it. Do not add a
65
- member row after the final member.
66
- 8. On **Review & Confirm**, present the summary to the user, then ask via
67
- **AskUserQuestion**: **"Submit the WiCOP request?"** with options `Submit` /
68
- `Not yet`. Only after they select `Submit`, select **Submit**; in the dialog,
69
- accept the CCoE Policy and select **Confirm**. On the successful-submission
70
- dialog, select **Let's Go** to open **Apply Status**.
71
- 9. Close the current browser session.
72
-
73
- This applies on every page and to every advancing control (**OK**, **Next >**,
74
- **Submit**, **Confirm**, **Let's Go**): after selecting it, inspect the next
75
- step and continue the workflow without pausing unless user input, a required
76
- confirmation, or a final submission decision is needed. If the UI does not
77
- visibly advance, select the same control once more, then stop.
78
-
79
- Do not submit the final request without the user's confirmation. WiCOP sends
80
- the application to the manager, owner, and owner division head for approval.
1
+ # WiCOP 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 (cost center, employee ID), not for yes/no decisions.
8
+
9
+ To wait for something the user does in the browser, poll in a tool loop:
10
+ wait ~5 s, re-check, repeat until the expected state appears or ~5 minutes
11
+ pass, then carry straight on. Never end your turn while waiting —
12
+ announcing "I'll continue once you have signed in" and stopping ends the
13
+ session, and nothing resumes it. Poll cheaply: a full page read returns the
14
+ entire sidebar and is tens of kilobytes, so when you are waiting on one
15
+ field, screenshot that field's ref instead. Element refs stay valid across
16
+ re-renders, so reuse the ones you already have rather than re-reading the
17
+ page to rediscover them.
18
+
19
+ 1. Open [WiCOP](https://wicop.wistron.com/). If the sign-in page appears, do
20
+ not ask for any application-form values yet. Say in one line that the user
21
+ should finish the Microsoft sign-in, then poll inside the same turn until
22
+ the URL returns to `wicop.wistron.com`. While the sign-in pages are open,
23
+ poll the page title and URL only — never read the page content, because the
24
+ password the user types is exposed in the accessibility snapshot. Once back
25
+ on WiCOP, confirm the signed-in shell (user name in the header, left
26
+ navigation) and continue without asking.
27
+ 2. Navigate directly to
28
+ `https://wicop.wistron.com/wicop/applicationForms/newAccountComboFlow` —
29
+ the collapsed left-nav submenu intercepts pointer events and clicking its
30
+ links times out. Select **Start**, then **New Account Combo**, set
31
+ **Purpose** to `Initialization of a new application.`, and select **OK**.
32
+ 3. On **IBU Apply**, ask via **AskUserQuestion** for the **Cost Center** and
33
+ whether to create **QAS**, **PRD**, or both. Fill the form sequentially from top to bottom;
34
+ never interact with a field while a required field above it is incomplete.
35
+ Leave prefilled and unneeded fields unchanged. The controls appear on the
36
+ page in this order — use these values as each one is reached:
37
+ - **I already have an IBU**: keep `No, apply a new IBU`. **IBU Group
38
+ (Service Name)** is generated from the fields below; never type into it.
39
+ - _Cloud Environment_
40
+ - Service Provider: `K8S`
41
+ - Application Name (EA ID): search for it yourself first — see step 4
42
+ - Service(System) Alias Name: read `package.json` `name` converted to
43
+ uppercase letters and digits only, with spaces and punctuation removed
44
+ (`my-app` becomes `MYAPP`); the field accepts at most 16 characters
45
+ - Cloud Type: `Satellite Cloud`
46
+ - Cloud Site: `WCZ`
47
+ - Plant: `WCZ` — this control only appears once Cloud Type is
48
+ `Satellite Cloud`, below Cloud Site
49
+ - Environment: tick only the requested boxes; the list is filtered by
50
+ site, so WCZ Satellite offers QAS and PRD only. Each ticked box
51
+ enables its own **Cloud Cluster ID** and **Budget (TWD)** below it
52
+ - QAS cluster / budget: `wcz-sat-qas-01` / `0`
53
+ - PRD cluster / budget: `wcz-sat-prd-01` / `0`
54
+ - _Owner information_
55
+ - Cost Center: the user-provided value, entered in the editable IBU
56
+ control, not the prefilled read-only IBG control
57
+ - _Charge Setting_
58
+ - Charge Type: `By Fixed Amount (per IBU)`
59
+ - Charge Groups: reuse the same Cost Center if its row asks for one
60
+ 4. When **Application Name (EA ID)** is reached, try to find it yourself. The
61
+ registered application names follow no convention — they may differ from
62
+ `package.json` `name` in casing, spacing, punctuation, and wording (`My
63
+ App`, `MyApp`, `My Application`, or an unrelated label), so do not expect an
64
+ exact match. Click the field first — it only starts searching once focused —
65
+ then type only a few leading characters of the most likely name to get a
66
+ wide option list. The options are loaded lazily, so wait and re-check the
67
+ list until it appears instead of concluding there are no matches; read the
68
+ options and select the one that clearly matches the project. Make a few
69
+ attempts with different guesses (short
70
+ prefix, the words separately, the full name). If no option is clearly the
71
+ right one, clear the field, say in one line that the user should pick the EA
72
+ ID, then poll the field until it holds a value. Resume filling the form
73
+ sequentially and select **Next >** when complete.
74
+ 5. On **IBG Apply**, verify the inherited read-only values and select
75
+ **Next >**. This page routinely needs the click twice.
76
+ 6. On **Project Apply**, set **Memory (GB)** to `2` for each selected
77
+ environment; leave other fields unchanged. Ask via **AskUserQuestion**
78
+ before selecting **Next >**.
79
+ 7. On **Team Apply**, ask via **AskUserQuestion** who the GitLab team manager
80
+ is, offering exactly two options: `Martin Husar (C1107048)` and the
81
+ logged-in user — read that ID and name from the top-right corner of the
82
+ WiCOP header.
83
+ Populate all other team fields automatically. Add `C0708003`, `C1107048`,
84
+ `C2503017`, `C2404003`, `C2404002`, and `C2508015` as GitLab members,
85
+ excluding the selected manager from the member list. Each member box is a
86
+ search field: type the ID, then select the suggestion it offers before
87
+ adding the next row — an unresolved ID is discarded. Use **Copy & Paste
88
+ Now** for all other teams. Create a JSM team and select its license-charge
89
+ agreement when requested, then copy the GitLab team to it. Do not add a
90
+ member row after the final member.
91
+ 8. On **Review & Confirm**, present the summary to the user, then ask via
92
+ **AskUserQuestion**: **"Submit the WiCOP request?"** with options `Submit` /
93
+ `Not yet`. Only after they select `Submit`, select **Submit**; in the dialog,
94
+ accept the CCoE Policy and select **Confirm**. On the successful-submission
95
+ dialog, select **Let's Go** to open **Apply Status**.
96
+ 9. Close the current browser session.
97
+
98
+ This applies on every page and to every advancing control (**OK**, **Next >**,
99
+ **Submit**, **Confirm**, **Let's Go**): after selecting it, inspect the next
100
+ step and continue the workflow without pausing unless user input, a required
101
+ confirmation, or a final submission decision is needed. If the UI does not
102
+ visibly advance, select the same control once more, then stop.
103
+
104
+ Do not submit the final request without the user's confirmation. WiCOP sends
105
+ the application to the manager, owner, and owner division head for approval.