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
8 changes: 2 additions & 6 deletions .github/workflows/bump-gitlink.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
name: Bump superproject gitlink

# Tells Gryt-chat/gryt that main moved, so it can fast-forward this
# repository's gitlink instead of waiting for its hourly sweep. Implementation
# lives in Gryt-chat/.github so all repos share one copy.
#
# Needs the org secret GITLINK_DISPATCH_TOKEN. Without it the dispatch is
# skipped with a warning and the sweep picks the change up instead, later.
# Tells Gryt-chat/gryt that main moved so it can fast-forward the gitlink. Shared
# implementation in Gryt-chat/.github; needs the org secret GITLINK_DISPATCH_TOKEN.

on:
push:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,10 @@ jobs:
- run: go test ./...
- run: go vet ./...
- run: go build ./cmd/gryt

# No comment runs past two lines. The script carries the list of paths still
# to be swept, and that list only ever shrinks.
- uses: actions/setup-node@v4
with:
node-version: 24
- run: node scripts/check-comment-length.mjs
9 changes: 2 additions & 7 deletions .github/workflows/discord-ci-notify.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
name: Discord CI notification

# Reports failed workflow runs to #ci in Discord, and the recovery when one
# goes green again. Implementation lives in Gryt-chat/.github so all repos
# share one copy. Needs the org secret DISCORD_CI_WEBHOOK_URL.
#
# Workflows are listed by name rather than left to a wildcard: GitHub's docs
# don't say whether omitting `workflows` means all of them, and an unlisted
# workflow notifies nobody. Add new workflows here as you add them.
# Reports failed workflow runs to #ci in Discord, and the recovery. Shared implementation
# in Gryt-chat/.github. List new workflows here — an unlisted one notifies nobody.

on:
workflow_run:
Expand Down
19 changes: 4 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
name: Release CLI

# Dispatched by hand, same shape as the SFU release. Version comes from the
# tags rather than a committed file, so nothing is pushed to main and this
# works against a protected branch.
#
# goreleaser does the building and creates the GitHub release itself, so there
# is no separate action-gh-release step here: the archives, the checksums and
# the release notes all come out of `goreleaser release`. install.sh in the
# superproject reads those assets, so the archive naming in .goreleaser.yml is
# load-bearing — changing it breaks the one-line install.
# Dispatched by hand, same shape as the SFU release: the version comes from the tags, so
# nothing is pushed to main. install.sh reads the archive names in .goreleaser.yml.

on:
workflow_dispatch:
Expand Down Expand Up @@ -148,12 +141,8 @@ jobs:
esac
fi

# Until now the channel input was validated, written to an output and
# read by nothing. goreleaser decides prerelease from the tag alone,
# so dispatching with beta still shipped a stable release that
# /releases/latest returned and the installer picked up. Both
# install.sh and `gryt update` resolve /releases/latest, which
# excludes prereleases, so the distinction has to come from here.
# goreleaser decides prerelease from the tag alone, and both install.sh and
# `gryt update` resolve /releases/latest, which excludes prereleases.
if [[ "$CHANNEL" == "beta" ]]; then
BASE="${NEW_VERSION%%-*}"
NEXT=1
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/vikunja-task-done.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: Sync Vikunja task

# Keeps the Vikunja task named in the branch (e.g. claude/GRYT-1-slug) in step
# with the PR: labelled "in review" and linked when it opens, marked done when
# it merges. Implementation lives in Gryt-chat/.github so all repos share one
# copy. Needs the org secret VIKUNJA_API_TOKEN.
# Keeps the Vikunja task named in the branch in step with the PR: in review when it opens,
# done when it merges. Shared in Gryt-chat/.github; needs VIKUNJA_API_TOKEN.

on:
pull_request:
Expand Down
8 changes: 4 additions & 4 deletions cmd/gryt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ func main() {
}
}

// runDoctor prints every check and returns the exit code, so that a script can
// gate on it.
// runUpdate replaces this binary with the newest release, or with --check only
// reports whether there is one.
// runDoctor prints every check and returns the exit code, so a script can gate on it.

// runUpdate replaces this binary with the newest release, or with --check only reports
// whether there is one.
func runUpdate(args []string) int {
checkOnly := len(args) > 0 && (args[0] == "--check" || args[0] == "check")

Expand Down
23 changes: 6 additions & 17 deletions internal/app/entries.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@ package app

import "github.com/Gryt-chat/cli/internal/config"

// An entry is a row in the table. Most are servers; the last two are the
// pieces the machine runs one of and every server shares.
//
// Before this the model assumed every row was a config.Profile, which is why
// the SFU and the object store appeared nowhere: the dashboard could say
// "voice server is not running" and then offer nothing to do about it, and
// there was no way at all to read the SFU's log.
// An entry is a row in the table. Most are servers; the last two are the pieces the machine
// runs one of and every server shares, which used to appear nowhere.
type entryKind int

const (
Expand All @@ -28,12 +23,8 @@ type entry struct {
role string
}

// entries lists the servers, then the shared pieces.
//
// Image workers are deliberately absent. One runs beside each server inside
// that server's own compose project, so `docker compose logs` for the server
// already carries its output; giving it a row would add a line to look at and
// no information that is not already one keypress away.
// entries lists the servers, then the shared pieces. Image workers are absent: one runs
// inside each server's own compose project, so its output is already in that server's logs.
func (m Model) entries() []entry {
list := make([]entry, 0, len(m.profiles)+2)
for _, profile := range m.profiles {
Expand All @@ -57,10 +48,8 @@ func (e entry) key() string {
return e.container
}

// actions are the things worth offering for a row in its current state.
//
// Start on a running server used to be accepted, run `compose up` again, and
// report "Start X" as though something had happened. The state decides now.
// actions are the things worth offering for a row in its current state. Start on a running
// server used to be accepted and report success without anything happening.
type actions struct{ start, stop, restart bool }

func availableActions(running, unknown bool) actions {
Expand Down
Loading
Loading