Skip to content

feat: Add first-class AwtrixApp object system (v0.4.0)#2

Merged
HeyItsGilbert merged 2 commits into
mainfrom
0.4.0
Mar 16, 2026
Merged

feat: Add first-class AwtrixApp object system (v0.4.0)#2
HeyItsGilbert merged 2 commits into
mainfrom
0.4.0

Conversation

@HeyItsGilbert
Copy link
Copy Markdown
Owner

Overview

This PR introduces a major enhancement: first-class AwtrixApp objects that enable sophisticated app and notification management patterns.

What's New

Classes

  • \AwtrixApp\ — Stateful persistent custom app with lifecycle management
  • \AwtrixNotification\ — Stateful one-time notification
  • \AwtrixAppBase\ — Shared infrastructure for 24 display properties
  • \AwtrixAppCollection\ — Multi-page app batching with unified I/O

Cmdlets

  • \New-AwtrixApp\ — Create app objects (local or -Push\ immediately)
  • \New-AwtrixNotification\ — Create notification objects (local or -Send\ immediately)
  • \Update-AwtrixApp\ — Pipeline cmdlet for property updates with -DirtyOnly\
  • \New-AwtrixAppCollection\ — Batch multi-page apps

Object Methods

  • \Push()\ / \Push()\ — Send full or incremental updates
  • \Remove(), \SwitchTo(), \Send()\ — Lifecycle management
  • \ToJson()\ / \FromJson()\ — Config serialization
  • \Clone()\ — Template/variant patterns
  • \GetDirtyPayload()\ — Incremental update detection

Backward Compatibility

  • \Set-AwtrixApp\ and \Send-AwtrixNotification\ now use the new classes internally
  • New -PassThru\ switch returns the object; default behavior unchanged (fire-and-forget)
  • All 1100+ existing tests pass

Test Coverage

✅ 102 new tests for AwtrixApp object system
✅ 1205 tests passed total
✅ Full backward compatibility verified

Related Issue

Addresses request to make apps 'first class' with object-oriented ergonomics.

…cation

* Introduced new test files for `AwtrixApp`, `AwtrixNotification`, and `AwtrixAppCollection`.
* Implemented tests for object construction, property mapping, and payload generation.
* Added functionality to support `-PassThru` in `Send-AwtrixNotification` and `Set-AwtrixApp`.
* Enhanced `Update-AwtrixApp` to handle multiple pipeline objects and return mutated objects.
* Ensured that tests cover various scenarios including property updates and API interactions.
Comment thread CHANGELOG.md
stateful PowerShell objects with methods, properties, and lifecycle
management, enabling sophisticated scenarios:
- `AwtrixApp` class — Represents a persistent custom app with state
management, dirty tracking, and serialization
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ [alex] reported by reviewdog 🐶
Be careful with dirty, it’s profane in some cases dirty retext-profanities


### -Text
The text to display.
A simple string or an array of colored fragment objects
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ [alex] reported by reviewdog 🐶
simple may be insensitive, try not to use it simple retext-equality


### -Text
The text to display.
A simple string or an array of colored fragment objects
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ [alex] reported by reviewdog 🐶
Be careful with colored, it’s profane in some cases colored retext-profanities

```

### -Color
Text, bar, or line color.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ [alex] reported by reviewdog 🐶
Be careful with color, it’s profane in some cases color retext-profanities


### -Color
Text, bar, or line color.
Accepts a named color, hex string, or RGB array.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ [alex] reported by reviewdog 🐶
Be careful with color, it’s profane in some cases color retext-profanities

```

### -Background
Background color.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ [alex] reported by reviewdog 🐶
Be careful with color, it’s profane in some cases color retext-profanities

```

### -EffectSettings
Effect color/speed overrides.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ [alex] reported by reviewdog 🐶
Be careful with color, it’s profane in some cases color retext-profanities

```

### -BarBackgroundColor
Bar background color.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ [alex] reported by reviewdog 🐶
Be careful with color, it’s profane in some cases color retext-profanities

```

### -ProgressColor
Progress bar foreground color.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ [alex] reported by reviewdog 🐶
Be careful with color, it’s profane in some cases color retext-profanities

```

### -ProgressBackgroundColor
Progress bar background color.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ [alex] reported by reviewdog 🐶
Be careful with color, it’s profane in some cases color retext-profanities

@github-actions
Copy link
Copy Markdown

Test Results

    3 files  1 137 suites   14s ⏱️
1 210 tests 1 198 ✅ 12 💤 0 ❌
3 630 runs  3 594 ✅ 36 💤 0 ❌

Results for commit 27be5e8.

@HeyItsGilbert HeyItsGilbert merged commit b469f24 into main Mar 16, 2026
6 checks passed
@HeyItsGilbert HeyItsGilbert deleted the 0.4.0 branch March 16, 2026 14:40
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.

1 participant