Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
}
]
}
}
}
180 changes: 90 additions & 90 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

jobs:
test:
Expand All @@ -31,91 +31,91 @@ jobs:
COV_APPEND: ${{ matrix.is-primary && '--cov=claude_code_log --cov-append --cov-report=xml --cov-report=html --cov-report=term' || '' }}

steps:
- uses: actions/checkout@v4
with:
# Full history so test/test_commit_linkifier.py's
# TestIntegrationLocalRepo can resolve SHAs older than the
# current tip (`git branch -r --contains` reads local refs
# only and needs the commits in the object DB).
fetch-depth: 0

- name: Move TEMP to the workspace disk (Windows)
# On windows runners TMP/TEMP default to the C: OS disk, whose
# throttled I/O dominates this tmp-heavy suite; RUNNER_TEMP lives on
# the same disk as the workspace (D:). Measured via A/B experiment
# (run 28715118956): this redirect alone took the unit selection from
# 555s mean to 150s — parity with ubuntu (~161s). Defender is NOT the
# culprit: real-time protection is already off on current images
# (exclusions/disable measured as no-ops), and a ReFS dev drive
# (~296s) was dominated by this redirect. Details: work/win-io.md
if: runner.os == 'Windows'
shell: pwsh
run: |
"TMP=$env:RUNNER_TEMP" >> $env:GITHUB_ENV
"TEMP=$env:RUNNER_TEMP" >> $env:GITHUB_ENV

- name: Install uv
uses: astral-sh/setup-uv@v4
with:
enable-cache: true

- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

- name: Install dependencies
run: uv sync --all-extras --dev && uv run playwright install chromium

- name: Run unit tests (coverage on primary only)
# -p no:playwright: unit tests don't use the browser fixtures; skipping the
# plugin avoids a ~1s playwright import per xdist worker, which Windows pays
# per spawned worker. See work/xdist-import-cost.md.
run: uv run pytest -p no:playwright -m "not (tui or browser or benchmark)" ${{ env.COV }}

- name: Run TUI tests (coverage append on primary only)
run: uv run pytest -m tui ${{ env.COV_APPEND }}

- name: Run browser tests (coverage append on primary only)
run: uv run pytest -m browser ${{ env.COV_APPEND }}

- name: Run benchmark tests with coverage append (primary only)
if: matrix.is-primary
env:
CLAUDE_CODE_LOG_DEBUG_TIMING: "1"
run: uv run pytest -m benchmark ${{ env.COV_APPEND }} -v

- name: Upload coverage HTML report as artifact
uses: actions/upload-artifact@v4
if: matrix.is-primary
with:
name: coverage-report-html
path: htmlcov/
retention-days: 30

- name: Upload coverage XML as artifact
uses: actions/upload-artifact@v4
if: matrix.is-primary
with:
name: coverage-report-xml
path: coverage.xml
retention-days: 30

- name: Coverage comment (PR only)
if: github.event_name == 'pull_request' && matrix.is-primary
uses: py-cov-action/python-coverage-comment-action@v3
with:
GITHUB_TOKEN: ${{ github.token }}
MINIMUM_GREEN: 75
MINIMUM_ORANGE: 60

- name: Run linting
run: uv run ruff check

- name: Run formatting check
run: uv run ruff format --check

- name: Run type checking
run: uv run pyright

- name: Lint the templates' JavaScript (primary only)
if: matrix.is-primary
run: uv run --group js python scripts/lint_js.py
- uses: actions/checkout@v4
with:
# Full history so test/test_commit_linkifier.py's
# TestIntegrationLocalRepo can resolve SHAs older than the
# current tip (`git branch -r --contains` reads local refs
# only and needs the commits in the object DB).
fetch-depth: 0

- name: Move TEMP to the workspace disk (Windows)
# On windows runners TMP/TEMP default to the C: OS disk, whose
# throttled I/O dominates this tmp-heavy suite; RUNNER_TEMP lives on
# the same disk as the workspace (D:). Measured via A/B experiment
# (run 28715118956): this redirect alone took the unit selection from
# 555s mean to 150s — parity with ubuntu (~161s). Defender is NOT the
# culprit: real-time protection is already off on current images
# (exclusions/disable measured as no-ops), and a ReFS dev drive
# (~296s) was dominated by this redirect. Details: work/win-io.md
if: runner.os == 'Windows'
shell: pwsh
run: |
"TMP=$env:RUNNER_TEMP" >> $env:GITHUB_ENV
"TEMP=$env:RUNNER_TEMP" >> $env:GITHUB_ENV

- name: Install uv
uses: astral-sh/setup-uv@v4
with:
enable-cache: true

- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

- name: Install dependencies
run: uv sync --all-extras --dev && uv run playwright install chromium

- name: Run unit tests (coverage on primary only)
# -p no:playwright: unit tests don't use the browser fixtures; skipping the
# plugin avoids a ~1s playwright import per xdist worker, which Windows pays
# per spawned worker. See work/xdist-import-cost.md.
run: uv run pytest -p no:playwright -m "not (tui or browser or benchmark)" ${{ env.COV }}

- name: Run TUI tests (coverage append on primary only)
run: uv run pytest -m tui ${{ env.COV_APPEND }}

- name: Run browser tests (coverage append on primary only)
run: uv run pytest -m browser ${{ env.COV_APPEND }}

- name: Run benchmark tests with coverage append (primary only)
if: matrix.is-primary
env:
CLAUDE_CODE_LOG_DEBUG_TIMING: "1"
run: uv run pytest -m benchmark ${{ env.COV_APPEND }} -v

- name: Upload coverage HTML report as artifact
uses: actions/upload-artifact@v4
if: matrix.is-primary
with:
name: coverage-report-html
path: htmlcov/
retention-days: 30

- name: Upload coverage XML as artifact
uses: actions/upload-artifact@v4
if: matrix.is-primary
with:
name: coverage-report-xml
path: coverage.xml
retention-days: 30

- name: Coverage comment (PR only)
if: github.event_name == 'pull_request' && matrix.is-primary
uses: py-cov-action/python-coverage-comment-action@v3
with:
GITHUB_TOKEN: ${{ github.token }}
MINIMUM_GREEN: 75
MINIMUM_ORANGE: 60

- name: Run linting
run: uv run ruff check

- name: Run formatting check
run: uv run ruff format --check

- name: Run type checking
run: uv run pyright

- name: Lint the templates' JavaScript (primary only)
if: matrix.is-primary
run: uv run --group js python scripts/lint_js.py
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Docs

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

# Allow the deploy job to publish to GitHub Pages.
permissions:
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
".claude-trace/**": true,
"docs/cache/**": true,
"docs/claude-code-log-transcript.html": true,
"test/test_data/cache/**": true,
"test/test_data/cache/**": true
},
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
"python-envs.defaultEnvManager": "ms-python.python:venv",
Expand Down
8 changes: 4 additions & 4 deletions claude_code_log/html/templates/components/filter_styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
border-radius: 8px;
padding: 12px 16px;
margin-bottom: 16px;
box-shadow: -7px -7px 10px #eeeeee44, 7px 7px 10px #00000011;
box-shadow:
-7px -7px 10px #eeeeee44,
7px 7px 10px #00000011;
border-left: var(--white-dimmed) 1px solid;
border-top: var(--white-dimmed) 1px solid;
border-bottom: #00000017 1px solid;
Expand Down Expand Up @@ -68,7 +70,6 @@
border-top: 1px solid #dee2e633;
}


.filter-toggles {
display: flex;
flex-wrap: wrap;
Expand All @@ -77,7 +78,6 @@
margin-bottom: 12px;
}


.filter-toggle {
padding: 6px 12px;
border: 1px solid #dee2e6;
Expand Down Expand Up @@ -169,4 +169,4 @@

.filter-messages.active {
background-color: #fff3cd;
}
}
41 changes: 30 additions & 11 deletions claude_code_log/html/templates/components/global_styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,10 @@
--message-padding: 1em;

/* Font families */
--font-monospace: 'Fira Code', 'Monaco', 'Consolas', 'SF Mono', 'Inconsolata', 'Droid Sans Mono', 'Source Code Pro', 'Ubuntu Mono', 'Cascadia Code', 'Menlo', monospace;
--font-ui: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
--font-monospace:
"Fira Code", "Monaco", "Consolas", "SF Mono", "Inconsolata", "Droid Sans Mono", "Source Code Pro",
"Ubuntu Mono", "Cascadia Code", "Menlo", monospace;
--font-ui: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
Expand All @@ -128,7 +130,19 @@ body {
max-width: 1200px;
margin: 0 auto;
padding: 10px;
background: linear-gradient(90deg, #f3d6d2, #f1dcce, #f0e4ca, #eeecc7, #e3ecc3, #d5eac0, #c6e8bd, #b9e6bc, #b6e3c5, #b3e1cf);
background: linear-gradient(
90deg,
#f3d6d2,
#f1dcce,
#f0e4ca,
#eeecc7,
#e3ecc3,
#d5eac0,
#c6e8bd,
#b9e6bc,
#b6e3c5,
#b3e1cf
);
color: var(--text-primary);
}

Expand All @@ -149,7 +163,6 @@ code {
line-height: 1.5;
}


pre {
background-color: #12121212;
padding: 10px;
Expand All @@ -171,15 +184,19 @@ pre {
background-color: #ffffff66;
border-radius: 8px;
padding: 16px;
box-shadow: -7px -7px 10px #eeeeee44, 7px 7px 10px #00000011;
box-shadow:
-7px -7px 10px #eeeeee44,
7px 7px 10px #00000011;
border-left: #ffffff66 1px solid;
border-top: #ffffff66 1px solid;
border-bottom: #00000017 1px solid;
border-right: #00000017 1px solid;
}

.card-base:hover {
box-shadow: -10px -10px 15px #eeeeee66, 10px 10px 15px #00000022;
box-shadow:
-10px -10px 15px #eeeeee66,
10px 10px 15px #00000022;
transform: translateY(-1px);
transition: all 0.2s ease;
}
Expand Down Expand Up @@ -235,7 +252,9 @@ pre {
align-items: center;
justify-content: center;
box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
transition: background-color 0.3s, transform 0.2s;
transition:
background-color 0.3s,
transform 0.2s;
z-index: 1000;
text-decoration: none;
}
Expand Down Expand Up @@ -271,7 +290,7 @@ pre {
.debug-toggle.floating-btn {
bottom: 260px;
font-size: 0.7em;
font-family: 'SFMono-Regular', Consolas, monospace;
font-family: "SFMono-Regular", Consolas, monospace;
font-weight: 600;
}

Expand Down Expand Up @@ -343,7 +362,7 @@ pre {
right: 2px;
padding: 1px 6px;
font-size: 0.7em;
font-family: 'SFMono-Regular', Consolas, monospace;
font-family: "SFMono-Regular", Consolas, monospace;
background: transparent;
border: 1px solid #ccc;
border-radius: 3px;
Expand Down Expand Up @@ -382,7 +401,7 @@ body.show-raw-user .user-content:not([data-user-view="md"]) .user-raw {
.user-view-global.floating-btn {
bottom: 320px;
font-size: 0.7em;
font-family: 'SFMono-Regular', Consolas, monospace;
font-family: "SFMono-Regular", Consolas, monospace;
font-weight: 600;
}

Expand Down Expand Up @@ -412,7 +431,7 @@ body.show-raw-user .user-content:not([data-user-view="md"]) .user-raw {
* wraps to one or two lines depending on the viewport. */
.resume-toast {
position: fixed;
right: calc(20px + 50px + 12px); /* button right + width + gap */
right: calc(20px + 50px + 12px); /* button right + width + gap */
bottom: calc(var(--resume-btn-bottom) + 25px);
transform: translateY(50%);
max-width: min(320px, calc(100vw - 120px));
Expand Down
Loading
Loading