Skip to content

Comments

Tweaks and fixes to the UI and additional examples#14

Merged
tyom merged 5 commits intomainfrom
dev
Feb 22, 2026
Merged

Tweaks and fixes to the UI and additional examples#14
tyom merged 5 commits intomainfrom
dev

Conversation

@tyom
Copy link
Owner

@tyom tyom commented Feb 22, 2026

Summary by CodeRabbit

  • New Features

    • Extended /showcase modal with Department, Skills, Attachments and Additional Notes fields.
    • Added static search results view with hotel listings and pagination control.
    • Modal shows bot avatar (or sparkle) and header adapts when content is scrolled.
    • Inputs now support id attributes and labels are clickable for improved accessibility.
    • Modal state now carries an optional bot identifier for modal context.
  • Style

    • Updated button sizing, padding, border-radius, weight and hover/border transitions.
    • Added global button cursor: pointer and adjusted input/message spacing.

tyom added 3 commits February 22, 2026 13:39
Add static_select, multi_static_select, file_input, and multiline
plain_text_input to the /showcase modal command. Fix inconsistent
text input heights (h-8 vs py-2) and add spacing between modal form fields.
- Make input labels bold, bright, and clickable to focus their field
- Update button styles: outlined secondary, solid primary/danger
- Add global cursor:pointer on buttons
- Show bot avatar icon in modal header
- Show header border only when content is scrolled
- Pass botId through view_open SSE event to UI
@coderabbitai
Copy link

coderabbitai bot commented Feb 22, 2026

📝 Walkthrough

Walkthrough

Adds new form fields to the /showcase modal, introduces a static Slack Block Kit search-results payload, propagates an optional botId through modal open/update flows and server events, and updates UI components for modal header behaviour, input labelling, button/input styling, and message spacing.

Changes

Cohort / File(s) Summary
Showcase modal & static blocks
apps/showcase-bot/src/listeners/commands/showcase.ts, apps/showcase-bot/src/messages/blocks/16-search-results.json
Extended the /showcase Slack modal with Department (single-select), Skills (multi-select), Attachments (file_input, max 3), and Additional Notes (multiline) fields; added a static hotel search-results Block Kit JSON payload.
Modal state & event propagation
apps/ui/src/lib/state.svelte.ts, apps/ui/src/lib/state/bots.svelte.ts, apps/ui/src/lib/dispatcher.svelte.ts, packages/slack/src/server/state.ts
Added optional botId to modal state, updated showModal signature to accept botId, preserved botId on updates, dispatcher now passes botId when opening modals, and server view_open events emit botId.
Modal presentation & interactions
apps/ui/src/components/ModalOverlay.svelte
Tracked content scroll state, derived modalBot from modal state to conditionally render bot avatar/Sparkles in header, reset scroll/validation on modal init, updated header border toggling and footer button styles.
BlockKit input accessibility
apps/ui/src/components/blockkit/blocks/InputBlock.svelte, apps/ui/src/components/blockkit/elements/PlainTextInput.svelte, apps/ui/src/components/blockkit/elements/NumberInput.svelte, apps/ui/src/components/blockkit/elements/EmailInput.svelte, apps/ui/src/components/blockkit/elements/UrlInput.svelte, apps/ui/src/components/blockkit/elements/StaticSelect.svelte
Added optional id props and derived inputId to associate labels with controls (clickable labels that focus inputs); propagated id into relevant input/select components and adjusted input vertical padding.
Button & global styling
apps/ui/src/components/blockkit/elements/Button.svelte, apps/ui/src/app.css
Adjusted button dimensions, padding, border-radius, font-weight and outline variant borders/hover; added global button { cursor: pointer; }.
Message spacing
apps/ui/src/components/Message.svelte
Changed root message padding from conditional (grouped vs not) to always use fixed vertical padding (py-2).

Sequence Diagram(s)

