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
11 changes: 8 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,14 @@ builds the tree. Help renders through `gotermstyle/cobrahelp`.

- **Every key the board takes is a row in `tui/action_table.go`, in every mode.** The key handler, the
hints in the status bar and in each prompt, picker and overlay, and the `?` overlay all read it. So a
key added there shows in each, and a row's `applies` keeps it out of each where it does not act. A
mode with a text box binds only keys that type nothing, and `typesText` hands the rest to the box.
The hosted reader takes its own keys while it shows.
key added there shows in each, and a row's `Applies` keeps it out of each where it does not act. A
row is gotermboard's `KeyAction`. On the board, `j` `k` `g` `G`, `ctrl+d` `ctrl+u`, `J` `K`, `[`
`]`, Enter, space, `?` and `q` are gotermboard's `UniversalActions`, acting on `App` as a
`gotermboard.Host` in `tui/key_host.go`, and the board's own rows take a key ahead of them where
they apply. A mode with a text box binds only keys that type nothing, and `typesText` hands the
rest to the box. The hosted reader takes its own keys while it shows.
- **Enter and space open an item's detail, the page its reader shows.** Space opens it under the
row however tall. Enter opens it there where it fits the pane, and full screen where it does not.
- **The board hosts gotermboard's `Reader` and not its `Model`.** Its own panes, glyphs and footer are
drawn in `tui`, so `App` forwards keys, pastes and window sizes to the reader while one shows, and
`Reader.ClosesWith` hands the screen back.
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ require (
github.com/datapointchris/goclikit v0.5.3
github.com/datapointchris/goclilogin v0.9.0
github.com/datapointchris/goselfupdate v0.11.0
github.com/datapointchris/gotermboard v0.31.0
github.com/datapointchris/gotermstyle v0.4.0
github.com/datapointchris/gotermboard v0.43.0
github.com/datapointchris/gotermstyle v0.5.0
github.com/datapointchris/tuidrive v0.1.0
github.com/go-viper/mapstructure/v2 v2.4.0
github.com/google/uuid v1.6.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ github.com/datapointchris/goclilogin v0.9.0 h1:xajsKfzuBvuREUZqw7B9Gv5PHxylSc8ss
github.com/datapointchris/goclilogin v0.9.0/go.mod h1:oiMIbY0jwfqH5pX8G1T1iBPa+cG1m3JQhqpaP9JxJ+w=
github.com/datapointchris/goselfupdate v0.11.0 h1:aUJ27Cm9ZNGMfC7+kKChBsnm8offBE99wwUa10lFo2w=
github.com/datapointchris/goselfupdate v0.11.0/go.mod h1:YcgyvM+wH6nh9zo9xioUqTHeH5HTYeCHevv4U+G7INc=
github.com/datapointchris/gotermboard v0.31.0 h1:Ri8KUGjPXoS5xM+/PA4IPicwzzNKKxMVwa2jH0ZtFbc=
github.com/datapointchris/gotermboard v0.31.0/go.mod h1:gzSG1LtOC2McInuKV5mSFJOLZ3EnFIY/1chPyivuxe0=
github.com/datapointchris/gotermstyle v0.4.0 h1:kOovTrAVF4oI/P6ptNg5VTuU9woNpPyjrhcKd6ndJsI=
github.com/datapointchris/gotermstyle v0.4.0/go.mod h1:pcTXWC/xls5Riw0rFtTueCQGlnszB3sqlepRItgdgeg=
github.com/datapointchris/gotermboard v0.43.0 h1:WQ5xgmogGwu7V+0BaoJYrr+qATVTc46XAqkX/6rDpZ8=
github.com/datapointchris/gotermboard v0.43.0/go.mod h1:A/9phVumidQPEVvHBLHTIWGgMfwbyDT+1/0iOHtjmao=
github.com/datapointchris/gotermstyle v0.5.0 h1:xdpuNASa4vS0jSMpBDQOO0rRFGY7jaft5H3hTHOrREE=
github.com/datapointchris/gotermstyle v0.5.0/go.mod h1:pcTXWC/xls5Riw0rFtTueCQGlnszB3sqlepRItgdgeg=
github.com/datapointchris/tuidrive v0.1.0 h1:s6esDWL9P8EkQYzdvrPwvBxYjPF98u0ukpnZbfBIGOc=
github.com/datapointchris/tuidrive v0.1.0/go.mod h1:lbRNaZkLTfPvfVqkJlcCzfuItgbePNp1flvS70mf/gI=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down
2 changes: 1 addition & 1 deletion real_binary_flows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func TestRealBinaryFlows(t *testing.T) {
{name: "views", script: "views.keys"},
{name: "filter", script: "filter.keys"},
{name: "move", script: "move.keys"},
{name: "note-in-place", script: "note-in-place.keys"},
{name: "detail-in-place", script: "detail-in-place.keys"},
{name: "reader", script: "reader.keys"},
{name: "add-project-and-item", script: "add-project-and-item.keys"},
{name: "add-task", script: "add-task.keys"},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
By project All items Dependencies
╭──────────────────────────────────────╮┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
│ Projects │┃ Repaint the fence ┃
│ Move the blog to plain files ○3 ✓1 │┃> ○ Scrape and prime the boards ┃
│ Move the blog to plain files ○3 ✓1 │┃> ▸ ○ Scrape and prime the boards ┃
│ Replace the kitchen faucet ○3 ✓0 │┃ 39┃
│ Plan the Lisbon trip ○31 ✓0 │┃ ┃
│> Repaint the fence ○1 ✓0 │┃ ┃
Expand All @@ -27,4 +27,4 @@
│ │┃ ┃
│ │┃ ┃
╰──────────────────────────────────────╯┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
Item created [?]help LOCAL projects.db
Item created ? keys LOCAL projects.db
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
By project All items Dependencies
╭──────────────────────────────────────╮┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
│ Projects │┃ Repaint the fence ┃
│ Move the blog to plain files ○3 ✓1 │┃> ○ Scrape and prime the boards ┃
│ Move the blog to plain files ○3 ✓1 │┃> ▸ ○ Scrape and prime the boards ┃
│ Replace the kitchen faucet ○4 ✓0 │┃ 39┃
│ Plan the Lisbon trip ○31 ✓0 │┃ ○ Buy exterior paint ◈ ┃
│ Plan the Lisbon trip ○31 ✓0 │┃ ▸ ○ Buy exterior paint ◈ ┃
│> Repaint the fence ○2 ✓0 │┃ also in Replace the kitchen faucet 40┃
│ │┃ ┃
│ │┃ ┃
Expand All @@ -27,4 +27,4 @@
│ │┃ ┃
│ │┃ ┃
╰──────────────────────────────────────╯┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
Item created [?]help LOCAL projects.db
Item created ? keys LOCAL projects.db
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
15: 81-81 fg=4
16: 20-81 fg=4
17: 20-20 fg=4
17: 25-50 fg=8
17: 25-49 fg=8
17: 81-81 fg=4
18: 20-81 fg=4
19: 20-81 fg=4
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
│ │
│ > Enter item title... │
│ │
│ [Enter]confirm [Esc]cancel │
│ enter confirm esc cancel │
│ │
╰────────────────────────────────────────────────────────────╯
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@
8: 100-100 fg=8
9: 1-40 fg=4
9: 41-41 fg=8
9: 42-46 strike
9: 42-44 strike
9: 45-45 fg=8 strike
9: 46-46 strike
9: 47-47 fg=8 strike
9: 48-48 strike
9: 49-52 fg=8 strike
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
┃ Plan the Lisbon trip ○31 ✓0 ┃│ ✓ Dump the database │
┃ Repaint the fence ○0 ✓0 ┃│ ○ Convert HTML to markdown │
┃ ┃│ ○ Download the images │
┃ ┃│ ✓ Pick a theme │
┃ ┃│ ▸ ✓ Pick a theme │
┃ ┃│ 2│
┃ ┃│ ○ Set up redirects for the old URLs │
┃ ┃│ ▸ ○ Set up redirects for the old URLs │
┃ ┃│ 3│
┃ ┃│ └─ blocked by: Export posts from the old CMS (1) │
┃ ┃│ ○ Point DNS at the new host │
┃ ┃│ ▸ ○ Point DNS at the new host │
┃ ┃│ 4│
┃ ┃│ └─ blocked by: Set up redirects for the old UR… (3)│
┃ ┃│ │
Expand All @@ -27,4 +27,4 @@
┃ ┃│ │
┃ ┃│ │
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛╰──────────────────────────────────────────────────────────╯
Project created [?]help LOCAL projects.db
Project created ? keys LOCAL projects.db
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
19: 81-81 fg=4
20: 20-81 fg=4
21: 20-20 fg=4
21: 25-64 fg=8
21: 25-63 fg=8
21: 81-81 fg=4
22: 20-81 fg=4
23: 20-81 fg=4
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
│ │
│ Currently in 2 project(s). Must belong to at least 1. │
│ │
│ [space]toggle [Enter]confirm [Esc]cancel │
│ space toggle enter confirm esc cancel │
│ │
╰────────────────────────────────────────────────────────────╯
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
19: 81-81 fg=4
20: 20-81 fg=4
21: 20-20 fg=4
21: 25-64 fg=8
21: 25-63 fg=8
21: 81-81 fg=4
22: 20-81 fg=4
23: 20-81 fg=4
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
│ │
│ Currently in 1 project(s). Must belong to at least 1. │
│ │
│ [space]toggle [Enter]confirm [Esc]cancel │
│ space toggle enter confirm esc cancel │
│ │
╰────────────────────────────────────────────────────────────╯
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
15: 81-81 fg=4
16: 20-81 fg=4
17: 20-20 fg=4
17: 25-50 fg=8
17: 25-49 fg=8
17: 81-81 fg=4
18: 20-81 fg=4
19: 20-81 fg=4
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
│ │
│ > Repaint the fence │
│ │
│ [Enter]confirm [Esc]cancel │
│ enter confirm esc cancel │
│ │
╰────────────────────────────────────────────────────────────╯
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
15: 81-81 fg=4
16: 20-81 fg=4
17: 20-20 fg=4
17: 25-50 fg=8
17: 25-49 fg=8
17: 81-81 fg=4
18: 20-81 fg=4
19: 20-81 fg=4
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
│ │
│ > Enter project name... │
│ │
│ [Enter]confirm [Esc]cancel │
│ enter confirm esc cancel │
│ │
╰────────────────────────────────────────────────────────────╯
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@
9: 100-100 fg=4
10: 1-40 fg=8
10: 41-41 fg=4
10: 42-46 strike
10: 42-44 strike
10: 45-45 fg=8 strike
10: 46-46 strike
10: 47-47 fg=8 strike
10: 48-48 strike
10: 49-52 fg=8 strike
Expand Down
8 changes: 4 additions & 4 deletions testdata/TestRealBinaryFlows/add-task/added-from-the-list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
│ │┃ ○ Convert HTML to markdown ┃
│ │┃ ○ Download the images ┃
│ │┃ ○ Check the image links ┃
│ │┃ ✓ Pick a theme ┃
│ │┃ ▸ ✓ Pick a theme ┃
│ │┃ 2┃
│ │┃ ○ Set up redirects for the old URLs ┃
│ │┃ ▸ ○ Set up redirects for the old URLs ┃
│ │┃ 3┃
│ │┃ └─ blocked by: Export posts from the old CMS (1) ┃
│ │┃ ○ Point DNS at the new host ┃
│ │┃ ▸ ○ Point DNS at the new host ┃
│ │┃ 4┃
│ │┃ └─ blocked by: Set up redirects for the old UR… (3)┃
│ │┃ ┃
Expand All @@ -27,4 +27,4 @@
│ │┃ ┃
│ │┃ ┃
╰──────────────────────────────────────╯┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
[Enter]read [space]note [c]omplete [a]dd [n]ote [M]ove [Tab]view … [?]help LOCAL projects.db
c complete a add n note M move tab view / filter j/k move … ? keys LOCAL projects.db
2 changes: 1 addition & 1 deletion testdata/TestRealBinaryFlows/add-task/prompt.style
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
15: 81-81 fg=4
16: 20-81 fg=4
17: 20-20 fg=4
17: 25-50 fg=8
17: 25-49 fg=8
17: 81-81 fg=4
18: 20-81 fg=4
19: 20-81 fg=4
2 changes: 1 addition & 1 deletion testdata/TestRealBinaryFlows/add-task/prompt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
│ │
│ > New task... │
│ │
│ [Enter]confirm [Esc]cancel │
│ enter confirm esc cancel │
│ │
╰────────────────────────────────────────────────────────────╯
4 changes: 3 additions & 1 deletion testdata/TestRealBinaryFlows/add-task/task-deleted.style
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
8: 100-100 fg=4
9: 1-40 fg=8
9: 41-41 fg=4
9: 42-46 strike
9: 42-44 strike
9: 45-45 fg=8 strike
9: 46-46 strike
9: 47-47 fg=8 strike
9: 48-48 strike
9: 49-52 fg=8 strike
Expand Down
Loading
Loading