Skip to content

[ADR-162] Working PR for client application support to use backend layout services#142

Draft
jodavis wants to merge 14 commits intofeature/ADR-161-cusrtomization-servicefrom
feature/ADR-162-client-side-layout-updates
Draft

[ADR-162] Working PR for client application support to use backend layout services#142
jodavis wants to merge 14 commits intofeature/ADR-161-cusrtomization-servicefrom
feature/ADR-162-client-side-layout-updates

Conversation

@jodavis
Copy link
Copy Markdown
Owner

@jodavis jodavis commented Apr 14, 2026

No description provided.

@jodavis jodavis changed the base branch from main to feature/ADR-161-cusrtomization-service April 19, 2026 04:53
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 19, 2026

Test Results

540 tests  +106   540 ✅ +106   7m 18s ⏱️ + 4m 51s
  8 suites ±  0     0 💤 ±  0 
  8 files   ±  0     0 ❌ ±  0 

Results for commit 14b0839. ± Comparison against base commit 799c155.

♻️ This comment has been updated with latest results.

@jodavis jodavis force-pushed the feature/ADR-161-cusrtomization-service branch 2 times, most recently from 9a1ea3f to af07885 Compare April 21, 2026 03:35
@jodavis jodavis force-pushed the feature/ADR-162-client-side-layout-updates branch from 49676e4 to b7b6252 Compare April 21, 2026 03:36
@jodavis jodavis force-pushed the feature/ADR-161-cusrtomization-service branch from 36433d8 to 4eb619e Compare April 23, 2026 18:16
@jodavis jodavis force-pushed the feature/ADR-162-client-side-layout-updates branch from 4420601 to 0f92d75 Compare April 23, 2026 18:16
@jodavis jodavis force-pushed the feature/ADR-161-cusrtomization-service branch from 4eb619e to 106f115 Compare April 23, 2026 20:49
@jodavis jodavis force-pushed the feature/ADR-162-client-side-layout-updates branch from 0f92d75 to 3831e42 Compare April 23, 2026 20:56
@jodavis jodavis force-pushed the feature/ADR-161-cusrtomization-service branch from 106f115 to 5ff955c Compare April 29, 2026 03:26
@jodavis jodavis force-pushed the feature/ADR-162-client-side-layout-updates branch from 3831e42 to 01cfce2 Compare April 29, 2026 03:27
ElwoodMoves and others added 9 commits April 29, 2026 16:06
* Implement ADR-176: CSS extraction and stub IDynamicStylesheetProvider

- Define IDynamicStylesheetProvider interface in Services/Layout/
- Extract #ROOT grid CSS from app.css into layout-grid.css embedded resource
- Implement LayoutStylesheetProvider v1 returning the static grid CSS
- Wire Remote.razor to inject <style> block via IDynamicStylesheetProvider
- Remove grid CSS from app.css and app.min.css
- Register LayoutStylesheetProvider as IDynamicStylesheetProvider (scoped)
- Add unit test: LayoutStylesheetProvider.GetCss() returns non-null content

https://claude.ai/code/session_01TEWzyYT1ytqqG5a26XDwHc

* Address ADR-176 review feedback with LESS cleanup and layout E2E assertions

Agent-Logs-Url: https://github.com/jodavis/AdaptiveRemote/sessions/aad88066-aa85-4c6c-aca5-4fde8c3cf6a2

Co-authored-by: jodavis <6740581+jodavis@users.noreply.github.com>

* Address validation feedback in layout CSS E2E assertions

Agent-Logs-Url: https://github.com/jodavis/AdaptiveRemote/sessions/aad88066-aa85-4c6c-aca5-4fde8c3cf6a2

Co-authored-by: jodavis <6740581+jodavis@users.noreply.github.com>

* Clarify sync behavior in stylesheet test-service extensions

Agent-Logs-Url: https://github.com/jodavis/AdaptiveRemote/sessions/aad88066-aa85-4c6c-aca5-4fde8c3cf6a2