sequenceDiagram
    participant SSE as SSE Stream
    participant Dispatcher as Dispatcher
    participant State as State Manager
    participant ModalOverlay as ModalOverlay Component
    participant DOM as DOM/UI

    SSE->>Dispatcher: view_open event (view, viewState, botId)
    Dispatcher->>State: showModal(viewId, view, botId)
    State->>State: simulatorState.activeModal = { viewId, view, botId }
    ModalOverlay->>State: read simulatorState.activeModal
    ModalOverlay->>ModalOverlay: derive modalBot from botId
    ModalOverlay->>DOM: render header (avatar or Sparkles), content, footer
    DOM->>ModalOverlay: onscroll event
    ModalOverlay->>ModalOverlay: set contentScrolled -> update header border
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The PR title is vague and generic. It uses non-descriptive terms like 'tweaks and fixes' without clarifying the specific focus, and 'additional examples' is unclear given the actual substantial changes across multiple components and files. Consider a more specific title that highlights the primary change, such as 'Add form field IDs for label association and improve modal styling' or 'Extend showcase modal with new input fields and refactor button/modal styling'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/ui/src/lib/state/bots.svelte.ts (1)

88-92: ⚠️ Potential issue | 🟡 Minor

updateModal loses the botId when updating the view.

When updateModal replaces the activeModal object, it only preserves viewId and view, discarding the botId that was set during showModal. This would cause the bot avatar to disappear from the modal header after any modal update.

🐛 Proposed fix to preserve botId
 export function updateModal(viewId: string, view: SlackView): void {
   if (simulatorState.activeModal?.viewId === viewId) {
-    simulatorState.activeModal = { viewId, view }
+    simulatorState.activeModal = { viewId, view, botId: simulatorState.activeModal.botId }
   }
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/ui/src/lib/state/bots.svelte.ts` around lines 88 - 92, updateModal
currently replaces simulatorState.activeModal with a new object containing only
viewId and view, dropping the existing botId and causing the avatar to
disappear; modify updateModal so it preserves the existing botId (if any) when
updating the view—e.g., merge or copy simulatorState.activeModal.botId into the
new activeModal object so the botId set by showModal remains intact.
🧹 Nitpick comments (3)
apps/ui/src/components/blockkit/elements/UrlInput.svelte (1)

2-2: Use $lib path alias for imports from src/lib/.

As per coding guidelines, imports from src/lib/ should use the $lib alias for consistency.

♻️ Suggested fix
-  import type { SlackUrlInputElement } from '../../../lib/types'
+  import type { SlackUrlInputElement } from '$lib/types'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/ui/src/components/blockkit/elements/UrlInput.svelte` at line 2, Replace
the relative import path in UrlInput.svelte that references the lib types with
the $lib alias; specifically update the import statement importing
SlackUrlInputElement to use "$lib/types" (or the appropriate module under $lib)
so it follows the project convention for imports from src/lib/.
apps/ui/src/components/blockkit/elements/Button.svelte (1)

2-2: Use $lib path alias for imports from src/lib/.

As per coding guidelines, imports from src/lib/ should use the $lib alias for consistency.

♻️ Suggested fix
-  import type { SlackButtonElement } from '../../../lib/types'
+  import type { SlackButtonElement } from '$lib/types'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/ui/src/components/blockkit/elements/Button.svelte` at line 2, Replace
the relative import for the SlackButtonElement type in Button.svelte: change the
import that references '../../../lib/types' to use the $lib alias (importing
from '$lib/types') so the SlackButtonElement type import follows the project's
path-alias convention.
apps/ui/src/components/blockkit/elements/EmailInput.svelte (1)

2-2: Use $lib path alias for imports from src/lib/.

As per coding guidelines, imports from src/lib/ should use the $lib alias for consistency.

♻️ Suggested fix
-  import type { SlackEmailInputElement } from '../../../lib/types'
+  import type { SlackEmailInputElement } from '$lib/types'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/ui/src/components/blockkit/elements/EmailInput.svelte` at line 2,
Replace the relative import of SlackEmailInputElement with the $lib alias:
change the import line that references '../../../lib/types' (the
SlackEmailInputElement type import at the top of EmailInput.svelte) to use
'$lib/types' so imports from src/lib use the standardized $lib path alias.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ae00a94 and 08c9820.

📒 Files selected for processing (13)
  • apps/showcase-bot/src/listeners/commands/showcase.ts
  • apps/showcase-bot/src/messages/blocks/16-search-results.json
  • apps/ui/src/app.css
  • apps/ui/src/components/Message.svelte
  • apps/ui/src/components/ModalOverlay.svelte
  • apps/ui/src/components/blockkit/blocks/InputBlock.svelte
  • apps/ui/src/components/blockkit/elements/Button.svelte
  • apps/ui/src/components/blockkit/elements/EmailInput.svelte
  • apps/ui/src/components/blockkit/elements/UrlInput.svelte
  • apps/ui/src/lib/dispatcher.svelte.ts
  • apps/ui/src/lib/state.svelte.ts
  • apps/ui/src/lib/state/bots.svelte.ts
  • packages/slack/src/server/state.ts
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx,js,jsx}: Use camelCase for variable names in TypeScript/JavaScript code
No semicolons in code, enforced by Prettier
Use single quotes instead of double quotes
Use trailing commas in es5 format
Prefix unused variables with underscore (_)

