fix(mobile): hide project sections with no workspaces
What & why
Project sections with no workspaces were being rendered — a header, a name and a 0,
introducing nothing.
Showing them was a deliberate call in the original design, but the reasoning was "a project
with nothing in it is exactly where you'd want to start one" — which only held while the
section header carried a +. That button came out during layout review (it duplicated the
per-row + a row apart, at the same size and colour), and the justification left with it.
Nothing replaced it, so an empty section became a row that says nothing and does nothing.
Starting work in an empty project still works: the composer's project picker lists every
project on the host regardless of whether it has workspaces.
Also fixes the section header's VoiceOver label, which read "1 workspaces".
How I tested it
On the simulator against a live host: the account has a project with zero workspaces
(MASTRA-SUPERSET). Before, it occupied a section; after, the list renders six sections and
every one has work in it — confirmed by dumping the accessibility tree rather than eyeballing
it, since the section that mattered was below the fold.
"Boid Home, 1 workspace" "notion-clone, 1 workspace"
"Superset, 14 workspaces" "presentations, 1 workspace"
"evidence, 1 workspace" "frontend-interview, 1 workspace"
Checklist
- PR title follows conventional commits (
type(scope): subject) -
bun run lintandbun run typecheckpass (CI fails on lint warnings too) - "Allow edits from maintainers" is checked on fork PRs
Summary by cubic
Hide empty project sections on the mobile Home list and fix the header’s VoiceOver label. Previously we rendered empty sections (except during search); now we never render them and we say “1 workspace” when count is 1.
- HomeScreen: always filter out sections where
workspaces.length === 0(was only filtered during search). - ProjectSectionHeader: accessibilityLabel pluralizes “workspace(s)” correctly.
- Starting work in an empty project still goes through the composer’s project picker, which lists all projects.
Summary by CodeRabbit
- Bug Fixes
- Empty project sections are now hidden consistently, including when not searching.
- Improved accessibility labels by using the correct singular or plural wording for workspace counts.