feat(microblog): add app token settings page and honest 5xx wording

The app token could only be entered in the publish sheet, and that
field came back only after a 401/403, so a saved token had no standing
way to be replaced or removed. The new Settings → Micro.blog page
writes the same `MicropubTokenStore` slot the sheet reads, with a
status row read back from the Keychain after every write so a locked
keychain fails visibly instead of claiming "stored". The sheet now
names the stored token a send carries when its field is hidden.

Micro.blog's errors arrive as HTML pages, never Micropub JSON, so
`decodeFailure` fell through to a bare `HTTP 503` that said nothing
about whose side it was on. Any 5xx without a JSON description now
reads "unavailable on their side — retry in a few minutes"; a
described 5xx keeps its description and a 4xx keeps the bare status.
One decode covers create, publish, q=config, and media uploads.

Docs: AGENTS.md bullets, CHANGELOG [Unreleased] Added/Fixed, and the
devlog for this task plus the 0.1.2 release log.
This commit is contained in:
AlexKucera committed 2026-12-04 15:06:00 +01:00
1 parent 9aa0314564
commit 6938826101
11 files changed
+272 -14

No files matched your search

+9 -4
View File
@@ -5,9 +5,9 @@
// #17 (S1.1): Settings — the Museion Home path, repoint-only (ADR-0004).
// #135 (Profiles S2): reworked to the #130 prototype's variant C verdict —
// a Settings sidebar + detail column (System Settings shape): destinations
// Content · Pass 1 · Pass 2 · Chat · Provider Keys. Content keeps the #17
// Home control unchanged; the surface and keys pages live in
// SettingsPagesView.swift.
// Content · Pass 1 · Pass 2 · Chat · Provider Keys · Micro.blog. Content
// keeps the #17 Home control unchanged; the surface, keys, and Micro.blog
// pages live in SettingsPagesView.swift.
// #136 (Profiles S3): the model runs over HermesSettingsWriter (the real
// CLI/.env rail) and hydrates from the profiles at pane open.
//
@@ -109,6 +109,8 @@ struct SettingsPaneView: View {
SurfaceSettingsPage(model: model, surface: .chat)
case .keys:
ProviderKeysPage(model: model)
case .microblog:
MicroblogSettingsPage()
}
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
@@ -116,13 +118,15 @@ struct SettingsPaneView: View {
}
/// The sidebar's destinations (#135): the #17 Content control, one page per
/// LLM surface (Sessions rides Chat — #126), and the provider keys.
/// LLM surface (Sessions rides Chat — #126), the provider keys, and the
/// Micro.blog app token (the one Keychain credential, ADR-0014).
enum SettingsPage: String, CaseIterable, Identifiable, Hashable {
case content
case pass1
case pass2
case chat
case keys
case microblog
var id: String {
rawValue
@@ -135,6 +139,7 @@ enum SettingsPage: String, CaseIterable, Identifiable, Hashable {
case .pass2: "Pass 2"
case .chat: "Chat"
case .keys: "Provider Keys"
case .microblog: "Micro.blog"
}
}