Skip to content

Add Web and Desktop UI#1194

Open
gritcsenko wants to merge 9 commits intomainfrom
926-add-ui
Open

Add Web and Desktop UI#1194
gritcsenko wants to merge 9 commits intomainfrom
926-add-ui

Conversation

@gritcsenko
Copy link
Owner

@gritcsenko gritcsenko commented Jun 17, 2025

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes:

Definition of done

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged and published in downstream modules

Signed-off-by: Serhii A. Hrytsenko <gritcsenko@users.noreply.github.com>
@gritcsenko gritcsenko self-assigned this Jun 17, 2025
Copilot AI review requested due to automatic review settings June 17, 2025 14:41
@gritcsenko gritcsenko linked an issue Jun 17, 2025 that may be closed by this pull request
@github-actions github-actions bot added enhancement New feature or request maintenance labels Jun 17, 2025
@github-actions
Copy link

github-actions bot commented Jun 17, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
nuget/Avalonia.Desktop >= 0 🟢 4.8
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 6 issue activity found in the last 90 days -- score normalized to 10
Code-Review🟢 10all changesets reviewed
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Binary-Artifacts🟢 10no binaries found in the repo
Security-Policy⚠️ 0security policy file not detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Vulnerabilities⚠️ 017 existing vulnerabilities detected
nuget/AvaloniaInside.Shell >= 0 UnknownUnknown
nuget/Avalonia.Browser >= 0 🟢 4.8
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 6 issue activity found in the last 90 days -- score normalized to 10
Code-Review🟢 10all changesets reviewed
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Binary-Artifacts🟢 10no binaries found in the repo
Security-Policy⚠️ 0security policy file not detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Vulnerabilities⚠️ 017 existing vulnerabilities detected
nuget/AvaloniaInside.Shell >= 0 UnknownUnknown
nuget/Avalonia >= 0 🟢 4.8
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 6 issue activity found in the last 90 days -- score normalized to 10
Code-Review🟢 10all changesets reviewed
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Binary-Artifacts🟢 10no binaries found in the repo
Security-Policy⚠️ 0security policy file not detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Vulnerabilities⚠️ 017 existing vulnerabilities detected
nuget/Avalonia.Diagnostics >= 0 🟢 4.8
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 6 issue activity found in the last 90 days -- score normalized to 10
Code-Review🟢 10all changesets reviewed
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Binary-Artifacts🟢 10no binaries found in the repo
Security-Policy⚠️ 0security policy file not detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Vulnerabilities⚠️ 017 existing vulnerabilities detected
nuget/Avalonia.Fonts.Inter >= 0 🟢 4.8
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 6 issue activity found in the last 90 days -- score normalized to 10
Code-Review🟢 10all changesets reviewed
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Binary-Artifacts🟢 10no binaries found in the repo
Security-Policy⚠️ 0security policy file not detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Vulnerabilities⚠️ 017 existing vulnerabilities detected
nuget/Avalonia.ReactiveUI >= 0 🟢 4.8
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 6 issue activity found in the last 90 days -- score normalized to 10
Code-Review🟢 10all changesets reviewed
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Binary-Artifacts🟢 10no binaries found in the repo
Security-Policy⚠️ 0security policy file not detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Vulnerabilities⚠️ 017 existing vulnerabilities detected
nuget/Avalonia.Themes.Fluent >= 0 🟢 4.8
Details
CheckScoreReason
Maintained🟢 1030 commit(s) and 6 issue activity found in the last 90 days -- score normalized to 10
Code-Review🟢 10all changesets reviewed
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Binary-Artifacts🟢 10no binaries found in the repo
Security-Policy⚠️ 0security policy file not detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
Vulnerabilities⚠️ 017 existing vulnerabilities detected

Scanned Files

  • src/HomeInventory/HomeInventory.UI.Desktop/HomeInventory.UI.Desktop.csproj
  • src/HomeInventory/HomeInventory.UI.Web/HomeInventory.UI.Web.csproj
  • src/HomeInventory/HomeInventory.UI/HomeInventory.UI.csproj

