Skip to content

Improve activity search empty state#449

Merged
ramimbo merged 1 commit into
ramimbo:mainfrom
tszaks:tszaks/activity-search-empty-state
May 26, 2026
Merged

Improve activity search empty state#449
ramimbo merged 1 commit into
ramimbo:mainfrom
tszaks:tszaks/activity-search-empty-state

Conversation

@tszaks
Copy link
Copy Markdown
Contributor

@tszaks tszaks commented May 26, 2026

Summary

  • Add a clear searched state to /activity so filtered views say what query is active.
  • Show search-specific empty states for contributors and recent accepted work instead of the generic empty-ledger copy.
  • Extend activity page tests to lock both matching and no-match search behavior.

Bounty #427

Evidence

  • The activity page already supports q search, but a no-match search currently renders the same copy as a completely empty ledger.
  • This is distinct from the already-paid bounty-list empty-state work because it applies to accepted-work activity search and proof-backed contributor history.
  • Touched surfaces are limited to app/templates/activity.html and tests/test_activity.py.
  • Out of scope: activity serialization, ledger data, wallet behavior, proof records, price claims, liquidity claims, off-ramp claims, or broad redesign.

Test Evidence

  • ./.venv/bin/python -m pytest tests/test_activity.py -q -> 3 passed
  • ./.venv/bin/python scripts/docs_smoke.py -> docs smoke ok
  • ./.venv/bin/python -m ruff check . -> passed
  • ./.venv/bin/python -m ruff format --check . -> 79 files already formatted
  • ./.venv/bin/python -m mypy app -> success
  • ./.venv/bin/python -m pytest -q -> 413 passed
  • git diff --check -> passed

MRWK

Related bounty or issue (Bounty #N or Refs #N for multi-award bounties): Bounty #427

Summary by CodeRabbit

  • New Features
    • Activity page now displays search-aware empty-state messaging. When searches are applied, the page shows "Showing accepted work matching..." notices and query-specific "no match" messages for contributors and work sections. A "Clear search" option allows users to easily reset applied filters and view all content again.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c4713473-6426-42f8-8cab-242b8163a873

📥 Commits

Reviewing files that changed from the base of the PR and between 12c3dbd and d676db4.

📒 Files selected for processing (2)
  • app/templates/activity.html
  • tests/test_activity.py

📝 Walkthrough

Walkthrough

Template on /activity now shows query-aware empty-state messaging: when a search query is present, it displays a search status notice and query-specific "no match" messages for contributors and accepted work sections with a clear-search link. Without a query, original empty-state messages appear. Tests verify both scenarios.

Changes

Activity page search-aware empty states

Layer / File(s) Summary
Template query-aware empty states
app/templates/activity.html
Template adds a search status notice when query is present, and conditionally splits empty-state messaging in the "Contributors" and "Recent accepted work" sections: query-specific "no match" messages appear when searching, otherwise original generic messages are preserved.
Test coverage for search query empty states
tests/test_activity.py
Test extends test_activity_page_renders_empty_and_paid_states with two query scenarios: /activity?q=bob verifies search status and clear-search link without "no match" messages, and /activity?q=alice verifies "no match" messages appear alongside the search status without old generic empty-state messages.
🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Improve activity search empty state' clearly summarizes the main change—enhancing empty-state messaging when searching the activity page.
Description check ✅ Passed The description includes all required sections: summary, evidence of the problem, surfaces touched, scope limitations, comprehensive test evidence, and bounty reference.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Mergework Public Artifact Hygiene ✅ Passed PR changes only modify activity.html template and test_activity.py. No investment, price, cash-out, payout, or security claims present. MRWK terminology used appropriately as a native project coin.
Bounty Pr Focus ✅ Passed PR only modifies stated files (activity.html +12, test_activity.py +14), adds search-specific empty states, and includes comprehensive test coverage; no out-of-scope changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@GHX5T-SOL GHX5T-SOL left a comment

Choose a reason for hiding this comment

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

Reviewed current head d676db4b2332acdb3f874e121cf86f9b00817367.

The change is narrowly scoped to /activity search rendering: it adds an active-search notice, replaces the generic empty-ledger copy with search-specific no-match messages, and keeps the existing clear-search path. That behavior matches the source #427 UX bounty and is distinct from the already paid bounty-list empty-state work.

I checked the template against the existing activity serializer: the rendered query value is the normalized escaped context value, and contributors/recent rows are both derived from the same filtered activity result set, so the new empty messages follow the API state rather than inventing separate UI logic.

Validation run locally on this head:

  • python -m pytest tests/test_activity.py -q -> 3 passed
  • python -m pytest -q -> 413 passed
  • python scripts/docs_smoke.py -> docs smoke ok
  • python -m ruff check . -> passed
  • python -m ruff format --check . -> 79 files already formatted
  • python -m mypy app -> success
  • git diff --check origin/main...HEAD -> passed
  • diff Gitleaks scan -> no leaks

GitHub currently shows the PR open/non-draft, mergeable MERGEABLE/CLEAN, Quality/readiness/docs/image checks successful, and CodeRabbit successful with no actionable comments. No blockers found.

Copy link
Copy Markdown

@weilixiong weilixiong left a comment

Choose a reason for hiding this comment

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

LGTM — empty state UX improvements for activity search. Template-only, conditional rendering isolated. Zero risk.

Copy link
Copy Markdown
Contributor

@tolga-tom-nook tolga-tom-nook left a comment

Choose a reason for hiding this comment

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

Evidence review for MRWK review round 12 (#447):

I checked the current head of this PR against origin/main and the change is narrowly scoped to app/templates/activity.html plus tests/test_activity.py.

What I verified:

  • The searched state now renders a positive "Showing accepted work matching ..." notice only when query is set.
  • A no-match search now distinguishes filtered-empty results from the global empty ledger state by showing No contributors match this search. and No accepted work matches this search. while suppressing the unfiltered empty-copy strings.
  • Existing matched-search behavior is preserved: value="bob" and the existing clear link are still asserted, and the no-match assertions make sure the new branch does not regress the paid/empty page states.

Commands run on the fetched PR head:

  • /home/ubuntu/hermes-agent/.venv/bin/python -m pytest tests/test_activity.py -q -> 3 passed in 2.13s
  • /home/ubuntu/hermes-agent/.venv/bin/python -m ruff check tests/test_activity.py -> All checks passed!

Verdict: no blockers from this focused review. The PR matches the UX-improvement scope and includes direct regression coverage for the filtered empty state.

@ramimbo ramimbo merged commit d8532d4 into ramimbo:main May 26, 2026
2 checks passed
@ramimbo ramimbo added mrwk:accepted Maintainer accepted for payout mrwk:paid Ledger payment recorded labels May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mrwk:accepted Maintainer accepted for payout mrwk:paid Ledger payment recorded

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants