Skip to content

Conversation

@alltheseas
Copy link
Collaborator

@alltheseas alltheseas commented Jan 3, 2026

Summary

Fix for longform article links (nevent URLs) showing "Can't display note" error instead of opening the article.

Previously, clicking nevent links pointing to longform notes (kind 30023) showed "Can't display note. We do not yet support viewing this type of content." This was because .longform was listed as an unsupported kind in LoadableNostrEventView.

This fix adds .longform to the supported kinds alongside .text and .highlight, routing them to ThreadModel for proper display.

Checklist

Standard PR Checklist

  • I have read (or I am familiar with) the Contribution Guidelines
  • I have tested the changes in this PR
  • I have profiled the changes to ensure there are no performance regressions, or I do not need to profile the changes.
    • If not needed, provide reason: Minimal code change - adds one enum case to existing switch statement, no new allocations or loops
  • I have opened or referred to an existing github issue related to this change: Review read/share longform article flow #3485 Bug: Longform URLs not recognized #3003
  • My PR is either small, or I have split it into smaller logical commits that are easier to review
  • I have added the signoff line to all my commits. See Signing off your work
  • I have added appropriate changelog entries for the changes in this PR. See Adding changelog entries
  • I have added appropriate Closes: or Fixes: tags in the commit messages wherever applicable, or made sure those are not needed. See Submitting patches

Test report

Device: iPhone 17 Pro Simulator

iOS: 26.2

Damus: Commit f4bee9c

Setup: Fresh build from fix branch, logged in with test account

Steps:

  1. Build and run app in iOS Simulator
  2. Test nevent URL to longform article via CLI:
    xcrun simctl openurl booted "damus:nostr:nevent1qqs2r28rpxzphrpv3ssefz5w4ccsuh5h7d33jv47w09kjd7625f7jcspzpmhxue69uhkummnw3ezumrpdejqz9rhwden5te0wfjkccte9ejxzmt4wvhxjmcpp4mhxue69uhkummn9ekx7mqzyzm7669svt0xkjsju50a22zurc0qa589z2xd4yatzx6p2z64a5e0cqcyqqq823c3h6qpg"
    
  3. Test additional naddr URLs to longform articles:
    xcrun simctl openurl booted "damus:nostr:naddr1qvzqqqr4gupzpdlddzcx9hntfgfw28749pwpu8sw6rj39rx6jw43rdq4pd276vhuqqgxgv3hxf3njef4xvunqv33xumrjy5my73"
    xcrun simctl openurl booted "damus:nostr:naddr1qvzqqqr4gupzqfngzhsvjggdlgeycm96x4emzjlwf8dyyzdfg4hefp89zpkdgz99qqxkzursd3jhxct4vdjj6a34lj6934"
    xcrun simctl openurl booted "damus:nostr:naddr1qvzqqqr4gupzpcatwy3kdjl7wde5r0wqk492hqaqfs8zfjv9ms8ur22my2my9s73qq25zv2g2ee9v6m6wpkyxct6v46xymzhddzx548ky3j"
    xcrun simctl openurl booted "damus:nostr:naddr1qvzqqqr4gupzpef89h53f0fsza2ugwdc3e54nfpun5nxfqclpy79r6w8nxsk5yp0qqn8wetz94hkvtt5wf6hxapdwa5x2un9945hxtt5dpjj6arjw4ehgttnd9nkuctv378l06"
    
  4. Verified all 5 URLs open the longform article correctly

Results:

  • PASS

Other notes

Closes: #3003
Closes: #3485

🤖 Generated with Claude Code

Previously, clicking nevent links pointing to longform notes (kind 30023)
showed "Can't display note" error because .longform was listed as an
unsupported kind in LoadableNostrEventView. This fix adds .longform to
the supported kinds alongside .text and .highlight, routing them to
ThreadModel for proper display.

Closes: damus-io#3003
Closes: damus-io#3485
Changelog-Fixed: Longform article links now open correctly when shared as nevent URLs
Signed-off-by: alltheseas <[email protected]>

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@alltheseas alltheseas added bug Something is not working, or not working as intended longform labels Jan 3, 2026
@danieldaquino danieldaquino added the pr-in-queue This PR is waiting in a queue behind their other PRs marked with the label `pr-active-review`. label Jan 5, 2026
@jb55
Copy link
Collaborator

jb55 commented Jan 6, 2026

lgtm

@jb55 jb55 added pr-in-merge-queue The PR has been reviewed, tested, and added to an integration branch. Will be merged soon. and removed pr-in-queue This PR is waiting in a queue behind their other PRs marked with the label `pr-active-review`. labels Jan 6, 2026
jb55 pushed a commit to jb55/damus that referenced this pull request Jan 6, 2026
Previously, clicking nevent links pointing to longform notes (kind 30023)
showed "Can't display note" error because .longform was listed as an
unsupported kind in LoadableNostrEventView. This fix adds .longform to
the supported kinds alongside .text and .highlight, routing them to
ThreadModel for proper display.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Closes: damus-io#3487
Closes: damus-io#3003
Closes: damus-io#3485
Changelog-Fixed: Longform article links now open correctly when shared as nevent URLs
Co-Authored-By: Claude Opus 4.5 <[email protected]>
Signed-off-by: alltheseas <[email protected]>
Signed-off-by: William Casarin <[email protected]>
@jb55 jb55 mentioned this pull request Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something is not working, or not working as intended longform pr-in-merge-queue The PR has been reviewed, tested, and added to an integration branch. Will be merged soon.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review read/share longform article flow Bug: Longform URLs not recognized

3 participants