Files:

  • apps/ui/src/lib/state.svelte.ts
  • apps/showcase-bot/src/listeners/commands/showcase.ts
  • packages/slack/src/server/state.ts
  • apps/ui/src/lib/state/bots.svelte.ts
  • apps/ui/src/lib/dispatcher.svelte.ts
apps/ui/src/**/*.{ts,tsx,svelte}

📄 CodeRabbit inference engine (CLAUDE.md)

Use $lib path alias when importing from src/lib/ in Svelte applications

Files:

  • apps/ui/src/lib/state.svelte.ts
  • apps/ui/src/components/blockkit/elements/UrlInput.svelte
  • apps/ui/src/components/blockkit/blocks/InputBlock.svelte
  • apps/ui/src/lib/state/bots.svelte.ts
  • apps/ui/src/components/blockkit/elements/EmailInput.svelte
  • apps/ui/src/lib/dispatcher.svelte.ts
  • apps/ui/src/components/Message.svelte
  • apps/ui/src/components/blockkit/elements/Button.svelte
  • apps/ui/src/components/ModalOverlay.svelte
packages/*/src/server/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

packages/*/src/server/*.ts: Platform emulator plugins must implement WebSocket protocol for event broadcasting to the frontend
Organize platform plugin packages with server/state.ts for in-memory state, server/web-api.ts for API handlers, and server/persistence.ts for storage

Files:

  • packages/slack/src/server/state.ts
packages/slack/src/server/**/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

Use SSE (Server-Sent Events) for broadcasting events from the emulator to the frontend

Files:

  • packages/slack/src/server/state.ts
**/*.svelte

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.svelte: Use {@html} in Svelte for mrkdwn rendering (ESLint rule disabled for this specific use case)
Use Svelte 5 runes ($state, $derived, $effect) for reactivity instead of legacy stores

Files:

  • apps/ui/src/components/blockkit/elements/UrlInput.svelte
  • apps/ui/src/components/blockkit/blocks/InputBlock.svelte
  • apps/ui/src/components/blockkit/elements/EmailInput.svelte
  • apps/ui/src/components/Message.svelte
  • apps/ui/src/components/blockkit/elements/Button.svelte
  • apps/ui/src/components/ModalOverlay.svelte
🧠 Learnings (4)
📚 Learning: 2026-02-20T00:31:35.696Z
Learnt from: CR
Repo: tyom/botarium PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-02-20T00:31:35.696Z
Learning: Applies to packages/slack/src/server/**/*.ts : Use SSE (Server-Sent Events) for broadcasting events from the emulator to the frontend

Applied to files:

  • packages/slack/src/server/state.ts
