forked from Furumi/furumi-tui
Wait for in-flight revocations and track them with federation off
Share-off and unsubscribe now take a revocation ticket on the UI thread before the write starts and ask for the immediate pass from the blocking task once the write succeeded, so quitting right after Shift+F (before the write's event was handled) still waits for the tombstone. With the federation off or not started yet, a podcast that was shared counts as possibly not revoked: the reconciler keeps it in the Off reports until the overlay runs, the side panel says the card may not be revoked yet, and the quit-time flush logs a warning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d6962eba47
commit
adfe809a40
7 files changed
+312
-66
No files matched your search
+3
-2
@@ -228,7 +228,7 @@ mod tests {
|
||||
state
|
||||
.podcasts
|
||||
.publication
|
||||
.note_revocation(&podcast_fixtures::podcast_id());
|
||||
.note_revocation(&podcast_fixtures::podcast_id(), true);
|
||||
let screen = render(&state, 110, 30);
|
||||
assert!(screen.contains("private · revoking the"), "{screen}");
|
||||
if let Some(crate::app::state::Loadable::Ready(rows)) = &mut state.podcasts.list {
|
||||
@@ -239,7 +239,8 @@ mod tests {
|
||||
assert!(!screen.contains("private (not shared"), "{screen}");
|
||||
state.podcasts.publication.discovery = Discovery::Off("federation is off".into());
|
||||
let screen = render(&state, 110, 30);
|
||||
assert!(screen.contains("not revoked yet:"), "{screen}");
|
||||
assert!(screen.contains("may not be revoked yet:"), "{screen}");
|
||||
assert!(screen.contains("federation is off"), "{screen}");
|
||||
state.podcasts.publication.unrevoked.clear();
|
||||
let screen = render(&state, 110, 30);
|
||||
assert!(screen.contains("private (not shared"), "{screen}");
|
||||
|
||||
+1
-1
@@ -323,7 +323,7 @@ pub(crate) fn share_status_line(state: &AppState, podcast: &PodcastRow) -> Line<
|
||||
}
|
||||
if let Discovery::Off(_) = report.discovery {
|
||||
return Line::styled(
|
||||
"private · public card not revoked yet: federation is off",
|
||||
"private · public card may not be revoked yet: federation is off",
|
||||
Style::new().fg(Color::Yellow),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user