Skip to content

fix(ui): remove duplicate editor status bar and add heading count - #439

Merged
petertzy merged 2 commits into
petertzy:mainfrom
HarshRajSinghania:fix/status-bar-heading-count
Oct 17, 2026
Merged

petertzy merged 2 commits into
petertzy:mainfrom
HarshRajSinghania:fix/status-bar-heading-count

Conversation

@HarshRajSinghania

Copy link
Copy Markdown
Contributor

Summary

Removes the redundant upper document statistics display and adds a dynamic heading count to the remaining bottom StatusBar.

Motivation

Addresses #438: the editor currently shows two nearly identical status areas. The upper one (DocumentStats) is removed, and the lower StatusBar is extended with a heading count that updates with the document.

Implementation

  • Deleted the unused DocumentStats component and its usage in page.tsx.
  • Updated StatusBar.tsx to display {heading_count} headings alongside the existing word/char/reading-time stats.
  • Heading count comes from the existing WordCountResult.heading_count field already computed by the backend.

Testing

  • Manually reviewed the rendered StatusBar layout and confirmed the heading field is present and uses the same locale formatting as the other counts.
  • No automated tests cover these UI components; verified the TypeScript types remain consistent with WordCountResult.

Closes #438.

HarshRajSinghania and others added 2 commits October 17, 2026 20:07
…tusBar

Closes the redundant upper DocumentStats bar and enhances the bottom StatusBar with a dynamic heading count, matching the requested cleanup in petertzy#438.
@petertzy

Copy link
Copy Markdown
Owner

Approved — the status display cleanup is complete and ready to merge.

The redundant upper document-statistics display has been removed, leaving a single status bar at the bottom of the editor. The remaining StatusBar now includes the dynamic heading count alongside word count, character count, and estimated reading time.

The heading value reuses the existing WordCountResult.heading_count backend result, so it updates together with the document’s existing debounced statistics flow as content or tabs change.

I also added regression coverage for rendering heading counts and for the no-statistics state.

Validation completed successfully:

npm test — 154 passed
npm run lint
npm run build
cargo check
No blocking issues remain.

@petertzy
petertzy merged commit 370d13f into petertzy:main Oct 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove Duplicate Editor Status Information and Add Heading Count

2 participants