From 98f603af9300735ab6cf9752e3b38d51e3374ff6 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 24 Jun 2026 14:29:36 +0000 Subject: [PATCH 1/2] Add 'New Inbox Task (Plan Only)' button in time plan big plan activity view Adds a new button in the big plan activity detail view within a time plan that creates an inbox task linked to the big plan but without adding it as a time plan activity. The new.tsx form supports a 'for-time-plan-only' reason that uses the time plan's dates for defaults, skips activity creation, and returns to the time plan view on success. Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_01XX6Mk5MM1hs3HKzK5JPeeg --- .../big-plans/$id/inbox-tasks/new.tsx | 33 ++++++++++++++----- .../workspace/time-plans/$id/$activityId.tsx | 4 +++ 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/src/webui/app/routes/app/workspace/big-plans/$id/inbox-tasks/new.tsx b/src/webui/app/routes/app/workspace/big-plans/$id/inbox-tasks/new.tsx index c921a5f8d..51449e244 100644 --- a/src/webui/app/routes/app/workspace/big-plans/$id/inbox-tasks/new.tsx +++ b/src/webui/app/routes/app/workspace/big-plans/$id/inbox-tasks/new.tsx @@ -61,7 +61,9 @@ const ParamsSchema = z.object({ }); const QuerySchema = z.object({ - timePlanReason: z.literal("for-time-plan").optional(), + timePlanReason: z + .union([z.literal("for-time-plan"), z.literal("for-time-plan-only")]) + .optional(), timePlanRefId: z.string().optional(), parentTimePlanActivityRefId: z.string().optional(), }); @@ -96,7 +98,10 @@ export async function loader({ request, params }: LoaderFunctionArgs) { const timePlanReason = query.timePlanReason || "standard"; let associatedTimePlan = null; - if (timePlanReason === "for-time-plan") { + if ( + timePlanReason === "for-time-plan" || + timePlanReason === "for-time-plan-only" + ) { if (!query.timePlanRefId) { throw new Response("Missing Time Plan Id", { status: 500 }); } @@ -132,9 +137,9 @@ export async function action({ request, params }: ActionFunctionArgs) { big_plan_ref_id: bigPlanId, name: form.name, time_plan_ref_id: - timePlanReason === "standard" - ? undefined - : (query.timePlanRefId as string), + timePlanReason === "for-time-plan" + ? (query.timePlanRefId as string) + : undefined, time_plan_activity_kind: form.timePlanActivityKind, time_plan_activity_feasability: form.timePlanActivityFeasability, is_key: form.isKey, @@ -156,6 +161,11 @@ export async function action({ request, params }: ActionFunctionArgs) { `/app/workspace/time-plans/${query.timePlanRefId}/${query.parentTimePlanActivityRefId}`, ); + case "for-time-plan-only": + return redirect( + `/app/workspace/time-plans/${query.timePlanRefId}`, + ); + case "standard": return redirect( `/app/workspace/big-plans/${bigPlanId}/inbox-tasks/${result.new_inbox_task.ref_id}`, @@ -190,7 +200,12 @@ export default function BigPlanNewInboxTask() { key="big-plan-inbox-tasks/new" isLeaflet fakeKey="big-plan-inbox-tasks/new" - returnLocation={`/app/workspace/big-plans/${bigPlanId}`} + returnLocation={ + loaderData.timePlanReason === "for-time-plan-only" && + loaderData.associatedTimePlan + ? `/app/workspace/time-plans/${loaderData.associatedTimePlan.ref_id}` + : `/app/workspace/big-plans/${bigPlanId}` + } inputsEnabled={inputsEnabled} > @@ -267,7 +282,8 @@ export default function BigPlanNewInboxTask() { label="actionableDate" inputsEnabled={inputsEnabled} defaultValue={ - loaderData.timePlanReason === "for-time-plan" + loaderData.timePlanReason === "for-time-plan" || + loaderData.timePlanReason === "for-time-plan-only" ? (loaderData.associatedTimePlan as TimePlan).start_date : (loaderData.bigPlan.actionable_date ?? undefined) } @@ -290,7 +306,8 @@ export default function BigPlanNewInboxTask() { label="dueDate" inputsEnabled={inputsEnabled} defaultValue={ - loaderData.timePlanReason === "for-time-plan" + loaderData.timePlanReason === "for-time-plan" || + loaderData.timePlanReason === "for-time-plan-only" ? (loaderData.associatedTimePlan as TimePlan).end_date : (loaderData.bigPlan.due_date ?? undefined) } diff --git a/src/webui/app/routes/app/workspace/time-plans/$id/$activityId.tsx b/src/webui/app/routes/app/workspace/time-plans/$id/$activityId.tsx index 3a5448181..5450dd4b9 100644 --- a/src/webui/app/routes/app/workspace/time-plans/$id/$activityId.tsx +++ b/src/webui/app/routes/app/workspace/time-plans/$id/$activityId.tsx @@ -797,6 +797,10 @@ export default function TimePlanActivity() { link: `/app/workspace/big-plans/${loaderData.targetBigPlan.ref_id}/inbox-tasks/new?timePlanReason=for-time-plan&timePlanRefId=${id}&parentTimePlanActivityRefId=${activityId}`, highlight: true, }), + NavSingle({ + text: "New Inbox Task (Plan Only)", + link: `/app/workspace/big-plans/${loaderData.targetBigPlan.ref_id}/inbox-tasks/new?timePlanReason=for-time-plan-only&timePlanRefId=${id}`, + }), NavSingle({ text: "From Current Inbox Tasks", link: `/app/workspace/time-plans/${id}/add-from-current-inbox-tasks?bigPlanReason=for-big-plan&bigPlanRefId=${loaderData.targetBigPlan.ref_id}&timePlanActivityRefId=${activityId}`, From 5fec1afd5562dfb64698721a5f13ec894ac0de02 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 24 Jun 2026 15:17:53 +0000 Subject: [PATCH 2/2] Rename 'New Inbox Task (Plan Only)' button label Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_01XX6Mk5MM1hs3HKzK5JPeeg --- .../app/routes/app/workspace/time-plans/$id/$activityId.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webui/app/routes/app/workspace/time-plans/$id/$activityId.tsx b/src/webui/app/routes/app/workspace/time-plans/$id/$activityId.tsx index 5450dd4b9..c24131845 100644 --- a/src/webui/app/routes/app/workspace/time-plans/$id/$activityId.tsx +++ b/src/webui/app/routes/app/workspace/time-plans/$id/$activityId.tsx @@ -798,7 +798,7 @@ export default function TimePlanActivity() { highlight: true, }), NavSingle({ - text: "New Inbox Task (Plan Only)", + text: "New Inbox Task (From Time Plan, Big Plan Only)", link: `/app/workspace/big-plans/${loaderData.targetBigPlan.ref_id}/inbox-tasks/new?timePlanReason=for-time-plan-only&timePlanRefId=${id}`, }), NavSingle({