Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 32 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Track time entries, manage clients and projects, set billing rates, mark work as
## Features

- **Timer tracking** — start/stop timers on tasks, see the live elapsed time in the tab bar on every tab
- **Clients & Projects** — full CRUD, clients on their own tab with project management next door
- **Clients & Projects** — full CRUD on one tab: the clients with this month's hours, earnings and unbilled, and the selected client's projects beside them
- **Billing rates** — set an hourly rate per client; earnings calculated automatically
- **Invoice & payment tracking** — mark entries as invoiced and/or paid
- **Reports** — aggregated hours, earnings, invoice status by project/client with quick date presets
Expand Down Expand Up @@ -186,25 +186,25 @@ That rewrites the generated files (marked as generated; never edit them by hand)

## Getting Started

1. Press **3** to go to the **Clients** tab → press **n** to create a client and set a billing rate
2. Press **2** to go to the **Projects** tab → press **n** to create a project, selecting its client from the dropdown
1. Press **2** to go to the **Clients** tab → press **n** to create a client and set a billing rate
2. Press **a** to add a project to the selected client
3. Press **1** to go to the **Timers** tab → press **n** to start a new timer
4. Press **space** to stop/restart a timer
5. Press **4** to view **Reports**
5. Press **3** to view **Reports**

---

## Keybindings

### Global

| Key | Action |
| -------------- | ---------------------- |
| `1` | Switch to Timers tab |
| `2` | Switch to Projects tab |
| `3` | Switch to Clients tab |
| `4` | Switch to Reports tab |
| `q` / `ctrl+c` | Quit |
| Key | Action |
| -------------- | --------------------- |
| `1` | Switch to Timers tab |
| `2` | Switch to Clients tab |
| `3` | Switch to Reports tab |
| `?` | Show every key |
| `q` / `ctrl+c` | Quit |

### Timers tab

Expand Down Expand Up @@ -234,31 +234,29 @@ That rewrites the generated files (marked as generated; never edit them by hand)
| `enter` | Confirm field / save form |
| `esc` | Cancel |

### Projects tab
### Clients tab

| Key | Action |
| --------- | ---------------------------------------------- |
| `↑` / `k` | Move cursor up |
| `↓` / `j` | Move cursor down |
| `n` | New project (pick a client from the dropdown) |
| `e` | Edit selected project (rename / change client) |
| `d` | Delete selected project (prompts confirmation) |
| `esc` | Cancel form |
The clients, each with its rate and this month's hours, earned and unbilled (unbilled counts every month), beside the selected client's projects, its rate, start date, all-time totals and unbilled. Below 120 columns the list takes the whole width, and `→` opens the projects in its place.

Clients are created and managed on the Clients tab (press **3**).
| Key | Action |
| ------------------------- | ----------------------------------------------------------------------- |
| `↑` / `k`, `↓` / `j` | Move through the clients, or the projects in the projects pane |
| `n` | New client (name and hourly rate) |
| `a` | Add a project to the selected client |
| `e` | Edit the selected client, or in the projects pane the selected project (rename, or move to another client) |
| `d` | Delete the selected client (with its projects and entries), or in the projects pane the selected project (with its entries); both ask first |
| `→` / `enter` | Into the selected client's projects |
| `enter` | In the projects pane: edit the project, or add one on "+ Add project" |
| `←` / `esc` | Back to the clients |

### Clients tab
### Client and project forms

