feat(embed/chat): AI Meeting Copilot — Transform Transcripts into Actionable Insights with Slack Automation#92
Conversation
Transforms raw meeting transcripts into structured insights (summary, action items, risks, next steps, follow-up email) and delivers them to Slack via a Lamatic chat widget embedded in Next.js. - Next.js 14 App Router frontend (page.js, layout.js, globals.css) - LamaticChat.js: widget bootstraps on mount so chatConfig + IndexedDB session are ready before first message - HeroActions.jsx and TranscriptPlayground.jsx as client components - 4 demo screenshots (web app, Lamatic Studio, Slack) - Full README with Mermaid architecture diagram, Vercel deploy button, flow config guide Lamatic flow: Chat Trigger -> Generate Text -> Generate JSON -> Slack API + Chat Response Made-with: Cursor
Updated the README to clarify authorship.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds a new "AI Meeting Intelligence Copilot" Next.js embed kit (Lamatic chat) that transforms meeting transcripts into structured insights and posts them to Slack. Also adds the new kit's UI, flows, configs, and docs; updates root README and repository .gitignore; and tweaks existing embed chat README and globals.css. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant NextApp as Next.js App
participant Widget as Lamatic Chat Widget
participant Lamatic as Lamatic Flow Engine
participant LLM as LLM Provider
participant Slack as Slack Webhook
User->>NextApp: Open meeting intelligence page
NextApp->>Widget: Bootstrap widget (project/flow/api URL)
User->>Widget: Paste/send transcript
Widget->>Lamatic: Chat Trigger (transcript)
Lamatic->>LLM: Generate Text (analysis prompt)
LLM-->>Lamatic: Return analysis (markdown)
Lamatic->>LLM: Generate JSON (Instructor node)
LLM-->>Lamatic: Return structured JSON
Lamatic->>Slack: POST formatted message via webhook
Lamatic-->>Widget: Stream full analysis response
Widget-->>User: Display analysis
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 8
🧹 Nitpick comments (2)
kits/embed/chat/app/globals.css (1)
124-126: Respect reduced-motion for global smooth scrolling.Applying smooth scrolling globally can conflict with users who prefer reduced motion.
Accessibility-friendly refinement
html { scroll-behavior: smooth; } + + `@media` (prefers-reduced-motion: reduce) { + html { + scroll-behavior: auto; + } + }kits/embed/chat/app/page.js (1)
39-45: Optional: treat whitespace-only env values as missing.Using raw truthiness allows
" "to pass readiness checks.Small robustness tweak
- }) - .filter(([, value]) => !value) + }) + .filter(([, value]) => !String(value).trim()) .map(([key]) => key);
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 99dc7076-135f-4c87-aa03-56602266af5d
⛔ Files ignored due to path filters (4)
kits/embed/chat/app/Screenshots/1.pngis excluded by!**/*.pngkits/embed/chat/app/Screenshots/FromwebPage-With Followup mail-Running.pngis excluded by!**/*.pngkits/embed/chat/app/Screenshots/Slack_integrated-Summarizer.pngis excluded by!**/*.pngkits/embed/chat/app/Screenshots/fromLamatic-Running.pngis excluded by!**/*.png
📒 Files selected for processing (9)
.gitignoreREADME.mdkits/embed/chat/README.mdkits/embed/chat/app/globals.csskits/embed/chat/app/layout.jskits/embed/chat/app/page.jskits/embed/chat/components/HeroActions.jsxkits/embed/chat/components/LamaticChat.jskits/embed/chat/components/TranscriptPlayground.jsx
| * { | ||
| @apply border-border outline-ring/50; | ||
| box-sizing: border-box; | ||
| } |
There was a problem hiding this comment.
Fix Stylelint violations in base rules.
The added declarations trigger declaration-empty-line-before and will keep style checks red.
Proposed lint-safe patch
* {
`@apply` border-border outline-ring/50;
+
box-sizing: border-box;
}
body {
`@apply` bg-background text-foreground;
+
margin: 0;
}Also applies to: 128-131
🧰 Tools
🪛 Stylelint (17.4.0)
[error] 121-121: Expected empty line before declaration (declaration-empty-line-before)
(declaration-empty-line-before)
| <div className="mt-10"> | ||
| <TranscriptPlayground /> | ||
| </div> |
There was a problem hiding this comment.
Analyze path remains active even when Lamatic is not ready.
LamaticChat is disabled by readiness, but TranscriptPlayground stays interactive and still dispatches lamatic:submit. In non-configured environments this becomes a silent dead-end for users.
Suggested integration fix
- <div className="mt-10">
- <TranscriptPlayground />
- </div>
+ <div className="mt-10">
+ <TranscriptPlayground isLamaticReady={isLamaticReady} />
+ </div>Then in kits/embed/chat/components/TranscriptPlayground.jsx, include readiness in the button gate:
-export default function TranscriptPlayground() {
+export default function TranscriptPlayground({ isLamaticReady = true }) {
...
- const canAnalyze = useMemo(() => transcript.trim().length > 12, [transcript]);
+ const canAnalyze = useMemo(
+ () => isLamaticReady && transcript.trim().length > 12,
+ [isLamaticReady, transcript],
+ );Also applies to: 208-209
| function bootstrapWidget() { | ||
| if (didBootstrap) return; | ||
| didBootstrap = true; |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cat -n kits/embed/chat/components/LamaticChat.js | head -100Repository: Lamatic/AgentKit
Length of output: 4762
🏁 Script executed:
cat -n kits/embed/chat/components/LamaticChat.js | tail -80Repository: Lamatic/AgentKit
Length of output: 3276
Script injection must survive transient load failures.
Lines 28–29 lock the bootstrap state before the remote script succeeds. If the widget script fails to load (lines 62–63), didBootstrap remains true permanently, preventing any retry. On subsequent mounts or re-initialization attempts, line 28 returns early, so the widget stays unavailable until a full page refresh.
Move didBootstrap = true into the onload handler, reset it in onerror, and remove the failed script element to allow recovery:
Suggested fix
function bootstrapWidget() {
- if (didBootstrap) return;
- didBootstrap = true;
+ if (didBootstrap || document.getElementById(SCRIPT_ID)) return;
if (!PROJECT_ID || !FLOW_ID || !API_URL) {
console.warn("[LamaticChat] Missing env vars — widget disabled.", {
PROJECT_ID: PROJECT_ID || "MISSING",
FLOW_ID: FLOW_ID || "MISSING",
@@
if (!document.getElementById(SCRIPT_ID)) {
const script = document.createElement("script");
script.id = SCRIPT_ID;
script.type = "module";
script.async = true;
script.src = `https://widget.lamatic.ai/chat-v2?projectId=${encodeURIComponent(PROJECT_ID)}`;
- script.onload = () => console.log("[LamaticChat] widget script loaded ✓");
- script.onerror = () => console.error("[LamaticChat] widget script failed to load");
+ script.onload = () => {
+ didBootstrap = true;
+ console.log("[LamaticChat] widget script loaded ✓");
+ };
+ script.onerror = () => {
+ script.remove();
+ didBootstrap = false;
+ console.error("[LamaticChat] widget script failed to load");
+ };
document.body.appendChild(script);
}
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| function bootstrapWidget() { | |
| if (didBootstrap) return; | |
| didBootstrap = true; | |
| function bootstrapWidget() { | |
| if (didBootstrap || document.getElementById(SCRIPT_ID)) return; | |
| if (!PROJECT_ID || !FLOW_ID || !API_URL) { | |
| console.warn("[LamaticChat] Missing env vars — widget disabled.", { | |
| PROJECT_ID: PROJECT_ID || "MISSING", | |
| FLOW_ID: FLOW_ID || "MISSING", | |
| API_URL: API_URL || "MISSING", | |
| }); | |
| return; | |
| } | |
| if (!document.getElementById(SCRIPT_ID)) { | |
| const script = document.createElement("script"); | |
| script.id = SCRIPT_ID; | |
| script.type = "module"; | |
| script.async = true; | |
| script.src = `https://widget.lamatic.ai/chat-v2?projectId=${encodeURIComponent(PROJECT_ID)}`; | |
| script.onload = () => { | |
| didBootstrap = true; | |
| console.log("[LamaticChat] widget script loaded ✓"); | |
| }; | |
| script.onerror = () => { | |
| script.remove(); | |
| didBootstrap = false; | |
| console.error("[LamaticChat] widget script failed to load"); | |
| }; | |
| document.body.appendChild(script); | |
| } | |
| } |
| const handleReady = () => { | ||
| console.log("[LamaticChat] lamaticChatWidgetReady ✓"); | ||
| setReady(true); | ||
| }; | ||
|
|
||
| window.addEventListener("lamaticChatWidgetReady", handleReady, { once: true }); | ||
| return () => window.removeEventListener("lamaticChatWidgetReady", handleReady); |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
find . -type f -name "LamaticChat.js" | head -20Repository: Lamatic/AgentKit
Length of output: 103
🏁 Script executed:
cat -n ./kits/embed/chat/components/LamaticChat.jsRepository: Lamatic/AgentKit
Length of output: 6686
Replay pending opens when the widget becomes ready.
If the user clicks Open before window.LamaticChatWidget exists, the sync effect (lines 95-106) executes but no-ops because the widget isn't available yet. When lamaticChatWidgetReady later fires and sets ready to true, the sync effect doesn't rerun since ready is not in its dependency array. The button then shows "Close Copilot" while the widget was never actually opened, creating a state mismatch.
Suggested fix
useEffect(() => {
if (disabled || !isConfigured) return;
bootstrapWidget();
const handleReady = () => {
console.log("[LamaticChat] lamaticChatWidgetReady ✓");
setReady(true);
};
+ if (window.LamaticChatWidget) {
+ handleReady();
+ }
window.addEventListener("lamaticChatWidgetReady", handleReady, { once: true });
return () => window.removeEventListener("lamaticChatWidgetReady", handleReady);
}, [disabled, isConfigured]);
useEffect(() => {
- if (!isConfigured || disabled) return;
+ if (!isConfigured || disabled || !ready) return;
try {
if (isOpen) {
window.LamaticChatWidget?.open?.();
} else {
window.LamaticChatWidget?.close?.();
}
} catch (e) {
console.warn("[LamaticChat] toggle error", e);
}
- }, [disabled, isConfigured, isOpen]);
+ }, [disabled, isConfigured, isOpen, ready]);
return (
<div className="fixed bottom-6 right-6 z-[70]">
<Button
type="button"
className="rounded-full px-5 shadow-lg"
aria-pressed={isOpen}
+ disabled={!ready}
onClick={() => setIsOpen(v => !v)}
>
- {isOpen ? "Close Copilot" : "Open Copilot"}
+ {!ready ? "Loading Copilot…" : isOpen ? "Close Copilot" : "Open Copilot"}
</Button>
</div>
);| > Part of the [Lamatic AgentKit](https://github.com/Lamatic/AgentKit) · `kits/embed/chat` | ||
|
|
||
| **Agent Kit Embedded Chat** is an AI-powered document chat system built with [Lamatic.ai](https://lamatic.ai). It uses intelligent workflows to index PDFs and webpages, then provides an interactive chat interface where users can ask questions about their documents through a modern Next.js interface. | ||
| [](https://vercel.com/new/clone?repository-url=https://github.com/vijayshreepathak/AgentKit&root-directory=kits/embed/chat&env=NEXT_PUBLIC_LAMATIC_PROJECT_ID,NEXT_PUBLIC_LAMATIC_FLOW_ID,NEXT_PUBLIC_LAMATIC_API_URL&envDescription=Lamatic%20project%20credentials) |
There was a problem hiding this comment.
Deploy button targets a personal fork instead of canonical upstream.
This can deploy a divergent codebase from the project’s main repository.
Suggested link fix
-[](https://vercel.com/new/clone?repository-url=https://github.com/vijayshreepathak/AgentKit&root-directory=kits/embed/chat&env=NEXT_PUBLIC_LAMATIC_PROJECT_ID,NEXT_PUBLIC_LAMATIC_FLOW_ID,NEXT_PUBLIC_LAMATIC_API_URL&envDescription=Lamatic%20project%20credentials)
+[](https://vercel.com/new/clone?repository-url=https://github.com/Lamatic/AgentKit&root-directory=kits/embed/chat&env=NEXT_PUBLIC_LAMATIC_PROJECT_ID,NEXT_PUBLIC_LAMATIC_FLOW_ID,NEXT_PUBLIC_LAMATIC_API_URL&envDescription=Lamatic%20project%20credentials)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| [](https://vercel.com/new/clone?repository-url=https://github.com/vijayshreepathak/AgentKit&root-directory=kits/embed/chat&env=NEXT_PUBLIC_LAMATIC_PROJECT_ID,NEXT_PUBLIC_LAMATIC_FLOW_ID,NEXT_PUBLIC_LAMATIC_API_URL&envDescription=Lamatic%20project%20credentials) | |
| [](https://vercel.com/new/clone?repository-url=https://github.com/Lamatic/AgentKit&root-directory=kits/embed/chat&env=NEXT_PUBLIC_LAMATIC_PROJECT_ID,NEXT_PUBLIC_LAMATIC_FLOW_ID,NEXT_PUBLIC_LAMATIC_API_URL&envDescription=Lamatic%20project%20credentials) |
| ``` | ||
| kits/embed/chat/ | ||
| ├── app/ | ||
| │ ├── page.js # Landing page — Server Component | ||
| │ ├── layout.js # Root layout (Geist font + Vercel Analytics) | ||
| │ ├── globals.css # Tailwind v4 theme + CSS variables | ||
| │ └── Screenshots/ # Demo screenshots | ||
| │ ├── 1.png | ||
| │ ├── fromLamatic-Running.png | ||
| │ ├── FromwebPage-With Followup mail-Running.png | ||
| │ └── Slack_integrated-Summarizer.png | ||
| ├── components/ | ||
| │ ├── LamaticChat.js # Widget lifecycle — mounts root div + script | ||
| │ ├── HeroActions.jsx # Interactive hero buttons (Client Component) | ||
| │ ├── TranscriptPlayground.jsx # Textarea + Analyze button | ||
| │ └── ui/ # shadcn/ui primitives | ||
| ├── flows/ | ||
| │ └── embedded-chatbot-chatbot/ # Exported Lamatic flow JSON | ||
| ├── .env.local # ← create this (see below) | ||
| └── package.json | ||
| ``` |
There was a problem hiding this comment.
Add code fence languages to satisfy markdownlint (MD040).
Both structural blocks are unlabeled fenced code sections.
Suggested lint fix
-```
+```text
kits/embed/chat/
...
-```
+```
-```
+```text
page.js (Server Component)
...
-```
+```Also applies to: 118-134
🧰 Tools
🪛 markdownlint-cli2 (0.21.0)
[warning] 13-13: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
| ``` | ||
| Chat Widget ──▶ Generate Text (LLM) ──▶ Generate JSON | ||
| │ | ||
| ┌────────────────┤ | ||
| ▼ ▼ | ||
| Slack API Chat Response | ||
| (Webhook) (back to user) | ||
| ``` |
There was a problem hiding this comment.
Add language identifiers to unlabeled fenced blocks.
These blocks currently violate MD040 and may fail markdown lint in strict pipelines.
Suggested lint fix
-```
+```text
Chat Widget ──▶ Generate Text (LLM) ──▶ Generate JSON
...
-```
+```
-```
+```text
kits/embed/chat/
...
-```
+```Also applies to: 206-222
| ```bash | ||
| git clone https://github.com/vijayshreepathak/AgentKit.git | ||
| cd AgentKit/kits/embed/chat | ||
| ``` |
There was a problem hiding this comment.
Use the canonical repository URL in Quick Start.
The clone command points to a personal fork. In this repo’s primary docs, that can send users to the wrong upstream and stale default branch history.
Suggested doc fix
-git clone https://github.com/vijayshreepathak/AgentKit.git
+git clone https://github.com/Lamatic/AgentKit.git
cd AgentKit/kits/embed/chat📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ```bash | |
| git clone https://github.com/vijayshreepathak/AgentKit.git | |
| cd AgentKit/kits/embed/chat | |
| ``` | |
| git clone https://github.com/Lamatic/AgentKit.git | |
| cd AgentKit/kits/embed/chat |
amanintech
left a comment
There was a problem hiding this comment.
invalid contribution.
- Create a new folder for contributions
- should contain lamatic flows
…ew kit folder Creates a brand new self-contained kit kits/embed/meeting-intelligence/ per reviewer feedback. Includes: - Next.js 14 App Router frontend (page.js, layout.js, globals.css) - LamaticChat.js: widget bootstraps on mount for reliable first-message delivery - HeroActions.jsx and TranscriptPlayground.jsx as client components - components/ui: button, badge, card, textarea (shadcn/ui) - flows/meeting-intelligence-chatbot/: full Lamatic flow config (config.json, meta.json, inputs.json, README.md) - 4 demo screenshots - Complete README with architecture diagram and Vercel deploy button Flow: Chat Trigger -> Generate Text (Gemini) -> Generate JSON -> Slack API + Chat Response Also reverts all changes to kits/embed/chat/ (restores original .tsx files, removes added files) Made-with: Cursor
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (3)
kits/embed/meeting-intelligence/components/TranscriptPlayground.jsx (1)
1-1: Convert to TypeScript (.tsx).Per coding guidelines, kit components should use TypeScript. This file uses
.jsxbut should be.tsxwith proper type annotations. As per coding guidelines: "Use TypeScript for all kit components and server actions."kits/embed/meeting-intelligence/app/page.js (1)
1-6: Convert to TypeScript (.tsx).Per coding guidelines, kit components should use TypeScript. This page component uses
.jsbut should be.tsxwith proper type annotations. As per coding guidelines: "Use TypeScript for all kit components and server actions."kits/embed/meeting-intelligence/components/LamaticChat.js (1)
1-5: Convert to TypeScript (.tsx).Per coding guidelines, kit components should use TypeScript. This file uses
.jsbut should be.tsxwith proper type annotations for the component props and event handlers. As per coding guidelines: "Use TypeScript for all kit components and server actions."
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 2c95a9fb-2d8c-418e-af72-91cefc9ebc56
⛔ Files ignored due to path filters (4)
kits/embed/meeting-intelligence/app/Screenshots/1.pngis excluded by!**/*.pngkits/embed/meeting-intelligence/app/Screenshots/FromwebPage-With Followup mail-Running.pngis excluded by!**/*.pngkits/embed/meeting-intelligence/app/Screenshots/Slack_integrated-Summarizer.pngis excluded by!**/*.pngkits/embed/meeting-intelligence/app/Screenshots/fromLamatic-Running.pngis excluded by!**/*.png
📒 Files selected for processing (23)
kits/embed/meeting-intelligence/.env.examplekits/embed/meeting-intelligence/.gitignorekits/embed/meeting-intelligence/README.mdkits/embed/meeting-intelligence/app/globals.csskits/embed/meeting-intelligence/app/layout.jskits/embed/meeting-intelligence/app/page.jskits/embed/meeting-intelligence/components.jsonkits/embed/meeting-intelligence/components/HeroActions.jsxkits/embed/meeting-intelligence/components/LamaticChat.jskits/embed/meeting-intelligence/components/TranscriptPlayground.jsxkits/embed/meeting-intelligence/components/ui/badge.tsxkits/embed/meeting-intelligence/components/ui/button.tsxkits/embed/meeting-intelligence/components/ui/card.tsxkits/embed/meeting-intelligence/components/ui/textarea.tsxkits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/README.mdkits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/config.jsonkits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/inputs.jsonkits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/meta.jsonkits/embed/meeting-intelligence/lib/utils.tskits/embed/meeting-intelligence/next.config.mjskits/embed/meeting-intelligence/package.jsonkits/embed/meeting-intelligence/postcss.config.mjskits/embed/meeting-intelligence/tsconfig.json
✅ Files skipped from review due to trivial changes (9)
- kits/embed/meeting-intelligence/.gitignore
- kits/embed/meeting-intelligence/postcss.config.mjs
- kits/embed/meeting-intelligence/components/ui/textarea.tsx
- kits/embed/meeting-intelligence/components.json
- kits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/meta.json
- kits/embed/meeting-intelligence/README.md
- kits/embed/meeting-intelligence/tsconfig.json
- kits/embed/meeting-intelligence/package.json
- kits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/inputs.json
| setTimeout(() => { | ||
| const input = document.getElementById("lam-chat-message-input"); | ||
| if (input) { | ||
| const nativeSetter = | ||
| Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype, "value")?.set || | ||
| Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set; | ||
| if (nativeSetter) nativeSetter.call(input, value); | ||
| else input.value = value; | ||
| input.dispatchEvent(new Event("input", { bubbles: true })); | ||
|
|
||
| const sendBtn = document.getElementById("lam-chat-send-button"); | ||
| if (sendBtn) sendBtn.click(); | ||
| } | ||
| }, 600); |
There was a problem hiding this comment.
Race condition: 600ms timeout may not be sufficient for widget readiness.
The hardcoded 600ms delay assumes the external Lamatic widget script has loaded and rendered its DOM elements (lam-chat-message-input, lam-chat-send-button). Per context snippet from LamaticChat.js (lines 50-61), the widget script loads asynchronously with no coordination mechanism to signal when DOM elements are ready.
If the script hasn't finished loading or rendering, getElementById returns null and the user's transcript is silently lost.
Consider polling for element presence or using the lamaticChatWidgetReady event:
Suggested approach
- setTimeout(() => {
- const input = document.getElementById("lam-chat-message-input");
- if (input) {
+ const maxAttempts = 20;
+ let attempts = 0;
+ const tryFillAndSend = () => {
+ const input = document.getElementById("lam-chat-message-input");
+ if (!input) {
+ if (++attempts < maxAttempts) {
+ setTimeout(tryFillAndSend, 100);
+ } else {
+ console.warn("[TranscriptPlayground] Widget input not found after retries");
+ }
+ return;
+ }
const nativeSetter =
Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype, "value")?.set ||
Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
if (nativeSetter) nativeSetter.call(input, value);
else input.value = value;
input.dispatchEvent(new Event("input", { bubbles: true }));
const sendBtn = document.getElementById("lam-chat-send-button");
if (sendBtn) sendBtn.click();
- }
- }, 600);
+ };
+ setTimeout(tryFillAndSend, 300);| "values": { | ||
| "id": "triggerNode_1", | ||
| "chat": "", | ||
| "domains": ["*"], |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# First, let's verify the file exists and read the config.json around line 10
cat -n kits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/config.json | head -20Repository: Lamatic/AgentKit
Length of output: 882
🏁 Script executed:
# Check the app/page.js to see how the flow is being invoked
cat -n kits/embed/meeting-intelligence/app/page.js | head -60Repository: Lamatic/AgentKit
Length of output: 3254
🏁 Script executed:
# Search for any documentation or comments about domains configuration
rg -i "domains" kits/embed/meeting-intelligence/ -A 2 -B 2Repository: Lamatic/AgentKit
Length of output: 2694
Configure allowed domains in Lamatic Studio before deploying to production.
The flow ships with domains: ["*"] as a development placeholder. Since the widget bootstraps from public NEXT_PUBLIC_LAMATIC_* environment variables, any origin will be able to invoke the flow and post to the Slack webhook until you explicitly configure your production domain in Lamatic Studio (as documented in the README). Verify after import and redeployment that Lamatic enforces the restricted origin list.
| "nodeId": "apiNode", | ||
| "values": { | ||
| "id": "apiNode_145", | ||
| "url": "YOUR_SLACK_WEBHOOK_URL", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
find . -name "config.json" -path "*/meeting-intelligence-chatbot/*" | head -5Repository: Lamatic/AgentKit
Length of output: 140
🏁 Script executed:
wc -l ./kits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/config.json ./kits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/inputs.jsonRepository: Lamatic/AgentKit
Length of output: 245
🏁 Script executed:
sed -n '130,150p' ./kits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/config.jsonRepository: Lamatic/AgentKit
Length of output: 837
🏁 Script executed:
sed -n '52,62p' ./kits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/inputs.jsonRepository: Lamatic/AgentKit
Length of output: 360
Wire the Slack webhook URL to the flow input and re-export the flow.
The node apiNode_145 in config.json hardcodes YOUR_SLACK_WEBHOOK_URL instead of referencing the flow input. However, inputs.json correctly declares apiNode_145.url as a required private input (lines 52-62). The hardcoded placeholder will override the input definition at runtime, preventing users from providing the actual webhook URL at deployment time and causing Slack posts to fail. Re-export the flow from Lamatic Studio with proper input wiring to resolve this.
kits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/README.md
Show resolved
Hide resolved
…fix CSS token, fix race condition, fix webhook URL, update flow README Made-with: Cursor
There was a problem hiding this comment.
♻️ Duplicate comments (2)
kits/embed/meeting-intelligence/components/TranscriptPlayground.tsx (1)
41-43:⚠️ Potential issue | 🟠 Major
TranscriptPlaygroundremains interactive when Lamatic is unavailable.The component does not receive or check
isLamaticReady. When the widget is disabled (missing env vars), clicking "Analyze in Copilot" dispatches events into the void, creating a silent dead-end for users.🛠️ Proposed fix
Accept and check the readiness prop:
-export default function TranscriptPlayground() { +interface TranscriptPlaygroundProps { + isLamaticReady?: boolean; +} + +export default function TranscriptPlayground({ isLamaticReady = true }: TranscriptPlaygroundProps) { const [transcript, setTranscript] = useState(SAMPLE_TRANSCRIPT); - const canAnalyze = useMemo(() => transcript.trim().length > 12, [transcript]); + const canAnalyze = useMemo( + () => isLamaticReady && transcript.trim().length > 12, + [isLamaticReady, transcript], + );Then update
page.tsxto pass the prop:<TranscriptPlayground isLamaticReady={isLamaticReady} />kits/embed/meeting-intelligence/app/page.tsx (1)
139-141:⚠️ Potential issue | 🟠 MajorPass
isLamaticReadytoTranscriptPlayground.As noted in a previous review,
TranscriptPlaygroundshould be gated by readiness to prevent users from clicking "Analyze in Copilot" when the widget is unavailable.🛠️ Proposed fix
<div className="mt-10"> - <TranscriptPlayground /> + <TranscriptPlayground isLamaticReady={isLamaticReady} /> </div>
🧹 Nitpick comments (4)
kits/embed/meeting-intelligence/components/TranscriptPlayground.tsx (1)
12-14: Hardcoded widget DOM IDs are fragile.The IDs
lam-chat-message-inputandlam-chat-send-buttondepend on the third-party Lamatic widget's internal implementation. If the widget updates its DOM structure, this integration will silently break. Consider documenting this coupling or adding a comment noting the dependency.📝 Suggested comment
+// These IDs must match the Lamatic chat widget's internal DOM structure. +// If the widget updates, verify these selectors still work. const INPUT_ID = "lam-chat-message-input"; const SEND_BTN_ID = "lam-chat-send-button";kits/embed/meeting-intelligence/app/page.tsx (1)
127-127: Demo section uses hardcoded light-mode colors.The
bg-slate-50 text-slate-900classes on the demo section won't adapt to dark mode. If the kit should support theming, consider using semantic tokens (bg-muted,text-foreground) or scoping this as an intentionally light section.kits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/README.md (1)
7-18: Add language specifier to the ASCII diagram code block.The fenced code block lacks a language specifier. Use
textorplaintextto silence the markdownlint warning.📝 Proposed fix
-``` +```text Chat Widget (Chat Trigger) ↓kits/embed/meeting-intelligence/components/LamaticChat.tsx (1)
84-90: Consider extracting the LamaticChatWidget type.The inline type assertion for
window.LamaticChatWidgetis repeated on lines 85-86. Consider extracting it to improve readability.♻️ Proposed refactor
+type LamaticWindow = Window & { + LamaticChatWidget?: { open?: () => void; close?: () => void }; +}; + // Sync open / close with the Lamatic widget JS API. useEffect(() => { if (!isConfigured || disabled) return; try { - if (isOpen) (window as Window & { LamaticChatWidget?: { open?: () => void; close?: () => void } }).LamaticChatWidget?.open?.(); - else (window as Window & { LamaticChatWidget?: { open?: () => void; close?: () => void } }).LamaticChatWidget?.close?.(); + const w = window as LamaticWindow; + if (isOpen) w.LamaticChatWidget?.open?.(); + else w.LamaticChatWidget?.close?.(); } catch (e) { console.warn("[LamaticChat] toggle error", e); } }, [disabled, isConfigured, isOpen]);
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 49547407-569f-4025-a21d-a81d619f975d
📒 Files selected for processing (8)
kits/embed/meeting-intelligence/app/globals.csskits/embed/meeting-intelligence/app/layout.tsxkits/embed/meeting-intelligence/app/page.tsxkits/embed/meeting-intelligence/components/HeroActions.tsxkits/embed/meeting-intelligence/components/LamaticChat.tsxkits/embed/meeting-intelligence/components/TranscriptPlayground.tsxkits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/README.mdkits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/config.json
Made-with: Cursor
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
kits/embed/meeting-intelligence/components/TranscriptPlayground.tsx (1)
49-52: Extract magic number to a named constant.The minimum length threshold
12lacks context. Consider extracting it to a named constant with a descriptive name.✨ Suggested refactor
+const MIN_TRANSCRIPT_LENGTH = 12; + const canAnalyze = useMemo( - () => isLamaticReady && transcript.trim().length > 12, + () => isLamaticReady && transcript.trim().length > MIN_TRANSCRIPT_LENGTH, [isLamaticReady, transcript], );kits/embed/meeting-intelligence/components/LamaticChat.tsx (1)
34-41: Consider reducing console logging verbosity in production.Logging full configuration values (
API_URL,FLOW_ID,PROJECT_ID) to the browser console aids debugging but exposes internal configuration to anyone with DevTools open. While these areNEXT_PUBLIC_vars (already client-visible), verbose logging in production can be noisy.Consider gating these logs behind a development check or reducing their verbosity:
✨ Suggested approach
- console.warn("[LamaticChat] Missing env vars — widget disabled.", { - PROJECT_ID: PROJECT_ID || "MISSING", - FLOW_ID: FLOW_ID || "MISSING", - API_URL: API_URL || "MISSING", - }); + if (process.env.NODE_ENV === "development") { + console.warn("[LamaticChat] Missing env vars — widget disabled.", { + PROJECT_ID: PROJECT_ID || "MISSING", + FLOW_ID: FLOW_ID || "MISSING", + API_URL: API_URL || "MISSING", + }); + }Also applies to: 51-51
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 71000f6c-c418-43aa-ab74-ec991c858838
📒 Files selected for processing (4)
kits/embed/meeting-intelligence/app/page.tsxkits/embed/meeting-intelligence/components/LamaticChat.tsxkits/embed/meeting-intelligence/components/TranscriptPlayground.tsxkits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/README.md
✅ Files skipped from review due to trivial changes (1)
- kits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/README.md
🚧 Files skipped from review as they are similar to previous changes (1)
- kits/embed/meeting-intelligence/app/page.tsx
kits/embed/meeting-intelligence/components/TranscriptPlayground.tsx
Outdated
Show resolved
Hide resolved
Made-with: Cursor
There was a problem hiding this comment.
Actionable comments posted: 5
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 79a90f34-812c-4a1a-8c49-a936d1b1b5d3
📒 Files selected for processing (2)
kits/embed/meeting-intelligence/components/LamaticChat.tsxkits/embed/meeting-intelligence/components/TranscriptPlayground.tsx
kits/embed/meeting-intelligence/components/TranscriptPlayground.tsx
Outdated
Show resolved
Hide resolved
kits/embed/meeting-intelligence/components/TranscriptPlayground.tsx
Outdated
Show resolved
Hide resolved
kits/embed/meeting-intelligence/components/TranscriptPlayground.tsx
Outdated
Show resolved
Hide resolved
Made-with: Cursor
AI Meeting Intelligence Copilot
Transforms raw meeting transcripts into structured, actionable insights and automatically delivers them to Slack.
What this PR adds
🔄 Flow
Chat Trigger → Generate Text → Generate JSON → Slack API + Chat Response
Tech
Next.js · Lamatic · Slack API · Tailwind
Impact
Eliminates manual meeting notes, ensures clear ownership, and improves team alignment with instant structured updates.