Part of #60. Depends on #61.
What
Replace direct IHttpContextAccessor / HttpContext usage in shared code with platform-neutral abstractions. Two concrete implementations: one for web (reads from HttpContext), one for desktop (returns hardcoded local user).
Scope
TenantContext — replace IHttpContextAccessor with a scoped ICurrentUser interface
- Attachment serving — wrap the
/attachments/{id} HTTP endpoint behind an IAttachmentProvider so the desktop target can serve files directly without an HTTP request
Acceptance criteria
Notes
Safe to merge independently. Improves the web app regardless of whether the desktop app ships.
Part of #60. Depends on #61.
What
Replace direct
IHttpContextAccessor/HttpContextusage in shared code with platform-neutral abstractions. Two concrete implementations: one for web (reads fromHttpContext), one for desktop (returns hardcoded local user).Scope
TenantContext— replaceIHttpContextAccessorwith a scopedICurrentUserinterface/attachments/{id}HTTP endpoint behind anIAttachmentProviderso the desktop target can serve files directly without an HTTP requestAcceptance criteria
ICurrentUserinterface introduced; web implementation resolves fromHttpContext, desktop implementation returns local userIAttachmentProviderintroduced; web implementation proxies the existing HTTP endpoint, desktop implementation returns stream directlyIHttpContextAccessorreferences remain inKoalaBooks.Componentsor shared service projectsNotes
Safe to merge independently. Improves the web app regardless of whether the desktop app ships.