Copy link
Contributor

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 Avalonia-based user interfaces for both web (WASM) and desktop, introducing view-model/view mapping and project configurations.

  • Introduces ViewLocator, ViewForAttribute, and related UI infrastructure in the HomeInventory.UI project
  • Adds a WebAssembly UI project with splash screen, startup scripts, and launch settings
  • Adds a desktop UI project with Windows manifest and Avalonia startup code
  • Updates shared Directory.Packages.props to pin Avalonia package versions

Reviewed Changes

Copilot reviewed 29 out of 30 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/HomeInventory/HomeInventory.UI/ViewLocator.cs Implements ViewLocator for view-model to view resolution
src/HomeInventory/HomeInventory.UI/ViewForAttribute.cs Defines attribute to associate views with view-model types
src/HomeInventory/HomeInventory.UI/IViewModelTypeProvider.cs Interface for attribute-based view-model type providers
src/HomeInventory/HomeInventory.UI/HomeInventory.UI.csproj Sets up Avalonia UI project and package references
src/HomeInventory/HomeInventory.UI/AppViewLocator.cs Registers MainViewModel to MainView mapping
src/HomeInventory/HomeInventory.UI/App.axaml.cs Configures Avalonia application initialization
src/HomeInventory/HomeInventory.UI/App.axaml Declares data templates and styles in XAML
src/HomeInventory/HomeInventory.UI.Web/wwwroot/main.js WebAssembly launch script
src/HomeInventory/HomeInventory.UI.Web/wwwroot/index.html HTML splash page and host element
src/HomeInventory/HomeInventory.UI.Web/wwwroot/css/app.css CSS for the splash screen with light/dark theme support
src/HomeInventory/HomeInventory.UI.Web/runtimeconfig.template.json WASM host configuration
src/HomeInventory/HomeInventory.UI.Web/Properties/launchSettings.json ASP.NET Core launch profile for browser
src/HomeInventory/HomeInventory.UI.Web/Properties/AssemblyInfo.cs Marks the assembly as supported on the browser platform
src/HomeInventory/HomeInventory.UI.Web/Program.cs Entry point and app builder for the web project
src/HomeInventory/HomeInventory.UI.Web/HomeInventory.UI.Web.csproj Defines the WASM project settings and references
src/HomeInventory/HomeInventory.UI.Desktop/app.manifest Windows application manifest for desktop transparency
src/HomeInventory/HomeInventory.UI.Desktop/Program.cs Desktop application entry point with Avalonia setup
src/HomeInventory/HomeInventory.UI.Desktop/HomeInventory.UI.Desktop.csproj Desktop project file with dependencies
src/HomeInventory/Directory.Packages.props Pins Avalonia and related package versions
Files not reviewed (1)
  • src/HomeInventory/.idea/.idea.HomeInventory/.idea/avalonia.xml: Language not supported
Comments suppressed due to low confidence (3)

src/HomeInventory/HomeInventory.UI.Web/wwwroot/index.html:5

  • [nitpick] The HTML <title> is still the default 'AvaloniaApplication1.Browser'; consider updating it to reflect the actual application name, e.g., 'HomeInventory Browser'.
    <title>AvaloniaApplication1.Browser</title>

src/HomeInventory/HomeInventory.UI.Web/wwwroot/main.js:3

  • [nitpick] Use consistent JavaScript naming conventions: prefer camelCase for variable names (e.g., 'isBrowser') instead of snake_case.
const is_browser = typeof window != "undefined";

src/HomeInventory/HomeInventory.UI/ViewLocator.cs:42

  • Add unit tests for the Register<TViewModel, TView>() method and attribute-based scanning (InternalScan) to verify that ViewLocator correctly maps view-model types to view types under various scenarios.
    public bool Register<TViewModel, TView>()

Signed-off-by: Serhii A. Hrytsenko <gritcsenko@users.noreply.github.com>
Signed-off-by: Serhii A. Hrytsenko <gritcsenko@users.noreply.github.com>
Signed-off-by: Serhii A. Hrytsenko <gritcsenko@users.noreply.github.com>
Signed-off-by: Serhii A. Hrytsenko <gritcsenko@users.noreply.github.com>

# Conflicts:
#	src/HomeInventory/Directory.Packages.props
Signed-off-by: Serhii A. Hrytsenko <gritcsenko@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add UI

2 participants