Skip to content

[codex] update README example sections#6511

Open
Alek99 wants to merge 1 commit into
mainfrom
codex/update-readme-image-example
Open

[codex] update README example sections#6511
Alek99 wants to merge 1 commit into
mainfrom
codex/update-readme-image-example

Conversation

@Alek99
Copy link
Copy Markdown
Member

@Alek99 Alek99 commented May 14, 2026

Summary

  • Simplifies the README "Create your first app" instructions into a shorter uv-based quickstart.
  • Removes the Resources, Status, Contributing, and License sections from the README.
  • Adds the image generation Reflex/OpenAI example code directly below the example video.

Impact

This keeps the README focused on the quickstart and example app while removing duplicated or less relevant project-meta sections.

Validation

  • git diff --cached --check
  • git diff --check

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 14, 2026

Merging this PR will not alter performance

✅ 24 untouched benchmarks
⏩ 2 skipped benchmarks1


Comparing codex/update-readme-image-example (e26a1b1) with main (d6618b2)

Open in CodSpeed

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@Alek99 Alek99 force-pushed the codex/update-readme-image-example branch 2 times, most recently from 8e4f990 to dc29bfc Compare May 14, 2026 20:53
@Alek99 Alek99 marked this pull request as ready for review May 14, 2026 20:57
@Alek99 Alek99 requested a review from a team as a code owner May 14, 2026 20:57
@Alek99 Alek99 force-pushed the codex/update-readme-image-example branch from dc29bfc to b072eb2 Compare May 14, 2026 20:57
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 14, 2026

Greptile Summary

This PR streamlines the README by collapsing the six-step quickstart into a single uv-based shell block, removing the Resources, Status, Contributing, and License sections, and embedding the image-generation example code directly below the demo video.

  • The quickstart simplification is clear and reduces friction for new users.
  • The inlined generate event handler makes a synchronous OpenAI API call inside a regular Reflex event handler (@rx.event) rather than a background task, which holds the state lock for the entire duration of the network request and blocks other events in the session — this is the exact pattern the project's convention warns against.

Confidence Score: 3/5

The README change is safe for the project itself but ships example code that demonstrably teaches incorrect Reflex usage to every new user who copies it.

The added generate handler runs a blocking OpenAI HTTP call inside a regular event handler, holding Reflex's state lock for the duration. This isn't hypothetical — any user who copies the snippet will encounter frozen UI responsiveness and queued events on every image request. The quickstart simplification and content removals are unproblematic edits.

README.md — specifically the generate event handler in the inlined example code.

Important Files Changed

Filename Overview
README.md Quickstart condensed to a single shell block; Resources/Status/Contributing/License sections removed; image-generation example code inlined — the added generate event handler makes a blocking API call while holding Reflex's state lock, which violates the project's background-task convention and will teach users an incorrect pattern.

Sequence Diagram

sequenceDiagram
    participant Browser
    participant ReflexServer as Reflex Server (state lock)
    participant OpenAI

    Browser->>ReflexServer: generate() event
    Note over ReflexServer: 🔒 State lock acquired
    ReflexServer-->>Browser: "yield → processing=True (UI update)"
    Note over ReflexServer: 🔒 State lock still held
    ReflexServer->>OpenAI: client.images.generate(...)
    Note over Browser: ⚠️ Other events from browser are queued
    OpenAI-->>ReflexServer: image response (seconds later)
    ReflexServer-->>Browser: "image_url + processing=False"
    Note over ReflexServer: 🔓 State lock released
Loading

Reviews (1): Last reviewed commit: "update readme example sections" | Re-trigger Greptile

Comment thread README.md
@Alek99 Alek99 force-pushed the codex/update-readme-image-example branch 4 times, most recently from afe7fa6 to 5c48952 Compare May 14, 2026 21:38
@Alek99 Alek99 force-pushed the codex/update-readme-image-example branch from 5c48952 to e26a1b1 Compare May 14, 2026 21:40
Copy link
Copy Markdown
Collaborator

@masenf masenf left a comment

Choose a reason for hiding this comment

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

greptile raises a good point about the example code being essentially broken by default. we probably need to get non-async event handlers running in a thread pool sooner rather than later. i'm not 100% sure what fallout effects that could have, but right now, non-async events just block the event loop and kill server performance. it's too easy to write code with bad performance characteristics.

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.

2 participants