Skip to content
This repository was archived by the owner on Jul 11, 2025. It is now read-only.

feat: Conversation deep link#1643

Merged
lourou merged 6 commits intomainfrom
lr/convo-deep-link
Mar 28, 2025
Merged

feat: Conversation deep link#1643
lourou merged 6 commits intomainfrom
lr/convo-deep-link

Conversation

@lourou
Copy link
Copy Markdown
Member

@lourou lourou commented Mar 19, 2025

WIP

Summary by CodeRabbit

  • New Features

    • Enhanced deep linking support for conversation navigation so that links reliably open existing or new conversations.
    • Improved URL handling now accommodates multiple address schemes for smoother app navigation.
    • Updated profile sharing builds shareable links using usernames (when available) and features a streamlined copy action.
  • Localization

    • Added French translations for link actions, providing clearer UI messages for French-speaking users.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 19, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update adds new navigation and deep linking features for conversation screens. A new configuration for conversation navigation is introduced with associated TypeScript types and URL parsing/stringifying logic. Several functions and hooks are implemented to handle conversation deep links, including checking if a conversation exists, processing parameters from URLs, and updating navigation state accordingly. A dedicated deep link handler component manages incoming URLs at the app’s root level, and a new link parser function extracts segments and query parameters from URLs. There are also updates to localization, with English share-profile strings removed and new French translations added for link actions. Additionally, the app navigator now supports multiple URL prefixes, and several ESLint dependency versions have been adjusted. Finally, the share profile screen refines the profile URL construction by using a username and updating translation references for clarity.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1bdf0fc and 9c8c12b.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (11)
  • features/conversation/conversation-chat/conversation.nav.tsx (1 hunks)
  • features/deep-linking/conversation-links.ts (1 hunks)
  • features/deep-linking/conversation-navigator.ts (1 hunks)
  • features/deep-linking/deep-link-handler.component.tsx (1 hunks)
  • features/deep-linking/link-parser.ts (1 hunks)
  • features/deep-linking/navigation-handlers.ts (1 hunks)
  • i18n/translations/en.ts (0 hunks)
  • i18n/translations/fr.ts (1 hunks)
  • navigation/app-navigator.tsx (2 hunks)
  • package.json (1 hunks)
  • screens/ShareProfile.tsx (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

@thierryskoda thierryskoda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great overall, I just think there might be too many comments or if statements for checking stuff - it's overkill and we can make it cleaner and easier to read by reducing them.

Also, we got to not forget that we'll probably migrate towards Expo Router soon, and Expo Router handles really well the deep linking stuff. So maybe for now, we just make it work and not perfect. We'll check again later.

yarn add eslint@8.57.0 eslint-plugin-react@7.33.2 @typescript-eslint/parser@6.21.0 @typescript-eslint/eslint-plugin@6.21.0 -D
@macroscopeapp
Copy link
Copy Markdown

macroscopeapp bot commented Mar 27, 2025

Add Conversation Deep Linking and URL Navigation

Added deep linking support for conversations with URL-based navigation. Created navigation configuration, link parsing utilities, and handlers for conversation deep links. Modified profile sharing to use subdomain URLs. Updated translation keys from nested to flat structure. Includes ESLint dependency updates.

📍Where to Start

The DeepLinkHandler component in deep-link-handler.component.tsx which orchestrates the deep linking functionality and routes URLs to appropriate handlers.


Macroscope summarized 5b72a48.

# Conflicts:
#	config/preview.ts
#	config/production.ts
#	navigation/app-navigator.tsx
#	screens/ShareProfile.tsx
#	yarn.lock
@lourou lourou marked this pull request as ready for review March 28, 2025 12:55
@lourou lourou requested a review from a team as a code owner March 28, 2025 12:55
@macroscopeapp
Copy link
Copy Markdown

macroscopeapp bot commented Mar 28, 2025

Changes in 2449d3f

  • Refactored error handling in useConversationDeepLinkHandler hook to wrap errors with GenericError class, capturing additional context including inbox ID and error messages

Macroscope summarized 2449d3f.

@lourou lourou merged commit 0f39281 into main Mar 28, 2025
7 checks passed
@lourou lourou deleted the lr/convo-deep-link branch March 28, 2025 13:00
@macroscopeapp
Copy link
Copy Markdown

macroscopeapp bot commented Mar 28, 2025

Changes in 9c8c12b

  • Modified GenericError usage by updating import path from @/utils/generic-error to @/utils/error and renamed constructor parameter from additionalData to extra in captureError function

Macroscope summarized 9c8c12b.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants