feat: add deep link customization #168

Closed
bhavishy2801 wants to merge 4 commits from (deleted):feat/deep-link-customization 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.
Solves #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. Solves #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 4 commits 2026-04-07 19:15:24 +00:00
Author
Contributor

Hi! Since this PR had conflict issue with ThreadCreate.svelte, I'm closing this PR and pushing a new PR for this.

Hi! Since this PR had conflict issue with ThreadCreate.svelte, I'm closing this PR and pushing a new PR for this.
bhavishy2801 closed this pull request 2026-04-07 19:37:07 +00:00
Collaborator

Hey @bhavishy2801, you don’t need to open a new PR. You can resolve the merge conflicts using basic Git commands and then force-push the changes to update the existing PR.

Hey @bhavishy2801, you don’t need to open a new PR. You can resolve the merge conflicts using basic Git commands and then force-push the changes to update the existing PR.
Author
Contributor

Hi @userAdityaa. Thanks for suggesting, but I was thinking of resolving the merge conflicts, but since this current PR had multiple commits, I thought to open a new PR to keep it clean and tidy under a single complete commit.

Hi @userAdityaa. Thanks for suggesting, but I was thinking of resolving the merge conflicts, but since this current PR had multiple commits, I thought to open a new PR to keep it clean and tidy under a single complete commit.
Owner

@bhavishy2801 for future reference you can do git rebase dev -i and "squash" all but the first commit. That will roll everything into a single commit.

@bhavishy2801 for future reference you can do `git rebase dev -i` and "squash" all but the first commit. That will roll everything into a single commit.
Author
Contributor

@bhavishy2801 for future reference you can do git rebase dev -i and "squash" all but the first commit. That will roll everything into a single commit.

Oh. I'll remember that next time. Thanks :)

> @bhavishy2801 for future reference you can do `git rebase dev -i` and "squash" all but the first commit. That will roll everything into a single commit. Oh. I'll remember that next time. Thanks :)

Pull request closed

Sign in to join this conversation.