budget consuming should not be clickable #77
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_shrimp#77
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
budget consuming should appear as info not an button that opens the settings
also the dir of workspace should appear as clickable button not just a clickable text
Implementation Spec for Issue #77
Objective
Change the top status bar so the budget/cost indicator is non-clickable informational text (not a button that opens Settings), and convert the workspace/target directory indicator from a plain bare-text control into a proper styled button matching the other nav buttons (
jobs,crew,library,dashboard,copy, settings).Requirements
onClick, no button semantics, no "click to edit budget" affordance..pillclass (same class used byjobs,crew,library,dashboard,copy).Files to Modify/Create
crates/hero_shrimp_web/ui/src/components/CostBadge.tsx- convert the cost/budget<button>into a non-interactive element (<div>/<span>); drop the settings click handler and the unusedsetSettingsOpenimport; update the tooltip text.crates/hero_shrimp_web/ui/src/components/TopBar.tsx- restyle the workspace/target<button>to use the.pillclass so it visually reads as a button like the other nav buttons; it already has the correctonClick(setWorkspacePickerOpen(true)), so only styling/placement changes.This is the SolidJS web UI (TypeScript/TSX, Tailwind/Vite). The top bar lives entirely in
TopBar.tsx; the budget pill is the child componentCostBadge.tsx.Implementation Plan
Step 1: Make the budget/cost indicator non-clickable info
Files:
crates/hero_shrimp_web/ui/src/components/CostBadge.tsx<button …>with a non-interactive element. Change the opening tag from<buttonto<div, and the matching closing</button>to</div>.onClick={() => setSettingsOpen(true)}line.pilllook. Change the class frompill ${tone()} flex-col !items-stretch !gap-0.5 !py-1to a plain info container, e.g.flex flex-col items-stretch gap-0.5 text-[11px] ${tone()}. Rationale:.pillcarries the border + hover background that makes it look like a button; the issue wants plain info.titletooltip: remove the trailing· click to edit budgettext since the element is no longer clickable. Keep the cost/cap/calls portion.setSettingsOpenfrom the import (import { rpc, setSettingsOpen } from "../store";→import { rpc } from "../store";) to avoid an unused-import warning.fmtUsdcost,/ {pct}%, and the fuel-tank bar) stays unchanged.Dependencies: none
Step 2: Render the workspace/target directory indicator as a styled button
Files:
crates/hero_shrimp_web/ui/src/components/TopBar.tsx<button>withonClick={() => setWorkspacePickerOpen(true)}. It currently usesclass="flex items-center gap-1 hover:text-text"— bare text with no button chrome. Change its class to the shared button styleclass="pill"(the same class used by thejobs/crew/library/dashboard/copybuttons in this file). This makes it a visually distinct clickable button per the issue.onClick,title, the folder<svg>icon, the{targetLabel().text}span, and the<Show>sub-label — only the wrapperclasschanges. The colored folder icon can remain..pillalready includesinline-flex items-center gap-1.5, drop the redundantflex items-center gap-1from the old class.<div class="... text-muted">group so it groups with the other nav pills (alongsidejobs/crew), keeping a leading divider so the layout reads cleanly. At minimum ensure the inheritedtext-[11px] text-muteddoes not override the pill's button appearance.Dependencies: none (independent of Step 1)
Step 3: Verify the build
Files: (none — verification only)
crates/hero_shrimp_web/ui, run the UI build/typecheck (npm run build/vite build) to confirm no unused-import or JSX errors.Dependencies: Step 1, Step 2
Acceptance Criteria
<button>and has no click handler; clicking it does nothing (does not open Settings).jobs/crew/library/dashboard/copybuttons (uses the.pillstyle).setWorkspacePickerOpen(true)), and the label/sub-label/icon still reflect the active context, dir, or sandbox.setSettingsOpenis removed fromCostBadge.tsximports and the UI builds/typechecks with no unused-import warnings.Notes
TopBar.tsxremains the way to edit the budget cap; removing the cost badge's click-to-settings does not orphan that functionality..pillis defined incrates/hero_shrimp_web/ui/src/index.css;.btn-ghostis an alternative borderless look, but.pillis the closest match to the requested "styled like the other buttons".@agentelement inTopBar.tsxis intentionally a button (deep-links to the crew page) and is out of scope.Build / Typecheck Results
npm run build(runsnpm run clean && vite build)setSettingsOpenimport from CostBadge.tsx is clean, and TopBar.tsx still imports and usessetSettingsOpencorrectly. No JSX errors in CostBadge.tsx or TopBar.tsx.Build output:
Note: The project
buildscript does not invoketsc(onlyvite build). Running a standalonetsc --noEmitsurfaces pre-existing strict type errors elsewhere in the codebase (e.g. ChatActivity.tsx, HeroWelcome.tsx, DiffViewer.tsx, store.ts, and strict-nullTS2531checks in CostBadge.tsx lines 96/101/106). These are not related to the unused-import removal and do not affect the production build. The specific concern (removedsetSettingsOpenimport in CostBadge.tsx) produces no error.Implementation Summary
Both requested top-bar changes are implemented in the SolidJS web UI.
Changes Made
1. Budget indicator is now read-only info (not a button)
File:
crates/hero_shrimp_web/ui/src/components/CostBadge.tsx<button>into a non-interactive<div>.onClickthat opened the Settings modal and removed the now-unusedsetSettingsOpenimport..pillbutton styling in favour of a plain info container (flex flex-col items-stretch gap-0.5 text-[11px]), preserving the tone color.2. Workspace/target directory is now a styled button
File:
crates/hero_shrimp_web/ui/src/components/TopBar.tsxflex items-center gap-1 hover:text-text) to the shared.pillbutton style used by thejobs/crew/library/dashboard/copynav buttons.setWorkspacePickerOpen(true)click handler, the folder icon, the label, and the sub-label intact.Build / Typecheck Results
npm run build(vite build)setSettingsOpenremoval inCostBadge.tsxintroduces no unused-import error;TopBar.tsxstill usessetSettingsOpenfor the Settings gear.Notes
Pull request opened: #79
This PR implements the changes discussed in this issue.