Revert "Every workspace split into real panes: 19 panes across 7 workspaces, one program per panel"

This reverts commit 32fa2752af.
This commit is contained in:
2026-11-10 16:40:14 +11:00
parent 32fa2752af
commit 851a15be74
19 changed files with 58 additions and 972 deletions

View File

@@ -35,7 +35,6 @@ type taskCost struct {
}
type projectModel struct {
panel string
client *paperclip.Client
folder string
@@ -56,8 +55,8 @@ type projectModel struct {
var projectTabs = []string{"facts", "costs", "settings"}
func newProjectModel(c *paperclip.Client, folder, panel string) projectModel {
return projectModel{client: c, folder: folder, panel: panel}
func newProjectModel(c *paperclip.Client, folder string) projectModel {
return projectModel{client: c, folder: folder}
}
func (m projectModel) Init() tea.Cmd {
@@ -194,46 +193,7 @@ func (m projectModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
return m, nil
}
// singleView is one panel filling the pane: facts, costs or settings.
func (m projectModel) singleView() string {
titles := map[string]string{"facts": "the project", "costs": "what it has cost", "settings": "settings and limits"}
title := titles[m.panel]
if title == "" {
title = "the project"
}
var body []string
switch m.panel {
case "costs":
body = m.costLines()
case "settings":
body = m.settingLines()
default:
body = m.factLines()
}
if m.err != nil {
body = append([]string{lipgloss.NewStyle().Foreground(lipgloss.Color(active.Error)).Render("error: " + m.err.Error()), ""}, body...)
}
footer := hintLine([]string{
keyHint("↑↓ j k", "scroll"),
keyHint("r", "read again"),
keyHint("R", "rebuild"),
keyHint("?", "keys"),
}, m.width)
if m.showHelp {
return helpOverlay(title, [][2]string{
{"↑ ↓ j k", "scroll"}, {"r / R", "read again / rebuild"}, {"q", "leave"},
}, m.width, m.height)
}
return singlePanel(title, nil, 0, body, m.width, m.height, footer, m.scroll)
}
func (m projectModel) View() string {
if m.panel != "" {
if m.width == 0 {
return "reading…"
}
return m.singleView()
}
if m.width == 0 || m.height == 0 {
return "reading…"
}