feat(office): add Workspace TUI with shared bootstrap and test suite

Introduce the office Bubble Tea browser (module tree, multi-select lists,
markdown preview) alongside oo, with cmd/internal/bootstrap for shared auth,
unit tests across preview/model/ui/fetch, CI build for both binaries, and
GoReleaser archives for office.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-24 16:29:04 +01:00
co-authored by Cursor
parent 4acec6bbc9
commit f8a73edef3
32 changed files with 2267 additions and 94 deletions
@@ -0,0 +1,45 @@
//go:build integration
package fetch_test
import (
"context"
"os"
"testing"
"github.com/eslider/go-onlyoffice/cmd/internal/bootstrap"
"github.com/eslider/go-onlyoffice/cmd/office/fetch"
"github.com/eslider/go-onlyoffice/cmd/office/model"
)
func TestIntegrationListProjects(t *testing.T) {
if os.Getenv("ONLYOFFICE_URL") == "" && os.Getenv("ONLYOFFICE_HOST") == "" {
t.Skip("ONLYOFFICE_URL not set")
}
client, err := bootstrap.NewClient(context.Background())
if err != nil {
t.Fatal(err)
}
loader := &fetch.Loader{Client: client}
items, err := loader.List(context.Background(), model.SubjectProjects)
if err != nil {
t.Fatal(err)
}
t.Logf("projects: %d", len(items))
}
func TestIntegrationListMailInbox(t *testing.T) {
if os.Getenv("ONLYOFFICE_URL") == "" && os.Getenv("ONLYOFFICE_HOST") == "" {
t.Skip("ONLYOFFICE_URL not set")
}
client, err := bootstrap.NewClient(context.Background())
if err != nil {
t.Fatal(err)
}
loader := &fetch.Loader{Client: client}
items, err := loader.List(context.Background(), model.SubjectMailInbox)
if err != nil {
t.Fatal(err)
}
t.Logf("mail messages: %d", len(items))
}