Skip to content

Commit 85440b2

Browse files
authored
feat(ui): redesign to Trail Reader centered layout (#1)
* feat(ui): redesign to Trail Reader centered layout - Remove sidebar in favor of centered layout (max-width 800px) - Add Forest Trail color palette with forest greens and amber accents - Add new typography: Fraunces (display), IBM Plex Sans (body), JetBrains Mono (code) - Implement session grouping by date (Today, Yesterday, This Week, Older) - Add micro-interactions: staggered card reveal, breathing status indicators, hover lift - Add subtle grain texture overlay - Update E2E tests for new selectors and add coverage for date grouping and filter counts - Fix modal and detail-view visibility conflicts with hidden class - Add null checks for removed sidebar elements * feat(ui): improve session browsing and bash blocks Add filters drawer (tags/directories/projects) with chips and grouping toggle; surface pinned/needs-input sections; replace projects chip-wall with search + browse modal; render Bash tool output as preformatted code with $ prompts. * chore(ui): align tailwind tokens with forest theme * feat(ui): apply tailwind layout for header and shell * feat(ui): tailwindize dynamic list and detail components * refactor(ui): shift styling to tailwind utilities * chore(ui): polish interactive microdetails * chore(ui): tune contrast and readability * chore(ui): refine typography details * chore(ui): refine hierarchy sizes * chore(ui): add cursor for thinking block * feat(ui): full-width detail view and dark neutral theme * feat(ui): cloister-style layout with list header search * feat(ui): expandable tool calls with input/output
1 parent 44b24fa commit 85440b2

9 files changed

Lines changed: 1520 additions & 1793 deletions

File tree

public/app.js

Lines changed: 921 additions & 131 deletions
Large diffs are not rendered by default.

public/index.html

Lines changed: 177 additions & 129 deletions
Large diffs are not rendered by default.

public/styles.css

Lines changed: 363 additions & 1526 deletions
Large diffs are not rendered by default.

tests/e2e/fixtures/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
"server": {
1313
"port": 9847
1414
}
15-
}
15+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
{"type":"user","message":{"content":[{"type":"text","text":"Fix the bug in login"}]},"timestamp":"2026-01-26T12:00:00.000Z"}
2-
{"type":"assistant","message":{"content":[{"type":"text","text":"I'll take a look."}]},"timestamp":"2026-01-26T12:01:00.000Z"}
2+
{"type":"assistant","message":{"content":[{"type":"text","text":"I'll take a look."},{"type":"tool_use","name":"Bash","id":"tool-1","input":{"command":"echo \"hello\""}}]},"timestamp":"2026-01-26T12:01:00.000Z"}

tests/e2e/home.spec.ts

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,36 @@ test.describe('Home Page', () => {
66
await expect(page.locator('.logo')).toContainText('AgentTrail');
77
});
88

9-
test('shows sidebar filters', async ({ page }) => {
9+
test('shows header filter buttons', async ({ page }) => {
1010
await page.goto('/');
11-
await expect(page.locator('text=All Sessions')).toBeVisible();
12-
await expect(page.locator('text=Today')).toBeVisible();
13-
await expect(page.locator('text=This Week')).toBeVisible();
11+
await expect(page.locator('.filter-btn[data-filter="all"]')).toBeVisible();
12+
await expect(page.locator('.filter-btn[data-filter="today"]')).toBeVisible();
13+
await expect(page.locator('.filter-btn[data-filter="week"]')).toBeVisible();
1414
});
1515

1616
test('has search input', async ({ page }) => {
1717
await page.goto('/');
1818
await expect(page.locator('#search-input')).toBeVisible();
1919
});
2020

21+
test('shows filters and grouping controls', async ({ page }) => {
22+
await page.goto('/');
23+
await expect(page.locator('#filters-toggle')).toBeVisible();
24+
await expect(page.locator('.group-btn[data-group="date"]')).toBeVisible();
25+
});
26+
2127
test('renders session cards', async ({ page }) => {
2228
await page.goto('/');
2329
await page.waitForSelector('.session-card');
2430
const count = await page.locator('.session-card').count();
2531
expect(count).toBeGreaterThan(0);
2632
});
33+
34+
test('shows date grouping headers', async ({ page }) => {
35+
await page.goto('/');
36+
await page.waitForSelector('.session-card');
37+
const dateHeaders = page.locator('.date-divider');
38+
const count = await dateHeaders.count();
39+
expect(count).toBeGreaterThan(0);
40+
});
2741
});

tests/e2e/search-filters.spec.ts

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,38 @@ test.describe('Search and Filters', () => {
2323

2424
test('filters by time - Today', async ({ page }) => {
2525
await page.goto('/');
26-
const todayFilter = page.locator('#time-filters .filter-item[data-filter="today"]');
26+
const todayFilter = page.locator('.filter-btn[data-filter="today"]');
2727
await todayFilter.click();
2828
await expect(todayFilter).toHaveClass(/active/);
2929
});
30+
31+
test('toggles filters drawer', async ({ page }) => {
32+
await page.goto('/');
33+
const toggle = page.locator('#filters-toggle');
34+
const drawer = page.locator('#filters-drawer');
35+
await expect(toggle).toBeVisible();
36+
const wasOpen = await drawer.evaluate(el => el.classList.contains('open'));
37+
await toggle.click();
38+
if (wasOpen) {
39+
await expect(drawer).not.toHaveClass(/open/);
40+
} else {
41+
await expect(drawer).toHaveClass(/open/);
42+
}
43+
});
44+
45+
test('displays filter counts', async ({ page }) => {
46+
await page.goto('/');
47+
await page.waitForSelector('.session-card');
48+
49+
const allCount = page.locator('#count-all');
50+
const todayCount = page.locator('#count-today');
51+
const weekCount = page.locator('#count-week');
52+
53+
await expect(allCount).toBeVisible();
54+
await expect(todayCount).toBeVisible();
55+
await expect(weekCount).toBeVisible();
56+
57+
const allText = await allCount.textContent();
58+
expect(Number(allText)).toBeGreaterThanOrEqual(0);
59+
});
3060
});

tests/e2e/session-detail.spec.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,11 @@ test.describe('Session Detail', () => {
1414
await page.locator('.session-card').first().click();
1515
await expect(page.locator('.message')).toHaveCount(2);
1616
});
17+
18+
test('prefixes bash commands with $', async ({ page }) => {
19+
await page.goto('/');
20+
await page.waitForSelector('.session-card');
21+
await page.locator('.session-card').first().click();
22+
await expect(page.locator('.bash-content code')).toContainText('$ echo "hello"');
23+
});
1724
});

tests/e2e/settings.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ test.describe('Settings Modal', () => {
4040
await page.goto('/');
4141
await page.locator('#settings-btn').click();
4242

43+
await page.locator('#add-directory-btn').scrollIntoViewIfNeeded();
4344
await page.locator('#add-directory-btn').click();
4445
await page.fill('#new-dir-path', 'tests/e2e/fixtures/sessions-extra');
4546
await page.fill('#new-dir-label', 'Extra');

0 commit comments

Comments
 (0)