📚 Learning: 2026-02-20T00:31:35.696Z
Learnt from: CR
Repo: tyom/botarium PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-02-20T00:31:35.696Z
Learning: Applies to packages/slack/src/server/socket-mode.ts : Slack API emulator must implement Socket Mode protocol for bot communication

Applied to files:

  • packages/slack/src/server/state.ts
📚 Learning: 2026-02-20T00:31:35.696Z
Learnt from: CR
Repo: tyom/botarium PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-02-20T00:31:35.696Z
Learning: Applies to packages/*/src/server/*.ts : Organize platform plugin packages with `server/state.ts` for in-memory state, `server/web-api.ts` for API handlers, and `server/persistence.ts` for storage

Applied to files:

  • packages/slack/src/server/state.ts
📚 Learning: 2026-01-14T21:36:07.933Z
Learnt from: tyom
Repo: tyom/botarium PR: 1
File: apps/ui/src/components/MessagePanel.svelte:10-23
Timestamp: 2026-01-14T21:36:07.933Z
Learning: In the client-only Botarium UI (Vite + Svelte), do not add or rely on SSR-specific guards (e.g., checks for sessionStorage) in components. Since the app runs only in Electron or the browser, code that accesses browser APIs will execute in a non-SSR environment, so SSR-unsafe checks are unnecessary and can be removed for maintainability.

Applied to files:

  • apps/ui/src/components/blockkit/elements/UrlInput.svelte
  • apps/ui/src/components/blockkit/blocks/InputBlock.svelte
  • apps/ui/src/components/blockkit/elements/EmailInput.svelte
  • apps/ui/src/components/Message.svelte
  • apps/ui/src/components/blockkit/elements/Button.svelte
  • apps/ui/src/components/ModalOverlay.svelte
🧬 Code graph analysis (1)
apps/ui/src/lib/state/bots.svelte.ts (2)
apps/ui/src/lib/state.svelte.ts (2)
  • showModal (108-108)
  • simulatorState (31-66)
apps/ui/src/lib/types.ts (1)
  • SlackView (90-101)
🪛 GitHub Actions: CI
apps/showcase-bot/src/messages/blocks/16-search-results.json

[warning] 1-1: Code style issues found in the file. Run Prettier with --write to fix.

🔇 Additional comments (16)
apps/ui/src/app.css (1)

6-8: LGTM!

The global cursor: pointer rule for buttons complements the existing button reset in @layer base and improves user feedback on interactive elements.

apps/ui/src/components/blockkit/elements/UrlInput.svelte (1)

19-25: LGTM!

The padding change from fixed height (h-8) to vertical padding (py-2) is consistent with similar input components and allows for more flexible sizing.

packages/slack/src/server/state.ts (1)

945-953: LGTM!

The addition of botId to the view_open event emission correctly propagates the bot identifier through the modal state system, aligning with the related frontend state changes.

apps/ui/src/lib/state.svelte.ts (1)

24-28: LGTM!

The optional botId property cleanly extends the ModalState interface whilst maintaining backward compatibility. This enables the modal overlay to display bot-specific avatars and context.

apps/ui/src/components/blockkit/elements/EmailInput.svelte (1)

19-25: LGTM!

The padding change is consistent with the similar update in UrlInput.svelte, maintaining uniform input styling across the Block Kit elements.

apps/ui/src/components/Message.svelte (1)

356-358: LGTM!

The simplified padding logic removes the conditional vertical spacing for grouped messages, applying consistent py-2 spacing throughout. This aligns with the broader UI spacing refinements in this PR.

apps/ui/src/components/blockkit/elements/Button.svelte (1)

57-98: LGTM!

The button styling improvements enhance the visual appearance with larger touch targets, rounder corners, and more defined outline variant borders. The transition updates ensure smooth state changes.

apps/showcase-bot/src/messages/blocks/16-search-results.json (1)

1-157: LGTM on structure!

The Slack Block Kit payload is well-structured with appropriate use of section, context, divider, and actions blocks for displaying hotel search results. The placeholder URLs (fakeLink.toHotelPage.com) are suitable for showcase purposes.

apps/ui/src/lib/dispatcher.svelte.ts (1)

402-402: LGTM!

The botId is correctly propagated from the SSE event to the showModal function, aligning with the extended signature that accepts an optional bot identifier.

apps/showcase-bot/src/listeners/commands/showcase.ts (1)

231-321: LGTM!

The new modal inputs are well-structured and follow the established patterns:

  • Department: single-select with clear options
  • Skills: multi-select with relevant programming language options
  • Attachments: file input limited to 3 files
  • Additional Notes: optional multiline text with appropriate placeholder and hint

All blocks use consistent formatting and adhere to Slack Block Kit conventions.

apps/ui/src/lib/state/bots.svelte.ts (1)

79-85: LGTM!

The showModal function correctly accepts an optional botId parameter and propagates it to the modal state.

apps/ui/src/components/ModalOverlay.svelte (5)

44-52: LGTM!

Good use of Svelte 5 runes. The contentScrolled state and modalBot derived value are well-implemented for tracking scroll state and looking up the associated bot.


338-358: Nice UX enhancement with the bot avatar and scroll-aware header border.

The conditional rendering of the bot avatar (with fallback to Sparkles icon) and the scroll-based border transition provide good visual feedback.


375-380: LGTM!

The scroll handler cleanly updates contentScrolled to trigger the header border transition.


403-411: LGTM!

Button styling improvements with font-bold and refined hover states.


422-426: LGTM!

The scoped global style appropriately adjusts spacing within the BlockKitRenderer for modal content.

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/showcase-bot/src/messages/blocks/16-search-results.json`:
- Around line 1-157: Run Prettier to fix the CI formatting error in this JSON
block; specifically format the file containing the "blocks" array that includes
action_ids like "showcase_search_results_filter" and
"showcase_search_results_next" by executing npx prettier --write on that file so
the JSON adheres to the project's style (this will resolve the Prettier check
failure).

In `@apps/ui/src/components/blockkit/blocks/InputBlock.svelte`:
- Around line 90-100: The label currently has an onclick handler that focuses
the associated input but lacks keyboard support and focusability; update the
label element (the same <label ... onclick=...> block) to be keyboard-accessible
by adding tabindex="0" and an on:keydown handler that listens for Enter and
Space and triggers the same focus logic (mirroring the onclick behavior), and
remove the svelte-ignore a11y_click_events_have_key_events (and
a11y_no_noninteractive_element_interactions if no longer needed) so the a11y
checks pass; keep the existing onclick as-is but ensure the on:keydown reuses
the same querySelector/focus logic.

---

Outside diff comments:
In `@apps/ui/src/lib/state/bots.svelte.ts`:
- Around line 88-92: updateModal currently replaces simulatorState.activeModal
with a new object containing only viewId and view, dropping the existing botId
and causing the avatar to disappear; modify updateModal so it preserves the
existing botId (if any) when updating the view—e.g., merge or copy
simulatorState.activeModal.botId into the new activeModal object so the botId
set by showModal remains intact.

---

Nitpick comments:
In `@apps/ui/src/components/blockkit/elements/Button.svelte`:
- Line 2: Replace the relative import for the SlackButtonElement type in
Button.svelte: change the import that references '../../../lib/types' to use the
$lib alias (importing from '$lib/types') so the SlackButtonElement type import
follows the project's path-alias convention.

In `@apps/ui/src/components/blockkit/elements/EmailInput.svelte`:
- Line 2: Replace the relative import of SlackEmailInputElement with the $lib
alias: change the import line that references '../../../lib/types' (the
SlackEmailInputElement type import at the top of EmailInput.svelte) to use
'$lib/types' so imports from src/lib use the standardized $lib path alias.

In `@apps/ui/src/components/blockkit/elements/UrlInput.svelte`:
- Line 2: Replace the relative import path in UrlInput.svelte that references
the lib types with the $lib alias; specifically update the import statement
importing SlackUrlInputElement to use "$lib/types" (or the appropriate module
under $lib) so it follows the project convention for imports from src/lib/.

tyom added 2 commits February 22, 2026 14:31
Replace the onclick/querySelector hack in InputBlock with proper
<label for> / id pairing on child input elements. This provides
native click-to-focus and keyboard accessibility, removing all
svelte-ignore a11y comments.

Fix updateModal dropping botId when replacing activeModal, which
caused the bot avatar to disappear on modal updates.

Also normalize relative imports to $lib/types in Button, EmailInput,
and UrlInput.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (4)
apps/ui/src/components/blockkit/elements/PlainTextInput.svelte (1)

2-2: Use $lib path alias for consistency.

The import should use the $lib path alias instead of a relative path to align with the coding guidelines and the pattern used in other input components in this PR (e.g., EmailInput.svelte, UrlInput.svelte).

Suggested fix
-  import type { SlackPlainTextInputElement } from '../../../lib/types'
+  import type { SlackPlainTextInputElement } from '$lib/types'

As per coding guidelines: "Use $lib path alias when importing from src/lib/ in Svelte applications".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/ui/src/components/blockkit/elements/PlainTextInput.svelte` at line 2,
Replace the relative import of SlackPlainTextInputElement with the $lib alias:
update the import statement that currently references '../../../lib/types' in
PlainTextInput.svelte to use '$lib/types' so it matches other components (e.g.,
EmailInput.svelte, UrlInput.svelte) and the project's coding guideline; ensure
the imported symbol SlackPlainTextInputElement remains unchanged.
apps/ui/src/components/blockkit/elements/NumberInput.svelte (1)

2-2: Use $lib path alias for consistency.

The import should use the $lib path alias instead of a relative path to align with the coding guidelines and the pattern used in other input components in this PR.

Suggested fix
-  import type { SlackNumberInputElement } from '../../../lib/types'
+  import type { SlackNumberInputElement } from '$lib/types'

As per coding guidelines: "Use $lib path alias when importing from src/lib/ in Svelte applications".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/ui/src/components/blockkit/elements/NumberInput.svelte` at line 2,
Replace the relative import of SlackNumberInputElement in NumberInput.svelte
with the $lib path alias; locate the import statement that currently references
'../../../lib/types' and change it to import from '$lib/types' so the component
(NumberInput.svelte) consistently uses the $lib alias for
SlackNumberInputElement.
apps/ui/src/components/blockkit/blocks/InputBlock.svelte (1)

18-18: Use $lib path alias for consistency.

The import should use the $lib path alias instead of a relative path to align with the coding guidelines.

Suggested fix
-  } from '../../../lib/types'
+  } from '$lib/types'

As per coding guidelines: "Use $lib path alias when importing from src/lib/ in Svelte applications".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/ui/src/components/blockkit/blocks/InputBlock.svelte` at line 18, The
import in InputBlock.svelte currently uses a relative path
("../../../lib/types"); update that import to use the Svelte $lib path alias
(import from "$lib/types") to follow project guidelines and keep imports
consistent—modify the existing import statement that references types in
../../../lib/types so it points to $lib/types instead.
apps/ui/src/components/blockkit/elements/StaticSelect.svelte (1)

2-5: Use $lib path alias for consistency.

The import should use the $lib path alias instead of a relative path to align with the coding guidelines and other components in this PR.

Suggested fix
-  import type {
-    SlackStaticSelectElement,
-    SlackOption,
-  } from '../../../lib/types'
+  import type {
+    SlackStaticSelectElement,
+    SlackOption,
+  } from '$lib/types'

As per coding guidelines: "Use $lib path alias when importing from src/lib/ in Svelte applications".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/ui/src/components/blockkit/elements/StaticSelect.svelte` around lines 2
- 5, Replace the relative import in StaticSelect.svelte that brings in
SlackStaticSelectElement and SlackOption from '../../../lib/types' with the $lib
alias import; update the import statement to reference '$lib/types' so the
component (StaticSelect.svelte) uses the project-wide $lib path alias for
SlackStaticSelectElement and SlackOption.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 08c9820 and 8d55a4a.

📒 Files selected for processing (9)
  • apps/showcase-bot/src/messages/blocks/16-search-results.json
  • apps/ui/src/components/blockkit/blocks/InputBlock.svelte
  • apps/ui/src/components/blockkit/elements/Button.svelte
  • apps/ui/src/components/blockkit/elements/EmailInput.svelte
  • apps/ui/src/components/blockkit/elements/NumberInput.svelte
  • apps/ui/src/components/blockkit/elements/PlainTextInput.svelte
  • apps/ui/src/components/blockkit/elements/StaticSelect.svelte
  • apps/ui/src/components/blockkit/elements/UrlInput.svelte
  • apps/ui/src/lib/state/bots.svelte.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • apps/ui/src/lib/state/bots.svelte.ts
  • apps/ui/src/components/blockkit/elements/Button.svelte
  • apps/showcase-bot/src/messages/blocks/16-search-results.json
🧰 Additional context used
📓 Path-based instructions (2)
**/*.svelte

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.svelte: Use {@html} in Svelte for mrkdwn rendering (ESLint rule disabled for this specific use case)
Use Svelte 5 runes ($state, $derived, $effect) for reactivity instead of legacy stores

