Course Outline card tag-count badge stays stale after editing tags
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- react, typescript
- Domain
- frontend
Research direction
Start by comparing the query keys in src/content-tags-drawer/data/apiHooks.ts (the useContentTaxonomyTagsUpdater invalidation) with useContentTagsCount in src/generic/data/apiHooks.ts, which CardHeader uses for the badge. Check that the card's key starts with the same prefix as contentTagsQueryKeys.contentTagsCount(...), then confirm the badge refreshes after saving in the drawer without a page reload. Done means the badge updates on save on the course outline.
Written by the indexing model from the issue text.
Description
After tags are added or removed in the Manage Tags drawer, the tag-count badge on the course outline's section and subsection cards keeps its old value until the page is reloaded. The drawer's own count, and the API (object_tags, object_tag_counts?count_implicit), are correct immediately. BTR testers noted the same in Verawood on TC-00181 / TC-00182 ("changes not at once but after page refresh").
Cause: the drawer's mutation and the card's query use different query keys.
useContentTaxonomyTagsUpdater(src/content-tags-drawer/data/apiHooks.ts) invalidatescontentTagsQueryKeys.contentTagsCount(pattern), i.e.['contentTags', 'contentTagsCount', pattern].useContentTagsCount(src/generic/data/apiHooks.ts), whichCardHeaderuses for the badge, queries['contentTagsCount', pattern].
React Query matches invalidation keys by prefix, so the card's query is never invalidated. It only refetches on remount or a reload.
Expected: the badge updates when the drawer saves. Building useContentTagsCount's key from contentTagsQueryKeys.contentTagsCount(...) would make the two match.
Environment: main and verawood, code as on master 2026-10-13. Found by the Open edX end-to-end test suite while triaging the BTR sheet's notes.
- Dominant language
- TypeScript
- Stars
- 18
- Forks
- 228
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 24
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openedx/frontend-app-authoring
-
Difficulty 2/5 Half a day Newbie friendliness 74/100
openedx/frontend-app-authoring#3311 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
openedx/frontend-app-authoring#3310 ·
Maintainers usually reply within 1 day
-
Library Add Content buttons and preview-changes actions are identifiable only by label or positionOpena11y bug
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
openedx/frontend-app-authoring#3309 ·
Maintainers usually reply within 1 day
-
XBlockStatus small status text uses a default color role below 4.5:1 on the light cardMay be free again @nisatsama claimed this 47 days ago, and no pull request is open. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
openedx/frontend-app-authoring#3282 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
openedx/frontend-app-authoring#3274 ·
Maintainers usually reply within 1 day
All issues in openedx/frontend-app-authoring
Similar issues
-
type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
db-ux-design-system/core-web#8856 ·
Maintainers usually reply within 1 day
-
'!' breaking change is lost when the commit also has an empty BREAKING CHANGE footerPossibly taken @wittdennis claimed this today. Openpriority: p3 type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
googleapis/release-please#2971 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 87/100
Maintainers usually reply within 1 day
-
🛠️ dette technique
Difficulty 2/5 1-3 hours Newbie friendliness 61/100
betagouv/mon-entreprise#4752 · 1 comment ·
Maintainers usually reply within 5 days