From 580cf09a82bfafcf5d094e4c8872ef0d4a2c0bbc Mon Sep 17 00:00:00 2001 From: Nik Graf Date: Wed, 18 Feb 2026 08:08:46 +0100 Subject: [PATCH 1/3] add allocated --- apps/events/src/routes/bounties.lazy.tsx | 8 +++++++- apps/events/src/schema.ts | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/apps/events/src/routes/bounties.lazy.tsx b/apps/events/src/routes/bounties.lazy.tsx index 64e0def4..30c34a63 100644 --- a/apps/events/src/routes/bounties.lazy.tsx +++ b/apps/events/src/routes/bounties.lazy.tsx @@ -1,6 +1,6 @@ +import { Bounty } from '@/schema'; import { useEntities } from '@graphprotocol/hypergraph-react'; import { createLazyFileRoute } from '@tanstack/react-router'; -import { Bounty } from '@/schema'; export const Route = createLazyFileRoute('/bounties')({ component: RouteComponent, @@ -19,6 +19,9 @@ function RouteComponent() { filter: { interestedIn: { entityId: PERSON_ENTITY_ID }, }, + include: { + allocated: {}, + }, }); return ( @@ -37,6 +40,9 @@ function RouteComponent() {

{bounty.name}

{bounty.description &&

{bounty.description}

}

{bounty.id}

+

+ Allocated to: {bounty.allocated.map((allocated) => allocated.name).join(', ')} +

))} diff --git a/apps/events/src/schema.ts b/apps/events/src/schema.ts index 56de14ff..99321844 100644 --- a/apps/events/src/schema.ts +++ b/apps/events/src/schema.ts @@ -372,11 +372,14 @@ export const PersonBacklink = Entity.Schema( }, ); +export const ALLOCATED_PROPERTY_ID = Id('cfeb642223c54df4b3f9375a489d9e22'); + export const Bounty = Entity.Schema( { name: Type.String, description: Type.optional(Type.String), interestedIn: Type.Backlink(PersonBacklink), + allocated: Type.Relation(PersonBacklink), }, { types: [Id('808af0bad5884e3391f09dd4b25e18be')], @@ -384,6 +387,7 @@ export const Bounty = Entity.Schema( name: Id(SystemIds.NAME_PROPERTY), description: Id(SystemIds.DESCRIPTION_PROPERTY), interestedIn: Id('ff7e1b4444a2419187324e6c222afe07'), + allocated: ALLOCATED_PROPERTY_ID, }, }, ); From 26d94cb2535f1808712aa5f703cc36272af804bb Mon Sep 17 00:00:00 2001 From: Nik Graf Date: Wed, 18 Feb 2026 08:15:16 +0100 Subject: [PATCH 2/3] implement allocation filter --- apps/events/src/routes/bounties.lazy.tsx | 26 ++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/apps/events/src/routes/bounties.lazy.tsx b/apps/events/src/routes/bounties.lazy.tsx index 30c34a63..c198242c 100644 --- a/apps/events/src/routes/bounties.lazy.tsx +++ b/apps/events/src/routes/bounties.lazy.tsx @@ -1,14 +1,18 @@ import { Bounty } from '@/schema'; import { useEntities } from '@graphprotocol/hypergraph-react'; import { createLazyFileRoute } from '@tanstack/react-router'; +import { useState } from 'react'; export const Route = createLazyFileRoute('/bounties')({ component: RouteComponent, }); -const PERSON_ENTITY_ID = '7728d2458ae842d3a90a37e0bb8ee676'; +type AllocationFilter = 'all' | 'allocated' | 'unallocated'; function RouteComponent() { + const [allocationFilter, setAllocationFilter] = useState('all'); + const filter = allocationFilter === 'all' ? undefined : { allocated: { exists: allocationFilter === 'allocated' } }; + const { data: bounties, isLoading, @@ -16,9 +20,7 @@ function RouteComponent() { } = useEntities(Bounty, { mode: 'public', spaces: 'all', - filter: { - interestedIn: { entityId: PERSON_ENTITY_ID }, - }, + filter, include: { allocated: {}, }, @@ -27,7 +29,19 @@ function RouteComponent() { return (

Bounties

-

Bounties where person {PERSON_ENTITY_ID} expressed interest

+

Filter bounties by allocation status

+ {isLoading &&
Loading...
} {isError &&
Error loading bounties
} @@ -38,7 +52,7 @@ function RouteComponent() { {bounties.map((bounty) => (
  • {bounty.name}

    - {bounty.description &&

    {bounty.description}

    } + {bounty.description &&

    {bounty.description.substring(0, 100)}...

    }

    {bounty.id}

    Allocated to: {bounty.allocated.map((allocated) => allocated.name).join(', ')} From fbd3febbd3e162577a09c76682cdd800f78703ee Mon Sep 17 00:00:00 2001 From: Nik Graf Date: Wed, 18 Feb 2026 09:44:26 +0100 Subject: [PATCH 3/3] fix lint --- apps/events/src/routes/bounties.lazy.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/events/src/routes/bounties.lazy.tsx b/apps/events/src/routes/bounties.lazy.tsx index c198242c..fc9ad648 100644 --- a/apps/events/src/routes/bounties.lazy.tsx +++ b/apps/events/src/routes/bounties.lazy.tsx @@ -1,7 +1,7 @@ -import { Bounty } from '@/schema'; import { useEntities } from '@graphprotocol/hypergraph-react'; import { createLazyFileRoute } from '@tanstack/react-router'; import { useState } from 'react'; +import { Bounty } from '@/schema'; export const Route = createLazyFileRoute('/bounties')({ component: RouteComponent,