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: 7 additions & 3 deletions .github/workflows/ci-flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ jobs:
run: |
uv sync --locked --only-group flatpak \
--python "${PYTHON_VERSION}" \
--no-build \
--no-install-project \
--no-python-downloads \
--no-install-project
--no-install-package flatpak-node-generator

- name: Setup Flatpak dependencies
run: |
Expand Down Expand Up @@ -95,15 +97,17 @@ jobs:
flatpak run org.flatpak.Builder --version

- name: Generate Flatpak Node sources
env:
PYTHONPATH: packaging/linux/flatpak/deps/flatpak-builder-tools/node
run: |
uv run --locked --no-sync python -m flatpak_node_generator \
uv run --locked --no-build --no-sync python -m flatpak_node_generator \
npm crates/client-web/package-lock.json \
--node-sdk-extension "org.freedesktop.Sdk.Extension.node${NODE_VERSION}//${FREEDESKTOP_SDK_VERSION}" \
--output generated-node-sources.json

- name: Generate Flatpak Cargo sources
run: |
uv run --locked --no-sync python \
uv run --locked --no-build --no-sync python \
./packaging/linux/flatpak/deps/flatpak-builder-tools/cargo/flatpak-cargo-generator.py \
Cargo.lock \
--output generated-cargo-sources.json
Expand Down
12 changes: 11 additions & 1 deletion crates/client-web/src/app/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export function defaultHomeTab(_route: AppRoute): HomeBrowseTab {
return 'recommended';
}

/** Maps a browse URL segment to its route-model kind. */
function browseKindFromSegment(segment: string): Extract<AppRoute, { page: 'browse-detail' }>['kind'] {
if (segment === 'collections') {
return 'collection';
Expand All @@ -16,9 +17,18 @@ function browseKindFromSegment(segment: string): Extract<AppRoute, { page: 'brow
return 'category';
}

/** Removes trailing slashes while preserving the root path. */
function normalizePath(pathname: string): string {
let end = pathname.length;
while (end > 0 && pathname[end - 1] === '/') {
end -= 1;
}
return pathname.slice(0, end) || '/';
}

/** Converts the current browser path into the web UI's route model. */
export function parseRoute(): AppRoute {
const normalizedPath = globalThis.location.pathname.replace(/\/+$/, '') || '/';
const normalizedPath = normalizePath(globalThis.location.pathname);

const settingsMatch = /^\/settings(?:\/(libraries|providers|scheduled|dashboard|logs))?$/.exec(normalizedPath);
if (settingsMatch) {
Expand Down
4 changes: 2 additions & 2 deletions crates/client-web/src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2115,7 +2115,7 @@ legend {
.log-entries-table .log-entry-message {
margin: 0;
white-space: pre-wrap;
word-break: break-word;
overflow-wrap: anywhere;
color: inherit;
background: transparent;
border: none;
Expand All @@ -2134,7 +2134,7 @@ legend {

.log-entry-message {
white-space: pre-wrap;
word-break: break-word;
overflow-wrap: anywhere;
font-family: 'Cascadia Mono', 'Fira Code', Consolas, monospace;
font-size: 0.86rem;
line-height: 1.5;
Expand Down
Loading