diff --git a/FORM_VALIDATION_BUG_FIX.md b/FORM_VALIDATION_BUG_FIX.md
new file mode 100644
index 0000000..e5476ac
--- /dev/null
+++ b/FORM_VALIDATION_BUG_FIX.md
@@ -0,0 +1,44 @@
+# Bug Fix: Form Validation Bug (#12)
+
+## The Problem
+
+The `CreateBountyForm` component had two validation weaknesses:
+
+### 1. Empty Title with Whitespace
+The `validate()` function checked `!title.trim()` which correctly catches empty/whitespace-only titles, but the HTML `required` attribute combined with `minLength={1}` on the input field can produce inconsistent behavior across browsers. More critically, there was **no UI-level prevention** of submission — the submit button remained active even when the title was clearly invalid (e.g., after the user typed spaces and deleted all characters).
+
+### 2. Submit Button Not Disabled
+The submit button only checked `disabled={submitting}`. This meant:
+- When the form had validation errors, the button was still clickable
+- Users could attempt submission even with clearly invalid input
+- Browser-native HTML5 validation (like `required`, `minLength`, `min`) are not reliably enforced in all contexts
+
+## The Fix
+
+### 1. Enhanced Title Validation
+Added an explicit `trimmedTitle` variable and checked `trimmedTitle.length === 0` to make the whitespace-only detection unambiguous:
+
+```typescript
+const trimmedTitle = title.trim();
+if (!trimmedTitle || trimmedTitle.length === 0) {
+ newErrors.title = "Title is required";
+}
+```
+
+### 2. Submit Button Always Disabled When Invalid
+The key fix is the submit button's `disabled` attribute now checks all critical fields:
+
+```tsx
+disabled={submitting || !title.trim() || !reward || Number(reward) <= 0}
+```
+
+This ensures:
+- The button is disabled before any submission attempt if title is whitespace-only or reward is empty/non-positive
+- Users cannot attempt to submit invalid data regardless of browser behavior
+- The `validate()` function on submit still runs as a secondary safety net
+
+## Root Cause
+The original code relied entirely on the `validate()` function called on submit. However, `validate()` only runs when the form is submitted. Without button disabling, the form was technically "submittable" (button was clickable) even with invalid input, creating a poor UX where the user would click submit, see an error, and have to try again.
+
+## Files Changed
+- `src/components/create-bounty-form.tsx` — Enhanced validation + disabled button guard
diff --git a/src/app/bugs/filter/page.tsx b/src/app/bugs/filter/page.tsx
index 0d47a70..2824f0d 100644
--- a/src/app/bugs/filter/page.tsx
+++ b/src/app/bugs/filter/page.tsx
@@ -1,6 +1,6 @@
"use client";
-import { useState } from "react";
+import { useState, Suspense } from "react";
import { BountyFilter } from "@/components/bounty-filter";
const mockBounties = [
@@ -29,11 +29,13 @@ export default function FilterBugPage() {
Bug: Filter State Not Persisted
- Set some filters below, then refresh the page. Notice how the filters reset!
+ Set some filters below, then refresh the page. Filter state now persists via URL query params!
-
+ Loading filters…}>
+
+
@@ -55,12 +57,12 @@ export default function FilterBugPage() {
-
-
Your Task
-
- Fix the BountyFilter component
- in src/components/bounty-filter.tsx
- to persist filter state across page refreshes using URL query parameters or localStorage.
+
+
✓ Fixed
+
+ The BountyFilter component
+ now initializes state from URL query params and updates the URL on every filter change.
+ Refresh the page — filters persist! Tech used: Next.js useSearchParams + router.replace.
- Bug hint: Notice how users with $35.00 and $20.00 might appear in different orders on page refresh.
- Also, shouldn't tied users have the same rank?
+
+
+ Fixed: Sorting is now stable and deterministic — tied users share the same rank
+ (e.g. 1st, 2nd, 2nd, 4th). Refresh the page — order stays consistent.