Skip to content

Upgrade staging#214

Merged
elliotBraem merged 24 commits intomainfrom
staging
Jul 9, 2025
Merged

Upgrade staging#214
elliotBraem merged 24 commits intomainfrom
staging

Conversation

@elliotBraem
Copy link
Collaborator

@elliotBraem elliotBraem commented Jul 9, 2025

Summary by CodeRabbit

  • Bug Fixes

    • Improved error logging in the feeds API to only log unexpected errors, reducing unnecessary log entries.
    • Simplified error handling during feed ID validation, ensuring consistent clearing of form errors on any exception.
  • Refactor

    • Adjusted how RSS feed URLs are constructed and used, ensuring consistent URL formats across feed creation and fetching processes.

elliotBraem and others added 23 commits June 25, 2025 17:40
* feat: update my feeds tab on profile page

* feat: update tabs to be routes

* fix: double scrollbar

* comment unused files in overview tab

* fix: revert rsbuild

* fmt

* fix: add routegen to prettier ignore

* clean up, server side

---------

Co-authored-by: Elliot Braem <elliot@ejlbraem.com>
* feat: add name and tag validation to create

* feat: add no activity data in activity tab

* add coming soon sections for profile page

* feat: clicking on leaderboard feed hashtag will redirect to that feed

* fix: keeps name on start when disable feed names collapse

* fix: rsbuild

* fix: add routegen to prettier ignore

* fix: add ability to navigate to collapsed feeds in leaderboard

* add ability to expand or collapse all

* fix: rsbuild

* adjustments

* nitpicks

---------

Co-authored-by: Elliot Braem <elliot@ejlbraem.com>
* feat: update the feed editor

* feat: improve performance, and fix bugs

* feat: revert local development change

* add routegen to pretttier ignore

* fix: resolve code rabbit comments

* fix some nitpick comments

* fix prettier and build config

* formats

* merge

---------

Co-authored-by: Elliot Braem <elliot@ejlbraem.com>
* Feat: add recent feeds

* feat: add recent content to the main feed page

* fmt

* Update apps/app/src/hooks/use-rss-feed.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* nitpicks

---------

Co-authored-by: Elliot Braem <elliot@everything.dev>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Elliot Braem <elliot@ejlbraem.com>
@coderabbitai
Copy link

coderabbitai bot commented Jul 9, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update adjusts error handling and URL construction in both backend and frontend code. Error logging in the feeds API is now limited to unexpected errors. The frontend modifies how RSS feed URLs are built and simplifies error handling in feed creation validation. The RSS distributor configuration also updates its service URL format.

Changes

File(s) Change Summary
apps/api/src/routes/api/feeds.ts Moves error logging to occur only for unexpected errors, after checking for NotFoundError.
apps/app/src/hooks/use-rss-feed.ts Changes serviceUrl to append /rss.xml to the original URL before fetching RSS feed data.
apps/app/src/routes/_layout/create/feed/_tabs/index.tsx Simplifies error handling: now always clears "id" errors on exceptions during validation.
apps/app/src/store/feed-creation-store.ts Updates serviceUrl construction to exclude the /rss.xml suffix from the feed URL.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Frontend
    participant Backend

    User->>Frontend: Initiate feed creation/validation
    Frontend->>Backend: GET /api/feeds/:feedId
    Backend-->>Frontend: 404 NotFound or Feed data
    alt NotFoundError
        Frontend->>Frontend: Clear "id" errors
    else Other error
        Backend->>Backend: Log error
        Frontend->>Frontend: Clear "id" errors
    end

    Frontend->>Frontend: Construct serviceUrl (with/without /rss.xml)
    Frontend->>Backend: Fetch RSS feed using serviceUrl
Loading

Possibly related PRs

  • PotLock/curatedotfun#156: Refactors and extends backend feeds API routes, including validation and repository methods. Both PRs modify the same backend API routes and related feed handling logic.

Poem

A bunny hopped through code today,
Tweaked URLs in a subtle way.
Error logs now skip the known,
Only surprises get their tone.
Feed creation, neat and clean—
Simpler flows behind the screen!
🐇✨


📜 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 7b3dd80 and 405dca4.

📒 Files selected for processing (1)
  • apps/app/src/hooks/use-rss-feed.ts (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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @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.

@vercel
Copy link

vercel bot commented Jul 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
curatedotfun-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 9, 2025 1:06pm
curatedotfun-app (staging) ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 9, 2025 1:06pm

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
apps/app/src/routes/_layout/create/feed/_tabs/index.tsx (1)

85-86: Simplified error handling may hide network issues from users.

The simplified error handling is cleaner but treats all errors (including network errors) the same way. While this allows users to proceed when there are connectivity issues, consider providing user feedback for network errors to improve the user experience.

Consider this enhancement to differentiate between network errors and other errors:

-      } catch {
-        form.clearErrors("id");
+      } catch (error) {
+        form.clearErrors("id");
+        // Optionally show a toast or indicator for network errors
+        if (error instanceof Error && error.message.includes('fetch')) {
+          console.warn('Network error while validating feed ID:', error);
+        }
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 71026d5 and 7b3dd80.

📒 Files selected for processing (4)
  • apps/api/src/routes/api/feeds.ts (1 hunks)
  • apps/app/src/hooks/use-rss-feed.ts (1 hunks)
  • apps/app/src/routes/_layout/create/feed/_tabs/index.tsx (1 hunks)
  • apps/app/src/store/feed-creation-store.ts (1 hunks)
🔇 Additional comments (2)
apps/app/src/store/feed-creation-store.ts (1)

138-138: Good separation of concerns in URL construction.

The change to store the base URL without /rss.xml suffix is well-designed. This allows the configuration to remain endpoint-agnostic while the consumption layer (in use-rss-feed.ts) adds the specific endpoint as needed.

apps/api/src/routes/api/feeds.ts (1)

145-145: Improved error logging by excluding expected errors.

Moving the error logging after the NotFoundError check is a good practice. NotFoundError is an expected error type that shouldn't be logged, reducing noise and focusing on actual unexpected errors.

@elliotBraem elliotBraem merged commit 2ca6486 into main Jul 9, 2025
1 of 8 checks passed
@elliotBraem elliotBraem deleted the staging branch July 9, 2025 13:06
@elliotBraem elliotBraem restored the staging branch July 9, 2025 13: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.

2 participants