feat(tui): wire Sharing overlay to PluginBridge #106
No reviewers
Labels
No labels
area:agents
area:ai
area:config
area:dashboard
area:design
area:design-review
area:devtools
area:entities
area:gallery
area:generate
area:image
area:infra
area:meta
area:model-browser
area:navigation
area:presets
area:security
area:sessions
area:settings
area:sharing
area:test
area:ux
area:webhook
area:workdir
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/loom!106
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "tui/sharing-wire-93"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
PluginBridge.share_image()for each enabled platform (Mastodon, Pixelfed, Bluesky, CivitAI)SharingOverlayimplementing theOverlaytrait with full form UI: platform toggle checkboxes, caption text input, visibility cycling, and submit buttontokio::spawn, with per-platform outcome status (pending/success/error) routed back throughAppAction::ShareOutcomeOverlayKind::Shareand wire it into the app's overlay stackTest plan
cargo clippy -p loom-tui -- -D warningscleancargo test -p loom-tuipasses (120 tests including new sharing tests)Closes charles/loom#93
🤖 Generated with Claude Code
Review — PR #106: Sharing overlay wired to PluginBridge
Full-featured sharing form. Focus navigation, per-platform status, async dispatch — all clean.
Concern:
as_sharing_mutdowncasting onOverlaytraitAdding a concrete-type accessor to the trait object is a code smell — it means the trait knows about one of its implementors. This works for now with few overlay types, but consider using
as_any_mut() -> &mut dyn Any(like PR #109 does) instead. Then the routing code downcasts viaAny, and the trait stays generic.Concern: no credential check before submit
The overlay dispatches
share_imagefor all enabled platforms even ifcredential_missingis set. The plugin bridge call will presumably fail with an auth error, but the user gets a confusing "pending → error" flow instead of an upfront "no credentials configured" warning. Consider checkingcredential_missinginsubmit()and settingShareOutcome::Error("no credentials")immediately for those platforms.Cross-PR: duplicated
centered_rectSame helper as PRs #103 and #109. Extract to shared utility.
Nit
Pixelfedreusesmastodonasplugin_id— correct since Pixelfed speaks Mastodon API, but a comment explaining this would help future readers.serde_jsondependency added. This is fine — it's already a transitive dep.Good test coverage.
3ba3ee660dtoc2b8022a5dc2b8022a5dto6aba79bea0