Skip to content

feat(ui): Add configurable favicon - #1212

Open
ItsNewe wants to merge 1 commit into
tinyauthapp:mainfrom
ItsNewe:feat/add-favicon-configuration
Open

ItsNewe wants to merge 1 commit into
tinyauthapp:mainfrom
ItsNewe:feat/add-favicon-configuration

Conversation

@ItsNewe

@ItsNewe ItsNewe commented Oct 25, 2026 •

Copy link
Copy Markdown

This PR adds a new TINYAUTH_UI_FAVICON variable pointing to an image path to enable favicon customization, in the same way it's possible to alter the background image.

Changes

  • New ui.favicon option (TINYAUTH_UI_FAVICON / --ui.favicon) exposed in /api/context/app
  • The frontend points the existing icon links (icon, shortcut icon, apple-touch-icon) at the configured URL once the app context is loaded
  • Defaults to empty which keeps the built-in favicons, nothing changes in existing setups

Summary by CodeRabbit

  • New Features
    • Added support for configuring a favicon. The configured icon is applied to the browser tab and Apple touch icon when set.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 54d7dfe and ab83c40.

Files selected for processing: 7
  • .env.example
  • frontend/src/components/layout/layout.tsx
  • frontend/src/schemas/app-context-schema.ts
  • internal/controller/context_controller.go
  • internal/controller/context_controller_test.go
  • internal/model/config.go
  • internal/test/test.go

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Walkthrough

The UI configuration now accepts a favicon path and includes it in the app-context response. The frontend schema requires the value, and BaseLayout uses a configured favicon to update existing icon links.

Changes: Configurable UI Favicon

Layer / File(s) Summary
Configure and expose the favicon
.env.example, internal/model/config.go, internal/controller/context_controller.go, internal/controller/context_controller_test.go, internal/test/test.go
UI configuration adds a favicon path. The app-context response includes the configured value, and test configuration and expectations include favicon values.
Apply the favicon in the frontend
frontend/src/schemas/app-context-schema.ts, frontend/src/components/layout/layout.tsx
The frontend context schema requires a favicon string. When the value is set, BaseLayout updates existing icon and Apple touch-icon links and removes their type and sizes attributes.

Priority: Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant UIConfig
  participant appContextHandler
  participant AppContextSchema
  participant BaseLayout
  participant document
  UIConfig->>appContextHandler: UI.Favicon
  appContextHandler-->>AppContextSchema: ui.favicon in app-context response
  AppContextSchema-->>BaseLayout: validated UI context
  BaseLayout->>document: update icon link href and remove type and sizes
Loading

Suggested reviewers: steveiliop56

Merge Risk: Minimal · up to ab83c

No actionable merge-blocking risk remains in the reviewed change.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 6 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely identifies the main change: adding configurable favicon support for the UI.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 6 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

This branch has not been deployed

No deployments
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