feat: add deep link customization #169

Closed
bhavishy2801 wants to merge 2 commits from (deleted):dev into dev
Contributor

Summary

Implements deep-link customization support for community onboarding and sharing workflows.
This PR adds a dedicated intent flow so organizers can share links that preconfigure Flotilla while users still explicitly review and approve requested changes.
Addresses #105.

What’s Included

  • Deep link: add community relays to user settings
  • Deep link: add blossom servers
  • Deep link: add follows
  • Deep link: update profile metadata
  • Deep link: join multiple communities
  • Deep link: configure app theme
  • Deep link: open a prefilled new post dialog in room context

New Flow

  • Added /intent route as a deep-link entry point.
  • Added IntentHandler modal to parse query params and present a confirmation summary before applying.
  • Added support for prefilled thread content via ThreadCreate (initialContent) for share links.

UX / Error Handling (Mentor-aligned)

Updated behavior for relay failures (blocked/rate-limited/network issues):

  • Execute requested actions in best-effort mode.
  • Collect and display per-action errors in the same dialog.
  • Let users choose:
    • Abort
    • Continue with successful actions only

This matches the requested behavior: show errors and allow users to proceed even if some relays fail.

Dialog/Navigation Fixes

  • Removed extra in-dialog left-arrow from intent UI.
  • Kept expected controls: close X, Cancel/Abort, Accept/Continue.
  • Fixed route-based dialog close behavior:
    • Dialog close button now uses onClose handler (instead of always clearing hash modals).
    • Intent/join dialogs now correctly navigate to /home on close.

Scroll/Layout Fixes

  • Restored settings-page scrolling while preserving original sidebar geometry/alignment.
  • Avoided introducing layout wrappers that altered settings sidebar width/position.

Stability Fixes

  • Fixed Svelte keyed list crash (each_key_duplicate) seen in People-related view after follow updates by deduplicating pubkeys before keyed rendering:
    • dedupe in bootstrap pubkeys
    • dedupe in People search/fallback list source

Files Changed (high level)

  • src/routes/intent/+page.svelte
  • src/app/components/IntentHandler.svelte
  • src/app/components/ThreadCreate.svelte
  • src/lib/components/Dialog.svelte
  • src/routes/join/+page.svelte
  • src/routes/settings/+layout.svelte
  • src/app/core/state.ts
  • src/routes/people/+page.svelte

Validation

  • Type/lint/prettier issues addressed on touched files.
  • Verified in GUI:
    • intent dialog opens and applies actions
    • close X works
    • settings tabs scroll correctly
    • relay/profile/join failures surface in dialog with Abort/Continue
    • follow flow no longer crashes keyed rendering

Test Links Used

  • Theme:
    • http://localhost:1847/intent?theme=light
  • Relay:
    • http://localhost:1847/intent?add_relay=wss://relay.damus.io
  • Blossom:
    • http://localhost:1847/intent?add_blossom=https://blossom.example.com
  • Follow:
    • http://localhost:1847/intent?add_follow=79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798
  • Profile:
    • http://localhost:1847/intent?profile_name=TestName&profile_about=Hi!%20This%20is%20test%20about&profile_nip05=testxyz@gmail.com&profile_lud16=test@getalby.com
  • Join (multi):
    • http://localhost:1847/intent?join=wss://bucket.coracle.social&join=wss://inner.sebastix.social
  • Share compose:
    • http://localhost:1847/intent?share_url=wss://flotilla.space&share_h=general&share_text=Hello%20from%20deep%20link
  • Combined:
    • http://localhost:1847/intent?theme=dark&add_relay=wss://relay.damus.io&add_blossom=https://blossom.example.com&add_follow=79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798&profile_name=Organizer%20Mode&profile_about=Customized%20via%20deep%20link&profile_nip05=organizer@example.com&profile_lud16=organizer@getalby.com&join=wss://flotilla.space&share_url=wss://flotilla.space&share_h=general&share_text=Hello%20from%20organizer%20mode

Videos

  • Theme: Changing to Light Theme

  • Adding Relay to User Settings

  • Adding Blossom Server

  • Add Follows

  • Update Profile Metadata

  • Joining Communities

  • Opening New Post with Prefilled Content

## Summary Implements deep-link customization support for community onboarding and sharing workflows. This PR adds a dedicated intent flow so organizers can share links that preconfigure Flotilla while users still explicitly review and approve requested changes. Addresses #105. ## What’s Included - Deep link: add community relays to user settings - Deep link: add blossom servers - Deep link: add follows - Deep link: update profile metadata - Deep link: join multiple communities - Deep link: configure app theme - Deep link: open a prefilled new post dialog in room context ## New Flow - Added `/intent` route as a deep-link entry point. - Added `IntentHandler` modal to parse query params and present a confirmation summary before applying. - Added support for prefilled thread content via `ThreadCreate` (`initialContent`) for share links. ## UX / Error Handling (Mentor-aligned) Updated behavior for relay failures (blocked/rate-limited/network issues): - Execute requested actions in best-effort mode. - Collect and display per-action errors in the same dialog. - Let users choose: - **Abort** - **Continue** with successful actions only This matches the requested behavior: show errors and allow users to proceed even if some relays fail. ## Dialog/Navigation Fixes - Removed extra in-dialog left-arrow from intent UI. - Kept expected controls: close **X**, **Cancel/Abort**, **Accept/Continue**. - Fixed route-based dialog close behavior: - `Dialog` close button now uses `onClose` handler (instead of always clearing hash modals). - Intent/join dialogs now correctly navigate to `/home` on close. ## Scroll/Layout Fixes - Restored settings-page scrolling while preserving original sidebar geometry/alignment. - Avoided introducing layout wrappers that altered settings sidebar width/position. ## Stability Fixes - Fixed Svelte keyed list crash (`each_key_duplicate`) seen in People-related view after follow updates by deduplicating pubkeys before keyed rendering: - dedupe in bootstrap pubkeys - dedupe in People search/fallback list source ## Files Changed (high level) - `src/routes/intent/+page.svelte` - `src/app/components/IntentHandler.svelte` - `src/app/components/ThreadCreate.svelte` - `src/lib/components/Dialog.svelte` - `src/routes/join/+page.svelte` - `src/routes/settings/+layout.svelte` - `src/app/core/state.ts` - `src/routes/people/+page.svelte` ## Validation - Type/lint/prettier issues addressed on touched files. - Verified in GUI: - intent dialog opens and applies actions - close X works - settings tabs scroll correctly - relay/profile/join failures surface in dialog with Abort/Continue - follow flow no longer crashes keyed rendering ## Test Links Used - Theme: - `http://localhost:1847/intent?theme=light` - Relay: - `http://localhost:1847/intent?add_relay=wss://relay.damus.io` - Blossom: - `http://localhost:1847/intent?add_blossom=https://blossom.example.com` - Follow: - `http://localhost:1847/intent?add_follow=79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798` - Profile: - `http://localhost:1847/intent?profile_name=TestName&profile_about=Hi!%20This%20is%20test%20about&profile_nip05=testxyz@gmail.com&profile_lud16=test@getalby.com` - Join (multi): - `http://localhost:1847/intent?join=wss://bucket.coracle.social&join=wss://inner.sebastix.social` - Share compose: - `http://localhost:1847/intent?share_url=wss://flotilla.space&share_h=general&share_text=Hello%20from%20deep%20link` - Combined: - `http://localhost:1847/intent?theme=dark&add_relay=wss://relay.damus.io&add_blossom=https://blossom.example.com&add_follow=79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798&profile_name=Organizer%20Mode&profile_about=Customized%20via%20deep%20link&profile_nip05=organizer@example.com&profile_lud16=organizer@getalby.com&join=wss://flotilla.space&share_url=wss://flotilla.space&share_h=general&share_text=Hello%20from%20organizer%20mode` ## Videos - #### Theme: Changing to Light Theme <video src="attachments/ecaeaa40-c03b-4abb-99d4-1e05f453ee1d" title="DeepLink_Theme_Light.mp4" controls></video> - #### Adding Relay to User Settings <video src="attachments/83577a51-5302-4bf7-be6e-a5c15b569152" title="DeepLink_Add_Relay.mp4" controls></video> - #### Adding Blossom Server <video src="attachments/13213f07-1717-4c95-be0c-922d935667d3" title="DeepLink_Add_Blossom_Server.mp4" controls></video> - #### Add Follows <video src="attachments/9957e547-169c-4c7b-b949-b54c0486fdd6" title="DeepLink_Add_Follows.mp4" controls></video> - #### Update Profile Metadata <video src="attachments/5d7673c7-9020-446d-8ca1-09b99072ea8c" title="DeepLink_Update_Profile_Metadata.mp4" controls></video> - #### Joining Communities <video src="attachments/9fbb09db-bd3e-47e6-ade0-8393bc047322" title="DeepLink_Join_Communities.mp4" controls></video> - #### Opening New Post with Prefilled Content <video src="attachments/c9cb7535-9c25-474b-810b-7e75dfd03520" title="DeepLink_New_Post.mp4" controls></video>
bhavishy2801 added 1 commit 2026-04-07 19:50:22 +00:00
Author
Contributor

