Skip to content

Commit d1dfc4e

Browse files
sa-bucclaude
andcommitted
Fix Open Codex update checks to use fork releases.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent f0bf732 commit d1dfc4e

5 files changed

Lines changed: 14 additions & 12 deletions

File tree

codex-rs/tui/src/chatwidget/snapshots/codex_tui__chatwidget__tests__update_popup.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ expression: terminal.backend().vt100().screen().contents()
44
---
55
✨ New version available! Would you like to update?
66

7-
Full release notes: https://github.com/openai/codex/releases/latest
7+
Full release notes: https://github.com/LEON-gittech/codex
88

99

1010
1. Yes, update now

codex-rs/tui/src/history_cell.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ impl HistoryCell for UpdateAvailableHistoryCell {
579579
let release_notes_url = self
580580
.update_action
581581
.map(UpdateAction::release_notes_url)
582-
.unwrap_or("https://github.com/openai/codex/releases/latest");
582+
.unwrap_or("https://github.com/LEON-gittech/codex");
583583
let update_instruction = if let Some(update_action) = self.update_action {
584584
line!["Run ", update_action.command_str().cyan(), " to update."]
585585
} else {

codex-rs/tui/src/snapshots/codex_tui__history_cell__tests__update_available_history_cell_snapshot.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ assertion_line: 3296
44
expression: rendered
55
---
66
╭──────────────────────────────────────────────────────────╮
7-
│ ✨ Update available! CURRENT_VERSION -> NEXT_VERSION
7+
│ ✨ Update available! CURRENT_VERSION -> NEXT_VERSION
88
Run npm install -g @leonw24/open-codex@latest to update. │
99
│ │
1010
See full release notes: │

codex-rs/tui/src/update_action.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use codex_install_context::InstallContext;
44
use codex_install_context::StandalonePlatform;
55

66
const OPEN_CODEX_RELEASE_NOTES_URL: &str = "https://github.com/LEON-gittech/codex";
7-
const UPSTREAM_CODEX_RELEASE_NOTES_URL: &str = "https://github.com/openai/codex/releases/latest";
87

98
/// Update action the CLI should perform after the TUI exits.
109
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
@@ -54,12 +53,7 @@ impl UpdateAction {
5453
}
5554

5655
pub fn release_notes_url(self) -> &'static str {
57-
match self {
58-
UpdateAction::NpmGlobalLatest | UpdateAction::BunGlobalLatest => OPEN_CODEX_RELEASE_NOTES_URL,
59-
UpdateAction::BrewUpgrade
60-
| UpdateAction::StandaloneUnix
61-
| UpdateAction::StandaloneWindows => UPSTREAM_CODEX_RELEASE_NOTES_URL,
62-
}
56+
OPEN_CODEX_RELEASE_NOTES_URL
6357
}
6458

6559
/// Returns string representation of the command-line arguments for invoking the update.
@@ -143,7 +137,15 @@ mod tests {
143137
);
144138
assert_eq!(
145139
UpdateAction::BrewUpgrade.release_notes_url(),
146-
UPSTREAM_CODEX_RELEASE_NOTES_URL
140+
OPEN_CODEX_RELEASE_NOTES_URL
141+
);
142+
assert_eq!(
143+
UpdateAction::StandaloneUnix.release_notes_url(),
144+
OPEN_CODEX_RELEASE_NOTES_URL
145+
);
146+
assert_eq!(
147+
UpdateAction::StandaloneWindows.release_notes_url(),
148+
OPEN_CODEX_RELEASE_NOTES_URL
147149
);
148150
}
149151

codex-rs/tui/src/updates.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ struct VersionInfo {
6363
const VERSION_FILENAME: &str = "version.json";
6464
// We use the latest version from the cask if installation is via homebrew - homebrew does not immediately pick up the latest release and can lag behind.
6565
const HOMEBREW_CASK_API_URL: &str = "https://formulae.brew.sh/api/cask/codex.json";
66-
const LATEST_RELEASE_URL: &str = "https://api.github.com/repos/openai/codex/releases/latest";
66+
const LATEST_RELEASE_URL: &str = "https://api.github.com/repos/LEON-gittech/codex/releases/latest";
6767

6868
#[derive(Deserialize, Debug, Clone)]
6969
struct ReleaseInfo {

0 commit comments

Comments
 (0)