Skip to content

Conversation

@naglepuff
Copy link
Collaborator

Vetting Workflow

Fix #287

Models vetting details for a particular user. Right now this means being able to capture any reference materials used by a user.

This is currently implemented as a text field that is accessible from the spectrogram sidebar.
image

image As a user types in the box, a request is made (debounced every 500ms) to update the backend with the new value. This is stored in a new database table that connects a user to their reviewer materials.

@naglepuff naglepuff requested a review from BryonLewis January 9, 2026 19:19
@naglepuff naglepuff force-pushed the issue-287-vetting-details branch from c99e650 to a1400c0 Compare January 9, 2026 20:11
Copy link
Collaborator

@BryonLewis BryonLewis left a comment

Choose a reason for hiding this comment

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

Some minor changes and questions about the overall

Comment on lines +31 to +41
@pytest.mark.django_db
def test_create_vetting_details(client):
test_text = 'foo'
data = {'reference_materials': test_text}
test_user = UserFactory()
client.force_login(user=test_user)
resp = client.post(
f'/api/v1/vetting/user/{test_user.id}', data=data, content_type='application/json'
)
assert resp.status_code == 200
assert resp.json()['user_id'] == test_user.id
Copy link
Collaborator

Choose a reason for hiding this comment

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

There is a DB constraint for the text size, should we be testin that in the tests?

Copy link
Collaborator Author

@naglepuff naglepuff Jan 12, 2026

Choose a reason for hiding this comment

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

Comment on lines 677 to 705
<v-dialog
v-model="referenceDialog"
max-width="50%"
>
<template #activator="{ props }">
<v-btn
v-bind="props"
>
Add reference materials
</v-btn>
</template>
<v-card>
<v-card-title>
Reference Materials
</v-card-title>
<v-card-text>
<v-textarea
v-model="reviewerMaterials"
placeholder="Describe any reference materials used during labeling"
@update:model-value="saveReviewerMaterials"
/>
</v-card-text>
<v-card-actions>
<v-btn
@click="referenceDialog = false"
>
Close
</v-btn>
</v-card-actions>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since it is already in a V-dialog I would probably swap this to using a submit/cancel button and have the saving of new data connected to the submit button and cancellation prevent saving the data.
Mostly because with 500ms if you are a fast typer and hit the 2000 character limit you could get an unseen error that doesn't save the data (or if you are pasting data in).
I'd suggest swapping it to that instead of debouncing and also making it so the textarea has a limit of 2000 characters and then it will have a rule show up as well as disabling the submit button.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Refactored into a separate component in 2dff11e

@naglepuff naglepuff requested a review from BryonLewis January 12, 2026 23:13
@naglepuff naglepuff force-pushed the issue-287-vetting-details branch from 8db34c7 to 821c17d Compare January 13, 2026 16:23
Copy link
Collaborator

@BryonLewis BryonLewis left a comment

Choose a reason for hiding this comment

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

I think it is missing a way to open the Reference Materials Dialog

Copy link
Collaborator

@BryonLewis BryonLewis left a comment

Choose a reason for hiding this comment

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

The length check was set to 20 instead of 2000.
Minor note about 'save'/'close' ordering. Up to you if you want to change it.

naglepuff and others added 2 commits January 13, 2026 16:08
Co-authored-by: Bryon Lewis <61746913+BryonLewis@users.noreply.github.com>
@naglepuff naglepuff requested a review from BryonLewis January 13, 2026 21:11
Copy link
Collaborator

@BryonLewis BryonLewis left a comment

Choose a reason for hiding this comment

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

👍

@naglepuff naglepuff merged commit 366944a into vetting-workflow Jan 14, 2026
4 checks passed
@naglepuff naglepuff deleted the issue-287-vetting-details branch January 15, 2026 19:06
naglepuff added a commit that referenced this pull request Jan 16, 2026
* Allow Users to Submit Annotations (#281)

* Add settings for vetting

* Model submission status of recording annotations

* Add endpoint to get current user

* Show recording submission status in table view

* Don't filter out noise

The model can predict noise, so sorting it out of the species list can
lead to problems when loading/displaying that value in a list.

* Add endpoint to submit file-level annotations

* Allow submitting file annotations in interface

* Squash migrations

* Indicate when a file has been reviewed

* Format

* Show the current user's submitted label in sidebar

* Disable deletion for non-admin vetters

* Make 403 message more descriptive

* Vetting progress UI (#293)

* Add settings for vetting

* Model submission status of recording annotations

* Add endpoint to get current user

* Show recording submission status in table view

* Don't filter out noise

The model can predict noise, so sorting it out of the species list can
lead to problems when loading/displaying that value in a list.

* Add endpoint to submit file-level annotations

* Allow submitting file annotations in interface

* Squash migrations

* Indicate when a file has been reviewed

* Format

* Show the current user's submitted label in sidebar

* Disable deletion for non-admin vetters

* Make 403 message more descriptive

* Show progress bar for submitted recordings

* Enable showing/hiding submitted recordings

* Toggle submitted recordings in sidebar

* Fix submission bug

* Navigate through unreviewed files (#294)

* Add settings for vetting

* Model submission status of recording annotations

* Add endpoint to get current user

* Show recording submission status in table view

* Don't filter out noise

The model can predict noise, so sorting it out of the species list can
lead to problems when loading/displaying that value in a list.

* Add endpoint to submit file-level annotations

* Allow submitting file annotations in interface

* Squash migrations

* Indicate when a file has been reviewed

* Format

* Show the current user's submitted label in sidebar

* Disable deletion for non-admin vetters

* Make 403 message more descriptive

* Show progress bar for submitted recordings

* Enable showing/hiding submitted recordings

* Toggle submitted recordings in sidebar

* Fix submission bug

* Add button to go to next unreviewed file

* Add function to get next unreviewed recording

* Navigate between unreviewed files

* Display a message when there are no files to review

* Reset selected annotation when recording changes

* Show a user their submitted labels (#295)

* Show submission status and label in sidebar

* Show user submitted label in Recordings view

* Hide detailed metadata in vetting mode (#296)

* In vetting mode, hide detailed metadata fields

* Hide annotation summary in vetting mode

* Show GRTS cell bounding box for vetters

* Indicate pending submissions

* Update title for pulse annotation column

* Hide "my recordings" if non-admins can't upload (#298)

* Hide "my recordings" if non-admins can't upload

* Add missing semicolon

Co-authored-by: Bryon Lewis <61746913+BryonLewis@users.noreply.github.com>

* Hide progress bar for my recordings when needed

---------

Co-authored-by: Bryon Lewis <61746913+BryonLewis@users.noreply.github.com>

* Allow users to add reference materials (#297)

* Allow users to add reference materials

* Model vetting details per user

* Update vetting details from front end

* Use separate component for reference materials

* Add length check and test to API layer

* Swap position of close/save for consistency

* Use correct max length value for vuetify rule

Co-authored-by: Bryon Lewis <61746913+BryonLewis@users.noreply.github.com>

---------

Co-authored-by: Bryon Lewis <61746913+BryonLewis@users.noreply.github.com>

* Vetting workflow feedback (#301)

* Make return type compatable for column definition

* Add scale widget to location map

* Fix casing for kHz

* Fix scrolling in spectrogram sidebar

* Add tooltip to submission status

* Ensure configuration is loaded before column check

* Remove unused setting and remake migrations

* Use tooltip in shared list

---------

Co-authored-by: Bryon Lewis <61746913+BryonLewis@users.noreply.github.com>
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.

2 participants