Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

display the latest N messages on the website #307

Closed
2 tasks
fozziethebeat opened this issue Jan 3, 2023 · 5 comments
Closed
2 tasks

display the latest N messages on the website #307

fozziethebeat opened this issue Jan 3, 2023 · 5 comments
Assignees
Labels

Comments

@fozziethebeat
Copy link
Collaborator

The backend now provides a /api/v1/messages/ endpoint that returns by default the 10 latest messages stored. We should present these somewhere on the home page when a user is logged in.

To finish this we need:

  • A new API route that fetches messages
  • A new component that use useSWRImmutable to fetch some messages and then presents them in a decent format, probably a table.

When presenting the messages, we should present the text and is_assistant fields. The client side should retain the id and parent_id for later features.

@AbdBarho
Copy link
Collaborator

AbdBarho commented Jan 3, 2023

Related #159 ?

@fozziethebeat
Copy link
Collaborator Author

I think we can treat them separately. This is more structured as a news feed of messages that have been submitted globally. I expect the messages in this feed would be unrelated to each other.

Visually they could share the same components but I think it's also sensible for them to have distinct styles since their purposes diverge.

@jojopirker
Copy link
Contributor

I would like to try this!

@fozziethebeat
Copy link
Collaborator Author

It's yours!

AbdBarho added a commit that referenced this issue Jan 5, 2023
#307 new page to display recent messages
@AbdBarho
Copy link
Collaborator

AbdBarho commented Jan 8, 2023

I will close this, it seems to be fixed in #375

@AbdBarho AbdBarho closed this as completed Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

3 participants