Co-authored-by: jodavis <6740581+jodavis@users.noreply.github.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jodavis <6740581+jodavis@users.noreply.github.com>
…r more buttons, and don't shut down or restart the application.
…leAsync (#153)

* [ADR-179] ApplicationLifecycle recycle loop and BlazorAppScope.RecycleAsync

Implements the scope recycle loop in ApplicationLifecycle.ExecuteAsync:
- IApplicationRecycleSignal / ApplicationRecycleSignal: new cross-service
  interface backed by a CancellationTokenSource; RequestRecycle() cancels it,
  Token is linked into the scope work item, Reset() creates a fresh CTS
- ExecuteAsync refactored to a while loop; linked token from stoppingToken +
  signal.Token passed into InvokeInScopeAsync each iteration
- Steady-state path: signal fires during Task.Delay(Infinite) → OCE → cleanup
  → log RecyclingScope → RecycleScopeAsync() → signal.Reset() → loop
- Init-phase path: signal fires during InitializeAllAsync → cancel → cleanup
  → signal.Reset() → loop without RecycleScopeAsync (scope TCS still valid)
- IPreScopeInitializer services awaited only before the first scope (before
  the while loop), not re-awaited on recycles
- BlazorAppScope.RecycleAsync: now calls IJSRuntime.InvokeVoidAsync("location.reload")
- Registered IApplicationRecycleSignal as singleton in DI
- Added EventId 712 ApplicationLifecycle_RecyclingScope log message
- Added 5 unit tests covering both recycle paths, loop continuation,
  pre-initializer not re-awaited, and signal.Reset() called after recycle
- Updated _doc_Lifecycle.md: removed "Future Plans" stub, documented the
  implemented recycle loop, signal, and two recycle paths

https://claude.ai/code/session_01VENkux7qyWvUsKWEzgNC3s

* Add sandbox setup script and update E2E test docs for Playwright browsers

Claude Code cloud sandbox environments block cdn.playwright.dev, so the
standard `playwright.ps1 install` fails. Browsers are pre-installed at
/opt/pw-browsers but under a different revision (1194) than the current
Playwright package expects (1208).

- scripts/setup-playwright-sandbox.sh: auto-detects the expected version
  from the Playwright registry JS, finds the highest installed version in
  /opt/pw-browsers, and creates symlinks + INSTALLATION_COMPLETE markers
- CLAUDE.md: updated E2E test instructions to document both the developer
  machine path and the sandbox workaround, with PLAYWRIGHT_BROWSERS_PATH

https://claude.ai/code/session_01VENkux7qyWvUsKWEzgNC3s

* Address PR review comments: refactor recycle loop, fix thread safety, add tests

- ApplicationLifecycle.ExecuteAsync: replace Task.Delay(Timeout.Infinite) / exception-based
  control flow with WaitForCancelledAsync (returns normally, no OCE for steady-state transitions)
- Add ScopeReady log message (EventId 713); ScopeReleased now only logged on init/construction failure
- Cleanup now runs inside the loop before ShuttingDown, rather than after the loop
- BlazorAppScope.RecycleAsync: use GetRequiredService<IJSRuntime>(); remove unused using
- ApplicationRecycleSignal: full lock-based thread safety; implement IDisposable
- IApplicationRecycleSignal: add XML doc comments to all interface methods
- HostBuilderExtensions: restore missing using AdaptiveRemote.Services.CloudAssets
- CLAUDE.md: update cloud sandbox E2E guidance — don't fall back to setup script; report broken environment
- _doc_Lifecycle.md: update recycle loop description to match current WaitForCancelledAsync design
- ApplicationLifecycleTests: fix 3 tests for new log ordering; add 6 recycle scenario tests
  (second signal during cleanup, blocks until cleanup, delay during init after recycle,
   error during cleanup continues recycle, error during init exits loop, signal during pre-init is no-op)

https://claude.ai/code/session_01VENkux7qyWvUsKWEzgNC3s

* Improve ApplicationLifecycle unit tests, behavior, and logging.

* Delete the playwright workaround script since it shouldn't be necessary

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Joe Davis <ElwoodMoves@hotmail.com>
@jodavis jodavis force-pushed the feature/ADR-162-client-side-layout-updates branch from 01cfce2 to 9933634 Compare April 29, 2026 23:07
jodavis and others added 2 commits April 29, 2026 23:09
…nd refresh, and file-watch loop (#159)

* [ADR-181] Real CloudAssetOrchestrator with cache-first load, background refresh, and file-watch loop

Replaces the stub CloudAssetOrchestrator with a three-phase implementation:

- Phase 1: cache-first parallel load — reads from {CachePath}/{name}.cache if present,
  otherwise downloads from server and saves to cache; signals IPreScopeInitializer once
  all assets are in the store (or faults on failure).
- Phase 2: background server refresh — for cache-loaded assets, compares SHA-256 of
  server bytes against cached bytes; updates store/cache and schedules an idle-deferred
  scope recycle when content differs.
- Phase 3: file-change loop — waits on IAssetChangeNotifier.WaitForChangeAsync; on each
  notification re-downloads all assets, updates cache/store, and schedules a recycle.

New components:
- CloudAssetCache: IFileSystem-backed implementation of ICloudAssetCache
- IAssetChangeNotifier: decoupled notification contract for Phase 3
- FileSystemCloudAssetWatchService: debounced FileSystemWatcher (100 ms cancel-restart)
  implementing IAssetChangeNotifier as a singleton BackgroundService
- Log messages 1702-1706 (LoadedFromCache, AssetUpToDate, AssetUpdated,
  BackgroundFetchFailed, FileChangeDetected)

Phase 1 failure sets the lifecycle FatalError state via the faulted WaitAsync and returns
cleanly rather than re-throwing, preventing BackgroundServiceExceptionBehavior.StopHost
from killing the process before the FatalError UI state can be observed by tests.

E2E test infrastructure:
- primary-layout.json / updated-layout.json fixtures (Guide absent/present in WELL group)
- Cloud paths configured once per test run in BeforeTestRun; @cloud-layout scenarios
  stop the host in AfterScenario to prevent state leakage
- ApplicationTestService resolves IRemoteDefinitionService lazily so GetCurrentPhaseAsync
  works in FatalError state where the layout asset is absent

https://claude.ai/code/session_018JQNh2RgmSxxNxzH9FM2o3

* Renames and namespace reorganization

* Refactor CloudAssetOrchestrator for better code reuse and behavior consistency.
- Added a few more logging messages
- Changed the output of ICloudAssetChangeNotifier to be an ICloudAsset
- Fixed unit tests to expect the new, consistent behavior

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Joe Davis <ElwoodMoves@hotmail.com>
@jodavis
Copy link
Copy Markdown
Owner Author

jodavis commented May 2, 2026

@copilot Update the OpenTelemetry packages in this repo to a version that doesn't have security vulnerabilities.

Copy link
Copy Markdown
Contributor

Copilot AI commented May 2, 2026

@jodavis I'm unable to start working on this because of repository rules that prevent me from pushing to the branch:

  • Changes must be made through a pull request due to repository rules

See the documentation for more details.

@jodavis
Copy link
Copy Markdown
Owner Author

jodavis commented May 2, 2026

@copilot I meant update the versions of OpenTelemetry in this branch to versions that don't have security vulnerabilities

Copy link
Copy Markdown
Contributor

Copilot AI commented May 2, 2026

@jodavis I'm unable to start working on this because of repository rules that prevent me from pushing to the branch:

  • Changes must be made through a pull request due to repository rules

See the documentation for more details.

@jodavis
Copy link
Copy Markdown
Owner Author

jodavis commented May 2, 2026

@copilot create s pull request that fixes build errors in this PR.

Copy link
Copy Markdown
Contributor

Copilot AI commented May 2, 2026

@jodavis I've opened a new pull request, #172, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 3 commits May 2, 2026 18:54
- cssId values were not uppercase, so they didn't match the selector IDs
- a lot of CSS content was missing from cssDefinitions
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.

5 participants