Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions src/lib/components/Providers.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
{/each}
</ul>
<h2>One app.</h2>
<p>Switch services from the account menu. Your own files sit next to each of them.</p>
</section>

<style>
Expand Down Expand Up @@ -99,15 +98,6 @@
letter-spacing: -0.05em;
}

p {
max-width: 440px;
margin-top: 18px;
font-size: 15px;
line-height: 1.6;
color: var(--muted-fg);
text-wrap: balance;
}

@keyframes pop {
to {
opacity: 1;
Expand Down
1 change: 1 addition & 0 deletions src/lib/components/SiteFooter.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<a href={repo}>GitHub</a>
<a href="/changelog">Changelog</a>
<a href="{repo}/blob/main/.github/CONTRIBUTING.md">Contributing</a>
<a href="/docs/ai">AI</a>
<a href="{repo}/blob/main/README.md#translations">Translations</a>
</div>
<div>
Expand Down
13 changes: 13 additions & 0 deletions src/lib/components/docs/Outline.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,19 @@
};
});

/** Follows headings added, renamed or removed after load, such as in a page being drafted in place. */
$effect(() => {
if (!root) return;
const observer = new MutationObserver(collect);
observer.observe(root, {
childList: true,
subtree: true,
characterData: true,
attributeFilter: ['id']
});
return () => observer.disconnect();
});

afterNavigate(collect);
</script>

Expand Down
5 changes: 5 additions & 0 deletions src/lib/data/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ export const groups: { label: string; pages: DocPage[] }[] = [
slug: 'roadmap',
title: 'Roadmap',
summary: "What's planned, and what has already shipped."
},
{
slug: 'ai',
title: 'AI',
summary: "Where AI tools help build Sonora, and where they don't."
}
]
}
Expand Down
6 changes: 0 additions & 6 deletions src/lib/prose.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@
line-height: 1.1;
}

.prose .summary {
margin-bottom: 8px;
font-size: 17px;
line-height: 1.55;
}

