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
11 changes: 11 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,14 @@ jobs:
$tag = "${{ github.ref_name }}"
$setup = pwsh desktop/installer/build.ps1 -Version $tag.TrimStart('v') | Select-Object -Last 1
gh release upload $tag $setup --clobber
# GoReleaser wrote checksums.txt before the installer existed. The
# app checks the installer against it before running it (D38), so
# its line is added, replacing any from an earlier run of this job.
$name = Split-Path $setup -Leaf
$hash = (Get-FileHash $setup -Algorithm SHA256).Hash.ToLower()
New-Item -ItemType Directory -Force sums | Out-Null
gh release download $tag -p checksums.txt -D sums --clobber
$lines = @(Get-Content sums/checksums.txt | Where-Object { $_ -and -not $_.EndsWith(" $name") })
$lines += "$hash $name"
[IO.File]::WriteAllText("$PWD/sums/checksums.txt", ($lines -join "`n") + "`n")
gh release upload $tag sums/checksums.txt --clobber
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

### Use the app

A desktop window for Windows, macOS and Linux, for people who would rather not use a terminal: your papers, search, the citation map, the Reader with highlights and notes, and connecting your AI assistant with one click.
A desktop window for Windows, macOS and Linux, for people who would rather not use a terminal: your papers, search, the citation map, the Reader with highlights, notes and several papers open in tabs, and connecting your AI assistant with one click. On Windows it keeps itself up to date.

The app arrives in the next release. Until then it builds from source: see [the desktop app](desktop/README.md).

Expand Down
10 changes: 10 additions & 0 deletions desktop/installer/filiation.iss
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,21 @@ Name: "{autodesktop}\Filiation"; Filename: "{app}\Filiation.exe"; IconFilename:

[Run]
Filename: "{app}\Filiation.exe"; Description: "Open Filiation"; Flags: nowait postinstall skipifsilent
; The app updating itself runs Setup silently with /relaunch=yes, and the new
; version opens when it is done (D38). Run by hand, Setup is unchanged.
Filename: "{app}\Filiation.exe"; Flags: nowait; Check: Relaunch

[Code]
const
EnvKey = 'Environment';

// Relaunch says whether to open the new version when Setup is done: only
// when the app ran Setup silently to update itself.
function Relaunch: Boolean;
begin
Result := WizardSilent and (CompareText(ExpandConstant('{param:relaunch|no}'), 'yes') = 0);
end;

// onPath says whether dir is one of the entries of the user's PATH.
function OnPath(Dir: string): Boolean;
var
Expand Down
28 changes: 28 additions & 0 deletions desktop/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,47 @@ import (
"github.com/codevector-2003/filiation/internal/assistants"
"github.com/codevector-2003/filiation/internal/config"
"github.com/codevector-2003/filiation/internal/opener"
"github.com/codevector-2003/filiation/internal/sources/github"
"github.com/codevector-2003/filiation/internal/ui"
"github.com/codevector-2003/filiation/internal/update"
)

// version is set at release with -ldflags "-X main.version=…".
var version = "dev"

// updateAPI is where releases are asked for: GitHub, or for a test build
// only, a stand-in set with -ldflags "-X main.updateAPI=…".
var updateAPI = github.DefaultBase

// installedBySetup says whether this copy can update itself: on Windows,
// installed by Setup, whose uninstaller sits beside it. A copy built or
// unpacked by hand is offered the download page instead (D38).
func installedBySetup() bool {
if runtime.GOOS != "windows" {
return false
}
exe, err := os.Executable()
if err != nil {
return false
}
_, err = os.Stat(filepath.Join(filepath.Dir(exe), "unins000.exe"))
return err == nil
}

