chore: restart the repository with a clean history
CI / Docker image (push) Successful in 12s
CI / Server (push) Successful in 25s
CI / CLI (push) Successful in 13s
Development image / Development image (push) Successful in 21s
CI / CLI (windows) (push) Successful in 57s
CI / CLI (linux-arm64, static) (push) Successful in 1m37s
Release / Prepare release (push) Successful in 2s
Release / Server (linux-x64) (push) Successful in 53s
Release / CLI (linux-arm64, static) (push) Successful in 1m32s
Release / Docker image (push) Successful in 2m48s
Release / Server (windows-x64) (push) Successful in 6m20s
Release / CLI (windows-x64) (push) Successful in 6m48s
Release / CLI (linux-x64) (push) Successful in 7m8s
Release / Publish release (push) Successful in 1s

Squash the tree into one commit, drop docs/architecture.html, reset the version line to 0.3.0, consolidate the changelog, enable Renovate automerge for non-major updates and add AGENTS.md.
This commit is contained in:
fristy committed 2026-11-10 11:31:13 +03:00
commit 650807c1fb
438 files changed
+45070

No files matched your search

@@ -0,0 +1,55 @@
import "./styles.sass";
import { useEffect, useState } from "react";
import { ChevronDown, Download, Waypoints } from "lucide-react";
import CopyField from "@/common/components/CopyField";
import { detectPlatform, downloadsFor, installCommand } from "@/common/utils/platform.js";
export const EmptyState = () => {
const [platform, setPlatform] = useState({ os: null, arch: null });
const [open, setOpen] = useState(false);
const downloads = downloadsFor(platform);
const [primary, ...rest] = downloads.files;
useEffect(() => {
detectPlatform().then(setPlatform);
}, []);
return (
<div className="empty">
<div className="empty-head">
<Waypoints size={22} />
<h2>No tunnels yet</h2>
<p>Tunnels show up here the moment the CLI shares something.</p>
<button type="button" className={`empty-toggle${open ? " open" : ""}`} onClick={() => setOpen(!open)} aria-expanded={open}>
Getting started<ChevronDown />
</button>
</div>
{open && <ol className="empty-steps">
<li>
<h3>Get the CLI</h3>
<p>One line, picks the right build for this machine.</p>
<CopyField value={installCommand(platform.os)} />
{primary && <a className="empty-download" href={primary.url}>
<Download />
<span>{primary.label}</span>
</a>}
<div className="empty-platforms">
{rest.map(entry => <a key={entry.url} href={entry.url}>{entry.label}</a>)}
<a href={downloads.all}>All releases</a>
</div>
</li>
<li>
<h3>Link this device</h3>
<p>Sends you back here to confirm, then the device stays signed in.</p>
<CopyField value="frislit login" />
</li>
<li>
<h3>Share a port</h3>
<p>Swap 3000 for the port your app runs on, or share a folder with <code>frislit serve .</code></p>
<CopyField value="frislit http 3000" />
</li>
</ol>}
</div>
);
};
@@ -0,0 +1 @@
export { EmptyState as default } from "./EmptyState.jsx";
@@ -0,0 +1,151 @@
@use "@/common/styles/colors"
@use "@/common/styles/breakpoints"
.empty
border: 1px dashed colors.$border-strong
border-radius: 0.875rem
padding: 2.5rem 2rem
.empty-head
display: flex
flex-direction: column
align-items: center
text-align: center
gap: 0.5rem
svg
color: colors.$muted
opacity: 0.7
h2
margin: 0
font-size: 1.0625rem
font-weight: 600
letter-spacing: -0.01em
p
margin: 0
max-width: 26rem
color: colors.$subtext
font-size: 0.875rem
.empty-toggle
display: inline-flex
align-items: center
gap: 0.25rem
margin-top: 0.5rem
padding: 0.375rem 0.75rem
background: none
border: 1px solid colors.$border
border-radius: 0.625rem
color: colors.$subtext
font-family: inherit
font-size: 0.8125rem
font-weight: 500
cursor: pointer
transition: background-color 0.15s ease, color 0.15s ease
svg
width: 0.875rem
height: 0.875rem
transition: transform 0.15s ease
&.open svg
transform: rotate(180deg)
&:hover
background-color: colors.$surface
color: colors.$text
.empty-steps
display: grid
grid-template-columns: repeat(3, 1fr)
gap: 1.5rem
counter-reset: step
margin: 2.5rem 0 0
padding: 0
list-style: none
@media (max-width: breakpoints.$mobile)
grid-template-columns: 1fr
gap: 2rem
li
display: grid
grid-template-rows: subgrid
grid-row: span 6
justify-items: start
align-content: start
gap: 0.375rem
counter-increment: step
@media (max-width: breakpoints.$mobile)
display: flex
flex-direction: column
align-items: flex-start
&::before
content: counter(step)
display: flex
align-items: center
justify-content: center
width: 1.5rem
height: 1.5rem
margin-bottom: 0.375rem
border-radius: 0.5rem
background-color: colors.$primary-tint
color: colors.$primary
font-size: 0.75rem
font-weight: 700
h3
margin: 0
font-size: 0.9375rem
font-weight: 600
p
margin: 0 0 0.5rem
color: colors.$subtext
font-size: 0.8125rem
line-height: 1.5
code
color: colors.$primary
font-size: 0.8125rem
.copy-field
width: 100%
.empty-download
display: inline-flex
align-items: center
gap: 0.5rem
margin-top: 0.75rem
border-radius: 0.75rem
padding: 0.5rem 1rem
background-color: colors.$primary-bright
color: colors.$on-primary
font-size: 0.875rem
font-weight: 600
transition: background-color 0.15s ease
svg
width: 1.0625rem
height: 1.0625rem
&:hover
background-color: colors.$primary-hover
.empty-platforms
display: flex
flex-wrap: wrap
gap: 0.25rem 0.875rem
margin-top: 0.75rem
a
color: colors.$muted
font-size: 0.8125rem
transition: color 0.15s ease
&:hover
color: colors.$text
@@ -0,0 +1,52 @@
import "./styles.sass";
import { useState } from "react";
import { DialogProvider } from "@/common/components/Dialog";
import Button from "@/common/components/Button";
import Input from "@/common/components/Input";
import { postRequest } from "@/common/utils/RequestUtil.js";
import { useToast } from "@/common/contexts/toast.js";
export const ReserveDialog = ({ open, setOpen, onReserved }) => {
const { sendToast } = useToast();
const [name, setName] = useState("");
const [busy, setBusy] = useState(false);
const close = () => {
setOpen(false);
setName("");
};
const submit = async event => {
event.preventDefault();
setBusy(true);
try {
const result = await postRequest("persistent", { name: name.trim().toLowerCase() });
sendToast("Success", result.message);
close();
onReserved?.(result.tunnel);
} catch (error) {
sendToast("Error", error.message);
} finally {
setBusy(false);
}
};
return (
<DialogProvider open={open} onClose={close}>
<form className="reserve" onSubmit={submit}>
<div className="reserve-head">
<h2>Reserve a name.</h2>
<p>Reserved for your account, with its own access rules and domains.</p>
</div>
<Input id="reserve-name" label="Name" value={name} setValue={setName} placeholder="myapp"
autoComplete="off" autoFocus required />
<div className="reserve-actions">
<Button text="Cancel" type="secondary" onClick={close} buttonType="button" />
<Button text={busy ? "Reserving..." : "Reserve"} buttonType="submit" disabled={busy || !name.trim()} />
</div>
</form>
</DialogProvider>
);
};
@@ -0,0 +1 @@
export { ReserveDialog as default } from "./ReserveDialog.jsx";
@@ -0,0 +1,22 @@
@use "@/common/styles/colors"
.reserve
display: flex
flex-direction: column
gap: 1rem
.reserve-head
h2
font-size: 1.25rem
p
margin: 0.5rem 0 0
color: colors.$subtext
font-size: 0.8125rem
line-height: 1.55
.reserve-actions
display: flex
justify-content: flex-end
gap: 0.5rem
margin-top: 0.25rem
@@ -0,0 +1,51 @@
import "./styles.sass";
import { useNavigate } from "react-router-dom";
import { formatCountdown, formatRelative } from "@/common/utils/formatUtils.js";
import { ArrowRight, Bookmark, ChevronRight } from "lucide-react";
import { useUser } from "@/common/contexts/user.js";
const status = (tunnel, now) => {
if (tunnel.online) return formatRelative(tunnel.createdAt);
if (tunnel.graceUntil) return `closes in ${formatCountdown(tunnel.graceUntil, now)}`;
return "offline";
};
const detail = tunnel => {
if (tunnel.mode === "tcp") return [tunnel.target, `tcp+udp · ${tunnel.joiners} connected`];
if (tunnel.dormant) return [tunnel.url];
return [tunnel.url, tunnel.target];
};
export const TunnelItem = ({ tunnel, now }) => {
const navigate = useNavigate();
const { user } = useUser();
const state = tunnel.online ? "online" : tunnel.dormant ? "dormant" : "offline";
const foreign = tunnel.owner && tunnel.owner !== user?.username;
return (
<button type="button" className={`tunnel-row ${state}`} onClick={() => navigate(`/tunnels/${tunnel.id}`)}>
<span className="tunnel-dot" />
<span className="tunnel-main">
<span className="tunnel-title">
<span className="tunnel-id">{tunnel.id}</span>
{tunnel.mode !== "tcp" && (
<span className={`tunnel-mode ${tunnel.mode}`}>{tunnel.mode === "subdomain" ? "sub" : "path"}</span>
)}
{tunnel.persistent && <Bookmark className="tunnel-pin" aria-label="Persistent" />}
{foreign && <span className="tunnel-owner">{tunnel.owner}</span>}
{tunnel.guest && <span className="tunnel-owner">via {tunnel.guest}</span>}
</span>
<span className="tunnel-detail">
{detail(tunnel).map((part, index) => (
<span key={part} className="tunnel-detail-part">
{index > 0 && <ArrowRight />}
<span>{part}</span>
</span>
))}
</span>
</span>
<span className="tunnel-status">{status(tunnel, now)}</span>
<ChevronRight className="tunnel-chevron" />
</button>
);
};
@@ -0,0 +1 @@
export { TunnelItem as default } from "./TunnelItem.jsx";
@@ -0,0 +1,148 @@
@use "@/common/styles/colors"
@use "@/common/styles/breakpoints"
.tunnel-row
width: 100%
display: flex
align-items: center
gap: 1rem
min-width: 0
padding: 1rem 1.125rem
background-color: colors.$surface
border: 1px solid colors.$border
border-radius: 0.875rem
color: colors.$text
font-family: inherit
text-align: left
cursor: pointer
transition: border-color 0.15s ease, background-color 0.15s ease
&:hover
border-color: colors.$border-strong
background-color: colors.$surface-raised
&:focus-visible
outline: 2px solid colors.$primary
outline-offset: 2px
&.offline
opacity: 0.75
&.dormant
border-style: dashed
.tunnel-id, .tunnel-detail
color: colors.$muted
@media (max-width: breakpoints.$mobile)
gap: 0.75rem
padding: 0.875rem 1rem
.tunnel-dot
width: 0.5rem
height: 0.5rem
flex-shrink: 0
border-radius: 50%
background-color: colors.$success
.offline &
background-color: colors.$warning
.dormant &
background-color: colors.$border-strong
.tunnel-main
flex: 1
min-width: 0
display: flex
flex-direction: column
gap: 0.25rem
.tunnel-title
display: flex
align-items: center
gap: 0.5rem
min-width: 0
.tunnel-id
font-size: 1rem
font-weight: 600
letter-spacing: -0.01em
white-space: nowrap
overflow: hidden
text-overflow: ellipsis
.tunnel-pin
width: 0.875rem
height: 0.875rem
flex-shrink: 0
color: colors.$primary
.tunnel-mode
flex-shrink: 0
padding: 0.1rem 0.4rem
border: 1px solid colors.$border
border-radius: 0.4rem
color: colors.$muted
font-size: 0.6875rem
font-weight: 600
letter-spacing: 0.04em
text-transform: uppercase
&.subdomain
color: colors.$primary
border-color: colors.$primary-tint
.tunnel-owner
color: colors.$muted
font-size: 0.8125rem
white-space: nowrap
&::before
content: "· "
.tunnel-detail
display: flex
align-items: center
gap: 0.75rem
min-width: 0
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace
font-size: 0.8125rem
color: colors.$subtext
svg
width: 0.875rem
height: 0.875rem
flex-shrink: 0
color: colors.$muted
.tunnel-detail-part
display: inline-flex
align-items: center
gap: 0.75rem
min-width: 0
span
white-space: nowrap
overflow: hidden
text-overflow: ellipsis
& + &
color: colors.$muted
flex-shrink: 0
.tunnel-status
flex-shrink: 0
color: colors.$muted
font-size: 0.8125rem
white-space: nowrap
font-variant-numeric: tabular-nums
@media (max-width: breakpoints.$mobile)
display: none
.tunnel-chevron
width: 1rem
height: 1rem
flex-shrink: 0
color: colors.$muted