docs(wiki): add new notes for Quick History and Worklog

This commit is contained in:
Corey Newton 2026-02-03 18:39:33 -08:00 committed by Johannes Millan
parent 1bb1b6839e
commit daa5cea0f6
5 changed files with 120 additions and 3 deletions

View file

@ -42,8 +42,8 @@
- [[4.18-Reflection]]
- [[4.19-Metrics]]
- [[4.20-Task-Archiving]]
- Quick History
- Worklog
- [[4.22-Quick-History]]
- [[4.21-Worklog]]
## Managing-Your-Data

View file

@ -62,6 +62,7 @@ Because time spent is updated in real time as the timer runs, the progress value
## Related
- [[4.21-Worklog]] — How “time spent per day” is turned into the date-organized worklog view
- [[4.20-Task-Archiving]] — How completed tasks and their time move into the archive (recent and old tiers)
- [[4.15-Timers-and-Focus-Mode]] — How Focus Mode timers sync with task tracking (when enabled)
- [[4.08-Time-Estimates]] — How estimates and the comparison with actual time support planning and review

54
docs/wiki/4.21-Worklog.md Normal file
View file

@ -0,0 +1,54 @@
# Worklog
The worklog in Super Productivity is a **date-organized view** of the time you have logged on tasks: it turns each tasks **time spent per day** into a hierarchy of years, months, and days (or years, weeks, and days) so you can see what you worked on and for how long on any given date. The worklog is **generated** from your task and archive data—it does not store time separately. It is **read-only**: you view and export it, but you do not edit logged time through the worklog screen. (A related view, **Quick History**, uses the same data in a week-centric, current-year layout and allows inline editing of time per task; see [[4.22-Quick-History]].) Understanding how worklog entries are built, where the data comes from, and how accuracy and refresh work helps you use the worklog and daily summary for review and export.
For how time is recorded on tasks (time spent per day), see [[4.14-How-Time-Is-Logged]]. For how archived tasks and their time are included, see [[4.20-Task-Archiving]].
## What a Worklog Entry Represents
A **worklog entry** is one row in the worklog for a **specific day**: it ties a **task** to **time spent on that day**. When the worklog is built, each tasks per-day time (from “time spent per day” on the task) becomes one or more entries—one per day on which time was logged. For display and export, each entry is effectively “this task, on this date, this much time.” Subtasks can be linked to their parent so they appear under the parent in the list; the app also tracks whether an entry should be excluded from certain restore operations, but that is an internal detail. So from your perspective: the worklog is a **list of taskdateduration** rows, grouped by day (and by month and year, or by week).
## How the Worklog Is Generated from Time-Tracking Data
The worklog is **not** a separate store of time. It is **computed** from:
- **Active tasks** — The current task list (in your work context) and each tasks **time spent per day** (the same data that shows “30m today” or “2h” on the task).
- **Archived tasks** — Tasks that have been moved to the archive but still have time-tracking data. The app loads both active and archived tasks for the current context, then builds the worklog from all of them so you see **full history**, not only current tasks.
The transformation does the following:
- **Iterates over every task** and every day in that tasks “time spent per day” map.
- **Builds a hierarchy** — Year → month → day (or, in week view, year → week → day). Each day has a list of entries (task + time for that day) and a **total time** for the day.
- **Places subtasks** — When a task has a parent, its entry is placed immediately after the parent (or after a sibling) so the list reflects hierarchy.
- **Uses locale and work times** — Day labels use your locale; if you have work start/end times configured, they can be shown per day where available.
- **Aggregates without double-counting** — Only **leaf tasks** (tasks with no subtasks) contribute their time to the day/month/year totals. Parent tasks own “time spent per day” is not added again on top of subtask time, so the totals are not inflated.
So the worklog is a **reorganized view** of the same “time spent per day” data that lives on tasks (and in the archive). When you open the worklog, daily summary, or quick-history view, the app loads the relevant tasks (active + archive for the context), runs this transformation, and shows the result.
## Accuracy and Completeness
- **Source of time** — Every worklog entry comes from **task.timeSpentOnDay**, which is filled by the normal time-tracking flow (ticks while a task is active, batched persistence every few minutes). So the worklog reflects the same data as the task list and reports.
- **Missing data** — If a task has no “time spent per day” (e.g. legacy or edge case), the app applies defaults so the task still appears: subtasks may inherit the first date from the parents time or completion date; other tasks may use their creation or completion date with a minimal duration so they show up in the list. That keeps the worklog from dropping tasks that should be visible.
- **No double-counting** — Only leaf tasks count toward the aggregated totals at day, month, and year level. So the numbers you see for “total time on this day” match a single count of work time.
- **Timezone safety** — Dates are compared using **date strings** (e.g. YYYY-MM-DD) rather than raw clock times, so timezone or DST changes dont shift time to the wrong day.
- **When the worklog updates** — The worklog is **refreshed** when you navigate to the worklog, daily summary, or quick-history screen, or when you trigger a manual refresh. It does **not** update continuously as you track time; you may need to open the view or refresh to see the latest logged time.
## Read-Only and Export
- **Read-only** — The worklog is a **view** of existing data. You cannot edit “time spent per day” through the worklog UI; changes to logged time happen by tracking time on tasks, or by other flows (e.g. idle reassignment). So the worklog is for **review and export**, not for correcting time.
- **Export** — You can export the worklog (e.g. to CSV or for external time sheets). Export uses the same taskdateduration data and can be **filtered by project and date range**. An option lets you **exclude time that falls outside the chosen range**, so only time within the range is included in the export. That way you get a clean slice of work for the period you care about.
## Summary
- **Worklog** = date-organized view (year → month → day, or year → week → day) of **time spent per day** on tasks. Each entry is task + date + duration.
- **Source** — Built from **active tasks** and **archived tasks** for the current work context; no separate worklog store.
- **Totals** — Only **leaf tasks** contribute to day/month/year totals so there is no double-counting.
- **Refresh** — Updates when you open the worklog/daily summary/quick-history or when you refresh manually; not live as you track.
- **Read-only** — View and export only; you dont edit logged time from the worklog.
- **Export** — Filter by project and date range; optional exclusion of time outside the range.
## Related
- [[4.22-Quick-History]] — Week-centric, current-year view of the same data with inline time editing
- [[4.14-How-Time-Is-Logged]] — How “time spent per day” is recorded on tasks (the source of worklog data)
- [[4.20-Task-Archiving]] — How archived tasks and their time are included when building the worklog