Hi @hodlbod. I've made all the necessary changes and put my work of #168 with fixing the merge conflicts in this PR for keeping this clean and tidy. Kindly review the PR :)

Hi @hodlbod. I've made all the necessary changes and put my work of #168 with fixing the merge conflicts in this PR for keeping this clean and tidy. Kindly review the PR :)
hodlbod reviewed 2026-04-07 20:04:17 +00:00
hodlbod left a comment
Owner

This looks good structurally, but I think we need to do some design work on the dialog, since users aren't going to know what a lot of this means. Maybe a multi-dialog process with UI tailored to the customization being made would be the right approach. I'll mention this in the design room and see if anyone wants to pitch in.

This looks good structurally, but I think we need to do some design work on the dialog, since users aren't going to know what a lot of this means. Maybe a multi-dialog process with UI tailored to the customization being made would be the right approach. I'll mention this in the design room and see if anyone wants to pitch in.
@@ -86,4 +77,0 @@
const onChange = (json: object) => {
content = json
}
Owner

Looks like a badly resolve merge conflict in this file

Looks like a badly resolve merge conflict in this file
Author
Contributor

I restored the draft-state flow in ThreadCreate.svelte, including content state + onChange, and kept the deep-link prefill behavior. The component now preserves drafts correctly and clears them on successful submit.

I restored the draft-state flow in `ThreadCreate.svelte`, including `content` state + `onChange`, and kept the deep-link prefill behavior. The component now preserves drafts correctly and clears them on successful submit.
hodlbod marked this conversation as resolved
@@ -21,2 +20,3 @@
pubkeys = Array.from(new Set($profileSearch.searchValues(term)))
} else {
pubkeys = $bootstrapPubkeys
pubkeys = Array.from(new Set($bootstrapPubkeys))
Owner

These shouldn't be necessary, were you seeing duplicate values?

These shouldn't be necessary, were you seeing duplicate values?
Author
Contributor

Yes, I was seeing duplicate values when the add-follow deep link was triggered multiple times for the same pubkey. I agree this dedupe does not belong in +page.svelte, so I removed the extra Set(....) there and kept deduping in the follow update flow instead.

Yes, I was seeing duplicate values when the add-follow deep link was triggered multiple times for the same pubkey. I agree this dedupe does not belong in `+page.svelte`, so I removed the extra `Set(....)` there and kept deduping in the follow update flow instead.
hodlbod marked this conversation as resolved
@@ -68,3 +68,3 @@
</SecondaryNav>
<Page>
<Page class="scroll-container overflow-y-auto overflow-x-hidden">
Owner

I think this is a badly resolved conflict.

I think this is a badly resolved conflict.
Author
Contributor

Agreed. Since the scroll wasn't working in setings/, I did that. I reverted +layout.svelte and fixed scrolling centrally in Page.svelte.

Agreed. Since the scroll wasn't working in `setings/`, I did that. I reverted `+layout.svelte` and fixed scrolling centrally in `Page.svelte`.
hodlbod marked this conversation as resolved
bhavishy2801 added 1 commit 2026-04-07 20:36:45 +00:00
Author
Contributor

@hodlbod I've made all the necessary changes. Kindly review the PR :)

@hodlbod I've made all the necessary changes. Kindly review the PR :)
Collaborator

Hi @bhavishy2801, it looks like there’s a merge conflict again with Page.svelte. Could you please rebase it following the steps mentioned here when you get a chance:
#168 (comment)

Thanks!

Hi @bhavishy2801, it looks like there’s a merge conflict again with `Page.svelte`. Could you please rebase it following the steps mentioned here when you get a chance: https://gitea.coracle.social/coracle/flotilla/pulls/168#issuecomment-1645 Thanks!
Owner

@bhavishy2801 I'm also going to wait until a design pass is done before merging this. See the issue for details.

@bhavishy2801 I'm also going to wait until a design pass is done before merging this. See the issue for details.
bhavishy2801 closed this pull request 2026-04-10 04:52:29 +00:00

Pull request closed

Sign in to join this conversation.