Skip to content

Some consistency improvements and a nicer button#38

Merged
scanash00 merged 6 commits into
paddinglabs:mainfrom
hacdias:refactor/rename-notes-to-annotations
Feb 13, 2026
Merged

Some consistency improvements and a nicer button#38
scanash00 merged 6 commits into
paddinglabs:mainfrom
hacdias:refactor/rename-notes-to-annotations

Conversation

@hacdias

@hacdias hacdias commented Feb 12, 2026

Copy link
Copy Markdown
Contributor
  • Renamed Notes to Annotations for consistent naming
  • Removed unused UrlPage, which seems to be an older iteration of SitePage
  • Renamed /site to /url to make it consistent with /{user}/url
  • Changed the "My Link" button to "My Annotations", which now navigates instead of copying the link
  • When in the "All" tab, show everything sorted instead of annotations first, highlights second

All in individual commits. Feel free to cherry-pick individual things :D

Closes #37

Summary by CodeRabbit

  • New Features

    • Revamped URL-based search and annotations UI with consolidated results view and unified item listing.
  • Bug Fixes

    • Improved consistency of annotations/highlights rendering and counts across views; fixed navigation behaviors for search actions.
  • Chores

    • Switched routing and navigation from /site to /url and updated related labels.
    • Cleaned up imports and simplified component structure for easier maintenance.

@coderabbitai

coderabbitai Bot commented Feb 12, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The PR standardizes URL routing by replacing /site with /url, removes the old Url.tsx component, renames SiteWrapper → UrlWrapper, updates navigation and route targets, and consolidates URL-related page rendering logic across several components.

Changes

Cohort / File(s) Summary
Route & Wrapper Updates
web/src/App.tsx, web/src/routes/wrappers.tsx
Replaced /site/* routing with /url/*; removed UrlRedirect; renamed exported wrapper SiteWrapper()UrlWrapper() and now return UrlPage. Updated route mappings accordingly.
Removed Search Page
web/src/views/content/Url.tsx
Deleted legacy UrlPage search component that handled query parsing, localStorage recent searches, getByTarget/searchActors flows, tabbed annotations/highlights UI, and share-to-clipboard functionality.
Main URL Page Refactor
web/src/views/content/UrlPage.tsx
Renamed SitePageUrlPage; switched navigation targets from /site/... to /url/...; unified annotations/highlights into a single sorted items array for rendering; simplified copy/share and button behavior/labels.
User-specific URL Page Consolidation
web/src/views/content/UserUrlPage.tsx
Merged separate tab render branches into a single items array (annotations + highlights) with descending createdAt sorting when all tab selected; import reordering and cleanup.
Navigation Adjustments
web/src/components/navigation/MobileNav.tsx, web/src/components/navigation/RightSidebar.tsx
Updated bottom nav link and active checks from "/site" to "/url"; changed search Enter-key navigation to target /url/{query}.
Import Formatting Only
web/src/views/core/HighlightImporter.tsx
Non-functional import reformat: separated React type import and named imports; adjusted icon import ordering. No logic changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I nibbled at routes and gave them a whirl,
From /site to /url, a tidy new curl.
Pages combined, tabs now in line,
A hop in the codebase — everything's fine! 🥕✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is vague and generic, using non-descriptive terms like 'improvements' and 'nicer button' that don't convey meaningful information about the substantial refactoring changes in the changeset. Consider a more specific title like 'Rename /site to /url and update annotations workflow' to better reflect the main changes.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed The pull request successfully addresses all primary objectives from issue #37: renamed /site to /url for consistency, changed 'My Link' button to navigate to user's page, consolidated sorting when showing all items, and removed legacy UrlPage component.
Out of Scope Changes check ✅ Passed All changes align with the stated objectives and issue #37 requirements; no out-of-scope modifications detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
web/src/views/content/UrlPage.tsx (1)

72-75: Remove unnecessary async keyword.

The callback doesn't contain any await expressions—navigate() is synchronous.

✏️ Suggested fix
-  const handleNavigateMyAnnotations = useCallback(async () => {
+  const handleNavigateMyAnnotations = useCallback(() => {
     if (!user?.handle || !targetUrl) return;
     navigate(`/${user.handle}/url/${encodeURIComponent(targetUrl)}`);
   }, [user?.handle, targetUrl, navigate]);

Comment @coderabbitai help to get the list of available commands and usage tips.

@hacdias hacdias changed the title refactor: consistent usage of Annotations refactor: consistent usage of Annotations, remove unused UrlPage Feb 12, 2026
@hacdias hacdias changed the title refactor: consistent usage of Annotations, remove unused UrlPage Some consistency improvements and a nicer button Feb 12, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@web/src/views/content/UrlPage.tsx`:
- Around line 72-75: The tooltip text for the "My Annotations" action is
outdated — update the title attributes where the navigation behavior is
triggered (e.g., in the handler handleNavigateMyAnnotations and the element that
calls it) to reflect navigation instead of "Copy link…"; replace the old title
with something like "Go to my annotations" (and apply the same change to the
other occurrence referenced around lines 192-197) so the UI tooltip matches the
new behavior.

Comment thread web/src/views/content/UrlPage.tsx
@scanash00
scanash00 merged commit ac8157f into paddinglabs:main Feb 13, 2026
1 check passed
@hacdias
hacdias deleted the refactor/rename-notes-to-annotations branch February 13, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FR: Discoverability of the URL / Site page

2 participants