Skip to content

Pilot history: filter bar and removable rejected rows - #132

Merged
TrueMessenger merged 1 commit into
mainfrom
feat/pilot-history-filters-hide
Jul 8, 2026
Merged

TrueMessenger merged 1 commit into
mainfrom
feat/pilot-history-filters-hide

Conversation

@TrueMessenger

Copy link
Copy Markdown
Owner

Summary

  • Adds a filter bar to Pilot Fittings' "My validation history" (status, verdict, doctrine, character, ship name), mirroring the reviewer queue's filter mechanics and markup. Doctrine and character options are scoped to the pilot's own submissions, so the filter never surfaces a doctrine name the pilot can't otherwise see. A "Source defaults" option covers submissions graded with no doctrine.
  • Pilots can now remove a rejected submission from their own history: it's hidden from that view only (FitSubmission.hidden_at, migration 0038) rather than deleted, so reviewers and reports still see it and the decision stays on the audit trail. Pending submissions are still hard-deleted by the same "Remove selected" action / single-delete endpoint, unchanged. Approved submissions are untouched either way.
  • The bulk-remove checkbox now renders for both pending and rejected rows (previously pending-only); the button is relabelled "Remove selected" and its confirm text explains the split behavior.

Why

The pilot's history page had no way to filter a growing list of past submissions, and rejected submissions cluttered it permanently with no way for the pilot to clean them up - reviewers still need those rows for the audit trail, so a hard delete wasn't appropriate.

Test plan

  • manage.py test fitcheck - full suite green (736 tests)
  • manage.py check - clean
  • manage.py makemigrations fitcheck --check --dry-run - no missing migrations
  • New tests cover: each filter narrowing correctly, filters composing, unknown filter values being ignored, filter option lists scoped to the pilot's own submissions, querystring preserved across pagination, bulk/single soft-hide of rejected rows (hidden but still in the DB, invisible to the owner's history, visible to an unfiltered query), approved rows untouched, pending rows still hard-deleted, and another user's rejected row unaffected by my remove action.

Adds a filter bar (status, verdict, doctrine, character, ship) to the
pilot's own validation history, mirroring the reviewer queue's filter
mechanics. Doctrine and character options are scoped to the pilot's own
submissions only, so a filter never leaks the name of a doctrine the
pilot can't otherwise see.

Pilots can now remove a rejected submission from their own history:
it's hidden from that view only (FitSubmission.hidden_at), not deleted,
so reviewers and reports still see it. Pending submissions in the same
"Remove selected" action are still deleted outright, unchanged from
before. Approved submissions remain untouched either way.
@TrueMessenger
TrueMessenger merged commit 6261cd6 into main Jul 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant