Skip to content
This repository was archived by the owner on Mar 5, 2026. It is now read-only.

fix: update trigger type from 'api' to 'http' in HandlersPage and Sidebar components#15

Merged
andersonleal merged 1 commit intomainfrom
fix/new-trigger-type
Feb 16, 2026
Merged

fix: update trigger type from 'api' to 'http' in HandlersPage and Sidebar components#15
andersonleal merged 1 commit intomainfrom
fix/new-trigger-type

Conversation

@andersonleal
Copy link
Copy Markdown
Contributor

@andersonleal andersonleal commented Feb 16, 2026

fix: update trigger type from 'api' to 'http' in HandlersPage and Sidebar components

Summary

Aligns the iii-console frontend with the iii engine's trigger type naming. The engine uses http (not api) for HTTP-triggered functions. This PR updates all references from trigger_type === 'api' to trigger_type === 'http' in the Handlers page and adjusts the Sidebar layout.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Changes

handlers.tsx

  • Updated getApiPath() to check for trigger_type === 'http' instead of 'api'
  • Updated invokeFunction() HTTP trigger branch
  • Updated handleSelectFunction() path params extraction for HTTP triggers
  • Updated getFunctionIcon() switch case
  • Updated all Badge styling and conditional rendering for HTTP triggers (7 occurrences)

Sidebar.tsx

  • Reordered nav items: Functions moved before States for better discoverability
  • Adjusted logo header padding: p-5px-5 py-2 md:py-3 for more compact mobile layout

Checklist

  • Code follows project conventions (Biome lint)
  • Self-review of code performed
  • No new warnings introduced

Additional Context

The iii engine protocol uses http as the trigger type for REST API endpoints. The console was still checking for api, which caused HTTP-triggered functions to not display their API paths, invoke buttons, or endpoint details correctly. This fix ensures full compatibility with the engine's trigger type schema.

Summary by CodeRabbit

  • Style

    • Adjusted sidebar header vertical padding with responsive breakpoints.
  • UI Changes

    • Reordered navigation menu to display Functions before States.
    • Updated trigger type terminology from "API" to "HTTP" across endpoint details, test interface, and action buttons.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 16, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

Two layout and routing adjustments in the console frontend: the Sidebar navigation is reordered with Functions moved before States and header padding adjusted for responsiveness; the Handlers page now references HTTP triggers instead of API triggers throughout its logic paths and UI rendering.

Changes

Cohort / File(s) Summary
Sidebar Layout
packages/console-frontend/src/components/layout/Sidebar.tsx
Navigation item reordering (Functions moved before States) and responsive header padding adjustment from uniform class to px-5 py-2 md:py-3.
Handler Trigger Type
packages/console-frontend/src/routes/handlers.tsx
Consistent replacement of trigger\_type references from 'api' to 'http' across API path derivation, function invocation, selection logic, icon rendering, and UI conditional blocks.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 The nav hops to a fresher beat,
Functions first make the order complete,
Padding breathes with responsive care,
HTTP's here, no API affair,
Layout and logic now both aligned so neat!

🚥 Pre-merge checks | ✅ 2 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Merge Conflict Detection ⚠️ Warning ❌ Merge conflicts detected (3 files):

⚔️ packages/console-frontend/src/components/layout/Sidebar.tsx (content)
⚔️ packages/console-frontend/src/routes/handlers.tsx (content)
⚔️ packages/console-rust/Cargo.toml (content)

These conflicts must be resolved before merging into main.
Resolve conflicts locally and push changes to this branch.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: updating trigger type references from 'api' to 'http' in two components. It accurately reflects the primary objective of the PR.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 fix/new-trigger-type
⚔️ Resolve merge conflicts (beta)
  • Auto-commit resolved conflicts to branch fix/new-trigger-type
  • Create stacked PR with resolved conflicts
  • Post resolved changes as copyable diffs in a comment

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

@andersonleal andersonleal merged commit 4ff7c9d into main Feb 16, 2026
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant