Post composer shows the category slug instead of its name
15 AUG AT 10:04 AM

Post composer shows the category slug instead of its name

0 LOVES 2 VIEWS

Bug

What

The Category row in the Flutter post composer displays the category’s slug rather than its name — branding where the rest of the app says Branding, kitchen-and-table where it says Kitchen & Table. The picker list itself is correctly cased; only the selected value on the form row is wrong.

Severity

Low — cosmetic only. The stored value is correct: PostCreateForm sends the slug, which is what the API expects, so posts are filed under the right category. Nothing is lost or misfiled. It reads as a bug because every other surface in the app shows the display name, so the composer looks like it is describing a different thing than the one you picked.

Repro

  1. Open the app on any category list (Haus Von Hester → Branding).
  2. Tap +New Article.
  3. The Category row reads branding, not Branding.
  4. Tap the Category row to open the picker. The list is correctly cased — Branding.
  5. Select it. The row still reads branding.

Step 5 matters: this is not caused by the inherit-from-page behaviour added in 5021c7da. Manual selection has always behaved this way. The inherit change only made it visible by default, because the row previously sat empty until it was touched.

Expected

The Category row shows the category’s display name, matching the picker list and every other category surface in the app.

Actual

It shows the raw slug, in both the inherited and the manually-selected case.

Evidence

flutter/gokonversed/lib/features/authoring/ui/molecules/category_picker_sheet.dart:20
  /// Show the picker and return the selected category slug (or null).
  static Future<String?> show(...)          // returns cat.slug, never cat.name

  :73  ListTile(title: Text(cat.name))       // the LIST renders the name correctly

flutter/gokonversed/lib/features/authoring/ui/organisms/post_compose_overlay.dart:285
  value: state.categorySlug.isEmpty ? null : state.categorySlug,   // renders the slug

flutter/gokonversed/lib/features/authoring/bloc/post_compose_cubit.dart:316
  categorySlug: s.categorySlug,             // stored value is CORRECT — slug is what the API wants

Observed on Haus Von Hester iOS build 15 (app_builds id 66, TestFlight internal, 2026-08-14).

Likely root cause

The display name never reaches the widget. CategoryPickerSheet has both fields available — it renders cat.name for the list and matches on cat.slug for selection — but returns only the slug. The compose overlay then renders whatever it was handed. There is no lookup from slug back to name anywhere in the compose path, so the row has nothing else it could show.

Proposed fix

Fix at the display layer, which covers both the inherited and the manually-picked case in one change rather than patching each path.

  1. Expose a slug→name lookup beside the existing private _flattenTree at category_picker_sheet.dart:100, reading CategoriesBloc. Keeping it next to the flatten helper avoids a second copy of the tree walk.
  2. In post_compose_overlay.dart, render the looked-up name and fall back to the slug when the category is not found, so a not-yet-loaded tree degrades to today’s behaviour rather than showing an empty row.
  3. Keep storing the slug. Only the label changes; PostCreateForm is untouched.

Roughly ten lines across two files, plus a test for the lookup. Worth folding into the next app build rather than cutting one for it — it is cosmetic, and an iOS build cycle currently costs a 2FA round trip.

← Back to Engineering