Repository navigation
Feat/subtasks checklist - #106
hitsmedia-grup wants to merge 11 commits into
Conversation
Let users disable the landing page from Settings. The preference is stored in localStorage; signed-out visitors go straight to login, and the login page hides its link back to the landing page.
Add a client-side fallback so signed-out visitors are redirected to login after hydration when the landing page is disabled.
Persist the landing-page preference in a cookie so the root route can redirect visitors server-side when the landing page is disabled.
Allow subtasks to be added while creating a task, and save subtask entries in task template payloads. Include templates in backups. Template subtasks are stored but not yet prefilled when using a template.
|
@hitsmedia-grup is attempting to deploy a commit to the ilramdhan's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Halo, makasih banyak sudah kirim PR ini, apalagi sekaligus bikin issue #104. Deskripsi PR-nya rapi dan bagian trade-off-nya jujur, itu ngebantu banget buat review. Aku sudah baca semua perubahannya. Berikut beberapa hal yang perlu dibenahi dulu sebelum bisa di-merge. Aku urutkan dari yang paling penting. 1. PR ini ikut membawa commit fitur landing pageDi tab Commits ada 4 commit landing page ( Aturannya satu PR = satu fitur, jadi commit landing perlu dibuang dari branch ini. Caranya kira-kira begini (jalankan di folder repo kamu): # sekali saja: tambahkan repo asli sebagai "upstream"
git remote add upstream https://github.com/ilramdhan/second-brain.git
git fetch upstream
# buat ulang branch dari main yang asli, lalu ambil hanya commit subtasks
git checkout -B feat/subtasks-checklist upstream/main
git cherry-pick af758a93 529246e9 72286984 51d492f9
# kirim ulang ke branch yang sama (aman, ini branch milik kamu sendiri)
git push --force-with-lease origin feat/subtasks-checklistPR ini akan otomatis ter-update. Setelahnya, cek tab "Files changed" dan pastikan yang tersisa hanya 2. Subtask yang disimpan di template belum terpakaiSekarang template bisa menyimpan
Setelah itu komentar "Note: subtasks from template are not pre-filled..." bisa dihapus. 3. Form template tidak ter-reset setelah membuat template baruBaris Solusi paling sederhana: reset form setiap kali dialog dibuka, dengan menaruh Poin ini juga berkaitan dengan lint. Repo ini memakai rule 4. Teks UI masih ditulis langsungDi Key 5. Backup:
|
|
Tambahan sedikit: CI di PR ini sudah jalan dan ada 4 cek yang merah. Kabar baiknya, penyebabnya cuma tiga hal kecil:
Setelah itu |
- Add wsTplSubtasks and wsTplSubtasksPlaceholder to English locale - Replace useEffect state sync with key-based component remount - Initialize state from initial prop values directly Resolves CI check failures: Typecheck, Test, and Lint
Summary
Menampilkan fitur Subtasks / Checklist saat membuat task baru dan template baru, serta menambahkan
templateske backup JSON.Masalah: Subtasks hanya muncul setelah task dipindah ke status "To Do" (setelah disimpan), karena komponen
<Subtasks>disembunyikan dengan kondisi{task && ...}di TaskEditor.Solusi:
draftSubtasks[]) dan normal mode untuk existing task (query DB)payload.subtasks: string[]templatesdengan schema validationCloses #(issue number jika ada)
Type of change
feat– new featureHow to test
1. Task baru dengan subtasks (views: semua yang buka task dialog - list, kanban, calendar, timeline, today)
parent_idyang benar2. Existing task (regression check)
3. Template dengan subtasks (view: /templates)
payload.subtasks: string[]TaskDefaults, follow-up)4. Backup/Restore (view: /settings)
"templates": [...]dengan templates yang ada (termasuk payload.subtasks)Screenshots / recordings
Checklist
bun run lint,bunx tsc --noEmitandbun run testpass locallybun run buildpasses (required for routing, server function or config changes)AGENTS.md(task edits viauseTaskActions, no new query hooks, soft delete for subtasks)N/A (no new tables;templatestable sudah ada, hanya tambah ke backup schema)*.server.ts/ server functions and are never exposed viaVITE_*wsTplSubtasks,wsTplSubtasksPlaceholderdiworkspace.ts)feat(tasks): add subtasks/checklist to new task and template formsREADME.md→ Subtasks section sudah ada, tidak perlu update;AGENTS.md→ tidak ada architecture rule barumainNotes for reviewers
Trade-offs:
for await), bukan parallel; jika gagal di tengah, parent task sudah terinsert tapi subtasks sebagian. Alternative: Promise.all atau transaction wrapper, tapi tambah kompleksitas. Current: cukup aman karena subtasks hanya butuh parent_id + title.TaskDefaultsdanTaskDialogProviderbelum support subtasks array. Subtasks dari template tersimpan dipayload.subtaskstapi tidak otomatis muncul. Follow-up: extendTaskDefaultsdengansubtasks?: string[]dan pre-populatedraftSubtasksstate.Areas needing extra eyes:
Subtaskscomponent conditional logic (draft vs normal mode): apakah type guards cukup aman?templates: apakahjson.optional()untukpayloadcukup, atau perlu nested validation?Skipped intentionally (not in scope):