fix(check): avoid false local-source updates and show check errors

Review follow-ups for local-source change detection:

- The dashboard installs the root of a directory that also holds child
  skills as its SKILL.md alone, so hashing the whole source reported
  update_available right after a clean install. Compare only the files
  such an install copies, recognized by recorded hashes that contain none
  of the child skills present in the source.
- A relative source path resolves against the cwd of the install, which
  is not recorded, so checking from another directory reported a missing
  source. Relative sources are no longer compared.
- The dashboard dropped the new check `message`, so a missing source only
  showed a generic "Check failed". Carry it into the status tooltip.
This commit is contained in:
Willie
2026-10-02 19:21:29 +08:00
parent 23d936cf9f
commit 1fb13b755f
17 changed files with 166 additions and 1643 deletions
+36 -5
View File
@@ -3,22 +3,29 @@ package check
import (
"maps"
"os"
"path/filepath"
"strings"
"skillshare/internal/install"
)
// LocalSourceStatus compares the files at a local install's recorded source
// path with the hashes recorded at install/update time. The path is resolved
// the same way `update` resolves it before re-copying, so a successful update
// brings the status back to "up_to_date".
// path with the hashes recorded at install/update time.
//
// Returns "update_available" when the source changed, "error" with a message
// when the source cannot be read, and "local" when there is nothing to
// compare against (not a local install, or no recorded hashes).
// compare against (not a local install, no recorded hashes, or a relative
// source path whose base directory is unknown).
func LocalSourceStatus(entry *install.MetadataEntry) (status, message string) {
if entry == nil || entry.Type != "local" || len(entry.FileHashes) == 0 {
return "local", ""
}
// A relative source resolves against the cwd of the install, which is
// not recorded; comparing against the current cwd would report a missing
// or unrelated directory.
if !filepath.IsAbs(entry.Source) && !strings.HasPrefix(entry.Source, "~") {
return "local", ""
}
source, err := install.ParseSource(entry.Source)
if err != nil || source.Type != install.SourceTypeLocalPath {
return "local", ""
@@ -32,8 +39,32 @@ func LocalSourceStatus(entry *install.MetadataEntry) (status, message string) {
return "error", "cannot read local source: " + err.Error()
}
if maps.Equal(hashes, entry.FileHashes) {
if maps.Equal(installedFiles(hashes, entry.FileHashes), entry.FileHashes) {
return "up_to_date", ""
}
return "update_available", ""
}
// installedFiles narrows the source hashes to the files an install copies.
// `install <path>` copies the whole directory, nested skills included. The
// dashboard installs the root of a directory that also holds child skills
// as its SKILL.md alone; that shape is recognized by recorded hashes that
// contain none of the child skills present in the source.
func installedFiles(source, recorded map[string]string) map[string]string {
hasChildSkill := false
for rel := range source {
if strings.HasSuffix(rel, "/SKILL.md") {
if _, ok := recorded[rel]; ok {
return source
}
hasChildSkill = true
}
}
if !hasChildSkill {
return source
}
if hash, ok := source["SKILL.md"]; ok {
return map[string]string{"SKILL.md": hash}
}
return map[string]string{}
}
+90
View File
@@ -76,3 +76,93 @@ func TestLocalSourceStatus_NotLocalType(t *testing.T) {
t.Errorf("status = %q, want local", status)
}
}
func TestLocalSourceStatus_RelativeSourceIsNotCompared(t *testing.T) {
entry, _ := localEntry(t)
entry.Source = "./my-skill"
if status, _ := LocalSourceStatus(entry); status != "local" {
t.Errorf("status = %q, want local", status)
}
}
// discoveryInstall installs the root skill of a local directory that also
// contains child skills, the way the dashboard does (DiscoverLocal +
// InstallFromDiscovery). That install copies only the root SKILL.md.
func discoveryInstall(t *testing.T) (repo string, entry *install.MetadataEntry) {
t.Helper()
tmp := t.TempDir()
repo = filepath.Join(tmp, "repo")
write := func(rel, body string) {
p := filepath.Join(repo, rel)
os.MkdirAll(filepath.Dir(p), 0755)
os.WriteFile(p, []byte(body), 0644)
}
write("SKILL.md", "---\nname: root\n---\n# Root")
write("README.md", "readme")
write("skills/child/SKILL.md", "---\nname: child\n---\n# Child")
discovery, err := install.DiscoverLocal(&install.Source{
Type: install.SourceTypeLocalPath, Raw: repo, Path: repo, Name: "repo",
})
if err != nil {
t.Fatal(err)
}
dest := filepath.Join(tmp, "dest")
for _, skill := range discovery.Skills {
if skill.Path != "." {
continue
}
opts := install.InstallOptions{SourceDir: dest, SkipAudit: true}
if _, err := install.InstallFromDiscovery(discovery, skill, filepath.Join(dest, "root"), opts); err != nil {
t.Fatal(err)
}
}
entry = install.LoadMetadataOrNew(dest).GetByPath("root")
if entry == nil {
t.Fatal("root skill was not installed")
}
return repo, entry
}
func TestLocalSourceStatus_RootOfSkillCollection_UnchangedIsUpToDate(t *testing.T) {
_, entry := discoveryInstall(t)
if status, msg := LocalSourceStatus(entry); status != "up_to_date" {
t.Errorf("status = %q (%s), want up_to_date", status, msg)
}
}
func TestLocalSourceStatus_RootOfSkillCollection_IgnoresFilesNotInstalled(t *testing.T) {
repo, entry := discoveryInstall(t)
os.WriteFile(filepath.Join(repo, "README.md"), []byte("changed"), 0644)
os.WriteFile(filepath.Join(repo, "skills/child/SKILL.md"), []byte("changed"), 0644)
if status, _ := LocalSourceStatus(entry); status != "up_to_date" {
t.Errorf("status = %q, want up_to_date", status)
}
}
func TestLocalSourceStatus_RootOfSkillCollection_DetectsSkillFileChange(t *testing.T) {
repo, entry := discoveryInstall(t)
os.WriteFile(filepath.Join(repo, "SKILL.md"), []byte("changed"), 0644)
if status, _ := LocalSourceStatus(entry); status != "update_available" {
t.Errorf("status = %q, want update_available", status)
}
}
func TestLocalSourceStatus_WholeDirectoryInstall_DetectsChildSkillChange(t *testing.T) {
src := filepath.Join(t.TempDir(), "pack")
os.MkdirAll(filepath.Join(src, "child"), 0755)
os.WriteFile(filepath.Join(src, "SKILL.md"), []byte("# Pack"), 0644)
os.WriteFile(filepath.Join(src, "child", "SKILL.md"), []byte("# v1"), 0644)
hashes, _ := install.ComputeFileHashes(src)
entry := &install.MetadataEntry{Source: src, Type: "local", FileHashes: hashes}
os.WriteFile(filepath.Join(src, "child", "SKILL.md"), []byte("# v2"), 0644)
if status, _ := LocalSourceStatus(entry); status != "update_available" {
t.Errorf("status = %q, want update_available", status)
}
}
+1
View File
@@ -86,6 +86,7 @@ export interface SkillCheckResult {
version: string;
status: string;
installed_at?: string;
message?: string;
}
export interface CheckResult {
+33
View File
@@ -108,6 +108,39 @@ describe('UpdatePage', () => {
expect(row.queryByText('Checking')).not.toBeInTheDocument();
});
it('shows why a skill check failed', async () => {
vi.mocked(api.listSkills).mockResolvedValue({
resources: [{ ...nestedSkill, source: '/apps/tool/skills/agent-browser', type: 'local' }],
});
vi.mocked(api.checkStream).mockImplementation((_onDiscovering, _onStart, _onProgress, onDone) => {
queueMicrotask(() => {
onDone({
tracked_repos: [],
skills: [
{
name: 'tools/agent-browser',
source: '',
version: '',
status: 'error',
message: 'local source not found: /apps/tool/skills/agent-browser',
},
],
});
});
return { close: vi.fn() } as unknown as EventSource;
});
const user = userEvent.setup();
renderUpdatePage();
await user.click(await screen.findByRole('button', { name: /check for updates/i }));
const row = await findRow('agent-browser');
await waitFor(() => {
expect(row.getByTitle('local source not found: /apps/tool/skills/agent-browser')).toBeInTheDocument();
});
});
it('restores cached check status and last check time on entry', async () => {
vi.mocked(api.listSkills).mockResolvedValue({
resources: [nestedSkill],
+1
View File
@@ -187,6 +187,7 @@ export default function UpdatePage({ kind }: { kind: Kind }) {
if (!item) continue;
next.set(item.name, {
status: skill.status === 'update_available' ? 'update-available' : skill.status === 'error' ? 'error' : 'up-to-date',
message: skill.message,
checkedAt,
});
pending.delete(item.name);
-119
View File
@@ -1,119 +0,0 @@
import { useCurrentFrame, useVideoConfig, spring, interpolate } from 'remotion';
import { colors } from '../styles/colors';
export type AIToolName = 'claude' | 'opencode' | 'codex' | 'antigravity';
type AIIconProps = {
name: AIToolName;
size?: number;
enterDelay?: number;
showLabel?: boolean;
labelText?: string;
};
const toolColors: Record<AIToolName, string> = {
claude: '#d97706', // Orange/amber
opencode: '#3b82f6', // Blue
codex: '#10a37f', // Green
antigravity: '#8b5cf6', // Purple
};
const toolLabels: Record<AIToolName, string> = {
claude: 'Claude',
opencode: 'OpenCode',
codex: 'Codex',
antigravity: 'Antigravity',
};
const toolPaths: Record<AIToolName, string> = {
claude: '~/.claude/skills',
opencode: '~/.config/opencode/skills',
codex: '~/.codex/skills',
antigravity: '~/.gemini/antigravity/skills',
};
export const AIIcon = ({
name,
size = 80,
enterDelay = 0,
showLabel = true,
labelText,
}: AIIconProps) => {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
const entrance = spring({
frame: frame - enterDelay,
fps,
config: { damping: 12, stiffness: 100 },
});
const scale = interpolate(entrance, [0, 1], [0, 1]);
const opacity = interpolate(entrance, [0, 1], [0, 1], {
extrapolateRight: 'clamp',
});
const bgColor = toolColors[name];
return (
<div
style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-start',
gap: '8px',
transform: `scale(${scale})`,
opacity,
}}
>
<div
style={{
width: size,
height: size,
borderRadius: '16px',
backgroundColor: bgColor,
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
gap: 4,
boxShadow: `0 4px 16px rgba(0, 0, 0, 0.3), 0 0 20px ${bgColor}30`,
}}
>
{/* Folder icon */}
<svg width={size * 0.45} height={size * 0.45} viewBox="0 0 24 24" fill="none">
<path
d="M3 7V17C3 18.1046 3.89543 19 5 19H19C20.1046 19 21 18.1046 21 17V9C21 7.89543 20.1046 7 19 7H13L11 5H5C3.89543 5 3 5.89543 3 7Z"
fill="rgba(255, 255, 255, 0.25)"
stroke="rgba(255, 255, 255, 0.9)"
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
<span
style={{
color: '#fff',
fontSize: size * 0.15,
fontWeight: 600,
fontFamily: '-apple-system, BlinkMacSystemFont, sans-serif',
textShadow: '0 1px 2px rgba(0,0,0,0.3)',
}}
>
{toolLabels[name]}
</span>
</div>
{showLabel && (
<span
style={{
color: colors.textSecondary,
fontSize: '14px',
fontFamily: '"JetBrains Mono", monospace',
}}
>
{labelText || toolPaths[name]}
</span>
)}
</div>
);
};
-110
View File
@@ -1,110 +0,0 @@
import { AbsoluteFill, useCurrentFrame, useVideoConfig, spring, interpolate } from 'remotion';
import { colors } from '../styles/colors';
import { ReactNode } from 'react';
type MacTerminalProps = {
children: ReactNode;
title?: string;
width?: number;
enterDelay?: number;
};
export const MacTerminal = ({
children,
title = 'skillshare',
width = 1000,
enterDelay = 0,
}: MacTerminalProps) => {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
// Spring animation for entrance
const entrance = spring({
frame: frame - enterDelay,
fps,
config: { damping: 15, stiffness: 100 },
});
const scale = interpolate(entrance, [0, 1], [0.9, 1]);
const translateY = interpolate(entrance, [0, 1], [50, 0]);
const opacity = interpolate(entrance, [0, 1], [0, 1], {
extrapolateRight: 'clamp',
});
return (
<div
style={{
width,
borderRadius: '12px',
overflow: 'hidden',
boxShadow: '0 25px 50px -12px rgba(0, 0, 0, 0.5)',
transform: `scale(${scale}) translateY(${translateY}px)`,
opacity,
}}
>
{/* Title bar */}
<div
style={{
backgroundColor: '#e5e5e5',
padding: '12px 16px',
display: 'flex',
alignItems: 'center',
gap: '8px',
}}
>
{/* Traffic lights */}
<div style={{ display: 'flex', gap: '8px' }}>
<div
style={{
width: '14px',
height: '14px',
borderRadius: '50%',
backgroundColor: colors.trafficRed,
}}
/>
<div
style={{
width: '14px',
height: '14px',
borderRadius: '50%',
backgroundColor: colors.trafficYellow,
}}
/>
<div
style={{
width: '14px',
height: '14px',
borderRadius: '50%',
backgroundColor: colors.trafficGreen,
}}
/>
</div>
{/* Title */}
<div
style={{
flex: 1,
textAlign: 'center',
fontFamily: '-apple-system, BlinkMacSystemFont, sans-serif',
fontSize: '14px',
color: '#666',
marginRight: '54px', // Balance the traffic lights
}}
>
{title}
</div>
</div>
{/* Terminal content */}
<div
style={{
backgroundColor: colors.terminalBg,
padding: '24px',
minHeight: '300px',
}}
>
{children}
</div>
</div>
);
};
-322
View File
@@ -1,322 +0,0 @@
import { AbsoluteFill, useCurrentFrame, useVideoConfig, spring, interpolate } from 'remotion';
import { Typewriter } from '../components/Typewriter';
import { colors } from '../styles/colors';
const FPS = 30;
// Claude brand orange color
const CLAUDE_ORANGE = '#d97706';
export const AIFeature = () => {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
// Timeline (4s):
// 0-0.3s: Title flies in
// 0.3-0.5s: Chat container appears
// 0.5-2.2s: User message types (34 chars * 1.5 speed = ~1.7s)
// 2.4s: Claude response row + thinking
// 3.0s: Claude executes command
// 3.5s: Success message
// 4s: Hold
// Calculate when user typing finishes
const userText = "Sync my skills to all my AI tools";
const typeSpeed = 1.0; // faster typing
const typeStartFrame = 0.5 * fps;
const typeEndFrame = typeStartFrame + userText.length * typeSpeed; // ~49 frames = 1.6s
// Title entrance
const titleEntrance = spring({
frame,
fps,
config: { damping: 12, stiffness: 150 },
});
// Chat container entrance
const chatEntrance = spring({
frame: frame - 0.3 * fps,
fps,
config: { damping: 15 },
});
// User message entrance
const userMsgEntrance = spring({
frame: frame - 0.5 * fps,
fps,
config: { damping: 15 },
});
// Claude response entrance - wait for user to finish typing
const claudeResponseEntrance = spring({
frame: frame - (typeEndFrame + 3), // 3 frames after typing ends
fps,
config: { damping: 12 },
});
// Command execution - after thinking for a bit
const commandEntrance = spring({
frame: frame - (typeEndFrame + 12), // ~0.4s after Claude appears
fps,
config: { damping: 12 },
});
// Success checkmark with bouncy entrance
const successEntrance = spring({
frame: frame - (typeEndFrame + 22), // ~0.7s after Claude appears
fps,
config: { damping: 8, stiffness: 180 },
});
// Success glow pulse
const successGlowPhase = (frame - (typeEndFrame + 27)) * 0.12;
const successGlowIntensity = successEntrance > 0.8 ? 16 + 12 * Math.sin(successGlowPhase) : 16;
return (
<AbsoluteFill style={{ backgroundColor: colors.bgDark }}>
{/* Main title */}
<div
style={{
position: 'absolute',
top: 60,
left: '50%',
transform: `translateX(-50%) scale(${titleEntrance}) translateY(${(1 - titleEntrance) * -30}px)`,
}}
>
<h1
style={{
fontFamily: '-apple-system, BlinkMacSystemFont, sans-serif',
fontSize: '64px',
fontWeight: 700,
color: colors.textPrimary,
margin: 0,
textShadow: `0 0 60px ${colors.primary}60`,
}}
>
Built-in AI
</h1>
</div>
{/* Claude-style Chat interface */}
<div
style={{
position: 'absolute',
top: '50%',
left: '50%',
transform: `translate(-50%, -50%) scale(${chatEntrance})`,
opacity: chatEntrance,
width: 1200,
backgroundColor: '#1c1c1c',
borderRadius: 20,
overflow: 'hidden',
boxShadow: '0 25px 80px rgba(0,0,0,0.6)',
}}
>
{/* User message row */}
<div
style={{
backgroundColor: '#2a2a2a',
padding: '36px 50px',
borderBottom: '1px solid #4a4a4a',
opacity: userMsgEntrance,
transform: `translateY(${(1 - userMsgEntrance) * 10}px)`,
}}
>
<div style={{ display: 'flex', alignItems: 'flex-start', gap: 24 }}>
{/* User avatar */}
<div
style={{
width: 48,
height: 48,
borderRadius: '50%',
backgroundColor: '#5a5a5a',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
}}
>
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
<circle cx="12" cy="8" r="4" fill="#aaa" />
<path d="M4 20c0-4 4-6 8-6s8 2 8 6" stroke="#aaa" strokeWidth="2" strokeLinecap="round" />
</svg>
</div>
{/* User message */}
<div style={{ flex: 1, paddingTop: 8 }}>
<Typewriter
text={userText}
startFrame={typeStartFrame}
speed={typeSpeed}
showCursor={false}
showPrompt={false}
style={{
color: '#ffffff',
fontSize: '32px',
fontWeight: 500,
fontFamily: '-apple-system, BlinkMacSystemFont, sans-serif',
lineHeight: 1.5,
}}
/>
</div>
</div>
</div>
{/* Claude response row */}
{claudeResponseEntrance > 0 && (
<div
style={{
backgroundColor: '#1c1c1c',
padding: '36px 50px',
opacity: claudeResponseEntrance,
transform: `translateY(${(1 - claudeResponseEntrance) * 10}px)`,
}}
>
<div style={{ display: 'flex', alignItems: 'flex-start', gap: 24 }}>
{/* Claude avatar */}
<div
style={{
width: 48,
height: 48,
borderRadius: 12,
background: `linear-gradient(135deg, ${CLAUDE_ORANGE}, #f59e0b)`,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexShrink: 0,
boxShadow: `0 4px 12px ${CLAUDE_ORANGE}40`,
}}
>
<ClaudeLogo />
</div>
{/* Claude message content */}
<div style={{ flex: 1, paddingTop: 4 }}>
{commandEntrance > 0 ? (
<div style={{ display: 'flex', flexDirection: 'column', gap: 24 }}>
{/* Response text */}
<span
style={{
color: '#ffffff',
fontSize: '28px',
fontFamily: '-apple-system, BlinkMacSystemFont, sans-serif',
lineHeight: 1.6,
}}
>
I'll sync your skills now. Running the command:
</span>
{/* Code block - Claude style */}
<div
style={{
backgroundColor: '#0d0d0d',
borderRadius: 10,
padding: '20px 28px',
border: '1px solid #444',
transform: `scale(${commandEntrance})`,
transformOrigin: 'left',
}}
>
<code
style={{
fontFamily: '"JetBrains Mono", "SF Mono", monospace',
fontSize: '26px',
color: '#4ade80',
}}
>
$ skillshare sync
</code>
</div>
{/* Success message */}
{successEntrance > 0 && (
<div
style={{
display: 'flex',
alignItems: 'center',
gap: 14,
transform: `scale(${successEntrance})`,
transformOrigin: 'left',
}}
>
<div
style={{
width: 32,
height: 32,
borderRadius: '50%',
backgroundColor: '#22c55e',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
boxShadow: `0 0 ${successGlowIntensity}px #22c55e80`,
}}
>
<span style={{ color: '#fff', fontSize: '18px', fontWeight: 'bold' }}>✓</span>
</div>
<span
style={{
color: '#4ade80',
fontSize: '26px',
fontFamily: '-apple-system, BlinkMacSystemFont, sans-serif',
fontWeight: 600,
}}
>
Synced 5 skills to 4 AI tools
</span>
</div>
)}
</div>
) : (
<ThinkingIndicator />
)}
</div>
</div>
</div>
)}
</div>
</AbsoluteFill>
);
};
// Claude sparkle logo (simplified)
const ClaudeLogo = () => (
<svg width="22" height="22" viewBox="0 0 24 24" fill="none">
<path
d="M12 2L14.5 9.5L22 12L14.5 14.5L12 22L9.5 14.5L2 12L9.5 9.5L12 2Z"
fill="#fff"
opacity="0.95"
/>
</svg>
);
// Claude-style thinking indicator
const ThinkingIndicator = () => {
const frame = useCurrentFrame();
// Pulsing animation
const pulse = Math.sin(frame * 0.15) * 0.5 + 0.5;
return (
<div style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
{/* Pulsing cursor */}
<div
style={{
width: 3,
height: 24,
backgroundColor: CLAUDE_ORANGE,
borderRadius: 2,
opacity: 0.4 + pulse * 0.6,
}}
/>
<span
style={{
color: '#888',
fontSize: '18px',
fontFamily: '-apple-system, BlinkMacSystemFont, sans-serif',
fontStyle: 'italic',
}}
>
Thinking...
</span>
</div>
);
};
-359
View File
@@ -1,359 +0,0 @@
import { AbsoluteFill, useCurrentFrame, useVideoConfig, spring, interpolate, Easing } from 'remotion';
import { AIIcon, AIToolName } from '../components/AIIcon';
import { colors } from '../styles/colors';
const FPS = 30;
// Target positions arranged in a circle around center (4 tools)
const targetPositions: { name: AIToolName; angle: number; delay: number }[] = [
{ name: 'claude', angle: -90, delay: 0 },
{ name: 'opencode', angle: 0, delay: 4 },
{ name: 'codex', angle: 90, delay: 8 },
{ name: 'antigravity', angle: 180, delay: 12 },
];
const RADIUS = 280;
const CENTER_X = 960;
const CENTER_Y = 420; // Move up to make room for text
export const Architecture = () => {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
// Timeline (compressed to 2.7s):
// 0-0.4s: Source block appears with label
// 0.4-1s: Targets fly in
// 1-1.6s: Arrows animate
// 1.3s: Checkmarks start appearing
// 1.5-1.8s: "All in sync" text fades in
// 1.8-2.7s: Full display (0.9s visibility)
// Source entrance
const sourceEntrance = spring({
frame,
fps,
config: { damping: 15, stiffness: 200 },
});
// Source breathing pulse effect (continuous after entrance)
const breathePhase = (frame - 0.3 * fps) * 0.08;
const breatheScale = sourceEntrance > 0.9 ? 1 + 0.03 * Math.sin(breathePhase) : sourceEntrance;
const breatheGlow = sourceEntrance > 0.9 ? 60 + 30 * Math.sin(breathePhase) : 60 * sourceEntrance;
// Source label with spring entrance
const labelEntrance = spring({
frame: frame - 0.2 * fps,
fps,
config: { damping: 12, stiffness: 150 },
});
const labelOpacity = interpolate(labelEntrance, [0, 1], [0, 1], {
extrapolateRight: 'clamp',
});
const labelTranslateY = interpolate(labelEntrance, [0, 1], [15, 0], {
extrapolateRight: 'clamp',
});
// Arrow animation (1-1.8s)
const arrowStart = 1 * fps;
const arrowProgress = interpolate(frame, [arrowStart, arrowStart + 0.6 * fps], [0, 1], {
extrapolateLeft: 'clamp',
extrapolateRight: 'clamp',
easing: Easing.out(Easing.quad),
});
// Checkmark animation (1.3-2.7s, earlier for more impact)
const checkStart = 1.3 * fps;
const checkProgress = spring({
frame: frame - checkStart,
fps,
config: { damping: 12 },
});
// "All in sync" text with spring entrance
const syncTextEntrance = spring({
frame: frame - 1.5 * fps,
fps,
config: { damping: 12, stiffness: 150 },
});
const syncTextOpacity = interpolate(syncTextEntrance, [0, 1], [0, 1], {
extrapolateRight: 'clamp',
});
const syncTextScale = interpolate(syncTextEntrance, [0, 1], [0.8, 1], {
extrapolateRight: 'clamp',
});
// Particle flow along arrows (continuous after arrows appear)
const particleCycleDuration = 40; // frames per cycle
const getParticlePosition = (angle: number, particleIndex: number) => {
if (arrowProgress < 0.5) return null;
const cycleOffset = particleIndex * (particleCycleDuration / 3);
const cycleProgress = ((frame - arrowStart + cycleOffset) % particleCycleDuration) / particleCycleDuration;
const targetPos = getTargetPosition(angle);
const targetX = targetPos.x + 45;
const targetY = targetPos.y + 45;
// Particle moves from center to target
const particleX = CENTER_X + (targetX - CENTER_X) * cycleProgress;
const particleY = CENTER_Y + (targetY - CENTER_Y) * cycleProgress;
const particleOpacity = interpolate(cycleProgress, [0, 0.3, 0.7, 1], [0, 1, 1, 0]);
return { x: particleX, y: particleY, opacity: particleOpacity };
};
// Calculate target positions
const getTargetPosition = (angle: number) => {
const rad = (angle * Math.PI) / 180;
return {
x: CENTER_X + RADIUS * Math.cos(rad) - 45,
y: CENTER_Y + RADIUS * Math.sin(rad) - 45,
};
};
return (
<AbsoluteFill style={{ backgroundColor: colors.bgDark }}>
{/* Source block (center) - Glassmorphism style */}
<div
style={{
position: 'absolute',
left: CENTER_X - 80,
top: CENTER_Y - 80,
transform: `scale(${breatheScale})`,
}}
>
{/* Glow layer behind */}
<div
style={{
position: 'absolute',
inset: -20,
borderRadius: '50%',
background: `radial-gradient(circle, ${colors.primary}40 0%, transparent 70%)`,
filter: `blur(${breatheGlow * 0.3}px)`,
}}
/>
{/* Glass card */}
<div
style={{
position: 'relative',
width: 160,
height: 160,
borderRadius: '28px',
background: `linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(99, 102, 241, 0.1) 100%)`,
backdropFilter: 'blur(20px)',
WebkitBackdropFilter: 'blur(20px)',
border: '1px solid rgba(255, 255, 255, 0.18)',
boxShadow: `
0 8px 32px rgba(0, 0, 0, 0.3),
0 0 ${breatheGlow}px ${colors.primary}30,
inset 0 1px 0 rgba(255, 255, 255, 0.1)
`,
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
gap: 8,
}}
>
{/* Folder/Sync icon */}
<svg width="48" height="48" viewBox="0 0 24 24" fill="none">
<path
d="M3 7V17C3 18.1046 3.89543 19 5 19H19C20.1046 19 21 18.1046 21 17V9C21 7.89543 20.1046 7 19 7H13L11 5H5C3.89543 5 3 5.89543 3 7Z"
stroke="rgba(255, 255, 255, 0.9)"
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
/>
<circle
cx="12"
cy="13"
r="2.5"
stroke={colors.primaryLight}
strokeWidth="1.5"
/>
<path
d="M12 10.5V8"
stroke={colors.primaryLight}
strokeWidth="1.5"
strokeLinecap="round"
/>
</svg>
<span
style={{
color: 'rgba(255, 255, 255, 0.95)',
fontSize: '18px',
fontWeight: 600,
fontFamily: '-apple-system, BlinkMacSystemFont, sans-serif',
letterSpacing: '0.5px',
textShadow: '0 1px 2px rgba(0,0,0,0.3)',
}}
>
Source
</span>
</div>
</div>
{/* Source label */}
<div
style={{
position: 'absolute',
left: CENTER_X,
top: CENTER_Y + 100,
transform: `translateX(-50%) translateY(${labelTranslateY}px)`,
opacity: labelOpacity,
}}
>
<span
style={{
color: colors.textSecondary,
fontSize: '18px',
fontFamily: '"JetBrains Mono", monospace',
}}
>
Single Source of Truth
</span>
</div>
{/* Arrows (SVG) */}
<svg
style={{
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
pointerEvents: 'none',
}}
>
<defs>
<linearGradient id="arrowGradient" x1="0%" y1="0%" x2="100%" y2="0%">
<stop offset="0%" stopColor={colors.primary} />
<stop offset="100%" stopColor={colors.primaryLight} />
</linearGradient>
<filter id="particleGlow" x="-50%" y="-50%" width="200%" height="200%">
<feGaussianBlur stdDeviation="3" result="coloredBlur" />
<feMerge>
<feMergeNode in="coloredBlur" />
<feMergeNode in="SourceGraphic" />
</feMerge>
</filter>
</defs>
{targetPositions.map(({ name, angle }) => {
const pos = getTargetPosition(angle);
const targetX = pos.x + 45;
const targetY = pos.y + 45;
// Animated arrow length
const currentX = CENTER_X + (targetX - CENTER_X) * arrowProgress;
const currentY = CENTER_Y + (targetY - CENTER_Y) * arrowProgress;
return (
<g key={name}>
<line
x1={CENTER_X}
y1={CENTER_Y}
x2={currentX}
y2={currentY}
stroke="url(#arrowGradient)"
strokeWidth="3"
opacity={arrowProgress > 0 ? 0.8 : 0}
/>
{/* Flowing particles along the arrow */}
{[0, 1, 2].map((particleIndex) => {
const particle = getParticlePosition(angle, particleIndex);
if (!particle) return null;
return (
<circle
key={particleIndex}
cx={particle.x}
cy={particle.y}
r={4}
fill={colors.primaryLight}
opacity={particle.opacity * 0.9}
filter="url(#particleGlow)"
/>
);
})}
</g>
);
})}
</svg>
{/* Target icons */}
{targetPositions.map(({ name, angle, delay }) => {
const pos = getTargetPosition(angle);
// Target entrance (0.4-1s, compressed)
const targetEntrance = spring({
frame: frame - 0.4 * fps - delay * 0.4,
fps,
config: { damping: 12, stiffness: 150 },
});
return (
<div
key={name}
style={{
position: 'absolute',
left: pos.x,
top: pos.y,
transform: `scale(${targetEntrance})`,
}}
>
<AIIcon name={name} size={90} enterDelay={0} showLabel={false} />
{/* Checkmark overlay */}
{checkProgress > 0 && (
<div
style={{
position: 'absolute',
top: -10,
right: -10,
width: 32,
height: 32,
borderRadius: '50%',
backgroundColor: colors.success,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
transform: `scale(${checkProgress})`,
boxShadow: `0 0 20px ${colors.success}60`,
}}
>
<span style={{ color: '#fff', fontSize: '18px', fontWeight: 'bold' }}>✓</span>
</div>
)}
</div>
);
})}
{/* "All in sync" text */}
<div
style={{
position: 'absolute',
bottom: 80,
left: '50%',
transform: `translateX(-50%) scale(${syncTextScale})`,
opacity: syncTextOpacity,
zIndex: 100,
}}
>
<h2
style={{
fontFamily: '-apple-system, BlinkMacSystemFont, sans-serif',
fontSize: '56px',
fontWeight: 700,
color: colors.success,
margin: 0,
textShadow: `0 0 40px ${colors.success}60, 0 4px 20px rgba(0,0,0,0.5)`,
background: `linear-gradient(180deg, ${colors.success} 0%, #16a34a 100%)`,
WebkitBackgroundClip: 'text',
WebkitTextFillColor: 'transparent',
backgroundClip: 'text',
}}
>
All in sync ✓
</h2>
</div>
</AbsoluteFill>
);
};
-358
View File
@@ -1,358 +0,0 @@
import { AbsoluteFill, useCurrentFrame, useVideoConfig, spring, interpolate } from 'remotion';
import { MacTerminal } from '../components/MacTerminal';
import { Typewriter } from '../components/Typewriter';
import { colors } from '../styles/colors';
const FPS = 30;
export const OrganizationFeature = () => {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
// Timeline (1.5x speed):
// 0-0.3s: Title flies in
// 0.3-0.7s: Terminal + Organization visual appear
// 0.7-2.3s: Typewriter animation
// 2.3-2.7s: Hold
// Main title entrance
const titleEntrance = spring({
frame,
fps,
config: { damping: 12, stiffness: 150 },
});
// Content entrance
const contentEntrance = spring({
frame: frame - 0.25 * fps,
fps,
config: { damping: 15 },
});
// Connection pulse animation
const pulsePhase = (frame % 30) / 30;
const pulseOpacity = 0.3 + 0.4 * Math.sin(pulsePhase * Math.PI * 2);
const command = 'skillshare install org/skills --track';
return (
<AbsoluteFill
style={{
backgroundColor: colors.bgDark,
}}
>
{/* Glowing background effect */}
<div
style={{
position: 'absolute',
top: '50%',
left: '50%',
transform: 'translate(-50%, -50%)',
width: 800,
height: 800,
borderRadius: '50%',
background: `radial-gradient(circle, ${colors.primary}15 0%, transparent 70%)`,
opacity: pulseOpacity,
}}
/>
{/* Main title - top */}
<div
style={{
position: 'absolute',
top: 80,
left: '50%',
transform: `translateX(-50%) scale(${titleEntrance}) translateY(${(1 - titleEntrance) * -30}px)`,
}}
>
<h1
style={{
fontFamily: '-apple-system, BlinkMacSystemFont, sans-serif',
fontSize: '72px',
fontWeight: 700,
color: colors.textPrimary,
margin: 0,
textShadow: `0 0 60px ${colors.primary}60`,
}}
>
Organization Skills
</h1>
</div>
{/* Content container - centered layout */}
<div
style={{
position: 'absolute',
top: '50%',
left: '50%',
transform: `translate(-50%, -50%) scale(${contentEntrance})`,
opacity: contentEntrance,
display: 'flex',
alignItems: 'center',
gap: '60px',
}}
>
{/* Left: Terminal with typewriter */}
<MacTerminal title="Terminal" width={680} enterDelay={0}>
<Typewriter
text={command}
startFrame={0.5 * fps}
speed={1}
showCursor={true}
/>
</MacTerminal>
{/* Right: Organization visualization - enlarged */}
<div
style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
gap: '24px',
position: 'relative',
minWidth: 320,
}}
>
{/* Source node with pulse - Glassmorphism style */}
<div style={{ position: 'relative' }}>
{/* Pulse ring */}
<PulseRing />
{/* Glow layer */}
<div
style={{
position: 'absolute',
inset: -15,
borderRadius: '50%',
background: `radial-gradient(circle, ${colors.primary}40 0%, transparent 70%)`,
filter: 'blur(12px)',
zIndex: 1,
}}
/>
{/* Glass card */}
<div
style={{
position: 'relative',
width: 110,
height: 110,
borderRadius: '24px',
background: `linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(99, 102, 241, 0.1) 100%)`,
backdropFilter: 'blur(16px)',
WebkitBackdropFilter: 'blur(16px)',
border: '1px solid rgba(255, 255, 255, 0.18)',
boxShadow: `
0 8px 32px rgba(0, 0, 0, 0.3),
0 0 30px ${colors.primary}30,
inset 0 1px 0 rgba(255, 255, 255, 0.1)
`,
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
gap: 6,
zIndex: 2,
}}
>
{/* Folder icon */}
<svg width="36" height="36" viewBox="0 0 24 24" fill="none">
<path
d="M3 7V17C3 18.1046 3.89543 19 5 19H19C20.1046 19 21 18.1046 21 17V9C21 7.89543 20.1046 7 19 7H13L11 5H5C3.89543 5 3 5.89543 3 7Z"
stroke="rgba(255, 255, 255, 0.9)"
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
<span
style={{
color: 'rgba(255, 255, 255, 0.95)',
fontSize: '14px',
fontWeight: 600,
fontFamily: '-apple-system, sans-serif',
textShadow: '0 1px 2px rgba(0,0,0,0.3)',
}}
>
Source
</span>
</div>
</div>
{/* Connection lines with animated particles */}
<svg width="220" height="50" style={{ overflow: 'visible' }}>
<defs>
<linearGradient id="lineGradient" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" stopColor={colors.primary} stopOpacity="0.8" />
<stop offset="100%" stopColor={colors.primaryLight} stopOpacity="0.4" />
</linearGradient>
</defs>
{/* Lines */}
<line x1="110" y1="0" x2="30" y2="50" stroke="url(#lineGradient)" strokeWidth="2.5" />
<line x1="110" y1="0" x2="110" y2="50" stroke="url(#lineGradient)" strokeWidth="2.5" />
<line x1="110" y1="0" x2="190" y2="50" stroke="url(#lineGradient)" strokeWidth="2.5" />
{/* Animated particles */}
<SyncParticle startX={110} startY={0} endX={30} endY={50} delay={0} />
<SyncParticle startX={110} startY={0} endX={110} endY={50} delay={8} />
<SyncParticle startX={110} startY={0} endX={190} endY={50} delay={16} />
</svg>
{/* Organization members with sync animation */}
<div style={{ display: 'flex', gap: '24px' }}>
{[0, 1, 2].map((i) => (
<OrgMember key={i} index={i} />
))}
</div>
{/* Label */}
<span
style={{
color: colors.textPrimary,
fontSize: '22px',
fontWeight: 600,
fontFamily: '-apple-system, sans-serif',
marginTop: '8px',
}}
>
Share across your organization
</span>
</div>
</div>
</AbsoluteFill>
);
};
// Pulse ring animation around source
const PulseRing = () => {
const frame = useCurrentFrame();
// Repeating pulse every 45 frames
const cycleFrame = frame % 45;
const pulseProgress = interpolate(cycleFrame, [0, 45], [0, 1]);
const scale = interpolate(pulseProgress, [0, 1], [1, 1.8]);
const opacity = interpolate(pulseProgress, [0, 0.5, 1], [0.5, 0.25, 0]);
return (
<div
style={{
position: 'absolute',
top: '50%',
left: '50%',
width: 110,
height: 110,
borderRadius: '24px',
border: `2px solid ${colors.primary}`,
transform: `translate(-50%, -50%) scale(${scale})`,
opacity,
zIndex: 0,
}}
/>
);
};
// Animated sync particle
const SyncParticle = ({
startX,
startY,
endX,
endY,
delay,
}: {
startX: number;
startY: number;
endX: number;
endY: number;
delay: number;
}) => {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
// Start animation after typing starts (1.5x speed)
const animStart = 1 * fps + delay;
const cycleDuration = 30;
const cycleFrame = Math.max(0, (frame - animStart) % cycleDuration);
const progress = interpolate(cycleFrame, [0, cycleDuration], [0, 1]);
const x = interpolate(progress, [0, 1], [startX, endX]);
const y = interpolate(progress, [0, 1], [startY, endY]);
const opacity = frame >= animStart ? interpolate(progress, [0, 0.5, 1], [0, 1, 0]) : 0;
return (
<circle
cx={x}
cy={y}
r="5"
fill={colors.primaryLight}
opacity={opacity}
style={{ filter: `drop-shadow(0 0 8px ${colors.primary})` }}
/>
);
};
// Organization member avatar component with sync checkmark - enlarged
const OrgMember = ({ index }: { index: number }) => {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
const entrance = spring({
frame: frame - 0.6 * fps - index * 4,
fps,
config: { damping: 12 },
});
// Checkmark appears after sync particle reaches (1.5x speed)
const checkDelay = 1.5 * fps + index * 7;
const checkProgress = spring({
frame: frame - checkDelay,
fps,
config: { damping: 10, stiffness: 180 }, // Bouncy checkmark
});
return (
<div style={{ position: 'relative' }}>
<div
style={{
width: 72,
height: 72,
borderRadius: '50%',
backgroundColor: colors.textSecondary,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
transform: `scale(${entrance})`,
boxShadow: '0 6px 20px rgba(0,0,0,0.35)',
}}
>
<svg width="36" height="36" viewBox="0 0 24 24" fill="none">
<circle cx="12" cy="8" r="4" fill={colors.bgDark} />
<path
d="M4 20c0-4 4-6 8-6s8 2 8 6"
stroke={colors.bgDark}
strokeWidth="2.5"
strokeLinecap="round"
/>
</svg>
</div>
{/* Checkmark badge */}
{checkProgress > 0 && (
<div
style={{
position: 'absolute',
top: -4,
right: -4,
width: 28,
height: 28,
borderRadius: '50%',
backgroundColor: colors.success,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
transform: `scale(${checkProgress})`,
boxShadow: `0 0 16px ${colors.success}60`,
}}
>
<span style={{ color: '#fff', fontSize: '16px', fontWeight: 'bold' }}>✓</span>
</div>
)}
</div>
);
};
-198
View File
@@ -1,198 +0,0 @@
import { AbsoluteFill, useCurrentFrame, useVideoConfig, spring, interpolate, Easing } from 'remotion';
import { AIIcon, AIToolName } from '../components/AIIcon';
import { colors } from '../styles/colors';
const FPS = 30;
// Scattered positions for 4 icons (faster entrance)
const iconPositions: { name: AIToolName; x: number; y: number; delay: number }[] = [
{ name: 'claude', x: 300, y: 250, delay: 0 },
{ name: 'opencode', x: 1450, y: 220, delay: 3 },
{ name: 'codex', x: 350, y: 650, delay: 6 },
{ name: 'antigravity', x: 1400, y: 680, delay: 9 },
];
export const PainPoint = () => {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
// Text animation: fade in at 1.3s with spring bounce
const textEntrance = spring({
frame: frame - 1.3 * fps,
fps,
config: { damping: 12, stiffness: 120 },
});
const textOpacity = interpolate(textEntrance, [0, 1], [0, 1], {
extrapolateRight: 'clamp',
});
const textScale = interpolate(textEntrance, [0, 1], [0.9, 1], {
extrapolateRight: 'clamp',
});
const textTranslateY = interpolate(textEntrance, [0, 1], [30, 0], {
extrapolateRight: 'clamp',
});
// Question mark floating animation (continuous after text appears)
const questionMarkFloat = textEntrance > 0.5 ? Math.sin((frame - 1.5 * fps) * 0.08) * 5 : 0;
// Lines animation: appear at 2.3s with drawing effect
const linesStart = 2.3 * fps;
const linesProgress = interpolate(frame, [linesStart, linesStart + 0.5 * fps], [0, 1], {
extrapolateLeft: 'clamp',
extrapolateRight: 'clamp',
easing: Easing.out(Easing.quad),
});
// Line stroke animation (for drawing effect)
const lineStrokeDashoffset = (1 - linesProgress) * 2000;
// Wobble animation for chaos effect (0.7-2.5s, extended and enhanced)
const wobblePhase = frame * 0.18;
const wobbleActive = frame >= 0.7 * fps && frame < 2.5 * fps;
const wobbleAmount = wobbleActive ? 5 : 0;
const wobbleRotation = wobbleActive ? 2 : 0;
return (
<AbsoluteFill style={{ backgroundColor: colors.bgDark }}>
{/* Scattered AI icons */}
{iconPositions.map(({ name, x, y, delay }) => {
const wobbleX = Math.sin(wobblePhase + delay) * wobbleAmount;
const wobbleY = Math.cos(wobblePhase + delay * 1.3) * wobbleAmount;
const wobbleRot = Math.sin(wobblePhase + delay * 0.7) * wobbleRotation;
const wobbleScale = wobbleActive ? 1 + 0.03 * Math.sin(wobblePhase + delay * 1.5) : 1;
return (
<div
key={name}
style={{
position: 'absolute',
left: x + wobbleX,
top: y + wobbleY,
transform: `rotate(${wobbleRot}deg) scale(${wobbleScale})`,
}}
>
<AIIcon name={name} enterDelay={delay} size={90} />
</div>
);
})}
{/* Connecting dashed lines (chaos visualization) */}
<svg
style={{
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
pointerEvents: 'none',
}}
>
{linesProgress > 0 && (
<>
<defs>
<filter id="lineGlow" x="-20%" y="-20%" width="140%" height="140%">
<feGaussianBlur stdDeviation="2" result="coloredBlur" />
<feMerge>
<feMergeNode in="coloredBlur" />
<feMergeNode in="SourceGraphic" />
</feMerge>
</filter>
</defs>
{/* Lines that follow wobble animation */}
{(() => {
// Calculate wobble positions for each icon
const getIconCenter = (i: number) => {
const { x, y, delay } = iconPositions[i];
const wobbleX = Math.sin(wobblePhase + delay) * wobbleAmount;
const wobbleY = Math.cos(wobblePhase + delay * 1.3) * wobbleAmount;
return {
x: x + 45 + wobbleX,
y: y + 45 + wobbleY,
};
};
const p0 = getIconCenter(0);
const p1 = getIconCenter(1);
const p2 = getIconCenter(2);
const p3 = getIconCenter(3);
return (
<>
<line
x1={p0.x} y1={p0.y} x2={p1.x} y2={p1.y}
stroke={colors.error}
strokeWidth="2"
strokeDasharray="10,10"
strokeDashoffset={lineStrokeDashoffset * 0.8}
opacity={linesProgress * 0.7}
filter="url(#lineGlow)"
/>
<line
x1={p1.x} y1={p1.y} x2={p3.x} y2={p3.y}
stroke={colors.error}
strokeWidth="2"
strokeDasharray="10,10"
strokeDashoffset={lineStrokeDashoffset * 0.9}
opacity={linesProgress * 0.7}
filter="url(#lineGlow)"
/>
<line
x1={p2.x} y1={p2.y} x2={p3.x} y2={p3.y}
stroke={colors.error}
strokeWidth="2"
strokeDasharray="10,10"
strokeDashoffset={lineStrokeDashoffset}
opacity={linesProgress * 0.7}
filter="url(#lineGlow)"
/>
<line
x1={p0.x} y1={p0.y} x2={p2.x} y2={p2.y}
stroke={colors.error}
strokeWidth="2"
strokeDasharray="10,10"
strokeDashoffset={lineStrokeDashoffset * 1.1}
opacity={linesProgress * 0.7}
filter="url(#lineGlow)"
/>
</>
);
})()}
</>
)}
</svg>
{/* Main text */}
<div
style={{
position: 'absolute',
top: '50%',
left: '50%',
transform: `translate(-50%, -50%) translateY(${textTranslateY}px) scale(${textScale})`,
opacity: textOpacity,
}}
>
<h1
style={{
fontFamily: '-apple-system, BlinkMacSystemFont, sans-serif',
fontSize: '64px',
fontWeight: 600,
color: colors.textPrimary,
textAlign: 'center',
margin: 0,
textShadow: '0 4px 20px rgba(0, 0, 0, 0.5)',
}}
>
Skills scattered everywhere
<span
style={{
display: 'inline-block',
transform: `translateY(${questionMarkFloat}px)`,
color: colors.error,
}}
>
?
</span>
</h1>
</div>
</AbsoluteFill>
);
};
-167
View File
@@ -1,167 +0,0 @@
import { AbsoluteFill, useCurrentFrame, useVideoConfig, spring, interpolate } from 'remotion';
import { MacTerminal } from '../components/MacTerminal';
import { Typewriter } from '../components/Typewriter';
import { Cursor } from '../components/Cursor';
import { colors } from '../styles/colors';
const FPS = 30;
// Output lines for init command (updated tool names)
const initOutputLines = [
{ text: '✓ Detected: claude, opencode, codex, antigravity', color: colors.terminalGreen },
{ text: '✓ Created ~/.config/skillshare/skills', color: colors.terminalGreen },
{ text: '✓ Ready to sync', color: colors.terminalGreen },
];
// Output for sync command
const syncOutputLine = { text: '✓ Synced 5 skills to 4 targets', color: colors.terminalGreen };
export const TerminalDemo = () => {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
// Timeline (1.5x speed):
// 0-0.7s: Terminal enters
// 0.7-1.8s: Type "skillshare init"
// 1.8-2.7s: Show init output
// 2.7-4s: Type "skillshare sync"
// 4-5.3s: Show sync output
const initCommand = 'skillshare init';
const syncCommand = 'skillshare sync';
// Command typing timings (1.5x speed)
const initTypeStart = 0.7 * fps;
const initTypeDuration = initCommand.length * 1.2; // 1.2 frames per char
const initOutputStart = initTypeStart + initTypeDuration + 8;
const syncTypeStart = 2.7 * fps;
const syncTypeDuration = syncCommand.length * 1.2;
const syncOutputStart = syncTypeStart + syncTypeDuration + 8;
// Calculate which output lines to show
const showInitOutput = frame >= initOutputStart;
const showSyncOutput = frame >= syncOutputStart;
// Output line stagger animation with slide-in effect
const getLineAnimation = (lineIndex: number, outputStart: number) => {
const lineDelay = lineIndex * 5; // 5 frames between each line
const lineFrame = frame - outputStart - lineDelay;
if (lineFrame < 0) return { opacity: 0, transform: 'translateX(-20px)', scale: 0.95 };
const progress = spring({
frame: lineFrame,
fps,
config: { damping: 15, stiffness: 200 },
});
const opacity = interpolate(progress, [0, 1], [0, 1], {
extrapolateRight: 'clamp',
});
const translateX = interpolate(progress, [0, 1], [-20, 0], {
extrapolateRight: 'clamp',
});
const scale = interpolate(progress, [0, 1], [0.95, 1], {
extrapolateRight: 'clamp',
});
return { opacity, transform: `translateX(${translateX}px)`, scale };
};
return (
<AbsoluteFill
style={{
backgroundColor: colors.bgDark,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
}}
>
<MacTerminal title="skillshare — Terminal" width={1100} enterDelay={0}>
<div style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
{/* Init command */}
<Typewriter
text={initCommand}
startFrame={initTypeStart}
speed={2}
showCursor={!showInitOutput && frame >= initTypeStart}
/>
{/* Init output */}
{showInitOutput && (
<div style={{ marginTop: '8px', marginBottom: '16px' }}>
{initOutputLines.map((line, i) => {
const anim = getLineAnimation(i, initOutputStart);
return (
<div
key={i}
style={{
fontFamily: '"JetBrains Mono", monospace',
fontSize: '20px',
color: line.color,
opacity: anim.opacity,
transform: `${anim.transform} scale(${anim.scale})`,
marginBottom: '4px',
transformOrigin: 'left center',
}}
>
{line.text}
</div>
);
})}
</div>
)}
{/* Sync command */}
{frame >= syncTypeStart - 10 && (
<Typewriter
text={syncCommand}
startFrame={syncTypeStart}
speed={2}
showCursor={!showSyncOutput && frame >= syncTypeStart}
/>
)}
{/* Sync output */}
{showSyncOutput && (() => {
const anim = getLineAnimation(0, syncOutputStart);
return (
<div
style={{
fontFamily: '"JetBrains Mono", monospace',
fontSize: '20px',
color: syncOutputLine.color,
opacity: anim.opacity,
transform: `${anim.transform} scale(${anim.scale})`,
marginTop: '8px',
transformOrigin: 'left center',
}}
>
{syncOutputLine.text}
</div>
);
})()}
{/* Final cursor */}
{showSyncOutput && frame >= syncOutputStart + 15 && (
<div style={{ marginTop: '8px' }}>
<span
style={{
fontFamily: '"JetBrains Mono", monospace',
fontSize: '24px',
color: colors.terminalGreen,
}}
>
${' '}
</span>
<Cursor />
</div>
)}
</div>
</MacTerminal>
</AbsoluteFill>
);
};
+1 -1
View File
@@ -68,7 +68,7 @@ skillshare update surge # Re-copies from the path and runs the security audit
skillshare sync
```
Skills installed before file hashes were recorded keep the "local source" status until they are updated or reinstalled.
Skills installed before file hashes were recorded keep the "local source" status until they are updated or reinstalled. Skills installed from a relative path (such as `./my-skill`) are not compared either, because the directory the path was relative to is not recorded; install with an absolute path to enable the check.
## Example Output
@@ -68,7 +68,7 @@ skillshare update surge # パスから再コピーし、セキュリティ監
skillshare sync
```
ファイルハッシュが記録される前にインストールされた Skill は、update または再インストールするまで「local source」のままです。
ファイルハッシュが記録される前にインストールされた Skill は、update または再インストールするまで「local source」のままです。 相対パス(`./my-skill` など)からインストールした Skill も、基準となるディレクトリが記録されないため比較されません。チェックを有効にするには絶対パスでインストールしてください。
## 出力例
@@ -68,7 +68,7 @@ skillshare update surge # 경로에서 다시 복사하고 보안 감사를
skillshare sync
```
파일 해시가 기록되기 전에 설치된 skill은 update하거나 다시 설치할 때까지 "local source" 상태로 남습니다.
파일 해시가 기록되기 전에 설치된 skill은 update하거나 다시 설치할 때까지 "local source" 상태로 남습니다. 상대 경로(`./my-skill` 등)로 설치한 skill도 기준 디렉터리가 기록되지 않으므로 비교하지 않습니다. 확인을 사용하려면 절대 경로로 설치하세요.
## 출력 예시
@@ -68,7 +68,7 @@ skillshare update surge # 从该路径重新复制,并执行安全审计
skillshare sync
```
在记录文件哈希值之前安装的 skill,会保持 "local source" 状态,直到执行 update 或重新安装。
在记录文件哈希值之前安装的 skill,会保持 "local source" 状态,直到执行 update 或重新安装。通过相对路径(如 `./my-skill`)安装的 skill 也不会比较,因为不会记录该相对路径的基准目录;如需启用检查,请使用绝对路径安装。
## 示例输出
@@ -68,7 +68,7 @@ skillshare update surge # 從該路徑重新複製,並執行安全稽核
skillshare sync
```
在記錄檔案 hash 之前安裝的 skill,會維持「local source」狀態,直到執行 update 或重新安裝。
在記錄檔案 hash 之前安裝的 skill,會維持「local source」狀態,直到執行 update 或重新安裝。透過相對路徑(如 `./my-skill`)安裝的 skill 也不會比對,因為不會記錄該相對路徑的基準目錄;如需啟用檢查,請使用絕對路徑安裝。
## 輸出範例