mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-05 08:10:14 +00:00
fix(ui): clamp maxTasksHomeScreen and correct test comment
This commit is contained in:
parent
52a57f6ae6
commit
59fb67e6ee
2 changed files with 2 additions and 2 deletions
|
|
@ -36,7 +36,7 @@ const HistoryPreview = () => {
|
|||
<div className="relative w-full">
|
||||
<div className="absolute w-full bg-gradient-to-t from-vscode-sideBar-background to-vscode-sideBar-background/0 z-5 bottom-0 h-6" />
|
||||
<div className="overflow-y-auto space-y-1 -mx-6 px-6 pb-6 max-h-[calc(100vh-280px)] relative z-4">
|
||||
{tasks.slice(0, maxTasksHomeScreen).map((item) => (
|
||||
{tasks.slice(0, Math.max(0, Math.min(20, maxTasksHomeScreen ?? 4))).map((item) => (
|
||||
<TaskItem key={item.id} item={item} variant="compact" />
|
||||
))}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ describe("HistoryPreview", () => {
|
|||
|
||||
render(<HistoryPreview />)
|
||||
|
||||
// Should render only the first 3 tasks
|
||||
// Should render only the first 4 tasks
|
||||
expect(screen.getByTestId("task-item-task-1")).toBeInTheDocument()
|
||||
expect(screen.getByTestId("task-item-task-2")).toBeInTheDocument()
|
||||
expect(screen.getByTestId("task-item-task-3")).toBeInTheDocument()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue