Harden Share popover, wire up address-book edit/delete and archived-stream cleanup (#685, #687-#689) - #703
Open
Johnero542 wants to merge 1 commit into
Conversation
…tream cleanup - Replace the custom Share popover on the stream detail page with the app's Base-UI-backed DropdownMenu, giving it click-outside, Escape, aria-expanded/aria-haspopup, and focus return to the trigger for free (FlowwStar#685). - Wire up deleteAddressBookEntry()/updateAddressBookEntry() in the create-stream form: "Recent recipients" pills now have rename and remove controls, with a rename dialog (FlowwStar#687). - Add lib/contract.ts wrappers for the contract's get_archived_sent_streams/get_archived_received_streams, a new useArchivedStreams() hook, and an "Archived" tab on the streams page (FlowwStar#688). - Add lib/contract.ts's cleanupStream() wrapper, wire it into useContract(), and add a "Remove from history" action + confirmation dialog on the stream detail page and on each archived-stream row (FlowwStar#689). Along the way, fixed pre-existing breakage blocking this work: - contracts/streaming/src/lib.rs: get_archived_sent_streams/ get_archived_received_streams had dead, syntactically-invalid leftover pagination code after an incomplete refactor to a shared paginate() helper — removed the dead code so the contract compiles. - hooks/use-streams.ts: useStreams() had two competing implementations merged together (duplicate pollIntervalRef declarations, duplicate early-return blocks, two conflicting return statements) — reconciled into one implementation keeping both real features (offline-cache fallback and the tab-refocus "Refreshing…" indicator). - app/app/streams/page.tsx: similarly had duplicate imports, duplicate state/JSX blocks, and malformed JSX with content after the root element's closing tag — reconstructed into one coherent page and added the Archived tab to it. Closes FlowwStar#685 Closes FlowwStar#687 Closes FlowwStar#688 Closes FlowwStar#689
|
@Johnero542 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DropdownMenu(already used elsewhere, e.g.download-receipt-button.tsx) — gets click-outside, Escape,aria-expanded/aria-haspopup, and focus return to the trigger for free.deleteAddressBookEntry()/updateAddressBookEntry()were implemented but never called. "Recent recipients" pills in the create-stream form now have a rename (pencil, opens a small dialog) and remove (X) control each.fetchArchivedSentStreamIds/fetchArchivedReceivedStreamIdswrappers inlib/contract.ts, a newuseArchivedStreams()hook, and an "Archived" tab on the streams page listing terminal (cancelled/fully-withdrawn) streams.cleanupStream()wrapper, wired intouseContract().cleanup, plus a "Remove from history" action with a confirmation dialog — on the stream detail page's action bar (for eligible streams) and on each row of the new Archived tab.Pre-existing breakage fixed along the way (all directly blocked this batch):
contracts/streaming/src/lib.rs:get_archived_sent_streams/get_archived_received_streamshad dead, syntactically-invalid leftover code after an incomplete refactor to a sharedpaginate()helper (a bare expression followed by another with no;— doesn't compile). Removed the dead code.hooks/use-streams.ts:useStreams()had two competing implementations merged together — duplicatepollIntervalRefdeclarations (hardSyntaxError), duplicate early-return blocks, two conflictingreturnstatements. Reconciled into one implementation that keeps both real features (offline-cache fallback withstale/lastUpdated, and the tab-refocusisRefreshingAfterHiddenindicator).app/app/streams/page.tsx: same shape of corruption — duplicate imports, duplicate state/JSX blocks, and malformed JSX with content after the root element's closing tag. Reconstructed into one coherent page (kept the more complete feature set: virtualized list, timeline view, hidden-streams toggle, bulk actions) and added the Archived tab to it.Closes #685
Closes #687
Closes #688
Closes #689