Skip to content

Conversation

comhar
Copy link
Contributor

@comhar comhar commented Sep 10, 2025

Related Issue
#776

Proposed Changes
This pr updates how args are passed to afterware in _endp. These args are generated using _wrap_req which was recently updated in this commit.

On main we currently pass the args to afterware like this

_,*wreq = await _wrap_req(req, _params(a))
nr = a(resp, *wreq)

In this pr we tweak the passing of these args which resolves the issue with toasts.

wreq = await _wrap_req(req, _params(a))
nr = a(*wreq.values())

Types of changes
What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist
Go over all the following points, and put an x in all the boxes that apply:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I am aware that this is an nbdev project, and I have edited, cleaned, and synced the source notebooks instead of editing .py or .md files directly.

Additional Information

fh_toasts_bug.mp4

@comhar comhar self-assigned this Sep 10, 2025
@comhar comhar added the bug Something isn't working label Sep 10, 2025
Copy link

gitnotebooks bot commented Sep 10, 2025

Found 1 changed notebook. Review the changes at https://app.gitnotebooks.com/AnswerDotAI/fasthtml/pull/777

@comhar comhar marked this pull request as draft September 10, 2025 15:36
@jph00 jph00 marked this pull request as ready for review September 10, 2025 21:55
@comhar comhar force-pushed the fix/776-broken-toasts branch from 2a7d1e2 to eb3a5ad Compare September 11, 2025 09:08
@comhar comhar requested a review from jph00 September 11, 2025 09:12
"metadata": {},
"outputs": [],
"source": [
"assert 'Successful Page Load!' in r.text"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test fails on main but passes on the pr branch.

@jph00 jph00 merged commit 3e41875 into main Sep 11, 2025
2 checks passed
@jph00 jph00 deleted the fix/776-broken-toasts branch September 11, 2025 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants