Skip to content

feat: Implement cross-type app conversion and enhance version management#2

Merged
mrMigles merged 1 commit into
mainfrom
feature/new_features_pre_saas
Jul 20, 2026
Merged

feat: Implement cross-type app conversion and enhance version management#2
mrMigles merged 1 commit into
mainfrom
feature/new_features_pre_saas

Conversation

@mrMigles

Copy link
Copy Markdown
Owner
  • Added support for switching app types (script ↔ project) with user confirmation.
  • Introduced pending state management for type conversions and source changes.
  • Enhanced versioning to include type and app-specific metadata.
  • Updated README to reflect new type conversion features and rollback capabilities.
  • Added comprehensive tests for type conversion scenarios and version management.

- Added support for switching app types (script ↔ project) with user confirmation.
- Introduced pending state management for type conversions and source changes.
- Enhanced versioning to include type and app-specific metadata.
- Updated README to reflect new type conversion features and rollback capabilities.
- Added comprehensive tests for type conversion scenarios and version management.

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

Copy link
Copy Markdown

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: 5659640ece

ℹ️ 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 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 address that feedback".

Comment thread main.py
tmp_conv.write_bytes(file_bytes)
try:
await query.edit_message_text(f"⚙️ Converting {script_id} to script ...")
full_id = script_mgr.upsert_script_from_file(original_name, tmp_conv)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve the forced target ID for uploaded script conversions

When Change Source is used to replace an existing app with a .py file whose filename differs from the target ID, this call derives full_id from original_name instead of using script_id. The new script is therefore created under the uploaded filename, while the original app remains unchanged; this contradicts the preceding forced-target routing and leaves the requested conversion unperformed.

Useful? React with 👍 / 👎.

Comment thread main.py
Comment on lines 1817 to 1819
app_id = info["app_id"]
repo_dir = GITREPOS_DIR / app_id
repo_url = f"https://github.com/{info['owner']}/{info['repo']}.git"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Clone the selected repository when changing a GitHub source

For a GitHub-to-GitHub Change Source, force_target_id makes the new repository reuse the old app's GITREPOS_DIR/<id> clone. Since git_clone_or_pull fetches the existing clone's origin, it stages the old repository rather than the newly supplied URL, then writes metadata for the new repo; subsequent Sync operations continue fetching that old origin. Replacing a GitHub source with a different repository therefore silently runs the wrong code.

Useful? React with 👍 / 👎.

Comment thread main.py
Comment on lines +1315 to +1316
py_files = discover_python_files(dest_root)
entry, _ = pick_entry_from_candidates(py_files)

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 Restore a previously selected app entry point on rollback

For an app that had multiple Python files and whose owner selected an entry through entrypick, rollback now recomputes the entry from the restored tree. pick_entry_from_candidates returns None for that ambiguous layout, and no pending choice is registered, so start_script subsequently rejects the restored app with “Entry point not set.” The old rollback preserved the configured entry; the version metadata or rollback flow needs to retain it.

Useful? React with 👍 / 👎.

@mrMigles
mrMigles merged commit c24acad into main Jul 20, 2026
3 checks passed
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.

1 participant