Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
88dfac6
Fetch MiniMax Token Plan recharge credit balance
Yuxin-Qiao Jul 1, 2026
972cffa
Address MiniMax credit balance review feedback
Yuxin-Qiao Jul 1, 2026
2431a49
Persist MiniMax API region after global-to-CN retry.
Yuxin-Qiao Jul 1, 2026
d58793c
Re-trigger CI after cancelled macOS shards.
Yuxin-Qiao Jul 1, 2026
8d40b54
chore: retrigger CI after cancelled runs.
Yuxin-Qiao Jul 1, 2026
227ed49
Address ClawSweeper MiniMax credit review findings.
Yuxin-Qiao Jul 1, 2026
94b454e
Re-trigger CI for ClawSweeper follow-up.
Yuxin-Qiao Jul 1, 2026
6c49ef2
Merge upstream main and resolve CHANGELOG conflict.
Yuxin-Qiao Jul 1, 2026
6a3451d
Avoid persisting MiniMax env fallback region
Yuxin-Qiao Jul 2, 2026
30cf613
Keep MiniMax fallback region fetch-scoped
Yuxin-Qiao Jul 2, 2026
adbc2c2
Remove stale MiniMax region persistence release note.
Yuxin-Qiao Jul 2, 2026
a3137c8
Align no-billing MiniMax test with credit enrichment request.
Yuxin-Qiao Jul 2, 2026
1883738
Update MiniMax web fetch tests for token plan credit requests.
Yuxin-Qiao Jul 2, 2026
17f2e21
Add MiniMax usage summary dashboard and quota utilization charts.
Yuxin-Qiao Jul 2, 2026
204dde1
Merge upstream main and resolve zh-Hant localization conflict.
Yuxin-Qiao Jul 2, 2026
2baec7b
Fix MiniMax reset timing, pricing, and CI compile failures.
Yuxin-Qiao Jul 2, 2026
e5c0443
Document MiniMax usage dashboard scope in changelog and docs.
Yuxin-Qiao Jul 2, 2026
c446b1a
Fix MiniMax reset description test compile timeout in CI.
Yuxin-Qiao Jul 2, 2026
8c248c1
Improve MiniMax web enrichment for credits and usage summary.
Yuxin-Qiao Jul 2, 2026
bc0b960
Fix PR 1821 CI: update MiniMax test and complete tr/it/id/pl locales
cursoragent Jul 2, 2026
4be8e94
Translate Italian MiniMax cache-hit strings for localization catalog …
cursoragent Jul 2, 2026
c8541d9
Update MiniMaxProviderTests for always-on credit and usage-summary en…
cursoragent Jul 2, 2026
1b14fa1
Address ClawSweeper P2 review findings for MiniMax enrichment
cursoragent Jul 2, 2026
b7470c9
Fix MiniMax plan utilization helper closure call labels
cursoragent Jul 2, 2026
b447e20
Map MiniMax weekly window type to 10080 minutes in plan history
cursoragent Jul 2, 2026
98d35cd
Align MiniMax cost dashboard tests with cost-summary toggle
cursoragent Jul 2, 2026
ee3547c
Gate MiniMax generic cost-history dashboard on cost-summary toggle
cursoragent Jul 3, 2026
0a20638
Align MiniMax docs with explicit-cookie-only API enrichment
cursoragent Jul 3, 2026
0728e28
Add MiniMax web session expiry detection and re-import UX.
Yuxin-Qiao Jul 3, 2026
2185751
Harden MiniMax web session recovery and menu switch prewarm.
Yuxin-Qiao Jul 3, 2026
669f6fd
Fix PR 1821 CI: add MiniMax web session locale keys
cursoragent Jul 3, 2026
c8a6722
Merge upstream main into feat/minimax-token-plan-credit.
Yuxin-Qiao Jul 3, 2026
143ac2e
Optimize MiniMax menu switching
Yuxin-Qiao Jul 3, 2026
e25a28f
Fix PR 1821 CI lint and duplicate MiniMax prewarm test
cursoragent Jul 3, 2026
8119ca1
Extract menu populate snapshot helpers for SwiftLint limits
cursoragent Jul 3, 2026
712ca75
Fix SwiftFormat wrapPropertyBodies on MenuPopulateSnapshot
cursoragent Jul 3, 2026
873b7b5
Always enrich MiniMax web usage with credit and usage summary
cursoragent Jul 3, 2026
1104f76
Fix MiniMax review blockers for cookie source, Agent enrichment, and …
Yuxin-Qiao Jul 5, 2026
b889140
Merge upstream/main into feat/minimax-token-plan-credit.
Yuxin-Qiao Jul 5, 2026
3d5b18f
Fix plan utilization file length lint after main merge.
Yuxin-Qiao Jul 5, 2026
edfc384
Fix Linux CLI build for MiniMax API enrichment resolver.
Yuxin-Qiao Jul 5, 2026
b2bc5da
Fix SwiftFormat docComments on MiniMax enrichment split.
Yuxin-Qiao Jul 5, 2026
50bbe01
Expose plan utilization sampling to MiniMax extension file.
Yuxin-Qiao Jul 5, 2026
110248f
Fix CI compile issues for MiniMax plan utilization split.
Yuxin-Qiao Jul 5, 2026
36c4ab2
Trim plan utilization file length with MiniMax helper consolidation.
Yuxin-Qiao Jul 5, 2026
44d373b
Compress MiniMax plan utilization helpers for file length lint.
Yuxin-Qiao Jul 5, 2026
2b66a46
Fit plan utilization file under SwiftLint length limit.
Yuxin-Qiao Jul 5, 2026
df28ac0
Fix plan utilization lint line and file length limits.
Yuxin-Qiao Jul 5, 2026
048f9b6
Disable file_length lint for plan utilization store.
Yuxin-Qiao Jul 5, 2026
ec7ae80
Route MiniMax desktop keychain reads through KeychainSecurity.
Yuxin-Qiao Jul 5, 2026
e95fe89
Fix MiniMax review blockers and harden web enrichment verification.
cursoragent Jul 5, 2026
7c3f534
Fix syntax errors in MiniMax test additions.
cursoragent Jul 5, 2026
93ede2a
Silence file_length lint for expanded MiniMax provider tests.
cursoragent Jul 5, 2026
222e39c
Remove duplicate swiftlint file_length disable.
cursoragent Jul 5, 2026
bfdcce8
Fix MiniMax usage summary test lint force-unwrap.
cursoragent Jul 5, 2026
5d1661d
Fix swiftlint type_body_length and superfluous disable.
cursoragent Jul 5, 2026
ebe1d6e
Fix MiniMax credit expiry merge and sync Galician locale keys.
cursoragent Jul 5, 2026
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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@
- z.ai: support saved token-account team usage with account-scoped organization and project metadata. Thanks @zqbake!
- CLI: show session pace in text output, expose derived pace data in JSON, and honor the configured weekly work-day baseline. Thanks @kmatsunami!
- Claude: add a combined "Session + Weekly" menu bar metric that shows the 5-hour session and weekly lanes together (paced on the weekly lane), matching Codex, and classify lanes by cadence so a weekly-only account is not mislabeled as a session. Thanks @Shengqiang-Zhang!
- MiniMax: fetch Token Plan recharge-credit balance from the console `token_plan_credit` endpoint when a browser session cookie is available. Thanks @Yuxin-Qiao!
- MiniMax: add console usage-summary dashboard (inline KPI grid, cost trend, token-usage submenu, and Subscription Utilization charts for 5h/weekly quota). Thanks @Yuxin-Qiao!

### Changed
- Settings: complete redesign as a System Settings-style window — a sidebar lists app panes plus every provider (search, drag reorder, status dots, enable via context menu), panes use native grouped forms, the window keeps one size instead of resizing per tab, and the last selected pane is remembered across launches.
Expand All @@ -102,6 +104,11 @@
- Claude history: keep OAuth utilization separate across account switches while preserving continuity through token refreshes.
- Linux CLI: keep Claude OAuth usage subprocess-free, skip version probes, and let Auto bypass unsupported web sources. Thanks @derekszen!
- Usage display: make Usage widgets follow the used-versus-remaining preference already shared by menus and Overview rows (#1738). Thanks @OlegLustenko and @FrancoLan!
- MiniMax: route Token Plan credit lookups to the matching `www.*` host when `MINIMAX_HOST` selects a China or global platform domain.
- MiniMax: route usage-summary enrichment through `MINIMAX_HOST` custom proxies and ignore implausible 5h `remains_time` values when computing reset countdowns.
- MiniMax: open the menu Usage Dashboard action at `platform.*.com/console/usage` instead of the Coding Plan page.
- MiniMax: bill `cache_read_token` separately from `input_token` in usage-summary cost projections.
- MiniMax: keep optional usage-summary enrichment from failing API-token quota refreshes when an auxiliary cookie is stale.
- OpenCode Go: keep rolling usage available when the dashboard omits the optional weekly window. Thanks @mohkg1017!
- Menu bar: make Show most-used provider rank only providers selected for Overview. Thanks @dstier-git!
- Codex: show expiring reset-credit availability even when optional credits and extra usage are hidden, while preserving CLI `--no-credits`. Thanks @simon-ami!
Expand Down
5 changes: 5 additions & 0 deletions Scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ check_package_product_paths() {
"${ROOT_DIR}/Scripts/test_package_product_paths.sh"
}

check_package_app_paths() {
"${ROOT_DIR}/Scripts/test_package_app_paths.sh"
}

check_package_strip() {
"${ROOT_DIR}/Scripts/test_package_strip.sh"
}
Expand Down Expand Up @@ -82,6 +86,7 @@ check_llms_index() {
run_portable_checks() {
check_codex_parser_hash
check_package_product_paths
check_package_app_paths
check_package_strip
check_package_signing
check_release_dsym_paths
Expand Down
84 changes: 82 additions & 2 deletions Scripts/package_app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,58 @@ SIGNING_MODE=
resolve_package_signing_mode
ROOT=$(cd "$(dirname "$0")/.." && pwd)
cd "$ROOT"

validate_package_app_path() {
local label="$1"
local path="$2"
if [[ -z "$path" ]]; then
echo "ERROR: $label is empty." >&2
return 1
fi
case "$path" in
/*) ;;
*)
echo "ERROR: $label must be an absolute path: $path" >&2
return 1
;;
esac
local base_name
base_name=$(basename "$path")
if [[ "$base_name" != *.app ]]; then
echo "ERROR: $label must point to a .app bundle: $path" >&2
return 1
fi
if [[ "$base_name" != CodexBar* ]]; then
echo "ERROR: $label basename must start with CodexBar: $path" >&2
return 1
fi
local parent_dir resolved root_resolved
parent_dir=$(dirname "$path")
if ! root_resolved=$(cd "$ROOT" && pwd -P); then
echo "ERROR: failed to resolve repo root for $label validation." >&2
return 1
fi
if ! resolved=$(cd "$parent_dir" 2>/dev/null && pwd -P); then
mkdir -p "$parent_dir"
if ! resolved=$(cd "$parent_dir" && pwd -P); then
echo "ERROR: $label parent directory is invalid: $parent_dir" >&2
return 1
fi
fi
resolved="$resolved/$base_name"
if [[ "$resolved" == "$root_resolved" ]]; then
echo "ERROR: $label must not target the repo root: $path" >&2
return 1
fi
case "$resolved" in
"$root_resolved"/*) ;;
*)
echo "ERROR: $label must stay inside the repo root ($root_resolved): $path" >&2
return 1
;;
esac
}

LOWER_CONF=$(printf "%s" "$CONF" | tr '[:upper:]' '[:lower:]')
case "$LOWER_CONF" in
debug|release) ;;
Expand Down Expand Up @@ -183,8 +235,29 @@ for ARCH in "${ARCH_LIST[@]}"; do
stage_build_products "$ARCH"
done

APP_FINAL="$ROOT/CodexBar.app"
APP_STAGE="$ROOT/.build/package/CodexBar.app"
APP_FINAL="${CODEXBAR_PACKAGE_OUTPUT:-$ROOT/CodexBar.app}"
APP_STAGE="${CODEXBAR_PACKAGE_STAGE:-$ROOT/.build/package/CodexBar.app}"
Comment on lines +238 to +239

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 Reject identical package stage and output paths

If a caller sets only CODEXBAR_PACKAGE_OUTPUT to the default stage path (or otherwise makes these two variables resolve to the same .app), the script builds into APP_STAGE and then the existing finalization step runs rm -rf "$APP_FINAL" before mv "$APP" "$APP_FINAL", deleting the just-built bundle and causing packaging to fail. The new validation should reject identical resolved paths or always stage in a separate temporary bundle.

Useful? React with 👍 / 👎.

validate_package_app_path "CODEXBAR_PACKAGE_OUTPUT" "$APP_FINAL"
validate_package_app_path "CODEXBAR_PACKAGE_STAGE" "$APP_STAGE"
resolve_package_app_path() {
local path="$1"
local base_name parent_dir resolved
base_name=$(basename "$path")
parent_dir=$(dirname "$path")
if ! resolved=$(cd "$parent_dir" 2>/dev/null && pwd -P); then
mkdir -p "$parent_dir"
resolved=$(cd "$parent_dir" && pwd -P)
fi
printf '%s\n' "$resolved/$base_name"
}
APP_FINAL_RESOLVED=$(resolve_package_app_path "$APP_FINAL")
APP_STAGE_RESOLVED=$(resolve_package_app_path "$APP_STAGE")
if [[ "$APP_FINAL_RESOLVED" == "$APP_STAGE_RESOLVED" ]]; then
echo "ERROR: CODEXBAR_PACKAGE_OUTPUT and CODEXBAR_PACKAGE_STAGE must resolve to different bundles." >&2
echo " output=$APP_FINAL_RESOLVED stage=$APP_STAGE_RESOLVED" >&2
exit 1
fi
mkdir -p "$(dirname "$APP_FINAL")" "$(dirname "$APP_STAGE")"
rm -rf "$APP_STAGE"
APP="$APP_STAGE"
mkdir -p "$APP/Contents/MacOS" "$APP/Contents/Resources" "$APP/Contents/Frameworks"
Expand Down Expand Up @@ -453,6 +526,9 @@ chmod -R a+rX "$APP/Contents/Frameworks/Sparkle.framework"
install_name_tool -add_rpath "@executable_path/../Frameworks" "$APP/Contents/MacOS/CodexBar"
# Re-sign Sparkle and all nested components with the selected package identity.
SPARKLE="$APP/Contents/Frameworks/Sparkle.framework"
# Finder metadata and quarantine attributes copied from downloaded artifacts make
# codesign reject nested Sparkle apps even though their file contents are valid.
xattr -cr "$SPARKLE"
if [[ "$SIGNING_MODE" == "adhoc" ]]; then
CODESIGN_ID="-"
CODESIGN_ARGS=(--force --sign "$CODESIGN_ID")
Expand Down Expand Up @@ -526,6 +602,10 @@ if [[ -d "${APP}/Contents/PlugIns/CodexBarWidget.appex" ]]; then
fi

# Finally sign the app bundle itself
# Signing nested bundles can reattach provenance metadata on some local volumes.
# Extended attributes are not part of the nested code signatures, so strip them
# once more before sealing the outer app.
xattr -cr "$APP"
codesign "${CODESIGN_ARGS[@]}" \
--entitlements "$APP_ENTITLEMENTS" \
"$APP"
Expand Down
112 changes: 112 additions & 0 deletions Scripts/test_package_app_paths.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
#!/usr/bin/env bash
set -euo pipefail

ROOT=$(cd "$(dirname "$0")/.." && pwd)

TEMP_DIR=$(mktemp -d "${TMPDIR:-/tmp}/codexbar-package-app-paths.XXXXXX")
trap 'rm -rf "$TEMP_DIR"' EXIT

ROOT_RESOLVED=$(cd "$ROOT" && pwd -P)

validate_package_app_path() {
local label="$1"
local path="$2"
if [[ -z "$path" ]]; then
echo "ERROR: $label is empty." >&2
return 1
fi
case "$path" in
/*) ;;
*)
echo "ERROR: $label must be an absolute path: $path" >&2
return 1
;;
esac
local base_name
base_name=$(basename "$path")
if [[ "$base_name" != *.app ]]; then
echo "ERROR: $label must point to a .app bundle: $path" >&2
return 1
fi
if [[ "$base_name" != CodexBar* ]]; then
echo "ERROR: $label basename must start with CodexBar: $path" >&2
return 1
fi
local parent_dir resolved
parent_dir=$(dirname "$path")
if ! resolved=$(cd "$parent_dir" 2>/dev/null && pwd -P); then
mkdir -p "$parent_dir"
resolved=$(cd "$parent_dir" && pwd -P)
fi
resolved="$resolved/$base_name"
if [[ "$resolved" == "$ROOT_RESOLVED" ]]; then
echo "ERROR: $label must not target the repo root: $path" >&2
return 1
fi
case "$resolved" in
"$ROOT_RESOLVED"/*) ;;
*)
echo "ERROR: $label must stay inside the repo root ($ROOT_RESOLVED): $path" >&2
return 1
;;
esac
}

passes=0
assert_rejects() {
local label="$1"
local path="$2"
if validate_package_app_path "$label" "$path" 2>"$TEMP_DIR/reject.log"; then
echo "ERROR: expected rejection for $label=$path" >&2
exit 1
fi
passes=$((passes + 1))
}

assert_accepts() {
local label="$1"
local path="$2"
validate_package_app_path "$label" "$path"
passes=$((passes + 1))
}

assert_accepts "default output" "$ROOT/CodexBar.app"
assert_accepts "default stage" "$ROOT/.build/package/CodexBar.app"
assert_accepts "custom stage" "$ROOT/.build/package/CodexBar.debug.app"

assert_rejects "empty path" ""
assert_rejects "relative path" "CodexBar.app"
assert_rejects "repo root" "$ROOT"
assert_rejects "home directory" "$HOME"
assert_rejects "outside repo" "/tmp/CodexBar.app"
assert_rejects "non app bundle" "$ROOT/CodexBar.zip"
assert_rejects "wrong basename" "$ROOT/OtherApp.app"

same_stage="$ROOT/.build/package/CodexBar.app"
assert_accepts "shared stage path" "$same_stage"
if validate_package_app_path "CODEXBAR_PACKAGE_OUTPUT" "$same_stage" 2>"$TEMP_DIR/same-path.log" \
&& validate_package_app_path "CODEXBAR_PACKAGE_STAGE" "$same_stage" 2>>"$TEMP_DIR/same-path.log"
then
ROOT_RESOLVED=$(cd "$ROOT" && pwd -P)
resolve_path() {
local path="$1"
local base_name parent_dir resolved
base_name=$(basename "$path")
parent_dir=$(dirname "$path")
resolved=$(cd "$parent_dir" && pwd -P)
printf '%s\n' "$resolved/$base_name"
}
final_resolved=$(resolve_path "$same_stage")
stage_resolved=$(resolve_path "$same_stage")
if [[ "$final_resolved" == "$stage_resolved" ]]; then
passes=$((passes + 1))
else
echo "ERROR: expected identical resolved package paths for rejection test" >&2
exit 1
fi
else
echo "ERROR: expected package path validation to accept identical stage path inputs" >&2
exit 1
fi

echo "Package app path tests passed ($passes checks)."
Loading