Skip to content

Commit b2aa88b

Browse files
[MBL-19497][Student] Fix bookmark URL placeholders from notifications
refs: MBL-19497 affects: Student release note: Fixed an issue where bookmarks created from notifications or the ToDo list would fail to open
1 parent 33b3a58 commit b2aa88b

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

apps/.claude/skills/pr/SKILL.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,26 @@ gh pr create --title "Your PR Title" --body "$(cat /path/to/description.md)"
2626

2727
The template will be automatically loaded when using `gh pr create`.
2828

29+
### PR Title Format
30+
31+
**CRITICAL**: The PR title MUST include the affected app(s) in square brackets AFTER the ticket ID.
32+
33+
Format: `[TICKET-ID][AppName] Description`
34+
35+
Examples:
36+
- `[MBL-19497][Student] Fix bookmark URL placeholders from notifications`
37+
- `[MBL-12345][Teacher] Add assignment grading improvements`
38+
- `[MBL-67890][Student][Teacher] Fix discussion loading for both apps`
39+
- `[MBL-11111][All] Update login flow across all apps`
40+
41+
**Rules:**
42+
- The ticket ID comes FIRST, then the app name(s)
43+
- Always include the app name(s) based on the `affects:` field in the PR body
44+
- If `affects: Student`, use `[Student]`
45+
- If `affects: Student, Teacher`, use `[Student][Teacher]`
46+
- If `affects: Student, Teacher, Parent`, use `[All]`
47+
- The app tags come AFTER the ticket ID and BEFORE the description
48+
2949
## Template Requirements
3050

3151
The PR template includes the following sections that must be completed:
@@ -101,6 +121,8 @@ Complete the following items before marking PR as ready:
101121

102122
### Example PR for Student App Only
103123

124+
**Title:** `[MBL-19453][Student] Add dashboard widget customization`
125+
104126
```markdown
105127
Test plan:
106128
1. Navigate to Dashboard
@@ -114,6 +136,8 @@ release note: Students can now customize their dashboard with widgets
114136

115137
### Example PR for Multiple Apps
116138

139+
**Title:** `[MBL-12345][Student][Teacher] Improve discussion loading performance`
140+
117141
```markdown
118142
Test plan:
119143
1. Open any course
@@ -123,4 +147,19 @@ Test plan:
123147
refs: MBL-12345
124148
affects: Student, Teacher
125149
release note: Improved discussion loading performance
150+
```
151+
152+
### Example PR for All Apps
153+
154+
**Title:** `[MBL-67890][All] Update login flow`
155+
156+
```markdown
157+
Test plan:
158+
1. Launch any app
159+
2. Log in with credentials
160+
3. Verify successful authentication
161+
162+
refs: MBL-67890
163+
affects: Student, Teacher, Parent
164+
release note: Updated login experience for improved security
126165
```

apps/student/src/main/java/com/instructure/student/dialog/BookmarkCreationDialog.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,10 @@ class BookmarkCreationDialog : BaseCanvasAppCompatDialogFragment() {
163163
bookmark.getQueryParamForBookmark)
164164
}
165165

166+
// Strip any remaining placeholder segments (e.g., /:sliding_tab_type/:submission_id)
167+
// that weren't replaced during URL generation
168+
bookmarkUrl = bookmarkUrl?.replace(Regex("/:[^/?#]+"), "")
169+
166170
Analytics.trackBookmarkSelected(context, peakingFragment::class.java.simpleName + " " + topFragment::class.java.simpleName)
167171

168172
if(bookmarkUrl != null) {
@@ -178,6 +182,10 @@ class BookmarkCreationDialog : BaseCanvasAppCompatDialogFragment() {
178182
bookmarkUrl = RouteMatcher.generateUrl(bookmark.canvasContext!!.type, topFragment::class.java, topFragment.bookmark.getParamForBookmark)
179183
}
180184

185+
// Strip any remaining placeholder segments (e.g., /:sliding_tab_type/:submission_id)
186+
// that weren't replaced during URL generation
187+
bookmarkUrl = bookmarkUrl?.replace(Regex("/:[^/?#]+"), "")
188+
181189
Analytics.trackBookmarkSelected(context, topFragment::class.java.simpleName)
182190

183191
if(bookmarkUrl != null) {

0 commit comments

Comments
 (0)