func main() {
opts := ui.Options{OpenPath: opener.Open, Trash: opener.Trash, Version: version}
if env, err := assistants.DefaultEnv(filCommand()); err == nil {
opts.Assistants = &env
}
if dir, err := config.DefaultCacheDir(); err == nil {
opts.CallLog = filepath.Join(dir, assistants.CallLogName)
opts.Updater = &update.Updater{
Current: version,
Source: &github.Client{Base: updateAPI, UserAgent: "Filiation/" + version},
Dir: filepath.Join(dir, "updates"),
CanInstall: installedBySetup(),
Arch: runtime.GOARCH,
}
}
var appCtx context.Context
opts.PickFiles = func() ([]string, error) {
Expand Down
36 changes: 36 additions & 0 deletions docs/DECISIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -963,3 +963,39 @@ request's desktop build.
shortcuts and the uninstall entry. The exe itself has no icon resource yet.
- Windows first: a macOS `.dmg` and Linux AppImage and `.deb` follow, as does a first-run welcome
in the app and a check for new versions.

## D38 — The app updates itself on Windows, from GitHub releases

Decided 24 Nov 2026, by the maintainer. Until now a new version meant downloading the installer
from the website and running it. The app now asks for the latest release once a day, and on
Windows installs it when asked.

- **One request, to GitHub, and nothing in it.** `internal/sources/github` asks the releases API
for the latest release, with a `Filiation/<version>` User-Agent and nothing else: no email, no
library, no papers. The answer is the version, its date, its notes and its files.
- **Once a day, and on request.** The page checks at start, and while it stays open once a day has
passed, and says nothing unless there is a newer version that was not skipped. Help, Check for
Updates… always answers. Help, Check for Updates Automatically turns the daily check off. About
says when it last ran and what it sends.
- **A note, never a pop-up.** A newer version shows "Update to 0.4.4" in the title bar, where jobs
show. Its panel gives what is new, from GoReleaser's changelog without the commit hashes, and
Update and restart, Later, or Skip this version.
- **Installed only when Setup installed the app.** `internal/update` downloads the release's
installer to `%LOCALAPPDATA%\filiation\updates`, checks its SHA-256 against the release's
`checksums.txt`, and deletes it rather than run it on a mismatch. The page saves its tabs, the
installer is started with `/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /CLOSEAPPLICATIONS
/relaunch=yes`, and the app quits. Setup replaces it, per user and with no administrator prompt
(D37), and its new `[Run]` line opens the new version only when `/relaunch=yes` was passed, so
Setup run by hand is unchanged.
- **Elsewhere, the download page.** A copy not installed by Setup (no `unins000.exe` beside it),
and the app on macOS and Linux, which have no installer yet, offer the release page instead. A
development build is never offered an update.
- **The installer is in the checksums.** GoReleaser writes `checksums.txt` before the installer
is built, so the release workflow adds the installer's line afterwards and uploads the file again.
A release whose checksums do not list its installer, as before v0.4.4, is offered as a download,
never as an update that would fail its check.
- **Trust rests on GitHub and the checksum.** The installer and its checksums come from the same
release, so the check catches a broken or partial download, not a compromised release; signing
the installer (D37) is what would add that.
- **Every version before this one updates by hand once.** The feature exists only from the version
that ships it.
2 changes: 1 addition & 1 deletion docs/STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ protected for them.
| 2 | M2 — MCP server | **Complete** — 25 Sept, released as v0.2 |
| 3 | M3 — fil IDs, library folder, PDFs, text, citation context, FTS5 | **Complete** — 30 Oct, released as v0.3 ([`ARCHITECTURE_PHASE3.md`](ARCHITECTURE_PHASE3.md)) |
| 4 | M4 — retrieval (was "retrieval and answers"; D35) | **Complete** — 18 Nov, checked across five fields and at 39,000 passages (`VALIDATION.md`). 15 Nov: a retrieval test set first (`eval/retrieval`, 20 working and 20 locked questions). Spike 14 measured meaning search inside fil (pure Go: 10 of 20, 44 min to embed) and through Ollama (15 of 20, a 3.2 GB install); neither is built. fil writes no answers either: the user's assistant does, over MCP (D35). Instead search leaves out filler words and ranks papers by their best passages fused with title and abstract (schema v15): 13 → 15 of 20 in the first three on the working set (MRR 0.60 → 0.73), 15 of 20 on the locked set (MRR 0.60 → 0.68). The AI assistants screen shows its call log again (#35) |
| 5 | M5 — the desktop app (was "web interface"; D24) | **In progress** — the shell is Wails v2, in the same process (spike 13, D25); the desktop app comes first and the browser version later (D26). 2 Nov: `desktop/` opens a real window with the Library, Search, Citation map, Inbox and AI assistants screens, and the Reader with notes. The Papers list reaches the whole library, with sorting and filters by year, author and venue. The Citation map shows the whole library on one screen as well as the map around a paper. 3 Nov: Favourites, collections inside collections, and coloured labels, with several papers picked at once, a right-click menu and dragging (schema v11, D28). Bringing in a Zotero library through its local API, read-only, from the Inbox or `fil zotero` (schema v12, D29), or from a Zotero RDF export (`fil zotero --from`). Your own documents can be matched to OpenAlex afterwards, by an identifier or by choosing from a title search (`fil match`). The window has no frame on Windows: the page draws a title bar with File, Edit, View, Library, Go, Paper and Help menus, keyboard shortcuts, and a library switcher, and libraries can be made, opened, switched, moved and closed while the app runs (D30). 4 Nov: a paper's PDF can be downloaded from its page, and the papers one citation step from it, what it cites and what cites it, brought in without growing the rest of the library (D31). The paper shows its abstract. The citation map sizes papers by citations here or worldwide and filters them by citations, year, PDF and your own papers, fading or hiding the rest; a paper with no legal copy takes a PDF you have (D32). 6 Nov: Search takes the Papers list's filters, applied before the best passages are chosen, and the list's filters can be saved as views in the sidebar that update themselves (schema v13, D33). 7 Nov: citation groups, the library's topics found from its citations alone by Louvain clustering, suggested in the sidebar, on the Papers list and on the citation map, and made into collections only when asked; `fil groups` and the `citation_groups` tool (schema v14, D34). 19 Nov: search moved into the title bar and the Papers list shows one row per paper; papers can be deleted, their folders to the system's bin, remembered so that expanding does not bring them back (schema v16, D36). 24 Nov: Reader tabs. Several papers stay open at once, one tab each, after a Library tab that holds the side menu and every other screen. Each tab keeps its page, zoom, side panel and find words; a citation on the page opens beside the paper it is cited in; Ctrl+Tab, Ctrl+W and Ctrl+Shift+T in the Go menu. The tabs are kept in the library's meta table, with no schema change, so a library opened again shows its own papers where they were left; only the four tabs seen last keep their PDF open |
| 5 | M5 — the desktop app (was "web interface"; D24) | **In progress** — the shell is Wails v2, in the same process (spike 13, D25); the desktop app comes first and the browser version later (D26). 2 Nov: `desktop/` opens a real window with the Library, Search, Citation map, Inbox and AI assistants screens, and the Reader with notes. The Papers list reaches the whole library, with sorting and filters by year, author and venue. The Citation map shows the whole library on one screen as well as the map around a paper. 3 Nov: Favourites, collections inside collections, and coloured labels, with several papers picked at once, a right-click menu and dragging (schema v11, D28). Bringing in a Zotero library through its local API, read-only, from the Inbox or `fil zotero` (schema v12, D29), or from a Zotero RDF export (`fil zotero --from`). Your own documents can be matched to OpenAlex afterwards, by an identifier or by choosing from a title search (`fil match`). The window has no frame on Windows: the page draws a title bar with File, Edit, View, Library, Go, Paper and Help menus, keyboard shortcuts, and a library switcher, and libraries can be made, opened, switched, moved and closed while the app runs (D30). 4 Nov: a paper's PDF can be downloaded from its page, and the papers one citation step from it, what it cites and what cites it, brought in without growing the rest of the library (D31). The paper shows its abstract. The citation map sizes papers by citations here or worldwide and filters them by citations, year, PDF and your own papers, fading or hiding the rest; a paper with no legal copy takes a PDF you have (D32). 6 Nov: Search takes the Papers list's filters, applied before the best passages are chosen, and the list's filters can be saved as views in the sidebar that update themselves (schema v13, D33). 7 Nov: citation groups, the library's topics found from its citations alone by Louvain clustering, suggested in the sidebar, on the Papers list and on the citation map, and made into collections only when asked; `fil groups` and the `citation_groups` tool (schema v14, D34). 19 Nov: search moved into the title bar and the Papers list shows one row per paper; papers can be deleted, their folders to the system's bin, remembered so that expanding does not bring them back (schema v16, D36). 24 Nov: Reader tabs. Several papers stay open at once, one tab each, after a Library tab that holds the side menu and every other screen. Each tab keeps its page, zoom, side panel and find words; a citation on the page opens beside the paper it is cited in; Ctrl+Tab, Ctrl+W and Ctrl+Shift+T in the Go menu. The tabs are kept in the library's meta table, with no schema change, so a library opened again shows its own papers where they were left; only the four tabs seen last keep their PDF open. The app updates itself on Windows: once a day it asks GitHub for the latest release, shows a note in the title bar, and Update and restart downloads the installer, checks its SHA-256 against the release's checksums, and lets Setup install it silently and reopen the app; elsewhere it offers the download page (D38) |
| 6 | M6 — claim genealogy | Not started |

---
Expand Down
Loading
Loading