Skip to content

feat: autofocus title when creating a new page#258

Merged
rmolinamir merged 4 commits intomainfrom
feature/ux-improvements
Mar 29, 2026
Merged

feat: autofocus title when creating a new page#258
rmolinamir merged 4 commits intomainfrom
feature/ux-improvements

Conversation

@rmolinamir
Copy link
Copy Markdown
Contributor

@rmolinamir rmolinamir commented Mar 29, 2026

Summary

  • Problem: Newly created pages did not consistently focus the page title input, especially across route transitions where event listeners might mount after creation.
  • Solution: Introduced buffered page-created events with orchestrated drain delivery so listeners can react after mount and focus the title reliably.

Implementation

  • Added buffered event fan-out support with a new drain API in the app event emitter and documented buffer vs listener responsibilities.
  • Updated page creation flows (sidebar and create-page tool client) to buffer PageCreatedEvent payloads.
  • Converted page route shell to a client wrapper that drains page-created events for the active page ID.
  • Updated page listeners (PageTitleTextarea, PageEditor) to consume live events via useAppEventHandler while buffering is handled by orchestrated drain.
  • Simplified delete-page success handling by moving route redirection logic into mutation-level onSuccess.

Verification

Code inspection and local branch diff review.

  • Checks: Not run locally in this session.
  • Tests: Not run locally in this session.

Notes

  • Risk Level: Medium
  • Refactoring: Yes, event delivery flow was intentionally refactored from per-listener flush to orchestrated drain.
  • Assumptions: The page shell mounts before/alongside page listeners so drain can fan out buffered events to all mounted handlers for the page ID.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
journl Ready Ready Preview, Comment Mar 29, 2026 10:31pm

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e4051a4a52

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@rmolinamir rmolinamir self-assigned this Mar 29, 2026
@rmolinamir rmolinamir merged commit 6e898bb into main Mar 29, 2026
5 checks passed
@rmolinamir rmolinamir deleted the feature/ux-improvements branch March 29, 2026 22:01
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.

1 participant