| Key | Action |
| ------------------- | --------------------------------------------------------- |
| `↑` / `k` | Move cursor up |
| `↓` / `j` | Move cursor down |
| `n` | New client |
| `e` | Edit selected client (name + hourly rate) |
| `d` | Delete selected client (cascades to projects and entries) |
| `tab` / `shift+tab` | Move between form fields |
| `enter` | Save |
| `esc` | Cancel |
| Key | Action |
| ------------------- | -------------------------------------------------------- |
| `tab` / `shift+tab` | Move between fields and buttons |
| `↑` / `↓` | Suggestions (when the project form's Client field has focus) |
| `enter` | Save |
| `esc` | Cancel |

### Reports tab

Expand Down Expand Up @@ -346,8 +344,8 @@ notch/
├── common.go # Shared types, messages, styles, key maps, helpers
├── timers.go # Timers tab — list, start/stop, edit, invoice/pay
├── timers_view.go # Timers list screen: hero, range chips, day groups, detail pane
├── projects.go # Projects tab — flat project list w/ client picker
├── clients.go # Clients tab — client CRUD with billing rate
├── clients.go # Clients tab — clients with their totals beside the selected client's projects
├── projects.go # Project form and delete confirm, opened from the Clients tab
└── reports.go # Reports tab — date-filtered summary + cards
```

Expand Down
9 changes: 9 additions & 0 deletions design/build/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ func renderPalette(t *Tokens) ([]byte, error) {
{"tui-hero-rows", "HeroRows"},
{"tui-hero-rows-compact", "HeroRowsCompact"},
{"tui-modal-width", "ModalWidth"},
{"tui-modal-width-narrow", "ModalWidthNarrow"},
{"tui-modal-indent", "ModalIndent"},
{"tui-modal-label", "ModalLabel"},
{"tui-suggest-width", "SuggestWidth"},
Expand All @@ -347,6 +348,14 @@ func renderPalette(t *Tokens) ([]byte, error) {
{"tui-modal-min-width", "ModalMinWidth"},
{"tui-strip-min", "StripMin"},
{"tui-field-width", "FieldWidth"},
{"tui-client-name-min", "ClientNameMin"},
{"tui-client-col-rate", "ClientColRate"},
{"tui-client-col-hours", "ClientColHours"},
{"tui-client-col-earned", "ClientColEarned"},
{"tui-client-col-unbilled", "ClientColUnbilled"},
{"tui-client-pane-earned", "ClientPaneEarned"},
{"tui-client-pane-label", "ClientPaneLabel"},
{"tui-client-pane-gap", "ClientPaneGap"},
} {
v, err := integer(t.Spacing, c.token)
if err != nil {
Expand Down
21 changes: 15 additions & 6 deletions design/tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{ "name": "primary", "value": "#91B0DE", "usage": "Active tab, selected-row marker, primary buttons (bg text on it), the running timer. Aether's accent." },
{ "name": "accent", "value": "#9DC6E9", "usage": "Field labels, links, code in the landing page. Aether's cyan." },
{ "name": "success", "value": "#99C2ED", "usage": "Paid status, the running pill. Aether's green." },
{ "name": "warning", "value": "#A4CBF7", "usage": "Section titles and invoiced status in Reports, and the unbilled total in the Timers hero. (The Timers list draws invoiced in accent and day headers in primary.) Aether's yellow." },
{ "name": "warning", "value": "#A4CBF7", "usage": "Section titles and invoiced status in Reports, the unbilled total in the Timers hero, and unbilled amounts in Clients. (The Timers list draws invoiced in accent and day headers in primary.) Aether's yellow." },
{ "name": "danger", "value": "#C79EA9", "usage": "Delete actions and confirm borders, field errors. Aether's red; the only warm hue." },
{ "name": "text", "value": "#C2D9E9", "usage": "Body text and values on bg and bg_alt. Aether's light_fg. Tailwind name: ink." },
{ "name": "dim", "value": "#B7D2E5", "usage": "Secondary text: meta lines, inactive tabs. Aether's fg." },
Expand Down Expand Up @@ -61,7 +61,7 @@
{ "name": "tui-max-width", "value": 150, "usage": "TUI: the widest the centred content column gets, in cells. Wider terminals pad both sides." },
{ "name": "tui-gutter", "value": 2, "usage": "TUI: columns before every list row for the row cursor (glyph-cursor and a space). Report columns leave the same room." },
{ "name": "tui-margin", "value": 2, "usage": "TUI: blank columns on each side of the content column, and before the tab bar's wordmark." },
{ "name": "tui-wide", "value": 120, "usage": "TUI: the narrowest terminal that gets the wide layout: the Timers hero with block digits, the CLIENT › PROJECT column and the entry detail pane. The wide layout also needs 23 rows, so the pane fits its borders, the task and its five keys below the hero and range chips (computed in timers_view.go's wide()); narrower or shorter terminals get the compact layout." },
{ "name": "tui-wide", "value": 120, "usage": "TUI: the narrowest terminal that gets the wide layout: the Clients list with its projects pane beside it (narrower terminals open the pane in its place with →), and the Timers hero with block digits, the CLIENT › PROJECT column and the entry detail pane. The wide layout also needs 23 rows, so the pane fits its borders, the task and its five keys below the hero and range chips (computed in timers_view.go's wide()); narrower or shorter terminals get the compact layout." },
{ "name": "tui-detail-width", "value": 42, "usage": "TUI: the entry detail pane's width, borders included, beside the Timers list in the wide layout." },
{ "name": "tui-pane-gap", "value": 2, "usage": "TUI: blank columns between the Timers list and the entry detail pane in the wide layout." },
{ "name": "tui-col-trail", "value": 1, "usage": "TUI: the blank column after the Timers list's last column, day subtotals and total." },
Expand All @@ -76,7 +76,8 @@
{ "name": "tui-detail-note-rows", "value": 3, "usage": "TUI: the most rows an entry's notes take in the detail pane; longer notes end in an ellipsis." },
{ "name": "tui-hero-rows", "value": 6, "usage": "TUI: rows the wide Timers hero takes, borders included: four rows for the label, task, place and meta line beside three rows of block digits." },
{ "name": "tui-hero-rows-compact", "value": 4, "usage": "TUI: rows the compact Timers hero takes, borders included: the task and elapsed time, then the place and today's total." },
{ "name": "tui-modal-width", "value": 70, "usage": "TUI: a form modal's width, borders included (New timer, Edit entry, the client and project forms). A narrower body gets a modal as wide as the body." },
{ "name": "tui-modal-width", "value": 70, "usage": "TUI: a form modal's width, borders included: New timer, Edit entry, New project and Edit project. The client forms use tui-modal-width-narrow. A narrower body gets a modal as wide as the body." },
{ "name": "tui-modal-width-narrow", "value": 60, "usage": "TUI: the New client and Edit client modals' width, borders included: they hold only Name and Rate ($/h)." },
{ "name": "tui-modal-indent", "value": 3, "usage": "TUI: blank columns inside a modal's border before its labels and buttons, and after its fields." },
{ "name": "tui-modal-label", "value": 11, "usage": "TUI: a form modal's label column (Task, Client, Rate ($/h)). The focus mark (glyph-cursor) follows it, then the field." },
{ "name": "tui-suggest-width", "value": 30, "usage": "TUI: the suggestions box under a Client or Project field, borders included; never wider than the field." },
Expand All @@ -86,10 +87,18 @@
{ "name": "tui-keys-cap", "value": 11, "usage": "TUI: the key-cap column in the ? keys sheet, room for the shift+tab cap." },
{ "name": "tui-keys-gap", "value": 2, "usage": "TUI: blank columns between the ? keys sheet's columns." },
{ "name": "tui-keys-cols", "value": 3, "usage": "TUI: the most columns the ? keys sheet uses; it drops to fewer when the body is too narrow for them." },
{ "name": "tui-client-name-min", "value": 16, "usage": "TUI: the narrowest the Clients list's CLIENT column gets in the master-detail layout; the projects pane gives up width before it goes below this." },
{ "name": "tui-client-col-rate", "value": 10, "usage": "TUI: the Clients list's RATE column, right-aligned, in cells, the gap before it included." },
{ "name": "tui-client-col-hours", "value": 11, "usage": "TUI: the HOURS column in the Clients list and its projects pane, right-aligned, in cells, the gap before it included." },
{ "name": "tui-client-col-earned", "value": 12, "usage": "TUI: the Clients list's EARNED column, right-aligned, in cells, the gap before it included." },
{ "name": "tui-client-col-unbilled", "value": 11, "usage": "TUI: the Clients list's UNBILLED column, right-aligned, in cells, the gap before it included." },
{ "name": "tui-client-pane-earned", "value": 13, "usage": "TUI: the EARNED column in the Clients tab's projects pane, right-aligned, in cells, the gap before it included." },
{ "name": "tui-client-pane-label", "value": 15, "usage": "TUI: the label column of the projects pane's client facts (Hourly rate, Since, All time, Unbilled)." },
{ "name": "tui-client-pane-gap", "value": 4, "usage": "TUI: blank columns between the Clients list and its projects pane in the wide layout." },
{ "name": "tui-modal-min-width", "value": 20, "usage": "TUI: the narrowest a modal gets, border included, however narrow the body is." },
{ "name": "tui-strip-min", "value": 8, "usage": "TUI: the narrowest a form field's bg_alt strip gets in a modal." },
{ "name": "tui-field-width", "value": 44, "usage": "TUI: a form field's width when the form opens; the modal sets it to its strip's width each time it draws." },
{ "name": "tui-min-width", "value": 64, "usage": "TUI: the narrowest terminal notch draws, in cells, measured from the views: the widest fixed line is the Projects tab's at 57 cells, 61 with the two margins; the compact Timers range chips need 48. Narrower terminals get a centred \"Terminal too small\" message." },
{ "name": "tui-min-width", "value": 64, "usage": "TUI: the narrowest terminal notch draws, in cells, measured from the views: the Clients list's fixed columns and gutter take 47 cells, leaving its CLIENT column 13 at this width; the compact Timers range chips need 48. Narrower terminals get a centred \"Terminal too small\" message." },
{ "name": "tui-min-height", "value": 22, "usage": "TUI: the shortest terminal notch draws, in rows: the chrome (4), the body's top and bottom padding (2), the compact Timers screen's fixed rows (14) and two list rows (a day header and the selected entry). A wide terminal this short gets the compact layout, since the wide one needs 23 rows (see tui-wide). Shorter terminals get a centred \"Terminal too small\" message." },
{ "name": "tui-chrome-rows", "value": 4, "usage": "TUI: rows taken by the chrome: the tab bar and its rule at the top, and a rule and the hotkey and status line at the bottom (measured from their real output). Content gets the rest." },
{ "name": "panel-padding", "value": "14px", "usage": "Bar panel: inner padding, from aliasOS's KeyboardPanel." }
Expand Down Expand Up @@ -146,7 +155,7 @@
{ "fg": "primary", "bg": "bg", "min": 4.5, "usage": "Day headers in the Timers list and the active tab's underline." },
{ "fg": "accent", "bg": "bg", "min": 4.5, "usage": "Field labels, links, and invoiced status (◐) in the Timers list." },
{ "fg": "success", "bg": "bg", "min": 4.5, "usage": "Paid and running status, the hero's elapsed time and status messages." },
{ "fg": "warning", "bg": "bg", "min": 4.5, "usage": "Section titles and invoiced status in Reports, and the Timers hero's unbilled total." },
{ "fg": "warning", "bg": "bg", "min": 4.5, "usage": "Section titles and invoiced status in Reports, the Timers hero's unbilled total, and unbilled amounts in Clients." },
{ "fg": "danger", "bg": "bg", "min": 4.5, "usage": "Errors and delete actions." },
{ "fg": "danger", "bg": "bg_alt", "min": 4.5, "usage": "The Delete entry button in the edit modal." },
{ "fg": "bg", "bg": "danger", "min": 4.5, "usage": "The Delete button in a delete confirm." },
Expand All @@ -159,7 +168,7 @@
{ "fg": "primary", "bg": "bg_alt", "min": 4.5, "usage": "Selected row marker and the primary label in modals." },
{ "fg": "accent", "bg": "bg_alt", "min": 4.5, "usage": "Field labels inside modals, and invoiced status on the Timers list's selected row." },
{ "fg": "success", "bg": "bg_alt", "min": 4.5, "usage": "Paid and running status on the selected row." },
{ "fg": "warning", "bg": "bg_alt", "min": 4.5, "usage": "Invoiced status on the selected row in Reports." },
{ "fg": "warning", "bg": "bg_alt", "min": 4.5, "usage": "Invoiced status on the selected row in Reports, and the unbilled amount on the selected client." },
{ "fg": "highlight", "bg": "bg_alt", "min": 4.5, "usage": "The wordmark in the tab bar, and elapsed time in the panel." },
{ "fg": "dim", "bg": "surface", "min": 4.5, "usage": "Landing page secondary text in cards." },
{ "fg": "highlight", "bg": "surface", "min": 4.5, "usage": "Landing page emphasis and the mark in cards." },
Expand Down
Loading
Loading