.prose h2 {
margin-top: 36px;
font-size: 22px;
Expand Down
1 change: 0 additions & 1 deletion src/routes/changelog/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
<header class="prose">
<span class="kicker">Changelog</span>
<h1>What's new in Sonora</h1>
<p class="summary">Every release and what changed in it.</p>
</header>

{#if data.releases.length}
Expand Down
95 changes: 95 additions & 0 deletions src/routes/docs/ai/+page.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<svelte:head>
<title>AI · Sonora docs</title>
</svelte:head>

<h1>How we use AI</h1>
<p>by <a href="https://github.com/nolight132">@nolight132</a>, while listening to Sonora</p>

<h2 id="tl-dr">TL;DR</h2>
<p>
Most code is written by AI agents. A human decides what to build and chooses the approach, then
judges the result. We don't read every line. Visual changes are judged by looks and behaviour. We
take a closer look at changes to the logic, making sure the structure stays the way we intended.
Our codebase is pleasant to work in, with or without AI.
</p>

<h2 id="what-we-use">What we use</h2>
<p>
We use frontier models — mainly Claude, but GPT and Gemini models are also used in review loops.
</p>
<p>
T3 Code is amazing even despite being Electron. If the TL;DR resonated with you, you should give
it a try (not an ad, it's open source).
</p>
<p>
We have a dedicated VPS where we run all of our compilation and testing during development. It's
enough to get around 5 concurrent incremental builds at a decent speed. T3 Code containers are
also deployed there.
</p>
<p>
We make use of a number of custom harnesses to test new ideas and iterate on them as quickly as
possible in order to find the best solutions. For the pace we are at, doing a manual
<code>cargo run</code> after editing a single line of code simply doesn't cut it.
</p>
<p>
Instead, a set of shared skills is set up for this environment: for example, <code>gui</code>
allows the agent to drive the app on its own and iterate on its work before presenting it to the human.
<code>desk</code> opens a built Sonora on the developer's desktop to test manually.
</p>

<h2 id="how-it-fits-into-the-work">How it fits into the work</h2>
<p>
Let's take a look at a small example.
<a href="https://github.com/sonorahq/sonora/pull/1899">#1899</a> addresses an annoying behavior in v0.51.0
and earlier where resizing one column in a table would affect unrelated ones, instead of just those
next to it.
</p>
<p>
Initially, the agent decided to avoid complicating the <code>ColumnSpec</code> struct, rightfully so.
It ended up with a version that worked, but resizing the window would keep the columns the same size,
which looked terrible! Of course, I never told the agent to consider window resizing, and promptly redeemed
myself by doing so.
</p>
<p>
It's worth mentioning that while the agent was iterating on this change, a discussion was taking
place under <a href="https://github.com/sonorahq/sonora/issues/1895">#1895</a> linked to that PR. A
better way forward was established, and additional changes took place in the PR as a result. This is
why you can see the # column becoming sortable in the same PR, along with the Clock icon change.
</p>
<p>
Going back to the agent, it took a better approach after trying multiple. To avoid having the
Length column be resized when the viewport does, it introduced a new <code>rigid</code> field to the
struct. It was needed because Length shouldn't stretch with the viewport, but you can still drag it
manually.
</p>
<p>
The agent verified that reordering works, resizing the window keeps the column the same size, and
returned to me with images confirming this. I told it to launch the fixed build on my computer,
verified it myself, and skimmed the diff briefly. For the record, I only read it because an ~80
line diff seemed too large for this change and because tables have been a personal point of
struggle for me when initially implementing them.
</p>
<p>
Of course, this is a very small change in the grand scheme of things, but I hope it gives you a
glimpse at how we develop Sonora.
</p>

<h2 id="if-you-contribute">If you contribute</h2>
<p>
First of all, thank you! A lot of progress has been made with the help of external contributors,
and your interest is what keeps this project going.
</p>
<p>
AI-written pull requests are welcome. You don't have to disclose the tools you used. What you have
to do is stand behind the change: run it, check that it does what you intend, and be able to
answer questions about it.
</p>
<p>
Visual changes need a screenshot, preferably before and after. Descriptions must be your own words
unless clearly communicated otherwise. Summaries for trivial changes are fine to generate.
</p>
<p>
The source of truth for these rules is
<a href="https://github.com/sonorahq/sonora/blob/main/.github/CONTRIBUTING.md">CONTRIBUTING.md</a>
in the repo.
</p>
2 changes: 1 addition & 1 deletion src/routes/docs/command-line/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ sonora completions fish > ~/.config/fish/completions/sonora.fish`;
</svelte:head>

<h1>Command line</h1>
<p class="summary">
<p>
Control a running Sonora from a terminal, a script or a key binding with the <code>sonora</code>
command. Run <code>sonora --help</code> for everything it can do.
</p>
Expand Down
5 changes: 2 additions & 3 deletions src/routes/docs/downloads/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
</svelte:head>

<h1>Downloads and offline</h1>
<p class="summary">
<h2 id="downloading">Downloading</h2>
<p>
Press the download button on an album or playlist. Downloads work with every service except local
files, which are already on disk.
</p>

<h2 id="downloading">Downloading</h2>
<p>
A downloaded playlist stays in step with the service, so songs added to it download too. Downloads
play only in Sonora on this computer, except Subsonic, Jellyfin and Plex ones, which are plain
Expand Down
5 changes: 0 additions & 5 deletions src/routes/docs/help/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
</svelte:head>

<h1>Getting help</h1>
<p class="summary">
Ask questions in the chat and report bugs on GitHub. The <a href="/faq">FAQ</a> may already have the
answer.
</p>

<h2 id="chat">Chat</h2>
<p>
Join us on <a href={discord}>Discord</a> or the bridged <a href={matrix}>Matrix</a> space.
Expand Down
5 changes: 0 additions & 5 deletions src/routes/docs/introduction/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@
</svelte:head>

<h1>Introduction</h1>
<p class="summary">
How Sonora works once it's installed. To install it, see the <a href="/#steps">install steps</a>.
Something broken? Try the <a href="/faq">FAQ</a> first.
</p>

<h2 id="contents">What's in the docs</h2>
<table>
<tbody>
Expand Down
2 changes: 1 addition & 1 deletion src/routes/docs/links/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</svelte:head>

<h1>Opening links</h1>
<p class="summary">Paste a music service link into Sonora's search field to open it.</p>
<p>Paste a music service link into Sonora's search field to open it.</p>

<h2 id="browser">From your browser</h2>
<p>
Expand Down
4 changes: 1 addition & 3 deletions src/routes/docs/logs/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
</svelte:head>

<h1>Logs</h1>
<p class="summary">
Attach the log to every bug report. Tokens and account details are kept out of it.
</p>
<p>Attach the log to every bug report. Tokens and account details are kept out of it.</p>

<h2 id="location">Location</h2>
<p>
Expand Down
4 changes: 0 additions & 4 deletions src/routes/docs/providers/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@
</svelte:head>

<h1>Providers</h1>
<p class="summary">
Sonora plays from one streaming service at a time, with your local files next to it.
</p>

<h2 id="accounts">Accounts</h2>
<p>
You can stay signed in to several services and switch between them from the account menu at the
Expand Down
6 changes: 3 additions & 3 deletions src/routes/docs/roadmap/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
</svelte:head>

<h1>Roadmap</h1>
<p class="summary">
What we're working toward, grouped by area. A line gets crossed out once it ships in a release,
its issue closes as done or its pull request merges.
<p>
A line gets crossed out once it ships in a release, its issue closes as done or its pull request
merges.
</p>

<p class="note">
Expand Down
2 changes: 1 addition & 1 deletion src/routes/docs/scrobbling/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</svelte:head>

<h1>Scrobbling</h1>
<p class="summary">
<p>
Link your accounts in <MenuPath steps={['Settings', 'Integrations', 'Scrobbling']} />. Every play
goes to every linked service that's turned on.
</p>
Expand Down
4 changes: 1 addition & 3 deletions src/routes/docs/sessions/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
</svelte:head>

<h1>Sessions</h1>
<p class="summary">
Listen to the same music with friends, in step, from the Sessions button in the player bar.
</p>
<p>Start or join a session from the <strong>Sessions</strong> button in the player bar.</p>

<h2 id="sonora-session">Sonora Session</h2>
<p>
Expand Down
4 changes: 1 addition & 3 deletions src/routes/docs/settings/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
</svelte:head>

<h1>Settings file</h1>
<p class="summary">Your preferences live in settings.json. Changes apply as soon as you save.</p>

<h2 id="location">Location</h2>
<table>
<tbody>
Expand All @@ -49,7 +47,7 @@
</table>

<h2 id="editing">Editing by hand</h2>
<p>Keys you leave out keep their defaults.</p>
<p>Keys you leave out keep their defaults. Changes apply as soon as you save.</p>
<Code label="settings.json" lang="json" text={example} />
<p>
If you break the file, Sonora saves nothing until you fix it. The last valid version is in
Expand Down
2 changes: 1 addition & 1 deletion src/routes/docs/shortcuts/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
</svelte:head>

<h1>Shortcuts</h1>
<p class="summary">
<p>
On macOS, use <kbd>⌘</kbd> for <kbd>Ctrl</kbd>, except for Previous and Next song, and
<kbd>⌥</kbd>
for <kbd>Alt</kbd>. Change any shortcut in <MenuPath steps={['Settings', 'Keybinds']} />.
Expand Down
2 changes: 1 addition & 1 deletion src/routes/docs/sound/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</svelte:head>

<h1>Sound</h1>
<p class="summary">
<p>
The output device and the equalizer are in <MenuPath steps={['Settings', 'Playback', 'Sound']} />.
</p>

Expand Down
2 changes: 1 addition & 1 deletion src/routes/docs/themes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
</svelte:head>

<h1>Themes</h1>
<p class="summary">
<p>
Install themes from the <a href="/themes">themes page</a>, or write your own as a JSON file in the
themes folder.
</p>
Expand Down
2 changes: 0 additions & 2 deletions src/routes/docs/vision/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
</svelte:head>

<h1>Vision</h1>
<p class="summary">Who Sonora is for, and what it will never be.</p>

<h2>TL;DR</h2>
<p>
If you're just here to figure out if your feature request will be implemented, here's a quick
Expand Down
4 changes: 2 additions & 2 deletions src/routes/faq/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
<article class="prose">
<span class="kicker">FAQ</span>
<h1>Something's not working</h1>
<p class="summary">
The problems people run into most, and what fixes them. If yours isn't here, check the
<p>
If your problem isn't here, check the
<a href="/docs/logs">log</a>. It usually names the culprit.
</p>

Expand Down