Help on every panel, task filter, unblock key, mouse zones, safe add-only rebuild

This commit is contained in:
Sam
2026-11-10 15:59:42 +11:00
parent 972d4c0184
commit 09e32da046
13 changed files with 587 additions and 16 deletions

View File

@@ -49,6 +49,7 @@ type projectModel struct {
tab int
scroll int
showHelp bool
width, height int
}
@@ -140,7 +141,14 @@ func (m projectModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
return m, tea.Batch(m.load(), tickEvery(10*time.Second))
case tea.KeyMsg:
if m.showHelp {
m.showHelp = false
return m, nil
}
switch msg.String() {
case "?":
m.showHelp = true
return m, nil
case "q", "ctrl+c":
return m, tea.Quit
case "r":
@@ -194,6 +202,17 @@ func (m projectModel) View() string {
fmt.Sprintf("This workspace needs 80 × 24.\nThis panel is %d × %d.", m.width, m.height))
}
if m.showHelp {
return helpOverlay("the project", [][2]string{
{"[ ] h l", "facts, costs, settings"},
{"↑ ↓ j k", "scroll"},
{"r", "read again"},
{"R", "rebuild every pane"},
{"q", "leave"},
{"?", "this list"},
}, m.width, m.height)
}
head := titleStyle.Render("Project") + mutedStyle2().Render(" · ")
if m.project.Name != "" {
head += lipgloss.NewStyle().Foreground(lipgloss.Color(active.Text)).Render(m.project.Name)