Skip to content

Conversation

@oliveirara
Copy link
Contributor

@oliveirara oliveirara commented Sep 14, 2025

Summary by CodeRabbit

  • New Features

    • Added a GitHub button in the header that opens the project repository in a new tab.
  • Style

    • Updated header with a left-aligned SLComp logo alongside the title for clearer branding.
    • Ensured the same header layout appears during loading.
  • Bug Fixes

    • Improved reliability of cutout image loading by constructing consistent absolute URLs when a raw endpoint isn’t configured.
    • Preserved development proxy behavior while refining fallback handling for failed fetches.

- enhance cutout url construction for different environments
- use local proxy in development for header injection and cors avoidance
- fallback to relative path if external endpoint is not configured
- construct url for external endpoint if available
- add slcomp logo to the left of the title
- add github link to the right of the filters
- update styling for better visual appeal
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 14, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Updates the dashboard header to include a left-aligned SLComp logo and a right-aligned GitHub link, applied in normal and loading states. Adjusts cutout URL construction and dev/prod control flow in api.ts: absolute URL fallback without RAW_ENDPOINT, earlier DEV short-circuit in getCutoutObject, and maintained proxy behavior.

Changes

Cohort / File(s) Summary
Header UI updates
dashboard/src/App.tsx
Replaced AppBar title with a flex layout: left SLComp logo and title; added right-aligned GitHub IconButton with external link. Applied consistently in normal and loading headers. Presentational only; no state or API changes.
Cutout URL and DEV proxy flow
dashboard/src/api.ts
buildCutoutUrl: returns absolute URL using BASE_URL when RAW_ENDPOINT is unset; preserves external endpoint handling with normalization. getCutoutObject: in DEV, immediately returns constructed URL (proxy handles it); in non-DEV, keeps fetch-to-blob logic with fallback to direct URL. Minor normalization/comment updates.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant UI as UI Component
  participant API as getCutoutObject
  participant BCU as buildCutoutUrl
  participant NET as Network
  participant CACHE as Blob Cache

  UI->>API: getCutoutObject(objectKey)
  API->>BCU: buildCutoutUrl(objectKey)
  BCU-->>API: url

  alt DEV mode
    note over API: DEV short-circuit
    API-->>UI: url (proxy-served)
  else Production
    API->>CACHE: check blob cache
    alt Cache hit
      CACHE-->>API: blobUrl
      API-->>UI: blobUrl
    else Cache miss
      API->>NET: fetch(url)
      alt Fetch success
        NET-->>API: blob
        API->>CACHE: store blob, createObjectURL
        API-->>UI: blobUrl
      else Fetch failure
        NET-->>API: error
        API-->>UI: url (direct)
      end
    end
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

In the header I hop with a gleam so bright,
A logo to the left, GitHub to the right.
Cutouts find paths, whether dev or prod,
URLs align—no need to nod.
I thump my review with tidy delight,
Carrots cached, and pixels just right. 🥕✨

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/fix-path

📜 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 a9fe718 and 4c4556d.

📒 Files selected for processing (2)
  • dashboard/src/App.tsx (2 hunks)
  • dashboard/src/api.ts (1 hunks)

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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.

@oliveirara oliveirara merged commit 6e6b99d into main Sep 14, 2025
0 of 2 checks passed
@oliveirara oliveirara deleted the chore/fix-path branch September 14, 2025 22:51
@oliveirara oliveirara restored the chore/fix-path branch September 14, 2025 23:04
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