Skip to content

feat: core provider map locks added and made logging optional#154

Merged
akshaydeo merged 1 commit intomainfrom
07-10-feat_core_provider_map_locks_added_and_made_logging_optional
Jul 10, 2025
Merged

feat: core provider map locks added and made logging optional#154
akshaydeo merged 1 commit intomainfrom
07-10-feat_core_provider_map_locks_added_and_made_logging_optional

Conversation

@Pratham-Mishra04
Copy link
Copy Markdown
Collaborator

No description provided.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jul 10, 2025

Caution

Review failed

Failed to post review comments.

Summary by CodeRabbit

  • New Features

    • Introduced a comprehensive configuration UI for managing providers, clients, and core settings in the Bifrost HTTP interface.
    • Added a real-time request logs UI with filtering, sorting, pagination, and live updates.
    • Launched a plugin ecosystem page with tabbed navigation, plugin details, and usage instructions.
    • Enhanced the sidebar UI with theme toggling, improved navigation, and resource links.
  • Improvements

    • Updated 404 error pages with refreshed styles, theme toggle support, and updated resource links.
    • Logging can now be enabled or disabled via a simple toggle in the configuration.
  • Bug Fixes

    • Improved concurrency and synchronization for provider updates, reducing the risk of race conditions and request loss.
  • UI Components

    • Added new UI primitives: Tabs, Select, Switch, AlertDialog, Dialog, Toaster, Popper, and various icons for richer interfaces.
  • Style

    • Updated CSS for new themes, color palettes, and improved accessibility.
  • Removals

    • Replaced or removed outdated UI components and static assets to support new features and layouts.

Walkthrough

This update introduces major concurrency improvements and configuration changes to the Bifrost core, enhances logging configurability, and refactors the Bifrost HTTP transport's frontend and backend. The UI receives a comprehensive overhaul with new static assets, improved theming, and updated configuration and plugin management pages. Several JavaScript and CSS bundles are replaced or removed, reflecting a significant frontend rebuild.

Changes

File(s) / Path(s) Change Summary
core/bifrost.go Adds thread-safe provider mutexes for concurrency, updates provider queue handling, improves request transfer and synchronization, and documents mutex requirements.
transports/bifrost-http/handlers/config.go Updates config handler to always overwrite InitialPoolSize and replaces LogQueueSize logic with EnableLogging.
transports/bifrost-http/lib/config.go, transports/bifrost-http/lib/store.go Replaces LogQueueSize with EnableLogging in config structures; updates default config and logging level for config file writes.
transports/bifrost-http/main.go Refactors logging plugin and handler initialization to be conditional on EnableLogging, updating control flow for logging-related components.
transports/bifrost-http/ui/404.html, transports/bifrost-http/ui/404/index.html Updates 404 error page styles, sidebar, theme toggle, and resource links; references new CSS/JS assets.
transports/bifrost-http/ui/_next/static/css/0290f827d14417a0.css Removes old Tailwind CSS stylesheet.
transports/bifrost-http/ui/_next/static/chunks/146-0f84e0451d3a2c28.js, .../447-2fb3004c69b6e1a0.js, .../452-ba1c85b70e91fcc3.js, .../617-7dfbdf69410b1b51.js, .../990-b08497a7c8bd8d1a.js Adds new JS chunks for UI primitives, icons, tabs, select, dialogs, toasts, poppers, progress bar, and image optimization.
transports/bifrost-http/ui/_next/static/chunks/341-3971b040aed697e5.js, .../519-45533824b2718864.js, .../529-26467b76604e8781.js, .../678-56244c2aeff7b5e2.js, .../825-aee0522b5fc044c3.js, .../866-b29a8568c4caa97e.js, .../867-ee04be25d0141432.js Removes old JS chunks for theme toggle, menus, icons, toasts, image handling, tabs, select, and UI utilities.
transports/bifrost-http/ui/_next/static/chunks/393-ea6cc19b80a7c19c.js Adds new JS chunk for advanced image component, context, and optimization logic.
transports/bifrost-http/ui/_next/static/chunks/app/config/page-e81b135af619a46a.js Adds a new React-based configuration UI for providers, MCP clients, and core settings with validation and async save.
transports/bifrost-http/ui/_next/static/chunks/app/docs/page-437689869a33f8e2.js Removes old theme toggle and dropdown menu code from docs page.
transports/bifrost-http/ui/_next/static/chunks/app/docs/page-a1cc76d315d682c5.js Adds a new async-loading JS chunk for docs page.
transports/bifrost-http/ui/_next/static/chunks/app/layout-6acb57196bba0407.js Removes old sidebar and layout components.
transports/bifrost-http/ui/_next/static/chunks/app/layout-739652a903d062da.js Adds new sidebar/layout components, theme toggle, and navigation logic.
transports/bifrost-http/ui/_next/static/chunks/app/page-3d9741bf5c7d7c6d.js Removes old real-time request logs UI and associated components.
transports/bifrost-http/ui/_next/static/chunks/app/page-c5d93cc14cf22918.js Adds new real-time request logs UI with filtering, sorting, pagination, WebSocket integration, and detailed views.
transports/bifrost-http/ui/_next/static/chunks/app/plugins/page-3f0f710f3ac21f25.js Removes old plugins page with tabs and theme toggle.
transports/bifrost-http/ui/_next/static/chunks/app/plugins/page-c7cc9c96cbdec10a.js Adds new plugin ecosystem page with tabs, plugin cards, and usage instructions.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant HTTP_UI
    participant ConfigHandler
    participant BifrostCore

    User->>HTTP_UI: Updates config (e.g., toggles logging)
    HTTP_UI->>ConfigHandler: POST /update-config
    ConfigHandler->>BifrostCore: UpdateProviderConcurrency / set EnableLogging
    BifrostCore->>BifrostCore: Acquire provider mutex
    BifrostCore->>BifrostCore: Transfer requests, update queue, release mutex
    BifrostCore-->>ConfigHandler: Success/Error
    ConfigHandler-->>HTTP_UI: Response
    HTTP_UI-->>User: UI feedback (toast, update)
