Skip to content

Review queue: add filters, CSV export, batch segment assignment, and bump to 0.9.3#6

Merged
Smartappli merged 2 commits intomainfrom
codex/update-to-version-0.9.2-meb5s9
Mar 16, 2026
Merged

Review queue: add filters, CSV export, batch segment assignment, and bump to 0.9.3#6
Smartappli merged 2 commits intomainfrom
codex/update-to-version-0.9.2-meb5s9

Conversation

@Smartappli
Copy link
Copy Markdown
Owner

@Smartappli Smartappli commented Mar 16, 2026

Motivation

  • Provide users finer control of the review queue with project/status/assignee/reviewer/text filters and ensure CSV exports match the UI filters.
  • Allow session-level batch assignment of review segments to speed up reviewer/assignee workflows.
  • Update release metadata and docs for a small 0.9.3 release and recommend ASGI parity for local runs with Granian.

Description

  • Added a shared filter helper _filter_review_segments and _review_queue_project_choices to centralize review-queue filtering logic used by both UI and exports.
  • Extended the review_queue view to accept project, status, assignee, reviewer, and q parameters and to expose projects and active filter values to the template; added review_queue_export_segment_analytics_csv to export filtered segments as CSV.
  • Implemented a session-level segment_batch_assign view plus URL and UI changes in session_player.html to support multi-select batch assignment of assignee/reviewer/status with audit logging and validation.
  • Updated templates review_queue.html and session_player.html to add filter controls, an export button, and batch-assign UI, and wired new routes in tracker/urls.py.
  • Bumped release metadata and documentation to 0.9.3, added local ASGI granian run instructions in README.md and docs/deployment.md, and updated CHANGELOG.md.

Testing

  • Ran the test suite with python manage.py test, and the tests passed including the new view test tracker.tests.test_views.ViewTests.test_segment_batch_assign_and_review_queue_filters_and_export.
  • Existing view tests in tracker.tests.test_views that exercise segments and queue behavior were run and remained green.

Codex Task

Summary by CodeRabbit

  • New Features

    • Added batch assignment for review segments with multi-select capability to efficiently update assignees, reviewers, and status in bulk.
    • Introduced advanced filtering options in the review queue (by project, status, assignee, reviewer, and search query).
    • Added CSV export for segment analytics with filter preservation.
    • Updated deployment documentation to reflect Granian ASGI server support.
  • Documentation

    • Bumped version to 0.9.3 and updated release notes documenting new features and improvements.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 16, 2026

Warning

Rate limit exceeded

@Smartappli has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 10 minutes and 10 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c9db8eac-7947-4a38-8d1a-e3830bd34965

📥 Commits

Reviewing files that changed from the base of the PR and between 46a80c3 and 662d92f.

📒 Files selected for processing (2)
  • README.md
  • tracker/views.py
📝 Walkthrough

Walkthrough

This PR introduces batch assignment functionality for review segments, adds multi-field filtering to the review queue, implements CSV export for segment analytics, updates documentation to reference Granian ASGI server, and bumps the version from 0.9.1 to 0.9.3.

Changes

Cohort / File(s) Summary
Documentation & Metadata
CHANGELOG.md, README.md, docs/deployment.md
Bumped version to 0.9.3, documented new batch assignment and filtering features, replaced Django runserver references with Granian ASGI server instructions, added local ASGI deployment section.
URL Routing
tracker/urls.py
Added two new endpoints: review-queue/export/segment-analytics.csv for CSV export and sessions/<int:pk>/segments/batch-assign/ for batch segment operations.
View Logic
tracker/views.py
Introduced filtering helper _filter_review_segments with support for project, status, assignee, reviewer, and query parameters; added _review_queue_project_choices helper; implemented review_queue_export_segment_analytics_csv endpoint for CSV generation; implemented segment_batch_assign endpoint for bulk segment updates; updated review_queue to materialize and filter rows with active filter persistence.
UI Templates
templates/tracker/review_queue.html, templates/tracker/session_player.html
Added CSV export link in review_queue header; introduced filter toolbar with queue, project, status, assignee, reviewer, and search fields; implemented batch assignment form and checkbox selection UI in session_player when permissions allow.
Tests
tracker/tests/test_views.py
Added comprehensive test validating batch assignment, review queue filtering, and CSV export functionality in a single test case.

Sequence Diagram(s)

sequenceDiagram
    participant User as User<br/>(Browser)
    participant Server as Django View<br/>(review_queue)
    participant DB as Database<br/>(Segments)

    User->>Server: GET review queue with filters<br/>(status, assignee, query, etc.)
    Server->>DB: Query all segments for user's queue
    DB-->>Server: Return all queue segments
    Server->>Server: _filter_review_segments()<br/>Apply status, assignee, reviewer,<br/>project, and query filters
    Server->>Server: _review_queue_project_choices()<br/>Extract unique projects from filtered rows
    Server-->>User: Render review_queue.html<br/>with filtered segments & active filters
    User->>Server: POST /review-queue/export/<br/>segment-analytics.csv<br/>with same filter parameters
    Server->>DB: Query segments
    DB-->>Server: Return segments
    Server->>Server: _filter_review_segments()<br/>Apply same filters
    Server-->>User: Return CSV file<br/>with filtered data
Loading
sequenceDiagram
    participant User as User<br/>(Browser)
    participant Server as Django View<br/>(segment_batch_assign)
    participant DB as Database<br/>(Segments & Audit)

    User->>Server: POST /sessions/{pk}/segments/<br/>batch-assign/<br/>with selected segment IDs,<br/>assignee, reviewer, status
    Server->>Server: Validate permissions<br/>(can_review_session)
    alt Validation fails
        Server-->>User: Return 403 Forbidden
    else Validation passes
        Server->>DB: Retrieve selected segments
        DB-->>Server: Return segments
        Server->>DB: Bulk update assignee,<br/>reviewer, status
        Server->>DB: Create audit log entries<br/>for each segment change
        DB-->>Server: Confirm updates & audit
        Server-->>User: Redirect to session_player<br/>with success message
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Poem

🐰 A rabbit hops through segments with glee,
Batch-assigning with filters so free,
CSV exports upon request,
Queue refinement—put to the test!
Version bumped up to 0.9.3! 🎉

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 11.11% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main changes: filters, CSV export, batch assignment, and version bump to 0.9.3, all of which are central to the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/update-to-version-0.9.2-meb5s9
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can generate a title for your PR based on the changes.

Add @coderabbitai placeholder anywhere in the title of your PR and CodeRabbit will replace it with a title based on the changes in the PR. You can change the placeholder by changing the reviews.auto_title_placeholder setting.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 46a80c3466

ℹ️ 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".

Comment on lines +4925 to +4929
if status_value and status_value not in {
ObservationSegment.STATUS_TODO,
ObservationSegment.STATUS_IN_PROGRESS,
ObservationSegment.STATUS_DONE,
}:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Require a non-empty status for batch status updates

This validation only runs when status_value is truthy, so a request with set_status=1 and an empty/missing status bypasses the check and later writes an invalid status (''/None) during the batch loop. In that scenario, the endpoint can either persist corrupted segment state or raise a server error on save, depending on payload shape. Since this view accepts raw POST data, it should explicitly require a valid status whenever status updates are requested.

Useful? React with 👍 / 👎.

@Smartappli Smartappli merged commit e3e5067 into main Mar 16, 2026
0 of 18 checks passed
@Smartappli Smartappli deleted the codex/update-to-version-0.9.2-meb5s9 branch March 28, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant