Use notifications.onButtonClicked to link to item destinations
mlissner opened this issue · 1 comments
When you upload a docket, it's often nice to know where it actually is, particularly when you're the first uploader or when you're tinkering with links and trying to figure out where things are.
If we use notification.onButtonClicked, I think we could provide a button in the notifications that users can click to go to the destination of the thing they uploaded. (It doesn't work in Firefox or Safari, which is a bummer, but Chrome is the leading browser and it works there.)
I think we could use our redirect URLs for this. E.g., this case:
https://www.courtlistener.com/docket/66957464/united-states-v-kennedy/
Has a pacer_case_id of 531077 (hover the View on PACER link to see this), and you can find it on CL here:
https://www.courtlistener.com/recap/gov.uscourts.mdd.531077/
That's handy, since when we upload a docket, we might not know the CL ID of it, but something to note is that if the item doesn't exist yet (like, because you just uploaded it), then the URL won't work yet (you'll get a 404). Maybe we can improve this though to encourage users to press refresh.
On the PDF side of things, we pretty much always know where the PDF is going to wind up, but I think it'd probably be nicer to send users to the HTML link instead. We don't have an easy way to hack those at the moment unless you know the CL ID. They look like this:
https://www.courtlistener.com/docket/66957464/1/united-states-v-kennedy/
I guess that means we either look up the CL ID, or maybe we have it in our context already? I'm not sure.
Oh, and the reason this came up is because of the danged doppelganger issue! doc1 links from CL.com now include the case number:
https://ecf.mdd.uscourts.gov/doc1/093013070699?caseid=531077
But in multi-defendant criminal cases, the caseid
parameter is wrong, and you can sometimes make things work by removing it like so:
https://ecf.mdd.uscourts.gov/doc1/093013070699
When you do that, PACER uses the correct caseid
value and uploads it accordingly. BUT it goes to a CL docket that can be different from the one you started with. In that case, it'd be really nice to have a button that went to the place with the correct caseid.