Skip to content

chore: configure default values for /#20

Merged
twangodev merged 2 commits intomainfrom
chore/rust-default
Oct 20, 2025
Merged

chore: configure default values for /#20
twangodev merged 2 commits intomainfrom
chore/rust-default

Conversation

@twangodev
Copy link
Owner

@twangodev twangodev commented Oct 20, 2025

Summary by CodeRabbit

  • New Features

    • Logo configuration field now available for customizing Open Graph images.
    • Logo support integrated into preview cards for visual display.
  • Updates

    • Default description text updated with product branding.
    • Default subtitle updated to "Open Source • Always Free."

Copilot AI review requested due to automatic review settings October 20, 2025 03:51
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 20, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This PR introduces a unified "logo" field throughout the system, replacing references to "image". Changes include adding a logo field to configuration defaults, introducing helper methods for logo resolution and emptiness checks in the params module, and refactoring frontend components to use the new logo property with corresponding URL parameter updates.

Changes

Cohort / File(s) Summary
Configuration defaults
src/config.rs
Adds pub logo: String field to the Defaults struct; updates description and subtitle default values.
Parameter helpers
src/params.rs
Adds is_empty() and get_effective_logo(state) private helper methods; refactors fetch_logo() and with_defaults() to use new helpers.
Frontend components
web/src/lib/components/hero/CardStack.svelte, web/src/lib/components/hero/OGCard.svelte
Renames image prop/field to logo across both components; adds default logo value to first card; switches from URLSearchParams to SvelteURLSearchParams; updates URL parameter mapping to use logo query parameter.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

The changes follow a consistent, repetitive pattern (image → logo rename) across files with coherent scope. While spanning 4 files and 2 language contexts (Rust and Svelte), the individual edits are straightforward property renames and helper method additions with minimal logic density.

Possibly related PRs

  • feat: web hero #14: Modifies the same hero components (CardStack.svelte and OGCard.svelte) with overlapping changes to image/logo prop and URL parameter handling.

Poem

🐰 A logo blooms where images once stood,
defaults shift like morning's misty wood,
helpers whisper through the Rust and Svelte,
cohesive changes, elegantly knelt.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/rust-default

📜 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 c101002 and ff47c3b.

📒 Files selected for processing (4)
  • src/config.rs (1 hunks)
  • src/params.rs (3 hunks)
  • web/src/lib/components/hero/CardStack.svelte (3 hunks)
  • web/src/lib/components/hero/OGCard.svelte (3 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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR configures default values for the root path ("/") by adding a default logo URL and updating default text values. The changes ensure consistent branding when no parameters are provided, with the default logo being displayed alongside updated default title, description, and subtitle text.

Key Changes:

  • Renamed image prop to logo for clarity in hero components
  • Added default logo URL configuration (https://ogis.dev/logo-light.png)
  • Updated default subtitle from "img.ogis.dev" to "Open Source • Always Free"

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
web/src/lib/components/hero/OGCard.svelte Renamed image prop to logo and switched to SvelteURLSearchParams
web/src/lib/components/hero/CardStack.svelte Updated prop name to logo and added default logo URL to first card
src/params.rs Added is_empty() helper and logic to apply default logo when no params provided
src/config.rs Added logo field to Defaults struct and updated default description/subtitle text

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@twangodev twangodev enabled auto-merge October 20, 2025 03:51
@twangodev twangodev merged commit 01057cc into main Oct 20, 2025
8 of 9 checks passed
@twangodev twangodev deleted the chore/rust-default branch October 20, 2025 03:52
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