Skip to content

Conversation

@darko-mijic
Copy link

Summary

This PR improves the documentation for the @convex-dev/persistent-text-streaming component and its example app. The aim is to make the docs clearer, more thorough, and easier to follow for developers who want to use the component.

I know the main README.md gets pulled into the Convex docs site, so I tried to keep it concise where it counts. That said, I went a bit verbose in some spots to cover all the bases—hopefully, there’s plenty here that can be cherry-picked to improve the official docs!

What’s Changed

Main README.md:

  • Clarified the core problem the component solves (speed vs. durability in text streaming).
  • Provided a more detailed explanation of the "Intelligent Dual-Path Streaming" solution.
  • Restructured for better readability and flow, aligning with common documentation best practices.
  • Added a "Usage Overview" section for a quick understanding of integration steps.
  • Included a "How It Works" section detailing the isDriven flag mechanism.
  • Prominently links to the updated example/README.md for detailed implementation guidance.

example/README.md:

  • Expanded from a basic setup guide to a comprehensive walkthrough of how the component is used within the example chat application.
  • Includes detailed code snippets and explanations for:
    • Backend component registration and schema setup.
    • Initialization of the PersistentTextStreaming client.
    • Stream ID creation and management within the application logic.
    • Implementation of the HTTP streaming action.
    • Frontend usage of the useStream hook, including the isDriven flag.
    • How to view component-specific data in the Convex Dashboard.
  • Aims to serve as a robust, practical reference for users.

Why This Matters

The original READMEs were solid but left room to grow. I wanted to:

  • Explain why this component is built the way it is.
  • Give clearer guidance on both the big picture and the nitty-gritty details of using it.
  • Make life easier for devs who are new to the component or want a deeper understanding.
  • Ensure the docs feel polished and ready for the official Convex component docs.

These updates should help developers pick up the persistent-text-streaming component faster and use it with confidence. Looking forward to feedback!


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ianmacartney
Copy link
Contributor

ianmacartney commented May 24, 2025 via email

@darko-mijic
Copy link
Author

No worries. It would be amazing if you just take the root readme. And please, submit the docs for this component to https://context7.com/

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