Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: Live Mode and General Improvements #65

Merged
merged 53 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
b5da129
Separate the header
canack Jun 26, 2024
5b4f1dc
Make the code better
canack Jun 26, 2024
44e7f4a
Merge branch 'refs/heads/main' into feature/i31-live-mode
canack Jun 26, 2024
c86f842
small improvements for better user experience
canack Jun 26, 2024
ed66581
Make the code better
canack Jun 27, 2024
84c66e2
Make the code better
canack Jun 29, 2024
0080dcb
Refactor the code
canack Jul 14, 2024
1d3487b
Architectural changes
canack Jul 30, 2024
b7eae64
Minor resizing
canack Aug 3, 2024
71bcbd9
Minor enhancements
canack Aug 3, 2024
c0a8dbc
Fix blocking calls
canack Aug 4, 2024
013baf6
Small code changes
canack Aug 4, 2024
980d167
Clean empty table
canack Aug 6, 2024
c89755a
Implement live mode
canack Aug 6, 2024
8b64ae2
Show running workflow's duration
canack Aug 6, 2024
0be0559
Custom interval support for live mode
canack Aug 6, 2024
34334fe
Change trigger pane colors
canack Aug 6, 2024
ca9658a
remove unused code
canack Aug 6, 2024
16afd93
remove unnecessary file
canack Aug 6, 2024
1c1e23a
first steps of enhanced ui
canack Aug 8, 2024
d073ee7
Start to use skeleton package
canack Sep 1, 2024
e54e3e5
Enhance UI
canack Sep 2, 2024
fc1445a
Improve code style
canack Sep 2, 2024
660ccd9
Revert "Improve code style"
canack Sep 2, 2024
7b538bc
Reapply "Improve code style"
canack Sep 2, 2024
8dc8680
Make architecture basic
canack Sep 2, 2024
598ef3d
Rearrange methods and delete unused code
canack Sep 2, 2024
648bcf5
Rearrange code
canack Sep 2, 2024
371eada
Fix refresh history after trigger
canack Sep 2, 2024
87f1532
Remove unnecessary spinner and fix self update
canack Sep 5, 2024
4b01fd0
Made listeners common
canack Sep 5, 2024
39b271b
Minor improvements
canack Sep 5, 2024
65c42cd
Rename and make private some variables
canack Sep 5, 2024
99f1187
Rename & minor improvements
canack Sep 7, 2024
a9110ab
Minor improvements
canack Sep 7, 2024
206ba46
Update gitignore
canack Dec 17, 2024
a9bc5ef
Upgrade dependencies
canack Dec 17, 2024
e11dbd3
Remove "Launch the selected option" helper. No need to show it always.
canack Dec 17, 2024
8efeab6
Make confirmation message better
canack Dec 17, 2024
1460ed0
Improve updater mechanism, remove obsolete and unused code for better…
canack Dec 17, 2024
8ca134e
remove go.work.sum
canack Dec 17, 2024
f168b6a
Merge branch 'main' into feature/i31-live-mode
canack Dec 17, 2024
0e11431
Upgrade the dependencies
canack Dec 18, 2024
ac225e2
Upgrade termkit/skeleton to v0.2.0 and add GetRepositoryBranches func…
canack Jan 5, 2025
2a0de10
Refactor terminal handler models and improve UI components
canack Jan 5, 2025
f5f501e
Update go.mod and go.sum to include new dependencies and upgrade exis…
canack Jan 6, 2025
b57e81e
Enhance GitHub workflow handling and state management
canack Jan 6, 2025
9fa580e
Refactor GitHub repository and workflow handling for improved perform…
canack Jan 6, 2025
ac4de9a
Minor changes
canack Jan 6, 2025
7456da0
Update input size
canack Jan 6, 2025
cac6e63
update readme
canack Jan 6, 2025
1f7227d
Update go version
canack Jan 6, 2025
d9e0412
Minor changes
canack Jan 6, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.22'
go-version: '1.23'

- name: Get the latest tag
id: get_latest_tag
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ vendor/

# Go workspace file
go.work
go.work.sum

# ide data
.idea
Expand All @@ -30,4 +31,4 @@ release/

