kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

TopicsMobileHeader crashes when topic is null

Open rtibbles opened this issue 2 months ago • 4 comments

🙂 Looking for an issue? Welcome! This issue is open for contribution. If this is the first time you’re requesting an issue, please:

  • Read Contributing guidelines carefully. Pay extra attention to Using generative AI. Pull requests and comments that don’t follow the guidelines won’t be answered.
  • Confirm that you’ve read the guidelines in your comment.

Overview

On small screens, TopicsPage renders TopicsMobileHeader before topic has loaded, and the header's render throws a TypeError on topic.title.

Complexity: Low Target branch: develop

Context

Production, 90 days to 2026-09-24:

Sentry issue Events Sites
KOLIBRI-FRONTEND-140J 9 2
TypeError: null is not an object (evaluating 'this.topic.title')

The Change

  • TopicsMobileHeader should handle a null topic the way TopicsHeader does, until the topic loads.

Acceptance Criteria

  • [ ] TopicsMobileHeader renders without error when topic is null.
  • [ ] Once topic loads, the header shows its title and thumbnail as it does today.
  • [ ] A Jest test renders TopicsMobileHeader with topic: null.

AI usage

I picked this from a Sentry triage with Claude Code. Claude Code queried Sentry, traced the code and drafted the sections.

rtibbles avatar Sep 24 '26 23:09 rtibbles

Sentry Issue: KOLIBRI-FRONTEND-140J

sentry[bot] avatar Sep 24 '26 23:09 sentry[bot]

Hi! 👋

This issue is available for contribution and supports self-assignment. Here's how to get started:

  • Comment /assign to assign yourself to this issue
  • You can have up to 2 issues assigned at a time across all community repos
  • Dropping an issue has a 7-day cooldown before the slot opens up
  • Link your pull request to this issue when you submit it

📖 Read the Contributing guidelines before starting.

Are you preparing for Google Summer of Code? See our GSoC guidelines.

learning-equality-bot avatar Sep 25 '26 00:09 learning-equality-bot

I reviewed the contribution guide, including the generative AI section. I’ll keep this focused on the null-topic render crash and add the requested test. /assign

humairaambreen avatar Sep 25 '26 07:09 humairaambreen

Hi! 👋

You've been assigned to this issue. Here's what to do next:

  • Read the issue description carefully and make sure you understand the requirements
  • Link your pull request to this issue when you submit it
  • If you can no longer work on this, unassign yourself so others can pick it up

Good luck! 😊

Are you preparing for Google Summer of Code? See our GSoC guidelines.

learning-equality-bot avatar Sep 25 '26 07:09 learning-equality-bot