Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
7280bf4
update rules
sawka Feb 19, 2026
4c6fd13
first cut at new block-tab based badge system
sawka Feb 20, 2026
51489eb
Merge remote-tracking branch 'origin/main' into sawka/block-indicators
sawka Mar 2, 2026
a75253f
run go generate, fix baseds import
sawka Mar 2, 2026
f7fda6a
Merge remote-tracking branch 'origin/main' into sawka/block-indicators
sawka Mar 5, 2026
f3d27e5
move indicators to their own file (badge.ts)
sawka Mar 5, 2026
95ec727
move tabindicatormap too
sawka Mar 5, 2026
ac7f295
move subscription to badge.ts, clean up some warnings
sawka Mar 5, 2026
e3aa0b8
clean up some warnings
sawka Mar 5, 2026
30788d0
setup FE badge store
sawka Mar 5, 2026
a7acdb9
working on badge integration
sawka Mar 5, 2026
f980494
add clearall for badge event
sawka Mar 5, 2026
260c767
add clearbyid
sawka Mar 5, 2026
c448ee7
add badgewatchpid
sawka Mar 5, 2026
f30f394
working on `wsh badge`
sawka Mar 5, 2026
a88c3bf
hook up pid watching to wsh badge command
sawka Mar 5, 2026
8d6f2ad
checkpoint on moving from tabiindicators to badges
sawka Mar 5, 2026
339cd6c
clear transient tab badges with focus as well
sawka Mar 5, 2026
ccf64e6
more badge migration
sawka Mar 5, 2026
498e0d9
remove tabindicators (backend+frontend), more badges
sawka Mar 6, 2026
09fed4e
getting the badges to show... up to 3 on a tab...
sawka Mar 6, 2026
2fb15c4
add flag color
sawka Mar 6, 2026
1806574
add context menu to flag tab...
sawka Mar 6, 2026
144db86
remove badge persistence
sawka Mar 6, 2026
820f535
focus should not clear pidlinked badges
sawka Mar 6, 2026
897f2d4
update tab bar, change flag to be a flag, resort badges
sawka Mar 6, 2026
c737c6e
Merge remote-tracking branch 'origin/main' into sawka/block-indicators
sawka Mar 6, 2026
e50de18
clean up some scss
sawka Mar 6, 2026
ddc9cff
remove ::after psudo element, just render the dividers in react
sawka Mar 6, 2026
9d1007d
dont use ctx in long running poller
sawka Mar 9, 2026
2518d31
fix nits
sawka Mar 9, 2026
dc2315d
fix nit
sawka Mar 9, 2026
64f6d4f
merge main
sawka Mar 9, 2026
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
Prev Previous commit
Next Next commit
remove badge persistence
  • Loading branch information
sawka committed Mar 6, 2026
commit 144db868eab531d98e7089540c7fb2e531d1c717
20 changes: 7 additions & 13 deletions cmd/wsh/cmd/wshcmd-badge.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,20 @@ var badgeCmd = &cobra.Command{
}

var (
badgeColor string
badgePriority float64
badgeClear bool
badgePersistent bool
badgeBeep bool
badgePid int
badgeColor string
badgePriority float64
badgeClear bool
badgeBeep bool
badgePid int
)

func init() {
rootCmd.AddCommand(badgeCmd)
badgeCmd.Flags().StringVar(&badgeColor, "color", "", "badge color")
badgeCmd.Flags().Float64Var(&badgePriority, "priority", 10, "badge priority")
badgeCmd.Flags().BoolVar(&badgeClear, "clear", false, "clear the badge")
badgeCmd.Flags().BoolVar(&badgePersistent, "persistent", false, "make badge persistent (survives restarts, default priority 5)")
badgeCmd.Flags().BoolVar(&badgeBeep, "beep", false, "play system bell sound")
badgeCmd.Flags().IntVar(&badgePid, "pid", 0, "watch a pid and automatically clear the badge when it exits (sets persistent, default priority 5)")
badgeCmd.Flags().IntVar(&badgePid, "pid", 0, "watch a pid and automatically clear the badge when it exits (default priority 5)")
}

func badgeRun(cmd *cobra.Command, args []string) (rtnErr error) {
Expand All @@ -52,10 +50,7 @@ func badgeRun(cmd *cobra.Command, args []string) (rtnErr error) {
if badgePid > 0 && runtime.GOOS == "windows" {
return fmt.Errorf("--pid flag is not supported on Windows")
}
if badgePid > 0 {
badgePersistent = true
}
if badgePersistent && !cmd.Flags().Changed("priority") {
if badgePid > 0 && !cmd.Flags().Changed("priority") {
badgePriority = 5
}

Expand All @@ -69,7 +64,6 @@ func badgeRun(cmd *cobra.Command, args []string) (rtnErr error) {

var eventData baseds.BadgeEvent
eventData.ORef = oref.String()
eventData.Persistent = badgePersistent

if badgeClear {
eventData.Clear = true
Expand Down
13 changes: 5 additions & 8 deletions cmd/wsh/cmd/wshcmd-tabindicator.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@ var tabIndicatorCmd = &cobra.Command{
}

var (
tabIndicatorTabId string
tabIndicatorColor string
tabIndicatorPriority float64
tabIndicatorClear bool
tabIndicatorPersistent bool
tabIndicatorBeep bool
tabIndicatorTabId string
tabIndicatorColor string
tabIndicatorPriority float64
tabIndicatorClear bool
tabIndicatorBeep bool
)

func init() {
Expand All @@ -39,7 +38,6 @@ func init() {
tabIndicatorCmd.Flags().StringVar(&tabIndicatorColor, "color", "", "indicator color")
tabIndicatorCmd.Flags().Float64Var(&tabIndicatorPriority, "priority", 10, "indicator priority")
tabIndicatorCmd.Flags().BoolVar(&tabIndicatorClear, "clear", false, "clear the indicator")
tabIndicatorCmd.Flags().BoolVar(&tabIndicatorPersistent, "persistent", false, "make indicator persistent (don't clear on focus)")
tabIndicatorCmd.Flags().BoolVar(&tabIndicatorBeep, "beep", false, "play system bell sound")
}

Expand All @@ -62,7 +60,6 @@ func tabIndicatorRun(cmd *cobra.Command, args []string) (rtnErr error) {

var eventData baseds.BadgeEvent
eventData.ORef = oref.String()
eventData.Persistent = tabIndicatorPersistent

if tabIndicatorClear {
eventData.Clear = true
Expand Down
3 changes: 0 additions & 3 deletions frontend/types/gotypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ declare global {
// baseds.BadgeEvent
type BadgeEvent = {
oref: string;
persistent?: boolean;
clear?: boolean;
clearall?: boolean;
clearbyid?: string;
Expand All @@ -134,7 +133,6 @@ declare global {
stickers?: StickerType[];
subblockids?: string[];
jobid?: string;
badge?: Badge;
};

// blockcontroller.BlockControllerRuntimeStatus
Expand Down Expand Up @@ -1595,7 +1593,6 @@ declare global {
name: string;
layoutstate: string;
blockids: string[];
badge?: Badge;
};

// waveobj.TermSize
Expand Down
11 changes: 5 additions & 6 deletions pkg/baseds/baseds.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ type Badge struct {
}

type BadgeEvent struct {
ORef string `json:"oref"`
Persistent bool `json:"persistent,omitempty"`
Clear bool `json:"clear,omitempty"`
ClearAll bool `json:"clearall,omitempty"`
ClearById string `json:"clearbyid,omitempty"`
Badge *Badge `json:"badge,omitempty"`
ORef string `json:"oref"`
Clear bool `json:"clear,omitempty"`
ClearAll bool `json:"clearall,omitempty"`
ClearById string `json:"clearbyid,omitempty"`
Badge *Badge `json:"badge,omitempty"`
}
16 changes: 6 additions & 10 deletions pkg/waveobj/wtype.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import (
"encoding/json"
"fmt"
"reflect"

"github.com/wavetermdev/waveterm/pkg/baseds"
)

type UpdatesRtnType = []WaveObjUpdate
Expand Down Expand Up @@ -189,13 +187,12 @@ func (*Workspace) GetOType() string {
}

type Tab struct {
OID string `json:"oid"`
Version int `json:"version"`
Name string `json:"name"`
LayoutState string `json:"layoutstate"`
BlockIds []string `json:"blockids"`
Meta MetaMapType `json:"meta"`
Badge *baseds.Badge `json:"badge,omitempty"`
OID string `json:"oid"`
Version int `json:"version"`
Name string `json:"name"`
LayoutState string `json:"layoutstate"`
BlockIds []string `json:"blockids"`
Meta MetaMapType `json:"meta"`
}

func (*Tab) GetOType() string {
Expand Down Expand Up @@ -295,7 +292,6 @@ type Block struct {
Meta MetaMapType `json:"meta"`
SubBlockIds []string `json:"subblockids,omitempty"`
JobId string `json:"jobid,omitempty"` // if set, the block will render this jobid's pty output
Badge *baseds.Badge `json:"badge,omitempty"`
}

func (*Block) GetOType() string {
Expand Down
Loading