You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a "Create Task" screen where users can create a new task with a title (required) and description (optional). This is the foundational task creation flow that subsequent tickets will extend with due date, priority, URL, and location fields.
The current app has no create-task navigation or screen. The Today screen is a placeholder with centered text and does not expose an add action. This ticket introduces the screen composable, ViewModel, navigation route, and a plus button in the Today screen top bar to navigate to it.
Scope
In scope: CreateTaskScreen composable with title (required) and description (optional) fields, form validation (title must not be blank), CreateTaskViewModel with Orbit MVI pattern, CreateTaskNavigation route, plus button in the Today/home top bar that navigates to the create screen, string resources for all UI text, and unit tests for the ViewModel.
Out of scope: due date, priority, URL, and location fields (covered by separate tickets). Edit task flow. Upcoming screen quick-add behavior.
Acceptance criteria
GIVEN the user is on the Today screen
WHEN they tap the plus button in the top bar
THEN they navigate to the Create Task screen
GIVEN the Create Task screen is displayed
WHEN the user leaves the title blank and taps save
THEN a validation error is shown and the task is not created
GIVEN the Create Task screen is displayed
WHEN the user enters a title and taps save
THEN a new task is persisted with creationDate set to now, and the user navigates back
GIVEN the Create Task screen is displayed
WHEN the user enters a title and an optional description
THEN both fields are saved on the task
GIVEN the user is on the Create Task screen
WHEN they press the system back button or the back arrow
THEN they navigate back without creating a task
GIVEN a task is successfully created
WHEN the user returns to the Today screen
THEN the new task appears in the list once the Today task list is implemented
Implement the foundational create-task flow so a user can open a Create Task screen from Today, enter a required title and optional description, save the task, and return to the previous screen.
Scope
In scope:
New Create Task screen
New Create Task ViewModel using Orbit MVI
New navigation route for Create Task
Plus button in the Today top bar
Validation for required title
Persisting a new task with creationDate = now
String resources for all UI text
ViewModel unit tests
Out of scope:
Due date
Priority
URL
Location
Edit task flow
Today task list implementation
Any change to Today task query behavior
Current State
TodayScreen is currently a placeholder and has no top bar action.
TodayViewModel currently has no events or side effects.
Navigation is route-based with NavKey plus Navigation<T> implementations.
TaskDao already supports writes through save(vararg task: Task).
TaskRepository does not yet expose a create/save method.
Task already has the fields needed for this ticket.
There is no existing top app bar pattern in the app, so this ticket introduces one. Keep it minimal and local to avoid over-design.
The Today screen still does not render tasks. This ticket should not try to solve that.
Newly created tasks will have dueDate = null, and current Today query behavior only returns due/overdue tasks. That is acceptable because showing the created task in Today is explicitly outside this ticket’s scope.
Definition Of Done
User can tap a plus button from Today and reach Create Task
Create Task screen shows title and description inputs
Saving with a blank title shows a validation error and does not save
Saving with a valid title persists a task with creationDate = now
Activity
MessiasLima commentedon Jul 21, 2026
/oc
Issue #121 Plan: Create Task Screen - Core Fields
Goal
Implement the foundational create-task flow so a user can open a Create Task screen from Today, enter a required title and optional description, save the task, and return to the previous screen.
Scope
In scope:
creationDate = nowOut of scope:
Current State
TodayScreenis currently a placeholder and has no top bar action.TodayViewModelcurrently has no events or side effects.NavKeyplusNavigation<T>implementations.TaskDaoalready supports writes throughsave(vararg task: Task).TaskRepositorydoes not yet expose a create/save method.Taskalready has the fields needed for this ticket.Files Likely To Change
foliary/src/commonMain/kotlin/dev/appoutlet/foliary/data/task/TaskRepository.ktfoliary/src/commonMain/kotlin/dev/appoutlet/foliary/data/task/TaskRepositoryImpl.ktfoliary/src/commonMain/kotlin/dev/appoutlet/foliary/feature/today/TodayViewModel.ktfoliary/src/commonMain/kotlin/dev/appoutlet/foliary/feature/today/TodayScreen.ktfoliary/src/commonMain/composeResources/values/strings.xmlFiles To Add
foliary/src/commonMain/kotlin/dev/appoutlet/foliary/feature/createtask/CreateTaskViewModel.ktfoliary/src/commonMain/kotlin/dev/appoutlet/foliary/feature/createtask/CreateTaskScreen.ktfoliary/src/commonMain/kotlin/dev/appoutlet/foliary/feature/createtask/CreateTaskNavigation.ktfoliary/src/commonTest/kotlin/dev/appoutlet/foliary/feature/createtask/CreateTaskViewModelTest.ktImplementation Plan
1. Extend the task repository
Add a minimal create API to
TaskRepository.Proposed shape:
suspend fun save(task: Task)Implementation:
taskDao.save(task)inTaskRepositoryImpl.Reason:
2. Create the new feature package
Add a new
feature/createtask/package following the existing screen pattern.Files:
CreateTaskViewModel.ktCreateTaskScreen.ktCreateTaskNavigation.ktThis matches the structure already used by
signin,profile, and the project’screate-screenguidance.3. Add navigation for Create Task
Create:
@Serializable data object CreateTaskNavKey : NavKey@Single class CreateTaskNavigation : Navigation<CreateTaskNavKey>Behavior:
CreateTaskScreen()insetupRouteCreateTaskNavKeyinsetupPolymorphismReason:
NavigationAggregator, so this should integrate without central manual route wiring.4. Update Today to expose the create flow
Update
TodayViewModelto handle a plus-button event.Suggested contracts:
TodayEvent.OnAddTaskClickTodayAction.NavigateToCreateTaskBehavior:
NavigateToCreateTaskUpdate
TodayScreen:TodayEvent.OnAddTaskClickTodayAction.NavigateToCreateTaskby navigating toCreateTaskNavKeyReason:
5. Implement CreateTaskViewModel
Keep form state in the ViewModel so validation and save behavior are fully testable.
Suggested state:
title: Stringdescription: StringshowTitleError: BooleanisSaving: BooleanSuggested events:
OnTitleChanged(String)OnDescriptionChanged(String)OnSaveClickOnBackClickSuggested side effects:
NavigateBackDependencies:
TaskRepositoryTimeProviderBehavior:
OnTitleChangedupdates title and clears the error once the title is no longer blankOnDescriptionChangedupdates descriptionOnBackClickemitsNavigateBackOnSaveClick:title.isBlank()showTitleError = trueand stopTaskNavigateBackTask construction:
id = Uuid.random()title = title.trim()description = description.trim().ifBlank { null }creationDate = timeProvider.now()dueDate = nullcompletionDate = nullpriority = nullurl = nulllocation = nullReason:
6. Implement CreateTaskScreen
Build the screen using the project’s existing
Screen(...)wrapper and aScaffold.UI elements:
Behavior:
OnBackClickOnSaveClickshowTitleErroris trueLayout:
SignInScreenNotes:
7. Add string resources
Add all UI strings to
strings.xml.Expected additions:
Rule:
Testing Plan
1. CreateTaskViewModel tests
Add
CreateTaskViewModelTestcovering:nullNavigateBackNavigateBackwithout savingRecommended assertions:
Taskfields2. Optional TodayViewModel test
Add a small
TodayViewModelTestif needed to cover:OnAddTaskClickemitsNavigateToCreateTaskThis is optional but low cost.
3. Repository test update
Extend
TaskRepositoryImplTestwith one save-delegation test if repository behavior is modified.Verification
Run only targeted JVM tests:
./gradlew foliary:jvmTest --tests "dev.appoutlet.foliary.feature.createtask.CreateTaskViewModelTest"./gradlew foliary:jvmTest --tests "dev.appoutlet.foliary.data.task.TaskRepositoryImplTest"If a
TodayViewModelTestis added:./gradlew foliary:jvmTest --tests "dev.appoutlet.foliary.feature.today.TodayViewModelTest"Risks
dueDate = null, and current Today query behavior only returns due/overdue tasks. That is acceptable because showing the created task in Today is explicitly outside this ticket’s scope.Definition Of Done
creationDate = nowstrings.xmlopencode-agent commentedon Jul 21, 2026
Created PR #194
opencode session | github run