You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixing up logic around selecting/deselecting nested labels
There’s a bug in label studio where if you use labels for conditional labeling (creating nested labels), and don’t deselect the label you’re on before attempting to label something else, the console will throw a bunch of errors and beachball of death, forcing you to reload the page. Fixing this by not allowing users to select a different top-level label if there are sub-labels already applied. Also not allowing users to remove a top-level label if there are sub-labels since that logically doesn't make sense.
Issue: https://khanacademy.atlassian.net/browse/DI-1502
Test plan:
- deployed to test; see in action here: https://data-labeling-test.khanacademy.org/projects/298/data?tab=537&page=1
"json_thread": "[[\"\",\"I’m here to help you with math or science questions. I won’t do your work for you, but I will help you learn how to solve them on your own.\\n\\nCan you tell me the problem or exercise you’d like to solve?\\n\\n - You can type it in or copy and paste below!\\n\\n - Click the bubble below and I can generate 10 practice problems for you!\\n\\n - If your question is about a Khan Academy exercise, please open the Khanmigo chat window on that page for more accurate and helpful support!\"],[\"Two identical rectangular prisms each have a height of 90cm. The base of each prism is a square, and the surface area of each prism is K \\\\(K\\\\left(cm\\\\right)^{2}\\\\)\",\"Let's start by understanding the problem a bit more. You mentioned that each rectangular prism has a height of 90 cm and a square base, and you're given the surface area as \\\\( K \\\\) square centimeters.\\n\\nWhat do you think we need to find out about the square base to help us solve for \\\\( K \\\\)?\"],[\"Two identical rectangular prisms each have a height of 90cm. The base of each prism is a square, and the surface area of each prism is \\\\(Kcm^{2}\\\\) . If the prisms are glued together along a square base, the resulting prism has a surface area of \\\\(\\\\frac{92}{47}K\\\\left(cm\\\\right)^{2}\\\\) . What is the side length, in cm, of each square base?\",\"Alright, let's break this down. We know that the surface area of a rectangular prism is given by \\\\(2lw + 2lh + 2wh\\\\), where \\\\(l\\\\), \\\\(w\\\\), and \\\\(h\\\\) are the length, width, and height of the prism, respectively. \\n\\nIn our case, the base of the prism is a square, so \\\\(l = w = s\\\\), the side length of the square base. So, the surface area of one prism is \\\\(2s^{2} + 4sh\\\\). \\n\\nWhen the two prisms are glued together along a square base, one of the square bases is no longer exposed, so the surface area of the resulting prism is \\\\(2K - 2s^{2}\\\\). \\n\\nWe're told that this is equal to \\\\(\\\\frac{92}{47}K\\\\). \\n\\nHow can we use this information to write an equation that we can solve for \\\\(s\\\\)?\"],[\"give me similar questions\",\"Sure, let's try a similar problem:\\n\\nTwo identical rectangular prisms each have a height of 60 cm. The base of each prism is a square, and the surface area of each prism is \\\\(M cm^{2}\\\\). If the prisms are glued together along a square base, the resulting prism has a surface area of \\\\(\\\\frac{72}{37}M cm^{2}\\\\). What is the side length, in cm, of each square base?\\n\\nRemember, the surface area of a rectangular prism with a square base is given by \\\\(2s^{2} + 4sh\\\\), where \\\\(s\\\\) is the side length of the square base and \\\\(h\\\\) is the height of the prism. When the two prisms are glued together along a square base, one of the square bases is no longer exposed, so the surface area of the resulting prism is \\\\(2M - 2s^{2}\\\\). \\n\\nCan you use this information to write an equation that we can solve for \\\\(s\\\\)?\"],[\"In the given equation ( \\\\(57\\\\left(x\\\\right)^{2}+57\\\\left(a+b\\\\right)x+ab=0\\\\) , a and b are positive constants. The product of the solutions to the given equation is kab, where k is a constant. What is the value of k?\",\"Great! We have a quadratic equation here. Remember, the product of the roots of a quadratic equation \\\\(ax^2 + bx + c = 0\\\\) is given by \\\\(\\\\frac{c}{a}\\\\). \\n\\nIn our equation \\\\(57x^2 + 57(a+b)x + ab = 0\\\\), what are the values of \\\\(a\\\\) and \\\\(c\\\\)? And how can we use these to find the product of the roots?\"],[\"just give me similar equationa\",\"Sure, here's a similar problem:\\n\\nIn the given equation \\\\(72(x)^2 + 72(c+d)x + cd = 0\\\\), \\\\(c\\\\) and \\\\(d\\\\) are positive constants. The product of the solutions to the given equation is \\\\(lcd\\\\), where \\\\(l\\\\) is a constant. What is the value of \\\\(l\\\\)?\\n\\nRemember, the product of the roots of a quadratic equation \\\\(ax^2 + bx + c = 0\\\\) is given by \\\\(\\\\frac{c}{a}\\\\). Can you use this information to find the value of \\\\(l\\\\)?\"]]",
"text": "I’m here to help you with math or science questions. I won’t do your work for you, but I will help you learn how to solve them on your own.\n\nCan you tell me the problem or exercise you’d like to solve?\n\n - You can type it in or copy and paste below!\n\n - Click the bubble below and I can generate 10 practice problems for you!\n\n - If your question is about a Khan Academy exercise, please open the Khanmigo chat window on that page for more accurate and helpful support!",
28
+
"author": "Khamigo",
29
+
"dialogue_id": "85e606f8ebbc4baca43a6174e233fc70"
30
+
},
31
+
{
32
+
"id": "6a1010416a234b9fb8a3c96c921425f2",
33
+
"text": "Two identical rectangular prisms each have a height of 90cm. The base of each prism is a square, and the surface area of each prism is K \\(K\\left(cm\\right)^{2}\\)",
34
+
"author": "User",
35
+
"dialogue_id": "3380f67bf08244108451b241a19a7790"
36
+
},
37
+
{
38
+
"id": "486237593b5242ad9cc7e20302bad485",
39
+
"text": "Let's start by understanding the problem a bit more. You mentioned that each rectangular prism has a height of 90 cm and a square base, and you're given the surface area as \\( K \\) square centimeters.\n\nWhat do you think we need to find out about the square base to help us solve for \\( K \\)?",
40
+
"author": "Khamigo",
41
+
"dialogue_id": "eb06a0c0849343eeacd9b7c9bb3c2952"
42
+
},
43
+
{
44
+
"id": "4fc1de609f0b4357b066ad5ba7ea69f7",
45
+
"text": "Two identical rectangular prisms each have a height of 90cm. The base of each prism is a square, and the surface area of each prism is \\(Kcm^{2}\\) . If the prisms are glued together along a square base, the resulting prism has a surface area of \\(\\frac{92}{47}K\\left(cm\\right)^{2}\\) . What is the side length, in cm, of each square base?",
46
+
"author": "User",
47
+
"dialogue_id": "6f67b2327d00495b8a140d58e5e1f8e9"
48
+
},
49
+
{
50
+
"id": "cf13e116a12e4fa1b1ff85905ddb5f2e",
51
+
"text": "Alright, let's break this down. We know that the surface area of a rectangular prism is given by \\(2lw + 2lh + 2wh\\), where \\(l\\), \\(w\\), and \\(h\\) are the length, width, and height of the prism, respectively. \n\nIn our case, the base of the prism is a square, so \\(l = w = s\\), the side length of the square base. So, the surface area of one prism is \\(2s^{2} + 4sh\\). \n\nWhen the two prisms are glued together along a square base, one of the square bases is no longer exposed, so the surface area of the resulting prism is \\(2K - 2s^{2}\\). \n\nWe're told that this is equal to \\(\\frac{92}{47}K\\). \n\nHow can we use this information to write an equation that we can solve for \\(s\\)?",
52
+
"author": "Khamigo",
53
+
"dialogue_id": "bfabb7de8bb741548734cf705f4c810b"
54
+
},
55
+
{
56
+
"id": "7344ca788b21432c996f9f2e5f402f14",
57
+
"text": "give me similar questions",
58
+
"author": "User",
59
+
"dialogue_id": "987e6d966ca346dda77e7ef779539614"
60
+
},
61
+
{
62
+
"id": "53ab44705b6b4a01b77f009c0fd9ab80",
63
+
"text": "Sure, let's try a similar problem:\n\nTwo identical rectangular prisms each have a height of 60 cm. The base of each prism is a square, and the surface area of each prism is \\(M cm^{2}\\). If the prisms are glued together along a square base, the resulting prism has a surface area of \\(\\frac{72}{37}M cm^{2}\\). What is the side length, in cm, of each square base?\n\nRemember, the surface area of a rectangular prism with a square base is given by \\(2s^{2} + 4sh\\), where \\(s\\) is the side length of the square base and \\(h\\) is the height of the prism. When the two prisms are glued together along a square base, one of the square bases is no longer exposed, so the surface area of the resulting prism is \\(2M - 2s^{2}\\). \n\nCan you use this information to write an equation that we can solve for \\(s\\)?",
64
+
"author": "Khamigo",
65
+
"dialogue_id": "ea8900509cd54bcfa2e7ee1cc5519baa"
66
+
},
67
+
{
68
+
"id": "060dbe6a330646f1948a9e4967b3562f",
69
+
"text": "In the given equation ( \\(57\\left(x\\right)^{2}+57\\left(a+b\\right)x+ab=0\\) , a and b are positive constants. The product of the solutions to the given equation is kab, where k is a constant. What is the value of k?",
70
+
"author": "User",
71
+
"dialogue_id": "49b5522949cd4c2887c1a9c611ecc4ce"
72
+
},
73
+
{
74
+
"id": "a3e38a1487524a5f88ec3374565003b2",
75
+
"text": "Great! We have a quadratic equation here. Remember, the product of the roots of a quadratic equation \\(ax^2 + bx + c = 0\\) is given by \\(\\frac{c}{a}\\). \n\nIn our equation \\(57x^2 + 57(a+b)x + ab = 0\\), what are the values of \\(a\\) and \\(c\\)? And how can we use these to find the product of the roots?",
76
+
"author": "Khamigo",
77
+
"dialogue_id": "55b4aaea2a59492f971d853a0934d59f"
78
+
},
79
+
{
80
+
"id": "12e026b73f8a463d9c1b1831abee28df",
81
+
"text": "just give me similar equationa",
82
+
"author": "User",
83
+
"dialogue_id": "23ff5a2f09374d718024ed932310bc7e"
84
+
},
85
+
{
86
+
"id": "11215401eea14163aaf7888abf77b1ac",
87
+
"text": "Sure, here's a similar problem:\n\nIn the given equation \\(72(x)^2 + 72(c+d)x + cd = 0\\), \\(c\\) and \\(d\\) are positive constants. The product of the solutions to the given equation is \\(lcd\\), where \\(l\\) is a constant. What is the value of \\(l\\)?\n\nRemember, the product of the roots of a quadratic equation \\(ax^2 + bx + c = 0\\) is given by \\(\\frac{c}{a}\\). Can you use this information to find the value of \\(l\\)?",
88
+
"author": "Khamigo",
89
+
"dialogue_id": "5e2e523a2d6e4796b4cbc4de2b889dbb"
90
+
}
91
+
],
92
+
"prompt_name": "activity-tutor-me-stem",
93
+
"reaction_note": null,
94
+
"sample_source": 3,
95
+
"thread_length": 6,
96
+
"highlighted_idx": 1,
97
+
"enrollment_group": "user-purchase",
98
+
"course_slug_clean": "AI Activities",
99
+
"has_reaction_note": false,
100
+
"user_primary_type": "Learner",
101
+
"has_apology_phrase": false,
102
+
"highlighted_answer": "Alright, let's break this down. We know that the surface area of a rectangular prism is given by \\(2lw + 2lh + 2wh\\), where \\(l\\), \\(w\\), and \\(h\\) are the length, width, and height of the prism, respectively. \n\nIn our case, the base of the prism is a square, so \\(l = w = s\\), the side length of the square base. So, the surface area of one prism is \\(2s^{2} + 4sh\\). \n\nWhen the two prisms are glued together along a square base, one of the square bases is no longer exposed, so the surface area of the resulting prism is \\(2K - 2s^{2}\\). \n\nWe're told that this is equal to \\(\\frac{92}{47}K\\). \n\nHow can we use this information to write an equation that we can solve for \\(s\\)?",
<Labelalias="type-incorrect"value="Wrong calculation"hotkey="w"hint="Khanmigo calculates incorrectly, e.g. 2+2=5"granularity="div"background="pink"/>
18
+
<Labelalias="type-process"value="Wrong process"hotkey="p"hint="Khanmigo suggests a bad method, e.g. 'to find 2+2 you must divide'"granularity="div"background="purple"/>
19
+
<Labelalias="type-other"value="Other"hotkey="o"hint="Use this label for any noteworthy issue that is not addressed by other labels; elaborate in Labeler Notes"granularity="div"background="blue"/>
0 commit comments