Files
alla-allaos-fullstack/plans/task-ep.1.7.md
phaichayon e0fcb3992b task-ep.1.7
2026-07-13 16:55:55 +07:00

8.4 KiB
Raw Blame History

Task EP.1.7 My Day Workspace Foundation

Status: Foundation Implemented

Priority: Critical

Type: Workspace / Operational Dashboard / Productivity Foundation


Depends On

  • EP.1.1 Activity Domain Foundation

  • EP.1.2 Activity Integration & Legacy Follow-up Adapter

  • EP.1.3 Business Event Foundation

  • EP.1.4 Projection Foundation & Delivery Reliability

  • EP.1.4.1 Transactional Outbox Activation & Worker Runtime

  • EP.1.5 Timeline Projection Foundation

  • EP.1.6 Calendar Projection, Workspace & Big Calendar Foundation

  • BU-R.0

  • BU-R.0.1

  • BU-R.1

  • AR.1

  • AR.2

  • ENG.0


Objective

Introduce the first operational workspace that users open every morning.

My Day becomes the single productivity workspace where Marketing, Sales, Managers, and Executives immediately understand:

  • what must be done today
  • what is overdue
  • what is important
  • what is blocked
  • what is approaching
  • what requires attention

without navigating through Lead, Opportunity, Quotation, Calendar, Timeline, and Approval individually.

My Day is NOT another business domain.

It is a read-oriented operational workspace.


Business Outcome

When a Sales user logs in, the first screen should answer:

What should I do next?

When a Manager logs in, the first screen should answer:

Which team members require attention?


Workspace Principles

My Day never owns business data

My Day aggregates information.

It never becomes the source of:

  • Activity
  • Lead
  • Opportunity
  • Quotation
  • Approval
  • Calendar

Activity remains the operational owner

Every actionable task ultimately resolves to Activity.

My Day never edits projection rows.


Calendar owns scheduling

My Day consumes Calendar Projection.

Calendar remains responsible for scheduling.


Timeline owns history

Timeline answers:

"What happened?"

My Day answers:

"What should happen next?"


Review Required

Review:

  • AGENTS.md
  • Engineering Constitution
  • Project Foundations
  • Architecture Rules
  • UI UX Rules
  • LAYOUT.md
  • AR.2 Workspace UI UX Design Note
  • EP.1.5 Timeline
  • EP.1.6 Calendar
  • CRM Security
  • Activity Domain
  • Projection Runtime

UI review must use:

  • ui-ux-pro-max

Scope

Part 1 — Workspace Route

Introduce

/dashboard/crm/my-day

This becomes the default landing page for CRM users after login.


Part 2 — Workspace Composition

The page is composed of widgets.

Widgets are independent read models.

Widgets never own business logic.


Part 3 — Workspace Widget Registry

Introduce

WorkspaceWidgetRegistry

Each widget defines:

  • id
  • title
  • priority
  • icon
  • permission
  • visibility
  • refresh strategy
  • empty state

Widgets must be individually reusable.


Part 4 — Default Widgets

Minimum widgets

Today's Schedule

Consumes Calendar.

Shows:

  • Meeting
  • Visit
  • Site Survey
  • Follow-up

Overdue Activities

Consumes Activity.


Due Today

Consumes Calendar.


Hot Projects

Consumes Opportunity.

Only projects currently flagged as Hot Project.


Quotations Requiring Attention

Examples

  • expiring soon
  • pending approval
  • returned for revision

Pending Approvals

Consumes Approval.


Recently Updated

Consumes Timeline.


My Statistics

Examples

  • Activities Today
  • Meetings
  • Visits
  • Closed Activities

Part 5 — Workspace Data Priority Matrix

Freeze rendering priority.

Example

Priority 1

Overdue

Priority 2

Today's Meetings

Priority 3

Today's Visits

Priority 4

Approvals

Priority 5

Quotation Expiring

Priority 6

Expected Award

Priority 7

Hot Project

Priority 8

Upcoming Activities

Widgets should appear in business importance order.


Part 6 — Add Activity

Primary workspace action.

Display

+ Add Activity

Must reuse existing

Activity Form

Activity API

Activity Service

No duplicate Activity implementation.

Support

  • Meeting
  • Visit
  • Follow-up
  • Phone Call
  • Reminder
  • Internal Task
  • Site Survey

Context-aware prefills:

  • Customer
  • Lead
  • Opportunity
  • Quotation
  • selected Calendar date

Part 7 — Quick Actions

