Prompt file imported from migoamigoea-star/ioi-docs-uploads (
.github/prompts/canvas-migration-session.prompt.md). Copyright stays with the author.
Canvas App Migration Session
Invoke
@canvas-migration-architectto start a full Canvas App migration pipeline.
Goal
Convert the existing TSX Code App into a maintainable Power Apps Canvas App using:
- Standard connectors only (SharePoint, Office 365 Users, Office 365 Outlook)
- No Dataverse, SQL, custom connectors, or premium connectors
- Power Automate flows for approval/workflow/notifications
- Reusable Canvas components for consistent UX
- XML/DXL, TXT, PDF, SharePoint schema, and TSX/code as source evidence
- The IOI professional UI design system and mandatory container hierarchy
🆕 Canvas Screen Requirement Spec: Before designing or implementing any screen, the architect and builder agents MUST read
design/IOI-CANVAS-SCREEN-SPEC.md. This 26-section spec is the authoritative reference for:
- Layout shell dimensions (§2): Header H=42, Sidebar W=194-224, Content X=220-240
- Typography mapping (§3): Every Stitch CSS size → Canvas PA Size
- Color system (§4):
gblITThemewith 16 tokens — must use theme, not hardcoded- Container strategy (§5): AutoLayout rules,
LayoutMinWidth=0enforcement- Control properties (§6): 15 controls with exact recommended values
- Screen templates (§7, §23): Index, New, Detail, Approval, My Tasks, Action Hub, Dashboard
- KPI cards (§8), Tab bar (§9), Workflow timeline (§10)
- Responsive patterns (§18): sidebar collapse, column breakpoints
- Error/empty/loading states (§19), validation (§20), people (§21)
- HtmlViewer rules (§25): ✅/❌ usage, padding
=0, performance- PAC CLI commands (§26): validate/pack/unpack + error table
- 20-point checklist (§16) + 18 compliance gates (§13)
Every screen designed or built in this migration must conform to these standards. Non-compliant output must be revised before handoff.
Use TSX as reference only. XML/TXT/PDF define source business structure, SharePoint schema defines persistence, and the Canvas design system defines the final UI. Do not invent missing business logic; mark unconfirmed rules as Needs confirmation.
Pipeline Steps
Run each step sequentially. Use /memory session to track progress.
Step 1 — Inventory
List every XML/DXL, TXT, PDF, screenshot/PNG, SharePoint schema, generated service/model, and TSX page/module available for each form/app.
Classify each as: Index | New | View | Detail | Edit | Approval | Dashboard
Step 2 — Per-Screen Analysis
First determine whether the request is:
- New screen from screenshot/reference
- Existing screen modification
For each screen, analyze the 20 dimensions:
1. Screen purpose
2. Department/form name
3. Screen type
4. Data source used
5. SharePoint list name
6. Required columns
7. System-generated columns
8. Editable columns
9. Computed/read-only columns
10. Field types
11. Lookup/person/choice fields
12. Validation rules
13. Conditional visibility
14. Required/optional behavior
15. Button actions
16. Approval/workflow behavior
17. Role-based access
18. Navigation logic
19. Loading/error/empty state behavior
20. Canvas App replacement design
If screenshot evidence exists, also extract:
- structure and section order
- font sizes and typography cues
- spacing/padding/gaps
- workflow presentation style
- people presentation style
- areas that require `HTML Text` for close visual parity
Step 3 — SharePoint Schema Mapping
For each SharePoint list used:
- List name and target site URL
- Column mapping: Display Name, Internal Name, Type, Required, Editable, System
- Choice column options
- Lookup relationships
- Person/group column config
Step 4 — Canvas Screen Design
For each Canvas screen:
- Full mandatory container hierarchy before controls
- Layout (vertical/horizontal containers, galleries, forms, cards)
- Controls (ModernTextInput, ModernDropdown, ModernButton, etc.)
- Navigation (Navigate, Back, variables)
- Responsive behavior (FillPortions, stretch, scroll)
- Typography, color, background, spacing, border, and status badge rules
- LoadingContainer, EmptyStateContainer, ErrorStateContainer, validation, and success behavior
- Match screenshot structure and font sizing as closely as Canvas allows
- Use `Office365Users` patterns when the UI needs to show people
- Use `HTML Text` for workflow or rich formatted display when native controls
cannot achieve close enough visual parity
- Record any exact-match limitations explicitly
Step 5 — Power Fx Drafting
Draft key formulas:
- OnVisible: screen init, variables, record loading
- OnSelect: Patch, SubmitForm, IfError, Notify
- Items: gallery/filter delegation-safe queries
- Default: field defaults
- DisplayMode: Edit/View/Disabled
- Visible: conditional field visibility
- Valid: field validation rules
Step 6 — Power Automate Design
For each workflow:
- Trigger (SharePoint item created/modified)
- Conditions (status change, stage transition)
- Actions (send email, update item, deep link)
- Connectors (SharePoint, Office 365 Outlook)
Step 7 — Component Architecture
Design reusable Canvas components:
- Header: title, user info, back nav
- StatusBadge: stage indicator
- ApprovalTimeline: workflow history
- ActionPanel: contextual action buttons
Step 8 — Risk Register
Maintain a live risk table:
| # | Issue | Severity | Resolution |
Step 9 — Implementation Plan
Produce a build task list with:
- Task ID, description, dependencies
- Effort estimate (Story Points or hours)
- Assigned component/screen
- Acceptance criteria
Output Format
Each step must produce structured artifacts in canvas-migration-design/ and the required XML UI design reports:
canvas-migration-design/
├── 01-inventory.md
├── 02-per-screen-analysis/
│ ├── ITSSR-New.md
│ ├── ITSSR-List.md
│ ├── ITSSR-Detail.md
│ └── ...
├── 03-sharepoint-mapping.md
├── 04-canvas-screen-design.md
├── 05-powerfx-formulas.md
├── 06-power-automate-design.md
├── 07-component-architecture.md
├── 08-risk-register.md
└── 09-implementation-plan.md
Required reports:
XML_UI_DESIGN_MASTER_REPORT.md
XML_FORM_UI_INVENTORY.xlsx
XML_UI_GAP_REGISTER.xlsx
UI_DESIGN_SYSTEM_AND_SCREEN_STANDARD.md
canvas-migration-design/02-per-screen-analysis/<Form>-<Screen>.md
canvas-migration-design/04-canvas-screen-design/<Form>-blueprint.md
Every per-form blueprint must include:
- Form name, department, site, source files, purpose, build readiness
- Screen list: dashboard, view list, new form, detail, approval panel if confirmed, admin/config if needed
- Container hierarchy: AppRootContainer, HeaderContainer, BodyContainer, SidebarContainer, MainContentContainer, PageHeaderContainer, FormContainer, SectionContainer, FieldRowContainer, FieldContainer, ActionBarContainer, WorkflowTimelineContainer, LoadingContainer, EmptyStateContainer, ErrorStateContainer, CommentsContainer, AttachmentContainer, AuditHistoryContainer
- Typography and color rules from
UI_DESIGN_SYSTEM_AND_SCREEN_STANDARD.md - Field inventory with SharePoint internal column mapping
- Section design, action logic, workflow timeline, responsive behavior, loading/empty/error/success/validation states
- Gaps and confirmation required
Key Constraints Reminder
- ❌ No Dataverse
- ❌ No SQL
- ❌ No Azure services
- ❌ No custom connector
- ❌ No HTTP premium action
- ❌ No premium connector dependency
- ✅ SharePoint Lists only
- ✅ Office 365 Users (people/profile)
- ✅ Office 365 Outlook (email)
- ✅ Power Automate standard connectors
UI and Evidence Constraints
- Do not assume approval. Classify each form as: No approval, Notification only, Single-level approval, Multi-level approval, or Unknown workflow.
- Do not add approval buttons unless approval is confirmed by source evidence.
- Every field must be inside a
FieldContainer. - Every screen must include loading, empty, error, validation, and success states.
- Use Segoe UI typography, approved IOI colors, 1180px main max width, 64px header, 260px desktop sidebar, 40px controls/buttons, and responsive desktop/tablet/mobile behavior.
- When a screenshot is provided, replicate it 1:1 as closely as Power Apps Canvas permits before redesigning.
- Preserve exact structure and font size whenever possible; if not possible, state the limitation and closest fallback.
- Use
Office365Userswhen the UI needs to show people, approvers, or profile information. - Use
HTML Textfor workflow/timeline or other rich formatted read-only areas when native controls are not visually sufficient. - Classify build readiness as Ready to Build, Partial Build, Needs Confirmation, or Blocked.