diff --git a/apps/desktop/src/App.vue b/apps/desktop/src/App.vue
index 5654dffb51..3a2f3e4ff5 100644
--- a/apps/desktop/src/App.vue
+++ b/apps/desktop/src/App.vue
@@ -341,6 +341,12 @@ const activeConnection = computed(() => {
return tab ? connectionStore.getConfig(tab.connectionId) : undefined;
});
+// Oracle manual-mode indicator derived from the RESOLVED database type (an
+// Oracle connection uses the agent runtime but reports db_type "oracle"), so
+// the toolbar's Commit/Rollback visibility can apply the Oracle dirty-state rule
+// without inferring Oracle from the raw transport type.
+const isOracleManualTransaction = computed(() => effectiveDatabaseTypeForConnection(activeConnection.value) === "oracle" && (activeTab.value?.autoCommit ?? true) === false);
+
function updateAgentDriverUpdateCount(count: number) {
if (!settingsStore.editorSettings.updateNotificationsEnabled) {
agentDriverUpdateCount.value = 0;
@@ -3039,6 +3045,8 @@ onUnmounted(() => {
:auto-commit="activeTab.autoCommit ?? true"
:txn-session-id="activeTab?.txnSessionId"
:txn-auto-rolled-back="activeTab?.txnAutoRolledBack"
+ :oracle-txn-possibly-dirty="activeTab?.oracleTxnPossiblyDirty"
+ :is-oracle-manual-transaction="isOracleManualTransaction"
@update:explain-mode="(m: 'explain' | 'autotrace') => (explainMode = m)"
@update:block-dangerous-redis-commands="(v: boolean) => (blockDangerousRedisCommands = v)"
@update:auto-commit="
diff --git a/apps/desktop/src/components/layout/EditorToolbar.vue b/apps/desktop/src/components/layout/EditorToolbar.vue
index 8995f44761..6db03688a6 100644
--- a/apps/desktop/src/components/layout/EditorToolbar.vue
+++ b/apps/desktop/src/components/layout/EditorToolbar.vue
@@ -34,6 +34,12 @@ const props = defineProps<{
autoCommit?: boolean;
txnSessionId?: string;
txnAutoRolledBack?: boolean;
+ /** Oracle-only: whether the current manual Oracle session executed a statement
+ * DBX cannot prove read-only. Commit/Rollback are hidden while false. */
+ oracleTxnPossiblyDirty?: boolean;
+ /** Oracle manual mode derived from the resolved database type (not raw
+ * db_type, which can be the agent transport). */
+ isOracleManualTransaction?: boolean;
}>();
const emit = defineEmits<{
@@ -153,6 +159,12 @@ function toggleSqlSemanticDiagnostics() {
const isTransactionActive = computed(() => !!props.txnSessionId);
const isManualTransactionMode = computed(() => props.autoCommit === false || isTransactionActive.value);
const transactionModeBadge = computed(() => (isManualTransactionMode.value ? "M" : "A"));
+// Oracle manual mode hides Commit/Rollback while the session is clean (no
+// unproven statement executed). Every other database keeps the existing rule.
+const showTxnActions = computed(() => {
+ if (props.isOracleManualTransaction) return isTransactionActive.value && props.oracleTxnPossiblyDirty === true;
+ return isTransactionActive.value;
+});
const transactionTooltip = computed(() => {
const isAgent = (props.activeConnection?.db_type as string) === "agent";
const isManual = isManualTransactionMode.value;
@@ -430,8 +442,8 @@ async function changeCatalog(selectedCatalog: string) {
{{ transactionTooltip }}
-
-
+
+
-
-
+
+