You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
vibed/quotesdb/.beans/quotesdb-x2kf--submit-form-...

79 lines
2.2 KiB
Markdown

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
# quotesdb-x2kf
title: 'Submit form: remove ''Submit another'' link from success screen'
status: completed
type: bug
priority: normal
created_at: 2026-03-10T23:32:08Z
updated_at: 2026-03-10T23:32:08Z
---
## Bug
After successfully submitting a quote, the success screen (`src/bin/ui/pages/submit.rs`, lines 111133) offers two actions:
1. "View your quote" (primary button → `/quotes/:id`)
2. "Submit another" (secondary button → `/submit`)
The "Submit another" link pushes users toward submitting more quotes immediately. This is undesirable — the success screen should celebrate the submission and direct the user to view what they just created or browse the collection, not encourage repeat submissions.
## Expected behaviour
Remove the "Submit another" link from the success screen. Replace it with a "Browse all quotes" link (`/browse`) so the user has a natural next step that doesn't push them back to the submit form.
Final success screen actions:
1. "View your quote" (primary, `/quotes/:id`)
2. "Browse all quotes" (secondary, `/browse`)
## How to fix
In `src/bin/ui/pages/submit.rs`, in the success render block (lines 120130):
```rust
// Before
<div class="page-submit__actions">
<Link<Route>
to={Route::QuoteDetail { id: quote_id.clone() }}
classes="btn btn--primary"
>
{ "View your quote" }
</Link<Route>>
<Link<Route> to={Route::Submit} classes="btn">
{ "Submit another" }
</Link<Route>>
</div>
// After
<div class="page-submit__actions">
<Link<Route>
to={Route::QuoteDetail { id: quote_id.clone() }}
classes="btn btn--primary"
>
{ "View your quote" }
</Link<Route>>
<Link<Route> to={Route::Browse} classes="btn">
{ "Browse all quotes" }
</Link<Route>>
</div>
```
No new imports needed — `Route::Browse` is already defined.
## File
- `src/bin/ui/pages/submit.rs` (lines 120130)
## Validation
```sh
# From quotesdb/ root
cargo fmt && cargo check && cargo clippy && cargo test
trunk build
```
Manually verify: after submitting a quote, the success screen shows "View your quote" and "Browse all quotes" (not "Submit another").
## Commit scope
`fix(quotesdb): remove submit-another link from success screen`