Skip to content

Add DevTunnel, QR, and MauiDevFlow support#5

Merged
PureWeen merged 4 commits intomainfrom
dev/redth/mobile-client
Feb 7, 2026
Merged

Add DevTunnel, QR, and MauiDevFlow support#5
PureWeen merged 4 commits intomainfrom
dev/redth/mobile-client

Conversation

@Redth
Copy link
Copy Markdown
Collaborator

@Redth Redth commented Feb 7, 2026

Add MAUI debugging docs and integrate remote sharing, QR scanning, and devflow tooling. Adds new .claude/maui-ai-debugging skill docs and platform FolderPicker helpers, QR scanner page/service, DevTunnelService, WebSocket bridge (client/server), and bridge message models. Update project refs to include QRCoder, ZXing, and Redth.MauiDevFlow packages. UI changes: Settings and Home pages now expose DevTunnel controls, QR generation, mode selection via PlatformHelper, and auto-start tunnel behavior; SessionSidebar shows session creation errors. Misc: CopilotService, ServerManager and related services updated, AndroidManifest and iOS Info.plist touched, and CSS/layout tweaks for nav spacing.

Redth and others added 4 commits February 7, 2026 13:35
Add MAUI debugging docs and integrate remote sharing, QR scanning, and devflow tooling. Adds new .claude/maui-ai-debugging skill docs and platform FolderPicker helpers, QR scanner page/service, DevTunnelService, WebSocket bridge (client/server), and bridge message models. Update project refs to include QRCoder, ZXing, and Redth.MauiDevFlow packages. UI changes: Settings and Home pages now expose DevTunnel controls, QR generation, mode selection via PlatformHelper, and auto-start tunnel behavior; SessionSidebar shows session creation errors. Misc: CopilotService, ServerManager and related services updated, AndroidManifest and iOS Info.plist touched, and CSS/layout tweaks for nav spacing.
Replace emoji characters with inline SVG icons across SessionSidebar, Home, and Settings components; update buttons (inspect, start/stop, copy, reveal, tunnel/login, QR scan) and headings to use consistent vector icons. Change GetModeIcon return type to MarkupString and return SVG markup for mode icons. Remove emoji prefixes from status messages and render connection status with colored spans. Add CSS for .icon and .icon.spin plus keyframes for spinner. Purpose: unify visual style, improve scalability of icons and provide a smoother, more consistent UX.
Remove the hardcoded 14px padding-bottom from Home.razor.css (two selectors) and add the same 14px buffer in MainPage.xaml.cs by incrementing bottomInset. This centralizes the gesture-bar visual buffer in the platform inset injection code so UI padding is driven by the injected safe-area inset rather than duplicated CSS offsets.
@PureWeen PureWeen merged commit 61f63f1 into main Feb 7, 2026
PureWeen added a commit that referenced this pull request Feb 20, 2026
Concurrency fixes:
- Swap _sessions before wiring event handler on reconnect (#2)
- Block ALL events from orphaned handlers, not just terminal (#3)
- Add lock(_imageQueueLock) to all image queue mutations (#4)
  including dequeue, reinsert, ClearQueue, rename, close, dispose
- Clear IsResumed on error and watchdog paths (#5)
- Add RunContinuationsAsynchronously to remaining TCS (#6)

Architecture/contract fixes:
- Add [JsonIgnore] to ShouldWarnOnStall, LastSimilarity (#7)
- Fix ConsecutiveErrors increment-before-check ordering (#8)
- Set IsCancelled on all non-success termination paths (#10)
  including stall, error-stall, max-iteration, OperationCanceled,
  empty-assignment error stall, and single-agent StopReflectionCycle
- Add session dir deletion for ghost evaluator pruning (#12)
- Add CompletedAt to StopReflectionCycle (#12 related)

Already correct (no changes needed):
- #9: CurrentIteration == 1 check was already fixed
- #11: Comments already reference string-based stall detection

Documentation:
- Update stall detection from 'hash match' to 'string equality'
- Update error handling to show ConsecutiveErrors (not ConsecutiveStalls)
- Add IsCancelled invariant to exit conditions table
- Add 5 new invariants: orphan gate, reconnect ordering,
  image queue locking, IsResumed clearing, TCS creation
- Document empty-assignment retry behavior

817/817 tests pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@PureWeen PureWeen deleted the dev/redth/mobile-client branch February 22, 2026 00:16
PureWeen added a commit that referenced this pull request Mar 5, 2026
Bug: IsMultiAgentSession was never set during RestoreSingleSessionAsync,
causing the watchdog to use the 120s inactivity timeout instead of 600s
for multi-agent workers restored after relaunch. Fixed by calling
IsSessionInMultiAgentGroup() before StartProcessingWatchdog.

Documentation updates:
- processing-state-safety: Add INV-9 (restore must init all watchdog state),
  add mistake #5 (missing restore initialization), update description to
  cover restore paths and IsRestoring window, update regression history
  with PR #284 root cause and pattern
- performance-optimization: Add PERF-6 (ReconcileOrganization during
  IsRestoring needs allowPruning:false for additive-only mode)
- regression-history: Add PR #284 entry with full analysis

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PureWeen added a commit that referenced this pull request Apr 5, 2026
…-hunk gaps

- #1 (CRITICAL): Snapshot CM instance IDs before clearing dictionaries in
  OnParametersSet, preventing InvalidOperationException from enumerator
  invalidation and ensuring all JS instances are properly disposed
- #2 (CRITICAL): Add generation counter to InitCodeMirrorForFile; stale
  completions (from a previous diff) are detected and disposed immediately
- #3: Double-init guard — skip InitCodeMirrorForFile if _cmInstances
  already contains an entry for the fileIdx
- #4: DisposeCmInstance replaced with snapshot-then-remove pattern;
  _pendingEditorInit cleared on Table toggle to prevent stale inits
- #5: ReconstructOriginal/Modified now insert blank placeholder lines
  for inter-hunk gaps to preserve correct line numbering in CM MergeView
- #6: Add SRI integrity hash (sha384) to codemirror-bundle.js script tag
- #7: Replace O(n²) Files.IndexOf(file) with indexed for loop
- #8: All catch blocks now log to Console.Error with [DiffView] prefix
- NEW-1: Post-loop Clear() race eliminated — DisposeJsInstancesByIdAsync
  works on snapshotted arrays, never touches _cmInstances dictionary
- Added _disposed guard to DisposeAsync for safe double-dispose

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PureWeen added a commit that referenced this pull request Apr 5, 2026
…-hunk gaps

- #1 (CRITICAL): Snapshot CM instance IDs before clearing dictionaries in
  OnParametersSet, preventing InvalidOperationException from enumerator
  invalidation and ensuring all JS instances are properly disposed
- #2 (CRITICAL): Add generation counter to InitCodeMirrorForFile; stale
  completions (from a previous diff) are detected and disposed immediately
- #3: Double-init guard — skip InitCodeMirrorForFile if _cmInstances
  already contains an entry for the fileIdx
- #4: DisposeCmInstance replaced with snapshot-then-remove pattern;
  _pendingEditorInit cleared on Table toggle to prevent stale inits
- #5: ReconstructOriginal/Modified now insert blank placeholder lines
  for inter-hunk gaps to preserve correct line numbering in CM MergeView
- #6: Add SRI integrity hash (sha384) to codemirror-bundle.js script tag
- #7: Replace O(n²) Files.IndexOf(file) with indexed for loop
- #8: All catch blocks now log to Console.Error with [DiffView] prefix
- NEW-1: Post-loop Clear() race eliminated — DisposeJsInstancesByIdAsync
  works on snapshotted arrays, never touches _cmInstances dictionary
- Added _disposed guard to DisposeAsync for safe double-dispose

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PureWeen added a commit that referenced this pull request Apr 6, 2026
…-hunk gaps

- #1 (CRITICAL): Snapshot CM instance IDs before clearing dictionaries in
  OnParametersSet, preventing InvalidOperationException from enumerator
  invalidation and ensuring all JS instances are properly disposed
- #2 (CRITICAL): Add generation counter to InitCodeMirrorForFile; stale
  completions (from a previous diff) are detected and disposed immediately
- #3: Double-init guard — skip InitCodeMirrorForFile if _cmInstances
  already contains an entry for the fileIdx
- #4: DisposeCmInstance replaced with snapshot-then-remove pattern;
  _pendingEditorInit cleared on Table toggle to prevent stale inits
- #5: ReconstructOriginal/Modified now insert blank placeholder lines
  for inter-hunk gaps to preserve correct line numbering in CM MergeView
- #6: Add SRI integrity hash (sha384) to codemirror-bundle.js script tag
- #7: Replace O(n²) Files.IndexOf(file) with indexed for loop
- #8: All catch blocks now log to Console.Error with [DiffView] prefix
- NEW-1: Post-loop Clear() race eliminated — DisposeJsInstancesByIdAsync
  works on snapshotted arrays, never touches _cmInstances dictionary
- Added _disposed guard to DisposeAsync for safe double-dispose

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PureWeen added a commit that referenced this pull request Apr 6, 2026
Add thorough test coverage for the CodeMirror diff editor feature:

- Inter-hunk gap placeholder tests: verify ReconstructOriginal/Modified
  insert correct blank lines between distant hunks (review fix #5)
- PairLines side-by-side pairing: context-only, matched pairs, uneven
  remove/add counts, pure additions/deletions, mixed interleaving,
  empty hunks, multiple independent change blocks
- Multi-file mixed types: new + deleted + modified + renamed in one diff
- Edge cases: CRLF handling, empty added/removed lines, hunk headers
  with and without function names, line number sequencing, insertions
  causing offset, multiple hunks resetting line numbers
- ShouldRenderDiffView integration: Read/view tool filtering, null tool
- IsPlainTextViewTool case insensitivity
- Reconstruction round-trip integrity: single-line, multi-hunk gaps with
  exact line counts, gap adjustment for added lines
- Real-world patterns: binary file notices, index lines, three-hunk diffs,
  hunk headers without comma

Total DiffParser tests: 67 (28 existing + 39 new), all passing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PureWeen added a commit that referenced this pull request Apr 6, 2026
…-hunk gaps

- #1 (CRITICAL): Snapshot CM instance IDs before clearing dictionaries in
  OnParametersSet, preventing InvalidOperationException from enumerator
  invalidation and ensuring all JS instances are properly disposed
- #2 (CRITICAL): Add generation counter to InitCodeMirrorForFile; stale
  completions (from a previous diff) are detected and disposed immediately
- #3: Double-init guard — skip InitCodeMirrorForFile if _cmInstances
  already contains an entry for the fileIdx
- #4: DisposeCmInstance replaced with snapshot-then-remove pattern;
  _pendingEditorInit cleared on Table toggle to prevent stale inits
- #5: ReconstructOriginal/Modified now insert blank placeholder lines
  for inter-hunk gaps to preserve correct line numbering in CM MergeView
- #6: Add SRI integrity hash (sha384) to codemirror-bundle.js script tag
- #7: Replace O(n²) Files.IndexOf(file) with indexed for loop
- #8: All catch blocks now log to Console.Error with [DiffView] prefix
- NEW-1: Post-loop Clear() race eliminated — DisposeJsInstancesByIdAsync
  works on snapshotted arrays, never touches _cmInstances dictionary
- Added _disposed guard to DisposeAsync for safe double-dispose

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PureWeen added a commit that referenced this pull request Apr 6, 2026
Add thorough test coverage for the CodeMirror diff editor feature:

- Inter-hunk gap placeholder tests: verify ReconstructOriginal/Modified
  insert correct blank lines between distant hunks (review fix #5)
- PairLines side-by-side pairing: context-only, matched pairs, uneven
  remove/add counts, pure additions/deletions, mixed interleaving,
  empty hunks, multiple independent change blocks
- Multi-file mixed types: new + deleted + modified + renamed in one diff
- Edge cases: CRLF handling, empty added/removed lines, hunk headers
  with and without function names, line number sequencing, insertions
  causing offset, multiple hunks resetting line numbers
- ShouldRenderDiffView integration: Read/view tool filtering, null tool
- IsPlainTextViewTool case insensitivity
- Reconstruction round-trip integrity: single-line, multi-hunk gaps with
  exact line counts, gap adjustment for added lines
- Real-world patterns: binary file notices, index lines, three-hunk diffs,
  hunk headers without comma

Total DiffParser tests: 67 (28 existing + 39 new), all passing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PureWeen added a commit that referenced this pull request Apr 7, 2026
…-hunk gaps

- #1 (CRITICAL): Snapshot CM instance IDs before clearing dictionaries in
  OnParametersSet, preventing InvalidOperationException from enumerator
  invalidation and ensuring all JS instances are properly disposed
- #2 (CRITICAL): Add generation counter to InitCodeMirrorForFile; stale
  completions (from a previous diff) are detected and disposed immediately
- #3: Double-init guard — skip InitCodeMirrorForFile if _cmInstances
  already contains an entry for the fileIdx
- #4: DisposeCmInstance replaced with snapshot-then-remove pattern;
  _pendingEditorInit cleared on Table toggle to prevent stale inits
- #5: ReconstructOriginal/Modified now insert blank placeholder lines
  for inter-hunk gaps to preserve correct line numbering in CM MergeView
- #6: Add SRI integrity hash (sha384) to codemirror-bundle.js script tag
- #7: Replace O(n²) Files.IndexOf(file) with indexed for loop
- #8: All catch blocks now log to Console.Error with [DiffView] prefix
- NEW-1: Post-loop Clear() race eliminated — DisposeJsInstancesByIdAsync
  works on snapshotted arrays, never touches _cmInstances dictionary
- Added _disposed guard to DisposeAsync for safe double-dispose

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PureWeen added a commit that referenced this pull request Apr 7, 2026
Add thorough test coverage for the CodeMirror diff editor feature:

- Inter-hunk gap placeholder tests: verify ReconstructOriginal/Modified
  insert correct blank lines between distant hunks (review fix #5)
- PairLines side-by-side pairing: context-only, matched pairs, uneven
  remove/add counts, pure additions/deletions, mixed interleaving,
  empty hunks, multiple independent change blocks
- Multi-file mixed types: new + deleted + modified + renamed in one diff
- Edge cases: CRLF handling, empty added/removed lines, hunk headers
  with and without function names, line number sequencing, insertions
  causing offset, multiple hunks resetting line numbers
- ShouldRenderDiffView integration: Read/view tool filtering, null tool
- IsPlainTextViewTool case insensitivity
- Reconstruction round-trip integrity: single-line, multi-hunk gaps with
  exact line counts, gap adjustment for added lines
- Real-world patterns: binary file notices, index lines, three-hunk diffs,
  hunk headers without comma

Total DiffParser tests: 67 (28 existing + 39 new), all passing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PureWeen added a commit that referenced this pull request Apr 7, 2026
…-hunk gaps

- #1 (CRITICAL): Snapshot CM instance IDs before clearing dictionaries in
  OnParametersSet, preventing InvalidOperationException from enumerator
  invalidation and ensuring all JS instances are properly disposed
- #2 (CRITICAL): Add generation counter to InitCodeMirrorForFile; stale
  completions (from a previous diff) are detected and disposed immediately
- #3: Double-init guard — skip InitCodeMirrorForFile if _cmInstances
  already contains an entry for the fileIdx
- #4: DisposeCmInstance replaced with snapshot-then-remove pattern;
  _pendingEditorInit cleared on Table toggle to prevent stale inits
- #5: ReconstructOriginal/Modified now insert blank placeholder lines
  for inter-hunk gaps to preserve correct line numbering in CM MergeView
- #6: Add SRI integrity hash (sha384) to codemirror-bundle.js script tag
- #7: Replace O(n²) Files.IndexOf(file) with indexed for loop
- #8: All catch blocks now log to Console.Error with [DiffView] prefix
- NEW-1: Post-loop Clear() race eliminated — DisposeJsInstancesByIdAsync
  works on snapshotted arrays, never touches _cmInstances dictionary
- Added _disposed guard to DisposeAsync for safe double-dispose

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PureWeen added a commit that referenced this pull request Apr 7, 2026
Add thorough test coverage for the CodeMirror diff editor feature:

- Inter-hunk gap placeholder tests: verify ReconstructOriginal/Modified
  insert correct blank lines between distant hunks (review fix #5)
- PairLines side-by-side pairing: context-only, matched pairs, uneven
  remove/add counts, pure additions/deletions, mixed interleaving,
  empty hunks, multiple independent change blocks
- Multi-file mixed types: new + deleted + modified + renamed in one diff
- Edge cases: CRLF handling, empty added/removed lines, hunk headers
  with and without function names, line number sequencing, insertions
  causing offset, multiple hunks resetting line numbers
- ShouldRenderDiffView integration: Read/view tool filtering, null tool
- IsPlainTextViewTool case insensitivity
- Reconstruction round-trip integrity: single-line, multi-hunk gaps with
  exact line counts, gap adjustment for added lines
- Real-world patterns: binary file notices, index lines, three-hunk diffs,
  hunk headers without comma

Total DiffParser tests: 67 (28 existing + 39 new), all passing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PureWeen added a commit that referenced this pull request Apr 14, 2026
…-hunk gaps

- #1 (CRITICAL): Snapshot CM instance IDs before clearing dictionaries in
  OnParametersSet, preventing InvalidOperationException from enumerator
  invalidation and ensuring all JS instances are properly disposed
- #2 (CRITICAL): Add generation counter to InitCodeMirrorForFile; stale
  completions (from a previous diff) are detected and disposed immediately
- #3: Double-init guard — skip InitCodeMirrorForFile if _cmInstances
  already contains an entry for the fileIdx
- #4: DisposeCmInstance replaced with snapshot-then-remove pattern;
  _pendingEditorInit cleared on Table toggle to prevent stale inits
- #5: ReconstructOriginal/Modified now insert blank placeholder lines
  for inter-hunk gaps to preserve correct line numbering in CM MergeView
- #6: Add SRI integrity hash (sha384) to codemirror-bundle.js script tag
- #7: Replace O(n²) Files.IndexOf(file) with indexed for loop
- #8: All catch blocks now log to Console.Error with [DiffView] prefix
- NEW-1: Post-loop Clear() race eliminated — DisposeJsInstancesByIdAsync
  works on snapshotted arrays, never touches _cmInstances dictionary
- Added _disposed guard to DisposeAsync for safe double-dispose

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PureWeen added a commit that referenced this pull request Apr 14, 2026
Add thorough test coverage for the CodeMirror diff editor feature:

- Inter-hunk gap placeholder tests: verify ReconstructOriginal/Modified
  insert correct blank lines between distant hunks (review fix #5)
- PairLines side-by-side pairing: context-only, matched pairs, uneven
  remove/add counts, pure additions/deletions, mixed interleaving,
  empty hunks, multiple independent change blocks
- Multi-file mixed types: new + deleted + modified + renamed in one diff
- Edge cases: CRLF handling, empty added/removed lines, hunk headers
  with and without function names, line number sequencing, insertions
  causing offset, multiple hunks resetting line numbers
- ShouldRenderDiffView integration: Read/view tool filtering, null tool
- IsPlainTextViewTool case insensitivity
- Reconstruction round-trip integrity: single-line, multi-hunk gaps with
  exact line counts, gap adjustment for added lines
- Real-world patterns: binary file notices, index lines, three-hunk diffs,
  hunk headers without comma

Total DiffParser tests: 67 (28 existing + 39 new), all passing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PureWeen added a commit that referenced this pull request Apr 15, 2026
- Add ProcessingGeneration guard on HasUsedToolsThisTurn override (INV-3/INV-12)
- Extract EvaluatePollCycle() static helper for testable decision logic
- Add PollAction enum for poller state machine actions
- Replace 3 structural tests with 7 behavioral tests for EvaluatePollCycle
- Add PollIntervalSeconds constant (eliminates hardcoded 5s in log)
- Fix XML doc displacement (constant doc was stealing method doc)
- Narrow catch blocks to IOException for file-size probes
- Move staleness detection before lastEventType null guard (Finding #5)
- Update method doc to clarify persistent-mode reconnect safety

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PureWeen added a commit that referenced this pull request Apr 15, 2026
- Add ProcessingGeneration guard on HasUsedToolsThisTurn override (INV-3/INV-12)
- Extract EvaluatePollCycle() static helper for testable decision logic
- Add PollAction enum for poller state machine actions
- Replace 3 structural tests with 7 behavioral tests for EvaluatePollCycle
- Add PollIntervalSeconds constant (eliminates hardcoded 5s in log)
- Fix XML doc displacement (constant doc was stealing method doc)
- Narrow catch blocks to IOException for file-size probes
- Move staleness detection before lastEventType null guard (Finding #5)
- Update method doc to clarify persistent-mode reconnect safety

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PureWeen added a commit that referenced this pull request Apr 19, 2026
CRITICAL fixes:
- #1 Test isolation: add [Collection("BaseDir")], restore dir in finally
  blocks, register in TestSetup.Initialize()
- #2 Stale state: only set _analyzerSessionName AFTER CreateSessionAsync
  succeeds, clear on failure
- #3 Prompt injection: remove autonomous PR-creation instructions, change
  to report-only mode ("Do NOT autonomously create branches or PRs")

MODERATE fixes:
- #4 Lifecycle: implement IAsyncDisposable, add StopAsync() that awaits
  _analysisLoop with 5s timeout, nulls _analyzerSessionName
- #5 (Feature activation deferred to UI integration PR)
- #6 Model slug: fix "claude-sonnet-4-5" → "claude-sonnet-4.5"
- #7 Timeout: wrap SendPromptAsync in 10-minute linked CancellationToken
- #8 Interval validation: clamp to Math.Max(1, value) in settings setter
  and in StartAsync
- #9 TailFile: use Queue<string> ring buffer instead of List, cap file
  read to MaxLogFileSizeBytes (10 MB)

OTHER fixes:
- #10 Remove TestHelpers class, use private CreateService() method
- Thread safety: use Interlocked for AnalysisCount and LastAnalysisAt
- Torn reads: snapshot GetAllSessions() with .ToList()
- 14 tests (up from 8): new tests for TailFile, interval clamping,
  DisposeAsync, RunSingleAnalysis null guard, report-only prompt

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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