-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MEDIUM: Show full thread ancestry (back end, 2/2) #34085
Comments
I've got a Wave issue assigned now and haven't started on this. Going to remove myself to not be a blocker here. Doing a recursive SQLite query sounds pretty unique though so if nobody grabs it I'm happy to take it on and/or follow along in the reviews. |
Nobody's picked it up yet, I'd love your help! |
Alright I'm back in 😄 |
The recursive query part wasn't too bad! Turns out we already had an existing example in the code to follow. Did have a question on this one though...
Thinking about workspace/non-workspace members for a sec... this is how I might imagine it could work and want to confirm first... Case 1:
Case 2:
Case 3:
Case 4:
Mostly not sure about Case 3. I could see the usefulness of inviting an off-workspace person to a thread and also providing some way to optionally grant access to the entire contents of the room. But also feels like something we'd ask your permission to do first. |
Update: I ran through all of these cases to see how things work now. And I'm gonna assume that the cases I laid out above is the direction we want to go in. We can always change how this works later. 👍 ETA: This change is going to take some extra time because the logic for building report action data is complex and we are still building them the PHP layer. The "easy" path to getting that to work is:
The hard path would be to migrate all report actions to Auth. But this would be a very large refactor that I'm not convinced we need to do right now. |
This is in review! |
Auth PR Merged. Web PR holding on the Auth deploy. |
This issue has not been updated in over 15 days. @marcaaron eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
@marcaaron, this Monthly task hasn't been acted upon in 6 weeks; closing. If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead. |
Note: Please see #32618 for the complete problem/solution statement. This issue only relates to implementing the back-end subset of the issue.
OpenReport
to return the the entire ancestry (i.e., the parentReportID, parentReportActionID and the reportAction to display), in the same exact format as if you had manually navigated down the tree, as far as it is shared with this userreportActions
(exactly like you had navigated there from the top); nothing fancy:reportActions_1: { 10: {original comment} }
reportActions_2: { 20: {child comment} }
reportActions_3: { 30: {grandchild comment} }
report_2: {parentReportID: 1, parentReportActionID: 10}
report_3: {parentReportID: 2, parentReportActionID: 20}
OpenReport
should do a recursive query as far as the caller has access -- recognizing that not all users will be able to access the full ancestry (eg, if you are pulled into a thread in a private chat, and then that thread has another thread, you'll be able to see a partial ancestry -- including the original message in the private chat that was threaded in the first place -- but you won't be able to navigate back to that private chat, nor see any other chats that it might be a thread inside of). There are likely a few ways to do this:Report::getAncestry
which acceptsparentReportID
to look up the parent report, and then its parent, so on recursively, adding results to the response.The text was updated successfully, but these errors were encountered: