Skip to content

Feature/demo#6

Merged
nahime0 merged 3 commits intomainfrom
feature/demo
Mar 9, 2026
Merged

Feature/demo#6
nahime0 merged 3 commits intomainfrom
feature/demo

Conversation

@nahime0
Copy link
Copy Markdown
Member

@nahime0 nahime0 commented Mar 9, 2026

Add a --demo flag to operate with fake data

nahime0 added 2 commits March 9, 2026 10:57
Decouple SessionManager from direct claude.DiscoverSessions calls,
allowing alternative providers (e.g. demo data) to be injected.
Generates 8 realistic sessions with randomised statuses, tools,
conversations, token counts and sparkline data. Refreshes every 30s.
@cursor
Copy link
Copy Markdown

cursor bot commented Mar 9, 2026

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on April 8.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a --demo mode to run lazyagent with generated fake session data (useful for screenshots/demos) by introducing a pluggable session discovery provider and threading the flag through both the TUI and tray app.

Changes:

  • Add --demo CLI flag and propagate it to TUI model creation and tray launch (including detached tray relaunch).
  • Introduce core.SessionProvider with LiveProvider and a new demo.Provider that generates realistic fake sessions.
  • Update SessionManager to use the provider for discovery, conditional watcher startup, and optional periodic re-discovery.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
main.go Adds --demo flag, includes it when re-launching detached tray, and passes mode to tray/TUI.
internal/ui/app.go Selects live vs demo provider when creating the TUI model.
internal/tray/service.go Selects live vs demo provider when the Wails service starts.
internal/tray/app.go Wires demo mode into the tray app’s SessionService initialization.
internal/tray/app_notray.go Updates tray stub signature to match the tray build.
internal/core/session.go Adds SessionProvider interface usage, conditional watcher start, and refresh-interval-based rediscovery.
internal/core/provider.go Adds LiveProvider implementation for real session discovery.
internal/demo/demo.go Adds fake session generator and provider for demo mode.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines 5 to 12
import (
"context"
"fmt"
"os"
"os/exec"
"strings"
"time"

Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The import block isn’t gofmt-formatted (e.g., the "strings" import is mis-indented). Running gofmt on this file will normalize formatting and avoid style/lint issues.

Copilot uses AI. Check for mistakes.
- Change tray.Run(demoMode ...bool) to tray.Run(demoMode bool)
- Use time.Now() inside the lock to prevent lastDiscover race
- Run gofmt on provider.go, demo.go, service.go
@nahime0 nahime0 merged commit dc25b43 into main Mar 9, 2026
@nahime0 nahime0 deleted the feature/demo branch March 9, 2026 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants