chore: remove export_count legacy alias from export state API#66
Conversation
Complete the export_count migration by removing the duplicate field from GET /api/export/state and updating the bundled SPA, tests, and docs to use last_export_session_count only.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
💤 Files with no reviewable changes (1)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughRemove the legacy ChangesExport state API contract cleanup
🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs:
Suggested reviewers:
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
@CodeRabbit. please review this PR fully |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Fetch the PR diff and file contents
gh pr view 66 --repo cppalliance/claude-code-chat-browser --json title,body,files,state,additions,deletions
echo "=== PR DIFF ==="
gh pr diff 66 --repo cppalliance/claude-code-chat-browser
echo "=== api/export_api.py ==="
cat api/export_api.py
echo "=== static/js/projects.js ==="
cat static/js/projects.js
echo "=== tests/test_api_routes.py ==="
cat tests/test_api_routes.py
echo "=== tests/test_export_api_bulk.py ==="
cat tests/test_export_api_bulk.py
echo "=== docs/api-reference.md ==="
cat docs/api-reference.md
echo "=== CHANGELOG.md ==="
cat CHANGELOG.mdLength of output: 43780
Overall AssessmentThe change is correct and well-scoped. All consumer sites (Python API, bundled SPA, tests, API docs, changelog) are updated atomically in a single PR, which is the right way to handle a breaking removal. No issues with the core logic. File-by-file Review
|
| Area | Status | Notes |
|---|---|---|
| API endpoint | ✅ | Correct removal |
| SPA JS | ✅ | Fallback correctly removed |
| Tests — positive assertions | ✅ | Correctly updated |
| Tests — negative assertions | Missing "export_count" not in body guard |
|
| API docs | ✅ | Clean |
| CHANGELOG | 🔧 nit | "policy PR" reference is vague |
The PR is mergeable as-is; the two test additions above would make the removal self-enforcing against regression.
Address PR review: add negative assertions so re-introducing the legacy alias fails the suite, and reference PR #60 in the CHANGELOG removal note.
timon0305
left a comment
There was a problem hiding this comment.
Diff is clean and the canonical-field path looks right. Main concern is on the deprecation timing — flagged inline.
Document path B: 0.1.0.dev0 has no git tag yet; export_count removal in [Unreleased] is acceptable for bundled SPA+API atomic deploy. Update example table and CHANGELOG wording per review.
0cf7cc9 to
721afcd
Compare
Closes #63
Summary
export_countfield fromGET /api/export/state; SPA readslast_export_session_countonlydocs/api-reference.mdand records removal under[Unreleased]inCHANGELOG.mdtest_api_routes.pyandtest_export_api_bulk.pywith the canonical response shapeCloses Chen W1 #4
Test plan
python -m pytest tests/test_api_routes.py tests/test_export_api_bulk.py -qpython -m pytest -qnpm testcurl -s http://127.0.0.1:5000/api/export/statereturns noexport_countkeySummary by CodeRabbit
Breaking Changes
Documentation
Bug Fixes
Tests