forked from 1b-agent/fieldcraft-upstream
[IMP] OneCAD Simulation rebrand: OneCAD Simulation wordmark + app bar, no external links (docs/GitHub/updates removed, local report copy), all visible strings OneCAD Simulation, REBRAND.md
This commit is contained in:
1 parent
8201f9a954
commit
f8c0e8500a
11 files changed
+221
-178
No files matched your search
@@ -21,7 +21,9 @@ pub const ISSUE_URL: &str = "https://github.com/tangency-labs/fieldcraft/issues/
|
||||
/// The longest link a draft opens: GitHub refuses new-issue links much past 8 KB.
|
||||
pub const MAX_URL: usize = 7000;
|
||||
/// The session file a draft attaches.
|
||||
pub const SESSION_FILE: &str = "fieldcraft-session.json";
|
||||
// OneBSpace (OneCAD Simulation): the attachment name carries the fork's mark; the internal API
|
||||
// name (`SESSION_FILE`) stays upstream.
|
||||
pub const SESSION_FILE: &str = "onecadsim-session.json";
|
||||
/// The model file a draft attaches.
|
||||
pub const MODEL_FILE: &str = "model.fieldcraft";
|
||||
/// Backtrace frames a crash's draft quotes.
|
||||
@@ -158,8 +160,9 @@ pub fn draft(input: &Input, version: &str) -> Draft {
|
||||
let crash = input.crash.as_ref();
|
||||
let mut title = input.title.trim().to_string();
|
||||
if title.is_empty() {
|
||||
// OneBSpace (OneCAD Simulation): the fork's name in the drafted title.
|
||||
title = match crash.and_then(|c| c.get("kind")).and_then(Value::as_str) {
|
||||
Some("unclean_exit") => "FieldCraft closed unexpectedly".to_string(),
|
||||
Some("unclean_exit") => "OneCAD Simulation closed unexpectedly".to_string(),
|
||||
Some(_) => "Internal error".to_string(),
|
||||
None => match input.observed.trim().lines().next().filter(|l| !l.is_empty()) {
|
||||
Some(line) => format!("Bug: {}", line.chars().take(100).collect::<String>()),
|
||||
@@ -224,14 +227,16 @@ pub fn draft(input: &Input, version: &str) -> Draft {
|
||||
} else {
|
||||
let text = serde_json::to_string_pretty(script).unwrap_or_default();
|
||||
evidence.push_str(&format!(
|
||||
"\nThe session is too long for this form: FieldCraft saved it as `{SESSION_FILE}` and copied it to the clipboard. Attach the file here (drag it in) or paste it.\n"
|
||||
// OneBSpace (OneCAD Simulation): the fork's name in the evidence text.
|
||||
"\nThe session is too long for this form: OneCAD Simulation saved it as `{SESSION_FILE}` and copied it to the clipboard. Attach the file here (drag it in) or paste it.\n"
|
||||
));
|
||||
attachments.insert(0, Attachment { name: SESSION_FILE.into(), bytes: text.clone().into_bytes(), what: "the session's commands".into() });
|
||||
clipboard = Some(text);
|
||||
}
|
||||
}
|
||||
if model.is_some() {
|
||||
evidence.push_str(&format!("\nThe model is attached as `{MODEL_FILE}` (drag it in from the folder FieldCraft saved it to).\n"));
|
||||
// OneBSpace (OneCAD Simulation): the fork's name in the evidence text.
|
||||
evidence.push_str(&format!("\nThe model is attached as `{MODEL_FILE}` (drag it in from the folder OneCAD Simulation saved it to).\n"));
|
||||
}
|
||||
if url.is_empty() || model.is_some() {
|
||||
let mut f = fields(evidence.clone());
|
||||
|
||||
@@ -43,7 +43,9 @@ pub const CRASH_REPORTS_DELETE: CommandSpec = CommandSpec {
|
||||
pub const BUG_REPORT: CommandSpec = CommandSpec {
|
||||
id: "diagnostics.bug_report",
|
||||
label: "Report a Bug",
|
||||
params: r#"{"title"?: "…", "observed"?: "what happened", "crash"?: "<crash report id>", "share_session"?: false, "include_model"?: false} — drafts a GitHub bug report: the issue link (the bug form filled with the version, the OS, what happened and, for a crash, where), and the files to attach. Only with share_session does it carry the model's commands, and only with include_model as well the model file. Nothing is sent: the desktop app's Help › Report a Bug shows the draft and opens the link when the user asks"#,
|
||||
// OneBSpace (OneCAD Simulation): the draft stays local — no GitHub issue link is opened;
|
||||
// the form's Copy report puts the report on the clipboard and saves attachments to a folder.
|
||||
params: r#"{"title"?: "…", "observed"?: "what happened", "crash"?: "<crash report id>", "share_session"?: false, "include_model"?: false} — drafts a bug report that stays in the workspace: the version, the OS, what happened and, for a crash, where, and the files to attach. Only with share_session does it carry the model's commands, and only with include_model as well the model file. Nothing is sent: the form's Copy report copies the report to the clipboard and saves the attachments to a local folder"#,
|
||||
form: Some(super::forms::BUG_REPORT),
|
||||
kind: CommandKind::Session,
|
||||
requires: &[],
|
||||
|
||||
@@ -15,7 +15,8 @@ use crate::{CommandKind, CommandSpec, EngineError, Result, Session};
|
||||
pub const CHECK: CommandSpec = CommandSpec {
|
||||
id: "app.update.check",
|
||||
label: "Check for Updates",
|
||||
params: r#"{} — asks GitHub Releases for the latest published FieldCraft release and compares it with this version: current, latest, newer, url (its page and release notes), published, signed (whether it can be verified and installed from the app) and asset (the file this install would download; null when it cannot update itself). Reports only: nothing is downloaded or installed. Desktop app and fieldcraft-cli only"#,
|
||||
// OneBSpace (OneCAD Simulation): the fork's name in the palette help text (desktop-only).
|
||||
params: r#"{} — asks GitHub Releases for the latest published OneCAD Simulation release and compares it with this version: current, latest, newer, url (its page and release notes), published, signed (whether it can be verified and installed from the app) and asset (the file this install would download; null when it cannot update itself). Reports only: nothing is downloaded or installed. Desktop app and fieldcraft-cli only"#,
|
||||
form: Some(&[]),
|
||||
kind: CommandKind::Session,
|
||||
requires: &[],
|
||||
|
||||
@@ -493,7 +493,8 @@ fn hook(info: &std::panic::PanicHookInfo<'_>) -> bool {
|
||||
// Outside any command: what the journal knows has to do.
|
||||
let extra = from_journal(read_live_journal(state), None);
|
||||
if let Some(id) = write_report(state, "panic", Some(&p), extra) {
|
||||
eprintln!("FieldCraft: internal error; crash report {}", state.dir.join(&id).display());
|
||||
// OneBSpace (OneCAD Simulation): the fork's name on the console.
|
||||
eprintln!("OneCAD Simulation: internal error; crash report {}", state.dir.join(&id).display());
|
||||
if let Ok(mut j) = state.journal.try_lock() {
|
||||
j.record(&json!({ "reported": id }));
|
||||
}
|
||||
@@ -890,7 +891,9 @@ fn unclean_exit(dir: &Path, build: &Build, journal: &Path) {
|
||||
let p = match &native {
|
||||
Some(n) => native_panic(n, &was, &when, &during, &what),
|
||||
None => Panic {
|
||||
message: format!("FieldCraft {was} (started {when}) ended without a clean exit {during}"),
|
||||
// OneBSpace (OneCAD Simulation): the fork's name in the crash message (shown in the
|
||||
// crash question and in the report the user copies).
|
||||
message: format!("OneCAD Simulation {was} (started {when}) ended without a clean exit {during}"),
|
||||
location: match (&starting, &doing) {
|
||||
(Some((p, _)), _) => format!("unclean exit during startup: {p}"),
|
||||
(None, c) => format!("unclean exit in {}", c.as_deref().unwrap_or("(between commands)")),
|
||||
@@ -958,7 +961,8 @@ fn native_panic(native: &Value, was: &str, when: &str, during: &str, what: &str)
|
||||
backtrace.push(format!("on thread {t}"));
|
||||
}
|
||||
Panic {
|
||||
message: format!("FieldCraft {was} (started {when}) crashed with {name} ({code}) in {at} {during}"),
|
||||
// OneBSpace (OneCAD Simulation): the fork's name in the native-crash message.
|
||||
message: format!("OneCAD Simulation {was} (started {when}) crashed with {name} ({code}) in {at} {during}"),
|
||||
location: format!("native exception in {at}"),
|
||||
thread: native.get("thread").and_then(Value::as_u64).map_or_else(|| "(unknown)".into(), |t| format!("native thread {t}")),
|
||||
backtrace,
|
||||
|
||||
Reference in new issue
Block a user