Examples

Complete

Reschedule

Cancel

Open Activity

Open Customer

Open Opportunity

Open Quotation

Open Calendar

Actions must call source services.


Part 8 — Workspace Filters

Support

  • Today
  • Tomorrow
  • This Week
  • User
  • Team
  • Branch
  • Product
  • Customer
  • Activity Type
  • Hot Project

Part 9 — Workspace Layout

Suggested layout

----------------------------------------------------

Good Morning

Summary KPIs

----------------------------------------------------

Today's Schedule

Overdue

Hot Projects

Pending Approvals

----------------------------------------------------

Quotation Attention

Recent Activity

----------------------------------------------------

Quick Actions

----------------------------------------------------

Must follow

LAYOUT.md

and

ui-ux-rules.md


Part 10 — Personal vs Manager Mode

Personal

Shows

  • own Activities
  • own Calendar
  • own Quotations
  • own Approvals

Manager

Adds

  • team workload
  • overdue team Activities
  • team Calendar
  • team approvals

Uses existing CRM permissions.


Part 11 — Widget Refresh

Widgets should refresh independently.

No full-page reload.

Reuse React Query.


Part 12 — Empty States

Every widget must define

  • loading
  • empty
  • permission denied

Part 13 — Notification Entry Points

Widgets provide links into

  • Calendar
  • Timeline
  • Activity
  • Customer
  • Opportunity
  • Quotation

Notifications remain outside scope.


Part 14 — Workspace Performance

Support

  • lazy loading
  • independent queries
  • cached widgets
  • bounded datasets

Part 15 — Responsive Layout

Desktop

Tablet

Mobile

Mobile defaults to

Today's Schedule


Part 16 — Workspace Security

Every widget must reuse

CRM Security Context

No widget bypasses permission.


Part 17 — My Day UX Review

Review with

  • ui-ux-pro-max
  • LAYOUT.md
  • ui-ux-rules.md

Review

  • hierarchy
  • density
  • responsiveness
  • accessibility
  • dark mode
  • keyboard
  • empty state
  • loading
  • interaction consistency

Part 18 — Workspace Analytics

Track

  • widget usage
  • quick action usage
  • Add Activity usage
  • completion rate

No sensitive business payload stored.


Deliverables

  1. My Day Workspace
  2. Widget Registry
  3. Workspace Layout
  4. Today's Schedule Widget
  5. Overdue Widget
  6. Due Today Widget
  7. Hot Project Widget
  8. Pending Approval Widget
  9. Quotation Attention Widget
  10. Recent Activity Widget
  11. My Statistics Widget
  12. Add Activity Action
  13. Quick Actions
  14. Workspace Filters
  15. Manager Mode
  16. Widget Refresh Strategy
  17. Responsive Layout
  18. Workspace Analytics
  19. My Day UX Review Report
  20. EP.2.0 Readiness Report

Constraints

Must preserve

  • Activity ownership
  • Calendar ownership
  • Timeline ownership
  • Opportunity ownership
  • Quotation ownership
  • Approval ownership

Must not introduce

  • duplicate Activity
  • duplicate Calendar
  • duplicate Timeline
  • duplicate Notification

No breaking API changes.


Testing

  • Widget rendering
  • Widget refresh
  • Permission
  • Add Activity
  • Quick Actions
  • Filters
  • Responsive
  • Mobile
  • Manager Mode
  • Empty State
  • Loading
  • Dark Mode
  • Accessibility
  • Performance

Acceptance Criteria

  • My Day becomes the default operational workspace for CRM users.
  • All widgets consume existing source domains or projections without introducing duplicate business logic.
  • The primary Add Activity action reuses the existing Activity form, API, and service.
  • Widgets refresh independently using React Query and do not require full-page reloads.
  • Personal and Manager modes enforce existing CRM permissions and team visibility rules.
  • The Workspace Widget Registry defines widget composition, priority, permissions, and refresh behavior.
  • The Workspace Data Priority Matrix determines the display order of actionable information.
  • UI follows LAYOUT.md, ui-ux-rules.md, and is reviewed with ui-ux-pro-max.
  • Existing Activity, Calendar, Timeline, Approval, Dashboard, Reports, and Notification behavior remain unchanged.

Success Criteria

ALLA OS gains a unified My Day Operational Workspace where users can start their day, understand priorities, create and manage Activities, and navigate seamlessly to Calendar, Timeline, Customers, Opportunities, Quotations, and Approvals from a single productivity-focused workspace.