# binary
main
gama
gama
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ GAMA is a powerful terminal-based user interface tool designed to streamline the
<a href="https://goreportcard.com/report/github.com/termkit/gama" target="_blank"><img src="https://goreportcard.com/badge/github.com/termkit/gama?style=for-the-badge&logo=go" alt="GAMA Go Report Card" /></a>
<a href="https://github.com/termkit/gama" target="_blank"><img src="https://img.shields.io/github/license/termkit/gama?style=for-the-badge" alt="GAMA Licence" /></a>

## Table of Contents
- [Key Features](#key-features)
- [Live Mode](#live-mode)
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Configuration](#configuration)
- [Build & Installation](#build--installation)
- [Contributing](#contributing)
- [License](#license)
- [Contact & Author](#contact--author)

![gama demo](docs/gama.gif)

## Key Features
Expand All @@ -14,6 +25,18 @@ GAMA is a powerful terminal-based user interface tool designed to streamline the
- **Workflow History**: Conveniently list all historical runs of workflows in a repository.
- **Discoverability**: Easily list all triggerable (dispatchable) workflows in a repository.
- **Workflow Management**: Trigger specific workflows with custom inputs.
- **Live Updates**: Automatically refresh workflow status at configurable intervals.
- **Docker Support**: Run directly from a container for easy deployment.

### Live Mode

GAMA includes a live mode feature that automatically refreshes the workflow status at regular intervals:

- **Toggle Live Updates**: Press `ctrl+l` to turn live mode on/off
- **Auto-start**: Set `settings.live_mode.enabled: true` to start GAMA with live mode enabled
- **Refresh Interval**: Configure how often the view updates with `settings.live_mode.interval` (e.g., "15s", "1m")

Live mode is particularly useful when monitoring ongoing workflow runs, as it eliminates the need for manual refreshing.

## Getting Started

Expand All @@ -36,8 +59,14 @@ keys:
switch_tab_left: shift+left
quit: ctrl+c
refresh: ctrl+r
live_mode: ctrl+l # Toggle live mode on/off
enter: enter
tab: tab

settings:
live_mode:
enabled: true # Enable live mode at startup
interval: 15s # Refresh interval for live updates
```

#### Environment Variable Configuration
Expand Down
6 changes: 6 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,11 @@ keys:
switch_tab_left: shift+left
quit: ctrl+c
refresh: ctrl+r
live_mode: ctrl+l
enter: enter
tab: tab

settings:
live_mode:
enabled: true # to enable live mode at startup
interval: 15s # interval to refresh the page
42 changes: 19 additions & 23 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,54 +1,50 @@
module github.com/termkit/gama

go 1.22.1
go 1.23

require (
github.com/Masterminds/semver/v3 v3.2.1
github.com/charmbracelet/bubbles v0.18.0
github.com/charmbracelet/bubbletea v0.26.4
github.com/charmbracelet/lipgloss v0.11.0
github.com/Masterminds/semver/v3 v3.3.1
github.com/charmbracelet/bubbles v0.20.0
github.com/charmbracelet/bubbletea v1.2.4
github.com/charmbracelet/lipgloss v1.0.0
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.9.0
github.com/stretchr/testify v1.10.0
github.com/termkit/skeleton v0.2.0
golang.org/x/exp v0.0.0-20250103183323-7d7fa50e5329
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/atotto/clipboard v0.1.4 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/charmbracelet/x/ansi v0.1.2 // indirect
github.com/charmbracelet/x/input v0.1.1 // indirect
github.com/charmbracelet/x/term v0.1.1 // indirect
github.com/charmbracelet/x/windows v0.1.2 // indirect
github.com/charmbracelet/x/ansi v0.6.0 // indirect
github.com/charmbracelet/x/term v0.2.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fsnotify/fsnotify v1.8.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/magiconair/properties v1.8.9 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-localereader v0.0.1 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
github.com/muesli/cancelreader v0.2.2 // indirect
github.com/muesli/reflow v0.3.0 // indirect
github.com/muesli/termenv v0.15.2 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/locafero v0.6.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sahilm/fuzzy v0.1.1 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/cast v1.7.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/sys v0.29.0 // indirect
golang.org/x/text v0.21.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
)
Loading
Loading