chore: bump version to 0.3.0
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -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": {
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user