-
Notifications
You must be signed in to change notification settings - Fork 0
235 mobile client for interacting with agent up server #259
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
Open
themassiveone
wants to merge
18
commits into
main
Choose a base branch
from
235-avalonia-mobile-client-for-interacting-with-agent-up-via-https
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
0bd1ab1
feat: initial mobile app
themassiveone c1e3cba
feat: mobile PWA
themassiveone 9a9aa4c
chore: replace PWA icons
themassiveone f0258ba
chore(Mobile): remove old and incorrect icons
themassiveone 59bce05
chore(Mobile): replace PWA icons correctly
themassiveone 7d176b0
feat: release channel selection
themassiveone 18c17bd
fix: cloudflare build
themassiveone f32a77d
fix: release tag naming
themassiveone 27007f2
fix(Mobile): native dropdown and non safe-area background
themassiveone ae08e3b
chore(Mobile): adress review issues
themassiveone 0fcbc45
chore(Mobile): add missing review issue fixes
themassiveone 590efb3
feat: mobile app connects to agent-up server
themassiveone 5ea3d9f
Merge branch 'main' into 235-avalonia-mobile-client-for-interacting-w…
themassiveone c796b83
fix: PWA auto-updating
themassiveone 95222fd
feat(Audit): frontend package to push audit logs to agent-up server
themassiveone 61abd5c
ci: release workflow for mobile package
themassiveone caf3beb
fix: review issues
themassiveone c630ccf
fix(mobile): service-worker asset caching and redirection issue
themassiveone File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
AgentUp.Desktop.Tests/Features/Audit/Headless/ApplicationAuditPanelTests.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| using Avalonia.Controls; | ||
| using Avalonia.Headless.NUnit; | ||
| using AgentUp.Desktop.Features.Ports.ViewModels; | ||
| using AgentUp.Desktop.Features.Workspaces.Views; | ||
| using AgentUp.Desktop.Features.Workspaces.ViewModels; | ||
| using AgentUp.Desktop.Tests.Support; | ||
|
|
||
| namespace AgentUp.Desktop.Tests.Features.Audit.Headless; | ||
|
|
||
| [TestFixture] | ||
| public sealed class ApplicationAuditPanelTests | ||
| { | ||
| [AvaloniaTest] | ||
| public async Task AuditTab_ShowsNativePaginatedEventList() | ||
| { | ||
| var app = await AppDriver.LaunchWithWorkspacesAsync([WorkspaceFixtures.WithApplications()]); | ||
| var viewModel = (MainViewModel)app.Window.DataContext!; | ||
| var auditTab = viewModel.SubTabs.OfType<AuditSubTabViewModel>().Single(); | ||
|
|
||
| viewModel.SelectedSubTab = auditTab; | ||
| await HeadlessExtensions.FlushAsync(); | ||
|
|
||
| Assert.Multiple(() => | ||
| { | ||
| Assert.That(app.Window.FindControl<Grid>("AuditPanel")!.IsVisible, Is.True); | ||
| Assert.That(app.Window.FindControl<ListBox>("AuditEventList"), Is.Not.Null); | ||
| Assert.That(app.Window.FindControl<Button>("AuditLoadMoreButton"), Is.Not.Null); | ||
| }); | ||
| } | ||
| } |
32 changes: 32 additions & 0 deletions
32
AgentUp.Desktop.Tests/Features/Audit/Provider/ApplicationAuditApiClientTests.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| using System.Net; | ||
| using AgentUp.Desktop.Features.Audit.Providers; | ||
|
|
||
| namespace AgentUp.Desktop.Tests.Features.Audit.Provider; | ||
|
|
||
| [TestFixture] | ||
| public sealed class ApplicationAuditApiClientTests | ||
| { | ||
| [Test] | ||
| public async Task GetPageAsync_EncodesIdentityAndCursor() | ||
| { | ||
| Uri? requested = null; | ||
| using var http = new HttpClient(new StubHandler(request => | ||
| { | ||
| requested = request.RequestUri; | ||
| return new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent("{\"items\":[],\"nextBefore\":null,\"nextBeforeEventId\":null}") }; | ||
| })) { BaseAddress = new Uri("http://localhost:5000") }; | ||
| var client = new ApplicationAuditApiClient(http); | ||
| var before = DateTimeOffset.Parse("2026-08-22T12:00:00Z"); | ||
|
|
||
| await client.GetPageAsync("workspace one", "web/app", before, "event/one", 50, CancellationToken.None); | ||
|
|
||
| Assert.That(requested!.PathAndQuery, Does.StartWith("/api/audit/workspaces/workspace%20one/applications/web%2Fapp?limit=50&before=")); | ||
| Assert.That(requested.PathAndQuery, Does.Contain("&beforeEventId=event%2Fone")); | ||
| } | ||
|
|
||
| private sealed class StubHandler(Func<HttpRequestMessage, HttpResponseMessage> response) : HttpMessageHandler | ||
| { | ||
| protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) | ||
| => Task.FromResult(response(request)); | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.