mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
fix(ruflo-console): the goal field stays on the 0 page's Mission Control strip while a mission is active
The strip drew the goal input only when no mission existed, so with a mission in progress the field disappeared. The field is now always drawn; with a mission it reads 'a new goal, planned in place of this one'. Enter still plans the goal and opens Missions. Co-Authored-By: RuFlo <ruv@ruv.net>
This commit is contained in:
1 parent
ab5ecd6aa1
commit
7c97f92ccf
1 file changed
+8
-4
@@ -234,13 +234,16 @@ export function missionStrip(ctx: Ctx): RenderElement[] {
|
||||
const title = ctx.kit.Text({ bold: true, color: THEME.head, children: '▓▒░ MISSION CONTROL ░▒▓' })
|
||||
const open = ctx.kit.Button({ key: 'menu-go-missions-top', label: ' (1) open Missions ', plain: true, onPress: () => ctx.act.view('missions') })
|
||||
|
||||
// The goal field is always here, with or without an active mission: Enter plans the goal and opens Missions.
|
||||
const field = box(ctx, 'menu-goal', '✎ goal', mission === null ? 'what do you want done? e.g. add a dark mode toggle to settings' : 'a new goal, planned in place of this one', 'plan', value => {
|
||||
ctx.act.view('missions')
|
||||
m.goal(value)
|
||||
})
|
||||
|
||||
if (mission === null) {
|
||||
return [
|
||||
row(ctx, [title, open], 'menu-mission-title'),
|
||||
...box(ctx, 'menu-goal', '✎ goal', 'what do you want done? e.g. add a dark mode toggle to settings', 'plan', value => {
|
||||
ctx.act.view('missions')
|
||||
m.goal(value)
|
||||
}),
|
||||
...field,
|
||||
text(ctx, ' research → create (ADRs, SOP) → build → test → validate → secure → benchmark → learn', { dimColor: true }),
|
||||
text(ctx, ' '),
|
||||
]
|
||||
@@ -252,6 +255,7 @@ export function missionStrip(ctx: Ctx): RenderElement[] {
|
||||
|
||||
return [
|
||||
row(ctx, [title, open], 'menu-mission-title'),
|
||||
...field,
|
||||
text(ctx, ` ${clip(mission.objective, Math.max(20, ctx.columns - 22))} ${bar(done, total)} ${done}/${total}${mission.paused ? ' · paused' : ''}`, { bold: true }),
|
||||
row(
|
||||
ctx,
|
||||
|
||||
Reference in new issue
Block a user