chore: bump version to 0.3.0

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
kuannnn
2026-03-29 09:51:11 +08:00
parent e2bf3512c9
commit a1079766bd
2 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@kuannnn/clawtap", "name": "@kuannnn/clawtap",
"version": "0.2.3", "version": "0.3.0",
"description": "Mobile UI for AI coding assistants. Real-time sync with Claude Code, Codex CLI, and Gemini CLI via tmux.", "description": "Mobile UI for AI coding assistants. Real-time sync with Claude Code, Codex CLI, and Gemini CLI via tmux.",
"type": "module", "type": "module",
"bin": { "bin": {
+6 -1
View File
@@ -1,4 +1,4 @@
import { useState, useEffect } from 'react'; import { useState, useEffect, useRef } from 'react';
import type { TaskSnapshot } from '../hooks/useTaskState'; import type { TaskSnapshot } from '../hooks/useTaskState';
type FabState = 'hidden' | 'visible' | 'fading'; type FabState = 'hidden' | 'visible' | 'fading';
@@ -11,6 +11,7 @@ interface TaskFabProps {
export function TaskFab({ snapshot, onClick }: TaskFabProps) { export function TaskFab({ snapshot, onClick }: TaskFabProps) {
const { completed, total } = snapshot; const { completed, total } = snapshot;
const [fabState, setFabState] = useState<FabState>('hidden'); const [fabState, setFabState] = useState<FabState>('hidden');
const hasBeenVisible = useRef(false);
const allDone = total > 0 && completed === total; const allDone = total > 0 && completed === total;
const pct = total > 0 ? completed / total : 0; const pct = total > 0 ? completed / total : 0;
@@ -18,8 +19,12 @@ export function TaskFab({ snapshot, onClick }: TaskFabProps) {
useEffect(() => { useEffect(() => {
if (total === 0) { if (total === 0) {
setFabState('hidden'); setFabState('hidden');
hasBeenVisible.current = false;
return; return;
} }
// Skip showing FAB if all tasks were already done on first load (reconnect)
if (allDone && !hasBeenVisible.current) return;
hasBeenVisible.current = true;
setFabState('visible'); setFabState('visible');
if (allDone) { if (allDone) {
const timer = setTimeout(() => setFabState('fading'), 3000); const timer = setTimeout(() => setFabState('fading'), 3000);