73 lines
4.8 KiB
Markdown
73 lines
4.8 KiB
Markdown
# HANDOFF — session state
|
|
|
|
> Current operational state, read right after `TASKS.md`. Trust this file as the
|
|
> truth of what is in flight — do not re-derive from git/fs unless it points at
|
|
> a problem. Conventions: [`schema.md`](schema.md). Rewrite this file at session
|
|
> end, compaction, or any interruption.
|
|
|
|
## Session state (last updated: 2026-08-12)
|
|
|
|
- **Branch:** `main` (work UNCOMMITTED — see dirty list). Includes the previous
|
|
session's socials v2 fixes + this session's fediverse-service-icon work.
|
|
- **Finished this session (round 3):** user's live-test report said the mastodon
|
|
icon still didn't show for `@gramps@llamachile.tube`. Root cause: the identity
|
|
domain `llamachile.tube` is YunoHost-SSO-gated — `/.well-known/nodeinfo`,
|
|
`/@gramps`, and webfinger all answer with the SSO login page, so nodeinfo
|
|
returned nothing and the icon fell back to the honeycomb glyph. The real
|
|
instance lives at `mastodon.llamachile.tube`, and only the bare root
|
|
`https://llamachile.tube/` 302s to it ("default app" redirect). Fix:
|
|
`HttpSocialValidator.TryFetchFediverseSoftwareAsync` now, when nodeinfo on the
|
|
identity domain fails, follows the root redirect (`ResolveInstanceHostAsync`,
|
|
reads `resp.RequestMessage.RequestUri.Host`) and re-runs the nodeinfo lookup
|
|
on the resolved host. New test `FediverseHandle_RootRedirectToSubdomain_ResolvesSoftware`.
|
|
Build: **0 warnings**. Tests: **111 passing**.
|
|
- **What landed (all rounds this session):**
|
|
1. **Fediverse icon resolution** — `DetectService` maps `@user@domain` to the
|
|
new `SocialService.Fediverse` (was `Link`/chain icon). On validate,
|
|
`HttpSocialValidator` best-effort GETs `https://{domain}/.well-known/nodeinfo`,
|
|
follows the first nodeinfo `links[].href`, reads `software.name`, and returns
|
|
it in `SocialLookupResult.FediverseSoftware`. `SocialEntry`/`SocialSlotViewModel`
|
|
carry `FediverseSoftware`; `SocialServiceIcons.LogoDataForFediverse(software)`
|
|
maps it to a bundled logo (mastodon/peertube/pixelfed/misskey/lemmy/pleroma/
|
|
firefish — Simple Icons CC0), falling back to the `FediverseIconData`
|
|
honeycomb glyph for unknown software (GoToSocial/Sharkey/Akkoma aren't in
|
|
Simple Icons). Nodeinfo failure still validates — the glyph falls back.
|
|
2. **Redirect resolution (round 3)** — identity domains that 302 their root
|
|
to the real instance (YunoHost default-app subdomains) resolve software via
|
|
the root redirect when identity-domain nodeinfo is SSO-blocked.
|
|
3. **Persistence** — new `SocialEntry.Software TEXT` column via
|
|
`MigrateSocialEntryTable()` (column-presence pattern, same as the others);
|
|
saved/loaded alongside Service/Handle/ProfileUrl.
|
|
4. **Icon colors** — `IconButton` style gains `Foreground="#d0d0d0"`
|
|
(`Themes/Controls.xaml`); the dialog's trash button overrides
|
|
`Foreground="#e94560"` (`SocialsDialog.xaml`). All other `IconButton`
|
|
usages are `Path` content with explicit `Fill`, so unaffected.
|
|
- **Landmines:**
|
|
- `LayoutStore.Socials` is only populated by `Load()` — tests must call
|
|
`store.Load()` before asserting it.
|
|
- `DetectService("justaname")` → **Website** with empty handle; only
|
|
unparseable input or `@user@domain` yields Link/Fediverse.
|
|
- Dialog sign-in provider is `Func<Task<YouTubeChannel?>>`; test fakes must
|
|
return `Task.FromResult` (sync-completed) so the fire-and-forget command
|
|
settles before the next assert.
|
|
- `SocialBarBottomTop = 1040` literal lives in `MainWindow.xaml.cs` (the VM's
|
|
`MasterFrameHeight` is private).
|
|
- `Cancel_AbortsInFlightValidation_WithoutMutatingSlot` relies on the
|
|
BlockingValidator's gate completing synchronously (no
|
|
`RunContinuationsAsynchronously`) — the assertions run after
|
|
`Gate.TrySetResult` returns because the awaited continuation executes inline.
|
|
- Nodeinfo cancellation test cancels mid-lookup via a counting stub; the
|
|
post-fetch `ct.IsCancellationRequested` check is what reports `Canceled`.
|
|
- Round-3 redirect fallback fires only when identity-domain nodeinfo fails;
|
|
the root follow happens automatically (HttpClient default auto-redirect),
|
|
and `RequestMessage.RequestUri.Host` is read from the final response.
|
|
- **Next step:** show the user the fixes and let them decide whether to commit.
|
|
Nothing queued beyond that — do not expand the task queue on your own.
|
|
(`ytLive.Tests`/`bin` + `/obj` are dirty build artifacts, not hand-authored.)
|
|
|
|
- **Secret/DB/port facts live:** OAuth client id/secret in `Helpers/OAuthCredentials.cs`;
|
|
OAuth session token in `Helpers/TokenStore.cs` (DPAPI → `%APPDATA%\ytLlive\ytLlive.auth`);
|
|
layout DB `%APPDATA%\ytLlive\ytLlive.db` (schema v8; the new `SocialEntry.Software`
|
|
column is a column-presence migration like the others, no version bump); OAuth callback
|
|
`http://localhost:8765/oauth2/callback`; crash log `%APPDATA%\ytLlive\startup.log`.
|