Skip to content

Release v1.0.5#6

Merged
kylethedeveloper merged 8 commits into
masterfrom
develop
Apr 13, 2026
Merged

Release v1.0.5#6
kylethedeveloper merged 8 commits into
masterfrom
develop

Conversation

@kylethedeveloper
Copy link
Copy Markdown
Owner

What's Changed

  • Added option to manage and delete downloaded models in Settings
  • Added screenshots section and status badges to README.md

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Releases v1.0.5 by adding a Settings UI to view/delete downloaded Whisper models, updating documentation visuals/badges, and bumping application version metadata.

Changes:

  • Added “Downloaded Models” manager in Settings (list, total size, delete flow).
  • Extended backend model listing to include on-disk file size and added a delete-model command.
  • Updated README with badges/screenshots and bumped versions to 1.0.5.

Reviewed changes

Copilot reviewed 9 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
TODO.md Marks Linux build and downloaded-model management as completed.
src/styles.css Adds styling for the Downloaded Models manager UI and delete confirmation state.
src/main.js Implements rendering of downloaded models, size aggregation, and delete/confirm UI flow.
src/index.html Adds the “Downloaded Models” section to the Settings page.
src-tauri/tauri.conf.json Bumps app version to 1.0.5.
src-tauri/src/model_manager.rs Adds delete-model and file-size lookup support in the model manager.
src-tauri/src/lib.rs Exposes file size in list_models and adds the delete_model Tauri command.
src-tauri/Cargo.toml Bumps crate version to 1.0.5.
src-tauri/Cargo.lock Updates locked package version for oratiotext.
README.md Adds release/license/platform/Tauri badges and a screenshots section.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src-tauri/src/model_manager.rs Outdated
Comment on lines +57 to +60
pub fn delete_model(&self, model_name: &str) -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
let path = self.models_dir.join(Self::model_filename(model_name));
if path.exists() {
std::fs::remove_file(&path)?;
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

delete_model builds a path from the unvalidated model_name via model_filename(). If a caller passes a name containing path separators (e.g. "../../..."), this can escape models_dir and delete arbitrary files. Restrict model_name to an allowlist of known model IDs (tiny/base/...) or reject names containing /, \\, or .. before joining/removing the file; consider also verifying the resolved path is under models_dir after canonicalization.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

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.

Fixed in commit 9a941f3. The changes in src-tauri/src/model_manager.rs:

  1. Added a VALID_MODEL_NAMES allowlist constant (tiny, base, small, medium, turbo, large).
  2. Added a validate_model_name() helper that returns an error for any name not in the allowlist — called at the top of delete_model.
  3. Canonicalize models_dir once at construction time in ModelManager::new() so the stored path is always resolved.
  4. After joining, canonicalize() the target file path and verify it starts_with(&self.models_dir) before removing — blocking any symlink-based or residual traversal attempts.

Comment thread src/main.js
Comment thread src/main.js Outdated
Comment on lines +628 to +635
// Auto-reset after 3 s
setTimeout(() => {
if (deleteBtn.dataset.confirming === "true") {
deleteBtn.dataset.confirming = "false";
deleteBtn.textContent = "Delete";
deleteBtn.classList.remove("btn-danger-confirm");
}
}, 10000);
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

The comment says "Auto-reset after 3 s" but the timeout is set to 10,000 ms. Update the comment or the timeout value so they match.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback. Update the comment.

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.

Updated the comment from "Auto-reset after 3 s" to "Auto-reset after 10 s" to match the actual 10,000 ms timeout (commit 5be1202).

Comment thread src/styles.css
Comment on lines +732 to +735
.model-delete-btn:hover:not(:disabled) {
opacity: 0.65;
}

Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

.model-delete-btn:hover:not(:disabled) sets opacity: 0.65, which is identical to the base .model-delete-btn opacity. Unless this is intentionally overriding a more specific rule elsewhere, the hover selector is redundant and can be removed (or changed to a different hover opacity if a visual cue is intended).

Suggested change
.model-delete-btn:hover:not(:disabled) {
opacity: 0.65;
}

Copilot uses AI. Check for mistakes.
Agent-Logs-Url: https://github.com/kylethedeveloper/OratioText/sessions/3874db65-2474-4f8d-b6a0-a9298358cb03

Co-authored-by: kylethedeveloper <8023096+kylethedeveloper@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…calization

Agent-Logs-Url: https://github.com/kylethedeveloper/OratioText/sessions/e301a6f4-adfa-4e78-9e51-80ff57268bfe

Co-authored-by: kylethedeveloper <8023096+kylethedeveloper@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 13 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +39 to +46
/// Returns an error if `model_name` is not in the allowlist of known model IDs.
fn validate_model_name(model_name: &str) -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
if VALID_MODEL_NAMES.contains(&model_name) {
Ok(())
} else {
Err(format!("Unknown model '{}'", model_name).into())
}
}
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

validate_model_name() is only used by delete_model, but other model_name entry points (e.g., download_model, get_model_path, is_model_downloaded, get_model_file_size) still accept arbitrary strings and build paths/URLs via model_filename(). Because model_filename() does not sanitize separators/.., a compromised frontend could potentially trigger path traversal or read/write outside models_dir. Consider enforcing the allowlist for all public methods that accept model_name (either by validating at the start of each method, or by making model_filename() return a Result and requiring validation before constructing paths).

Copilot uses AI. Check for mistakes.
Comment thread src/index.html Outdated
Comment on lines +199 to +205
<button id="open-models-dir-btn" class="btn btn-secondary btn-sm" style="padding: 2px 6px; display: flex; align-items: center; justify-content: center;" title="Open models directory in file manager">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-folder-open">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M5 19l2.757 -7.351a1 1 0 0 1 .936 -.649h12.307a1 1 0 0 1 .986 1.164l-.996 5.211a2 2 0 0 1 -1.964 1.625h-14.026a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l2 2h5a2 2 0 0 1 2 2v1" />
</svg>
</button>
</div>
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

The “open models directory” icon-only button relies on title, which is not a reliable accessible name for screen readers. Add an explicit accessible label (e.g., aria-label="Open models directory") and ensure it remains meaningful without the SVG.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

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.

Added aria-label="Open models directory in file manager" to the button in commit 10ca1de. The button now has an explicit accessible name independent of the SVG icon, matching the existing title text.

Comment thread src/main.js Outdated
Copilot AI and others added 2 commits April 13, 2026 02:08
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@kylethedeveloper kylethedeveloper merged commit 3171d8f into master Apr 13, 2026
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release New Release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants