Skip to content

Refactor generic storage helpers and add develop update channel#119

Open
cooper (czxtm) wants to merge 5 commits into
developfrom
feat/release-channel-dev
Open

Refactor generic storage helpers and add develop update channel#119
cooper (czxtm) wants to merge 5 commits into
developfrom
feat/release-channel-dev

Conversation

@czxtm
Copy link
Copy Markdown
Contributor

@czxtm cooper (czxtm) commented May 8, 2026

Summary

Adds release-channel support so developer builds can target the develop update channel independently from main/stable auto-updates.

Test Plan

  • bun run --cwd apps/native test:unit -- src/components/widget/controls/directory-picker.test.tsx
  • bunx vitest run --project=unit --coverage --coverage.reporter=json-summary --coverage.reporter=text --reporter=basic from apps/native
  • bun run --cwd apps/native build
  • git diff --check

Docs

  • Docs updated (companion PR in darkmatter/nixmac-web: #___)
  • No docs update needed

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Warnings
⚠️ Please assign this PR to someone (usually yourself).
Messages
📖

🤖 This PR touches CI / infra — reviewers please pay extra attention:

  • .github/workflows/build.yaml
  • ops/scripts/release/compute-version.sh
  • ops/scripts/release/sync-version.sh
  • ops/scripts/release/upload-r2.sh

📋 PR Overview

Lines changed 499 (+407 / -92)
Files 0 added, 23 modified, 0 deleted
Draft / WIP no
Has Test Plan yes
New UI components no
New Storybook stories no
New Rust modules no
New TS source files no
New tests no
package.json touched no
Cargo.toml touched no
Infra / CI touched yes

🔬 Coverage

Report Lines Statements Functions Branches
apps/native/coverage/coverage-summary.json 17.4% 17.4% 27.6% 52.7%

Generated by 🚫 dangerJS against e9c2526

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4c74e5841b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

TAG="v${VERSION}"
elif [[ "$GITHUB_EVENT_NAME" == "push" && "$GITHUB_REF" == "refs/heads/develop" ]]; then
MODE="develop"
BASE=$(git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//' || echo "")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Filter prerelease tags when deriving develop versions

When a disposable tag such as v0.22.0-test.1 is the nearest reachable tag, git describe --tags --abbrev=0 can return it (git describe -h says --tags uses any tag, while --match is the option to restrict candidates). The new develop path then parses PAT as 0-test.1, so PAT=$((PAT + 1)) aborts the workflow with an arithmetic syntax error on every develop push after such a tag; use a stable-tag match/exclude before doing numeric arithmetic.

Useful? React with 👍 / 👎.

store::UPDATE_CHANNEL_KEY,
shared_types::UpdateChannel::default(),
)
.map_err(|e| capture_err("ui_get_prefs", e))?;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest using wrap_result_and_capture_err which I added after tiring of seeing this same verbose/error-prone pattern dozens of times in this file.

get_string_pref_raw(app, key)
}

pub fn get_json_pref<R, T>(app: &AppHandle<R>, key: &str) -> Result<Option<T>>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that I think this will have the effect of downgrading to defaults if you ever change the JSON schema by (say) adding a field. Maybe that's ok?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants