Release 0.9.2: batch segment assignment, refined review-queue filters, and CSV analytics export#5
Conversation
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughVersion 0.9.2 introduces three new features: batch assignment of review segments from the session player, enhanced filtering in the review queue (by project, status, assignee, reviewer, and search text), and CSV export functionality for segment analytics. Documentation, templates, backend views, URLs, and tests are updated to support these features. Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant Client as Session Player UI
participant Server as Backend
participant DB as Database
User->>Client: Select segments & set assignee/reviewer/status
Client->>Client: Check "Apply" checkboxes
User->>Client: Click apply
Client->>Server: POST batch-assign with segment_ids, assignee, reviewer, status
Server->>DB: Update selected segments
DB-->>Server: Confirmation
Server->>Server: Log audit entry
Server-->>Client: Redirect to session
Client-->>User: Show updated segments
sequenceDiagram
actor User
participant Client as Review Queue UI
participant Server as Backend
participant DB as Database
User->>Client: Set filters (project, status, assignee, reviewer, search)
User->>Client: Click "Apply filters"
Client->>Server: GET review-queue with filter parameters
Server->>DB: Query segments matching filters
DB-->>Server: Filtered results
Server->>Client: Render filtered review queue
Client-->>User: Display filtered segments
User->>Client: Click "Export CSV"
Client->>Server: GET review-queue/export/segment-analytics.csv
Server->>DB: Fetch all segment analytics
DB-->>Server: Segment data
Server->>Server: Generate CSV content
Server-->>Client: CSV file (application/csv)
Client-->>User: Download analytics.csv
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can suggest fixes for GitHub Check annotations.Configure the |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ae18274be1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if status_value and status_value not in { | ||
| ObservationSegment.STATUS_TODO, | ||
| ObservationSegment.STATUS_IN_PROGRESS, | ||
| ObservationSegment.STATUS_DONE, | ||
| }: |
There was a problem hiding this comment.
Require a status value when applying batch status updates
In segment_batch_assign, status validation only runs when status_value is truthy, so a request with set_status=1 and a missing/blank status bypasses validation and reaches the update loop, where item.status can be set to None/''. That can either raise a server error on save (NULL into a non-null field) or persist an invalid status outside STATUS_CHOICES, which corrupts review-queue and analytics semantics; validation should be keyed to update_status and reject blank values.
Useful? React with 👍 / 👎.
| item.title, | ||
| item.status, | ||
| item.start_seconds, | ||
| item.end_seconds, | ||
| item.duration_seconds, | ||
| item.assignee.username if item.assignee else '', | ||
| item.reviewer.username if item.reviewer else '', | ||
| item.notes, |
There was a problem hiding this comment.
Escape formula-like values in segment analytics CSV export
The CSV export writes user-controlled fields (item.title and item.notes) directly into cells, so values starting with =, +, -, or @ will be interpreted as formulas when opened in spreadsheet software. In shared projects this creates a CSV injection path (for example, exfiltration formulas) for anyone consuming the export, so these fields should be neutralized before writer.writerow.
Useful? React with 👍 / 👎.
Motivation
Description
0.9.2by updatingbuild_release_metadata,README.md, andCHANGELOG.md.segment_batch_assign(POST) that validates selected segments and project membership, supports selective updates forassignee,reviewer, andstatus, records an audit entry, and returns user messages in the session context; added corresponding route and session-player UI to select segments and apply batch changes.open|todo|in_progress|done, assignee/reviewer shortcuts, and free-text search) and added a filter form and project selector totemplates/tracker/review_queue.html.review_queue_export_segment_analytics_csvand linked it from the review-queue UI; added the route and server-side CSV writer includingproject,session,segment,status, times,assignee,reviewer, andnotescolumns.tracker/tests/test_views.py.Testing
python -m compileall tracker templates configsuccessfully to validate Python syntax of modified modules and templates.python manage.py test tracker.tests.test_views --verbosity 2but the test run could not complete because Django is not installed in the execution environment (package installation viapip install -r requirements.txtfailed due to network/proxy restrictions), so full unit test execution is pending in an environment with dependencies installed.test_segment_batch_assign_and_review_queue_filters_and_exportwhich exercises batch assignment, review-queue filtering, and the CSV export endpoint and will run when dependencies are available.Codex Task
Summary by CodeRabbit
New Features
Chores