Loading
sequenceDiagram
    participant User
    participant HTTP_UI
    participant WebSocketHandler
    participant LogPlugin

    User->>HTTP_UI: Opens Request Logs page
    HTTP_UI->>WebSocketHandler: Connects if EnableLogging
    WebSocketHandler->>LogPlugin: Subscribes to log stream
    LogPlugin-->>WebSocketHandler: Pushes logs
    WebSocketHandler-->>HTTP_UI: Sends real-time logs
    HTTP_UI-->>User: Displays live logs
Loading

Poem

🐇
In Bifrost’s warren, threads now dance,
With mutexes guarding each provider’s chance.
Logging’s a switch—on or off with delight,
While the UI’s refreshed, so crisp and bright!
New tabs and themes, plugins abound,
In this green-lit meadow, improvements are found.
—Rabbit, ever coding, hops around!

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ast-grep (0.38.1)
transports/bifrost-http/ui/_next/static/chunks/452-ba1c85b70e91fcc3.js
transports/bifrost-http/ui/_next/static/chunks/617-7dfbdf69410b1b51.js
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 07-10-feat_core_provider_map_locks_added_and_made_logging_optional

🪧 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 auto-generate unit tests to generate unit tests for 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.

@Pratham-Mishra04 Pratham-Mishra04 marked this pull request as ready for review July 10, 2025 13:42
Copy link
Copy Markdown
Contributor

akshaydeo commented Jul 10, 2025

Merge activity

  • Jul 10, 2:14 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jul 10, 2:27 PM UTC: @akshaydeo merged this pull request with Graphite.

@akshaydeo akshaydeo changed the base branch from 07-10-feat_ui_enhancements to graphite-base/154 July 10, 2025 14:26
@akshaydeo akshaydeo changed the base branch from graphite-base/154 to main July 10, 2025 14:26
@akshaydeo akshaydeo merged commit f2304b3 into main Jul 10, 2025
1 of 2 checks passed
@akshaydeo akshaydeo deleted the 07-10-feat_core_provider_map_locks_added_and_made_logging_optional branch August 31, 2025 17:28
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