Skip to content

feat(frontend): sort planter job board by pay, deadline, altitude - #679

Merged
Utilitycoder merged 8 commits into
Fundable-Protocol:mainfrom
Abbyhay:feat/issue-623-feat-frontend-planter-job-board-sort-by-pay
Aug 31, 2026
Merged

feat(frontend): sort planter job board by pay, deadline, altitude#679
Utilitycoder merged 8 commits into
Fundable-Protocol:mainfrom
Abbyhay:feat/issue-623-feat-frontend-planter-job-board-sort-by-pay

Conversation

@Abbyhay

@Abbyhay Abbyhay commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Overview

This PR adds sort controls to the Planter job board so planters can sort by highest pay rate, soonest deadline, or easiest (lowest altitude). Sort state is threaded through map types, cluster utilities, the impact map section, the map layer hook, the GraphQL schema/resolvers, and shared utilities — with stable ordering and safe fallbacks when metadata is missing.

Related Issue

Changes

🎛️ Job Board Sort Controls

  • [ADD] apps/web/src/components/map/types.ts

    • Adds JobSortOption (payRate | deadline | altitude) and SortConfig types for map markers and cluster payloads.
  • [MODIFY] apps/web/src/components/map/cluster-utils.ts

    • Clusters now receive the active sort key and order jobs within clusters before aggregating markers.
    • Cluster previews surface the top job under the selected sort (highest pay, soonest deadline, or lowest altitude).
  • [MODIFY] apps/web/src/components/modules/impact-map/ImpactMapSection.tsx

    • Adds a job board sort control with options: Highest pay, Soonest deadline, Easiest (lowest altitude).
    • Wires the selected sort into the map hook and list ordering.
  • [MODIFY] apps/web/src/hooks/use-map-layer.ts

    • Accepts a SortConfig and applies it to layer data before rendering; falls back to default ordering when fields are unavailable.
  • [MODIFY] apps/web/src/graphql/schema.ts

    • Adds a PlanterJobSort enum and optional sort argument to job board queries.
  • [MODIFY] apps/web/src/graphql/resolvers.ts

    • Resolves the sort argument with null-safe handling for missing pay rate, deadline, or altitude values.
  • [MODIFY] apps/web/src/lib/utils.ts

    • Adds shared comparator helpers: sortByHighestPay, sortBySoonestDeadline, and sortByLowestAltitude.
    • Uses deterministic tie-breaking so sort order is stable across map and list views.

Verification Results

npm run typecheck
✅ 0 errors

npm run lint
✅ 0 warnings

Live acceptance check:
✅ Highest pay sort puts the highest-paying job first
✅ Soonest deadline sort puts the soonest-deadline job first
✅ Easiest (lowest altitude) sort puts the lowest-altitude job first
✅ Missing pay/deadline/altitude values are placed last without crashing
Acceptance Criteria Status
Sort by highest pay rate ✅ Highest-paying jobs appear first in map clusters and job list
Sort by soonest deadline ✅ Deadline-ascending order with missing deadlines placed last
Sort by easiest (lowest altitude) ✅ Lowest-altitude jobs appear first with null altitude handled
Sort controls visible on job board ✅ Sort control added to ImpactMapSection and connected to map/layer state

Closes #623

@drips-wave

drips-wave Bot commented Aug 27, 2026

Copy link
Copy Markdown

@Abbyhay Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e1e5d745-210f-45b0-99cd-2b1ecae7cb6d


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@Utilitycoder Utilitycoder left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please fix up the merge conflict and update your PR. Kindly ensure you offramp with Fundable at https://stellar.fundable.finance/offramp

@Utilitycoder Utilitycoder left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please fix up the merge conflict and update your PR. Kindly ensure you offramp with Fundable at https://stellar.fundable.finance/offramp

@Idrhas

Idrhas commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Fix your conflicts to get PR merged, and don't forget to use https://stellar.fundable.finance for your offramps

1 similar comment
@Idrhas

Idrhas commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Fix your conflicts to get PR merged, and don't forget to use https://stellar.fundable.finance for your offramps

@Utilitycoder

Copy link
Copy Markdown
Contributor

Thanks for the work. Kindly ensure you offramp with Fundable at https://stellar.fundable.finance/offramp

@Utilitycoder
Utilitycoder merged commit 73b199f into Fundable-Protocol:main Aug 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(frontend): Planter job board - sort by pay rate and deadline

3 participants