Skip to content

Mermaid Diagrams #242

Open
Chester-alt wants to merge 22 commits intomainfrom
Blazor-Diagrams
Open

Mermaid Diagrams #242
Chester-alt wants to merge 22 commits intomainfrom
Blazor-Diagrams

Conversation

@Chester-alt
Copy link
Collaborator

Usecases for Mermaid.js diagram exporter

Chester-alt and others added 22 commits March 5, 2026 17:04
* Migrate nics -> ports in v3 schema

* Added connections

* Updated schema

* Ran format

* Ran format

* Ran Format

* Added PortsPom / E2E ui tests

* Updated workflows
* feat: Add git status indicator and controls to web UI header

Add a minimal git integration to the web UI that shows the current
branch name, change status, and provides save/diff/discard/history
controls directly in the header.

- GitService wrapping git CLI for status, commit, diff, restore, log
- NullGitService for WASM Viewer where git is not available
- GitStatusIndicator component with auto-polling every 5s
- Branch name clickable to open commit history modal
- Save button with dropdown for diff view and discard
- Color-coded diff output and changed file listing
- Gracefully hidden when git is not installed or not a repo

Ref #131

* feat: Add remote sync, push/pull, diff, discard and history to git UI

- Add push/pull support with automatic upstream tracking on first push
- Add separate Sync button for manual remote fetch (no auto-polling)
- Add diff viewer modal with color-coded output
- Add discard changes with confirmation prompt
- Add commit history modal via branch name click
- Split save dropdown (diff/discard) from sync dropdown (push/pull)

* feat: Refactor git module to hexagonal architecture with libgit2sharp

Replace CLI-based git implementation with LibGit2Sharp native library,
restructure the git module following hexagonal architecture, DDD, CQS
and SRP principles.

Architecture:
- Port: IGitRepository interface for low-level repository access
- Adapter: LibGit2GitRepository (libgit2sharp) and NullGitRepository (WASM)
- UseCases (commands): InitRepo, CommitAll, RestoreAll, Push, Pull, AddRemote
- Queries (reads): GetStatus, GetBranch, GetDiff, GetChangedFiles, GetLog, GetSyncStatus

Features:
- Git init via web UI with confirmation dialog
- Add HTTPS remote via web UI with URL validation (SSH not supported)
- Manual sync button with fetch, push and pull controls
- Sync status display (ahead/behind) with fetch error reporting
- Token-based auth via GIT_TOKEN environment variable for Docker/CI
- 5-second local status polling (no remote fetch in polling loop)

Removed:
- CLI-based GitService, IGitService and NullGitService

* Cleaned up

* Updated docs

---------

Co-authored-by: mavnezz <githubb.com@stuch.me>
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