Skip to content

[Testing] Zero test coverage for HomeScreen — activity feed rendering, streak display, pending proof sync, and EarningsSummary integration #148

Closed

Description

@cybermax4200

Why this matters now

HomeScreen is the first screen users land on after authentication and the primary engagement loop surface (streak, recent activity, earnings). It integrates five stores (userStore, activityStore, walletStore), useProofSubmit (for offline sync), and EarningsSummary. It has no test file. Any regression in how activities render, how the streak is displayed, or how the PendingProofsBanner triggers sync is invisible.

Problem / What

src/screens/HomeScreen.tsx (250 lines) has no test file. The screen:

Key Challenges

  • useProofSubmit calls loadQueue() synchronously in its initializer — the mock must stub proofQueue.loadQueue to return a controlled array.
  • recomputeStreaks must be called on mount; test with jest.fn() to verify the call.
  • Activity status styling (confirmed=green, pending=yellow, failed=red) is a critical correctness concern — snapshot or explicit style assertion is needed.

Acceptance Criteria

  • HomeScreen.test.tsx created with tests for: greeting text rendering, profile name from userStore, streak value from activityStore, last-5-activities rendering with correct status labels, PendingProofsBanner shown when pendingCount > 0, recomputeStreaks called on mount, "Browse Tasks" button navigates to Tasks tab.
  • All tests pass in CI.

Relevant files / functions

  • src/screens/HomeScreen.tsx
  • src/store/activityStore.ts
  • src/store/userStore.ts
  • src/hooks/useProofSubmit.ts — mock
  • src/services/proofQueue.ts — mock loadQueue

Out of scope

  • EarningsSummary internal rendering (tested separately in components.test.tsx).
  • The sync retry flow (tested in useProofSubmit.test.tsx).

Activity

  1. devprom6 commented on Aug 28, 2026

    @devprom6
    Contributor

    I’d like to work on this issue because it addresses an important area of the project and presents a great opportunity to make a meaningful contribution. I’m particularly interested in delivering a solution that is reliable, maintainable, and aligned with the project’s existing architecture and development standards.

    I have experience working across software development, including backend and frontend development, APIs, databases, testing, DevOps, and blockchain-based applications. I’m comfortable understanding existing codebases, identifying the root cause of issues, implementing clean and scalable solutions, and writing thorough tests to prevent regressions.

    My approach would be to first understand the existing implementation and project conventions, then develop the solution in a focused and incremental way. I’ll ensure the changes are well-tested, documented where necessary, and do not introduce unnecessary complexity or break existing functionality. I’m also committed to clear communication, responding to review feedback, and delivering a polished contribution that provides real value to the project.

  2. grantfox-oss commented on Aug 28, 2026

    @grantfox-oss

    🦊 GrantFox — @devprom6 has been assigned to this issue as part of the Third Campaign campaign!

    Next steps:

    1. Open a Pull Request referencing this issue (e.g., Closes #148)
    2. Your PR will be reviewed by the ecotask-network maintainers

    Good luck! Track your progress on GrantFox.

  3. grantfox-oss commented on Aug 28, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox as part of the Third Campaign campaign!

    @devprom6's PR #153 was approved and merged by @cybermax4200.

    🏆 @devprom6: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (592 total points). Track your full progress on GrantFox.

    👏 Great work, @devprom6! Keep contributing to ecotask-network.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions