# Quản lý User Intent Bằng Sealed Actions

> Biến UI events thành action vocabulary rõ ràng, bạn có thể tạo log, tự mở rộng để thấy hiệu quả.

- URL: https://dantech.academy/courses/kotlin-accelerator/engineer-builder/02-compose-ui-from-state/lesson-02-model-user-intent-with-sealed-actions
- Khóa học: [Mobile Action Pro](https://dantech.academy/courses/kotlin-accelerator.md)
- Module: Compose UI Theo State
- Thời lượng: 10 phút
- Độ khó: beginner
- Truy cập: Dành cho học viên
- English: https://dantech.academy/en/courses/kotlin-accelerator/engineer-builder/02-compose-ui-from-state/lesson-02-model-user-intent-with-sealed-actions.md

## Mục tiêu

- Đặt tên action theo intent của người dùng thay vì widget detail như OnSignInButtonClicked
- Định nghĩa action vocabulary đóng bằng sealed interface và biết chính xác khi nào compiler bảo vệ bạn
- Quản lý request action, async result action, dialog orchestration và one-time UI event

## Nội dung bài học

1. Mục Tiêu Bài Học
2. Phần 1: Callback và Action trong Kotlin Accelerator
3. Phần 2: Sealed Actions Của Menu
4. Phần 3: Không Phải Action Nào Cũng Đến Từ User
5. Phần 4: Drill 1, Đọc Toàn Bộ Auth
6. Phần 5: Đặt Tên Theo Chuẩn
7. Code Reading Path
8. Checkpoint
9. Bad Smells
10. Điều Cần Nhớ

## Học cùng AI agent

Toàn bộ bài học dành cho học viên của khóa. Học viên mở bài trên web và bấm nút **Markdown** để copy toàn bài, rồi dán vào Claude, ChatGPT, Cursor hoặc agent bạn đang dùng. Nhanh hơn: tạo token ở `/profile/ai-agents` và agent đọc bài trực tiếp qua MCP.

- [Đăng ký khóa học](https://dantech.academy/kotlin-accelerator/checkout)

---

- Bài trước: [Thiết Kế UI Model Bất Biến](https://dantech.academy/courses/kotlin-accelerator/engineer-builder/02-compose-ui-from-state/lesson-01-design-immutable-ui-models.md)
- Bài tiếp theo: [Kiểm Soát Recomposition](https://dantech.academy/courses/kotlin-accelerator/engineer-builder/02-compose-ui-from-state/lesson-03-control-recomposition-with-stable-state.md)