Files:

  • apps/ui/src/components/blockkit/elements/NumberInput.svelte
  • apps/ui/src/components/blockkit/blocks/InputBlock.svelte
  • apps/ui/src/components/blockkit/elements/StaticSelect.svelte
  • apps/ui/src/components/blockkit/elements/EmailInput.svelte
  • apps/ui/src/components/blockkit/elements/UrlInput.svelte
  • apps/ui/src/components/blockkit/elements/PlainTextInput.svelte
apps/ui/src/**/*.{ts,tsx,svelte}

📄 CodeRabbit inference engine (CLAUDE.md)

Use $lib path alias when importing from src/lib/ in Svelte applications

Files:

  • apps/ui/src/components/blockkit/elements/NumberInput.svelte
  • apps/ui/src/components/blockkit/blocks/InputBlock.svelte
  • apps/ui/src/components/blockkit/elements/StaticSelect.svelte
  • apps/ui/src/components/blockkit/elements/EmailInput.svelte
  • apps/ui/src/components/blockkit/elements/UrlInput.svelte
  • apps/ui/src/components/blockkit/elements/PlainTextInput.svelte
🧠 Learnings (2)
📚 Learning: 2026-01-14T21:36:07.933Z
Learnt from: tyom
Repo: tyom/botarium PR: 1
File: apps/ui/src/components/MessagePanel.svelte:10-23
Timestamp: 2026-01-14T21:36:07.933Z
Learning: In the client-only Botarium UI (Vite + Svelte), do not add or rely on SSR-specific guards (e.g., checks for sessionStorage) in components. Since the app runs only in Electron or the browser, code that accesses browser APIs will execute in a non-SSR environment, so SSR-unsafe checks are unnecessary and can be removed for maintainability.

