Skip to content

Commit f934363

Browse files
brunobergherroomotemrubens
authored
ux: Redesigned Message Feed (#7985)
Co-authored-by: Roo Code <[email protected]> Co-authored-by: Matt Rubens <[email protected]>
1 parent 513fce3 commit f934363

32 files changed

+1774
-1515
lines changed

webview-ui/src/components/chat/BrowserSessionRow.tsx

Lines changed: 29 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { useExtensionState } from "@src/context/ExtensionStateContext"
1414
import CodeBlock, { CODE_BLOCK_BG_COLOR } from "../common/CodeBlock"
1515
import { ChatRowContent } from "./ChatRow"
1616
import { ProgressIndicator } from "./ProgressIndicator"
17+
import { Globe, Pointer, SquareTerminal } from "lucide-react"
1718

1819
interface BrowserSessionRowProps {
1920
messages: ClineMessage[]
@@ -237,58 +238,50 @@ const BrowserSessionRow = memo((props: BrowserSessionRowProps) => {
237238
const [browserSessionRow, { height: rowHeight }] = useSize(
238239
<div style={{ padding: "10px 6px 10px 15px", marginBottom: -10 }}>
239240
<div style={{ display: "flex", alignItems: "center", gap: "10px", marginBottom: "10px" }}>
240-
{isBrowsing ? (
241-
<ProgressIndicator />
242-
) : (
243-
<span
244-
className={`codicon codicon-inspect`}
245-
style={{ color: "var(--vscode-foreground)", marginBottom: "-1.5px" }}></span>
246-
)}
241+
{isBrowsing ? <ProgressIndicator /> : <Pointer className="w-4" aria-label="Browser action indicator" />}
247242
<span style={{ fontWeight: "bold" }}>
248243
<>{t("chat:browser.rooWantsToUse")}</>
249244
</span>
250245
</div>
251246
<div
247+
className="ml-6 mb-4 border-border"
252248
style={{
253-
borderRadius: 3,
254-
border: "1px solid var(--vscode-editorGroup-border)",
249+
borderRadius: 6,
255250
overflow: "hidden",
256251
backgroundColor: CODE_BLOCK_BG_COLOR,
257-
marginBottom: 10,
258252
}}>
259253
{/* URL Bar */}
260254
<div
261255
style={{
262-
margin: "5px auto",
263-
width: "calc(100% - 10px)",
256+
margin: "0px auto",
257+
width: "calc(100%)",
264258
boxSizing: "border-box", // includes padding in width calculation
265-
backgroundColor: "var(--vscode-input-background)",
266-
border: "1px solid var(--vscode-input-border)",
267-
borderRadius: "4px",
268-
padding: "3px 5px",
259+
borderRadius: "4px 4px 0 0",
260+
padding: "5px",
269261
display: "flex",
270262
alignItems: "center",
271263
justifyContent: "center",
272-
color: displayState.url
273-
? "var(--vscode-input-foreground)"
274-
: "var(--vscode-descriptionForeground)",
264+
color: "var(--vscode-descriptionForeground)",
275265
fontSize: "12px",
276266
}}>
277267
<div
278268
style={{
269+
cursor: "default",
279270
textOverflow: "ellipsis",
280271
overflow: "hidden",
281272
whiteSpace: "nowrap",
282273
width: "100%",
283274
textAlign: "center",
284275
}}>
276+
<Globe className="w-3 inline -mt-0.5 mr-2 opacity-50" />
285277
{displayState.url || "http"}
286278
</div>
287279
</div>
288280

289281
{/* Screenshot Area */}
290282
<div
291283
data-testid="screenshot-container"
284+
className="hover:opacity-90 transition-all"
292285
style={{
293286
width: "100%",
294287
paddingBottom: `${aspectRatio}%`, // height/width ratio
@@ -341,27 +334,24 @@ const BrowserSessionRow = memo((props: BrowserSessionRowProps) => {
341334
)}
342335
</div>
343336

344-
<div style={{ width: "100%" }}>
345-
<div
346-
onClick={() => {
347-
setConsoleLogsExpanded(!consoleLogsExpanded)
348-
}}
349-
style={{
350-
display: "flex",
351-
alignItems: "center",
352-
gap: "4px",
353-
width: "100%",
354-
justifyContent: "flex-start",
355-
cursor: "pointer",
356-
padding: `9px 8px ${consoleLogsExpanded ? 0 : 8}px 8px`,
357-
}}>
358-
<span className={`codicon codicon-chevron-${consoleLogsExpanded ? "down" : "right"}`}></span>
359-
<span style={{ fontSize: "0.8em" }}>{t("chat:browser.consoleLogs")}</span>
360-
</div>
361-
{consoleLogsExpanded && (
362-
<CodeBlock source={displayState.consoleLogs || t("chat:browser.noNewLogs")} language="shell" />
363-
)}
337+
{/* Console Logs Accordion */}
338+
<div
339+
onClick={() => {
340+
setConsoleLogsExpanded(!consoleLogsExpanded)
341+
}}
342+
className="flex items-center justify-between gap-2 text-vscode-editor-foreground/50 hover:text-vscode-editor-foreground transition-colors"
343+
style={{
344+
width: "100%",
345+
cursor: "pointer",
346+
padding: `9px 10px ${consoleLogsExpanded ? 0 : 8}px 10px`,
347+
}}>
348+
<SquareTerminal className="w-3" />
349+
<span className="grow text-xs">{t("chat:browser.consoleLogs")}</span>
350+
<span className={`codicon codicon-chevron-${consoleLogsExpanded ? "down" : "right"}`}></span>
364351
</div>
352+
{consoleLogsExpanded && (
353+
<CodeBlock source={displayState.consoleLogs || t("chat:browser.noNewLogs")} language="shell" />
354+
)}
365355
</div>
366356

367357
{/* Action content with min height */}

0 commit comments

Comments
 (0)