View file

@ -0,0 +1,60 @@
# Quick History
Quick History is a **week-centric view** of the time you have logged on tasks, limited to the **current year**. It uses the same underlying data as the [[4.21-Worklog]]—your tasks “time spent per day” from both active and archived tasks—but presents it as a compact list of **weeks**, each with a total time and expandable **days** that show per-task entries. Unlike the worklog screen, Quick History lets you **edit** the time spent for a task on a given day directly in the view. It is scoped to the same **work context** (project or tag) as the worklog and is meant for fast review and correction of recent time without opening the full, multi-year worklog.
For how time is recorded and where “time spent per day” comes from, see [[4.14-How-Time-Is-Logged]]. For the full worklog (all years, read-only, export), see [[4.21-Worklog]].
## Quick History Vs Worklog
| Aspect | Quick History | Worklog |
|--------|----------------|---------|
| **Time range** | Current year only | All years (full archive) |
| **Structure** | Weeks → days → task entries | Years → months → days (or years → weeks → days) → entries |
| **Purpose** | Compact, recent summary with inline time editing | Detailed, day-by-day log for review and export |
| **Editing** | Yes — you can change time spent per task per day inline | No — read-only view and export |
| **Scope** | Same as worklog: active work context (project or tag) | Same: active work context |
| **Access** | Work-context menu (e.g. project or tag) → Quick History | Work-context menu → Worklog |
Both views are **generated** from the same source: active and archived tasks for the current context, with their “time spent per day” data. Navigating to either screen triggers a refresh of that data. So Quick History is a **focused slice** of the same information the worklog uses—current year, by week—plus the ability to correct time inline.
## What Quick History Shows
- **Weeks** — One row per week of the current year, with the **week number** and **total time spent** that week. Weeks are usually ordered with the **most recent first**.
- **Days** — Each week can be expanded to show **days** that have logged time. For each day you see:
- **Total time** spent that day
- **Number of log entries** (tasks with time on that day)
- **Work start/end** times for that day, if configured
- **Simple counters** (e.g. stopwatch or click counters) for that day, if you use them
- **Task list per day** — Expanding a day shows a **per-task table**: task title, and for each task the time spent on that day. Only tasks that are **done** or have **more than a second** of time are shown, so the list stays relevant. For **leaf tasks** (no subtasks), the time is **editable inline**—you can change the duration for that task on that day. For parent tasks, the table shows the **sum** of subtask time (read-only in this view).
So you get a quick answer to “what did I do this week?” and “what did I log on this day?” with the option to fix time without opening the task or the full worklog.
## How Far Back It Looks
Quick History includes **only the current year**. If there is no logged time for the current year in the selected work context, the view shows a message such as “No data for current year.” For older data (previous years), use the **Worklog** view, which includes all years.
## Data Source and Refresh
- **Source** — Same as the worklog: **active tasks** and **archived tasks** for the current project or tag, with their “time spent per day” and optional work start/end and simple-counter data. The app builds a **week-based** structure (year → week → day) from that data.
- **Refresh** — Like the worklog, Quick History is refreshed when you **navigate** to the Quick History screen (or when the shared worklog refresh runs). It does not update in real time as you track; open the view or refresh to see the latest data.
- **Scope** — You open Quick History from a **project** or a **tag** (work-context menu). The data you see is for that project or tag only.
## Inline Editing and Persistence
When you **edit** time for a task on a day in Quick History, the app updates that tasks “time spent per day” for that date. The change is persisted the same way as other time changes (e.g. after tracking or idle reassignment), so the updated value appears in the worklog, reports, and metrics. Inline editing is only for **leaf tasks**; parent tasks show the sum of subtask time and are not edited here.
## Where to Find It
Quick History is available from the **work-context menu** (the menu for the current project or tag), alongside **Worklog** and **Metrics**. You can open it for a project or for a tag; the route reflects the context (e.g. project/:id/quick-history or tag/:id/quick-history).
## Summary
- **Quick History** = week-centric view of **time spent per day** for the **current year**, scoped to the active project or tag.
- **Same data as Worklog** — Built from active + archived tasks; different layout (weeks first, current year only) and **inline editing** of time per task per day.
- **Worklog** = all years, read-only, detailed day-by-day, with export; **Quick History** = current year, week-by-week, with inline time editing.
- **Refresh** on navigation; **scope** = current work context (project or tag).
## Related
- [[4.21-Worklog]] — Full worklog (all years, read-only, export); same underlying data
- [[4.14-How-Time-Is-Logged]] — How “time spent per day” is recorded (the source for both Quick History and worklog)

View file

@ -38,4 +38,6 @@
- [[4.17-Idle-Time]]
- [[4.18-Reflection]]
- [[4.19-Metrics]]
- [[4.20-Task-Archiving]]
- [[4.20-Task-Archiving]]
- [[4.22-Quick-History]]
- [[4.21-Worklog]]