Applied to files:

  • apps/ui/src/components/blockkit/elements/NumberInput.svelte
  • apps/ui/src/components/blockkit/blocks/InputBlock.svelte
  • apps/ui/src/components/blockkit/elements/StaticSelect.svelte
  • apps/ui/src/components/blockkit/elements/EmailInput.svelte
  • apps/ui/src/components/blockkit/elements/UrlInput.svelte
  • apps/ui/src/components/blockkit/elements/PlainTextInput.svelte
📚 Learning: 2026-02-20T00:31:35.696Z
Learnt from: CR
Repo: tyom/botarium PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-02-20T00:31:35.696Z
Learning: Applies to apps/ui/src/**/*.{ts,tsx,svelte} : Use `$lib` path alias when importing from `src/lib/` in Svelte applications

Applied to files:

  • apps/ui/src/components/blockkit/elements/UrlInput.svelte
🔇 Additional comments (7)
apps/ui/src/components/blockkit/elements/PlainTextInput.svelte (1)

6-12: LGTM!

The optional id prop is correctly added and propagated to both the textarea and input elements, enabling proper label-for interactions. The use of Svelte 5 runes ($props() and $derived) is correct.

Also applies to: 17-34

apps/ui/src/components/blockkit/elements/UrlInput.svelte (1)

