Skip to content

fix(portal-plugin-ipfs): fix api url#511

Merged
pcfreak30 merged 1 commit intodevelopfrom
libs/portal-plugin-dashboard
Oct 2, 2025
Merged

fix(portal-plugin-ipfs): fix api url#511
pcfreak30 merged 1 commit intodevelopfrom
libs/portal-plugin-dashboard

Conversation

@pcfreak30
Copy link
Copy Markdown
Member

@pcfreak30 pcfreak30 commented Oct 2, 2025

Summary by CodeRabbit

  • New Features
    • Emits an authTokenChanged event during configuration when a current token exists, enabling immediate reactions to token availability.
  • Chores
    • Updated API endpoint resolution to append “/api” to the base path for requests.
  • Refactor
    • Reformatted token retrieval logic without changing behavior.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Oct 2, 2025

⚠️ No Changeset found

Latest commit: 16b6a93

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Oct 2, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adds an authTokenChanged emission during getConfig when a current token exists and adjusts API URL resolution to append "/api" to the base path. No public API changes; token retrieval logic reformatted without behavioral change.

Changes

Cohort / File(s) Summary
IPFS portal plugin config refinement
libs/portal-plugin-ipfs/src/capabilities/refineConfig.ts
Emit authTokenChanged during getConfig when a current token is present; modify API URL construction to append "/api"; reformat token retrieval logic (no semantic change).

Sequence Diagram(s)

sequenceDiagram
    actor Caller
    participant Config as refineConfig.getConfig
    participant Store as Token Store/Config
    participant Obs as Observers

    Caller->>Config: getConfig()
    Config->>Store: read current token
    alt token exists
        Note over Config,Obs: New behavior: emit authTokenChanged
        Config-->>Obs: authTokenChanged(token)
    end
    Config->>Config: build API URL (+ "/api")
    Config-->>Caller: resolved config
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I twitch my ears at tokens found,
A whisper: “changed!” now hops around.
The path grows longer, “/api” tail,
Our burrow’s routes will never fail.
I thump, I cheer, with carrot glee—
Small tweaks, swift streams, in harmony. 🥕🐇

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch libs/portal-plugin-dashboard

📜 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 89c9114 and 16b6a93.

📒 Files selected for processing (1)
  • libs/portal-plugin-ipfs/src/capabilities/refineConfig.ts (2 hunks)

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

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

@pcfreak30 pcfreak30 merged commit 122ccc2 into develop Oct 2, 2025
0 of 2 checks passed
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.

1 participant