1-27: LGTM!

The implementation correctly adds the optional id prop, uses the $lib path alias for imports, and properly employs Svelte 5 runes. The styling update from fixed height to vertical padding is consistent with other input components.

apps/ui/src/components/blockkit/blocks/InputBlock.svelte (2)

85-96: Good accessibility improvement with proper label association.

The inputId derivation and for={inputId} attribute correctly replace the previous onclick-based approach, providing native label-input association. This addresses the earlier accessibility concern about keyboard support.


100-156: The current approach appears intentionally differentiated based on component structure rather than inconsistency.

Components like Checkboxes and RadioButtonGroup render multiple interactive elements (checkboxes/radio buttons in a loop), each with its own associated label. A single id prop cannot properly associate with multiple elements—the current per-element labelling approach is the correct accessibility pattern.

DatePicker, TimePicker, DateTimePicker, and FileInput handle labelling differently: they're either complex widgets managing their own interaction state or provide their own label handling. Propagating id to these would not meaningfully improve accessibility and could create confusion with the parent label's for attribute (which only associates with a single element).

The existing pattern is sound: simple text inputs receive id for parent label association, while multi-element and complex components use alternative labelling strategies.

Likely an incorrect or invalid review comment.

apps/ui/src/components/blockkit/elements/StaticSelect.svelte (1)

10-18: LGTM!

The optional id prop is correctly added to the Props interface, destructured, and passed through to the <select> element. This enables proper label-for association when used with InputBlock.

Also applies to: 52-53

apps/ui/src/components/blockkit/elements/EmailInput.svelte (1)

1-27: LGTM!

The implementation correctly adds the optional id prop, uses the $lib path alias for imports, and properly employs Svelte 5 runes. The changes are consistent with the other input components in this PR.

apps/ui/src/components/blockkit/elements/NumberInput.svelte (1)

6-12: LGTM!

The optional id prop is correctly added and propagated to the input element. The use of Svelte 5 runes is correct.

Also applies to: 17-18

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@apps/ui/src/components/blockkit/blocks/InputBlock.svelte`:
- Line 18: The import in InputBlock.svelte currently uses a relative path
("../../../lib/types"); update that import to use the Svelte $lib path alias
(import from "$lib/types") to follow project guidelines and keep imports
consistent—modify the existing import statement that references types in
../../../lib/types so it points to $lib/types instead.

In `@apps/ui/src/components/blockkit/elements/NumberInput.svelte`:
- Line 2: Replace the relative import of SlackNumberInputElement in
NumberInput.svelte with the $lib path alias; locate the import statement that
currently references '../../../lib/types' and change it to import from
'$lib/types' so the component (NumberInput.svelte) consistently uses the $lib
alias for SlackNumberInputElement.

In `@apps/ui/src/components/blockkit/elements/PlainTextInput.svelte`:
- Line 2: Replace the relative import of SlackPlainTextInputElement with the
$lib alias: update the import statement that currently references
'../../../lib/types' in PlainTextInput.svelte to use '$lib/types' so it matches
other components (e.g., EmailInput.svelte, UrlInput.svelte) and the project's
coding guideline; ensure the imported symbol SlackPlainTextInputElement remains
unchanged.

In `@apps/ui/src/components/blockkit/elements/StaticSelect.svelte`:
- Around line 2-5: Replace the relative import in StaticSelect.svelte that
brings in SlackStaticSelectElement and SlackOption from '../../../lib/types'
with the $lib alias import; update the import statement to reference
'$lib/types' so the component (StaticSelect.svelte) uses the project-wide $lib
path alias for SlackStaticSelectElement and SlackOption.

@tyom tyom merged commit 86c8796 into main Feb 22, 2026
2 checks passed
@tyom tyom deleted the dev branch February 22, 2026 14:57
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