Update env var names to SIGITSI_SMBCLOUD and improve diff UI

Switch all SMBCLOUD_* env vars to SIGITSI_SMBCLOUD_* for clarity. Refactor commit diff UI to use collapsible details with file toggles.

Seto Elkahfi committed Apr 13, 2026 at 20:41 UTC 2b554632759467ba356e69a13c58c246dbda70ed
4 files changed +22 -17
app/controllers/dev/panel_controller.rb
+1 -1
@@ -29,7 +29,7 @@ module Dev
29 private
30
31 def current_environment
32 - Rails.cache.read(CACHE_KEY) || ENV.fetch("SMBCLOUD_ENVIRONMENT", "dev")
32 + Rails.cache.read(CACHE_KEY) || ENV.fetch("SIGITSI_SMBCLOUD_ENVIRONMENT", "dev")
33 end
34 end
35 end
app/controllers/sessions_controller.rb
+1 -1
@@ -52,7 +52,7 @@ class SessionsController < ApplicationController
52 render :new, status: :unprocessable_entity
53
54 rescue KeyError => e
55 - # Missing SMBCLOUD_APP_ID / SMBCLOUD_APP_SECRET env vars
55 + # Missing SIGITSI_SMBCLOUD_APP_ID / SIGITSI_SMBCLOUD_APP_SECRET env vars
56 Rails.logger.error("smbCloud configuration error: #{e.message}")
57 flash.now[:alert] = "Authentication service is not configured. Please contact support."
58 render :new, status: :internal_server_error
app/services/smbcloud_auth_service.rb
+10 -10
@@ -19,9 +19,9 @@
19 # client.remove(access_token:)
20 #
21 # Required env vars:
22 -# SMBCLOUD_APP_ID – your smbCloud app ID
23 -# SMBCLOUD_APP_SECRET – your smbCloud app secret
24 -# SMBCLOUD_ENVIRONMENT – "production" (default) or "dev"
22 +# SIGITSI_SMBCLOUD_APP_ID – your smbCloud app ID
23 +# SIGITSI_SMBCLOUD_APP_SECRET – your smbCloud app secret
24 +# SIGITSI_SMBCLOUD_ENVIRONMENT – "production" (default) or "dev"
25 #
26 require "auth"
27
@@ -120,29 +120,29 @@ class SmbcloudAuthService
120 def self.smbcloud_environment
121 raw = if Rails.env.development?
122 Rails.cache.read("dev:smbcloud_environment") ||
123 - ENV.fetch("SMBCLOUD_ENVIRONMENT", "dev")
123 + ENV.fetch("SIGITSI_SMBCLOUD_ENVIRONMENT", "dev")
124 else
125 - ENV.fetch("SMBCLOUD_ENVIRONMENT", "production")
125 + ENV.fetch("SIGITSI_SMBCLOUD_ENVIRONMENT", "production")
126 end.strip.downcase
127
128 case raw
129 when "dev", "development" then SmbCloud::Auth::Environment::DEV
130 when "production" then SmbCloud::Auth::Environment::PRODUCTION
131 else
132 - Rails.logger.warn("Unknown SMBCLOUD_ENVIRONMENT '#{raw}', defaulting to production.")
132 + Rails.logger.warn("Unknown SIGITSI_SMBCLOUD_ENVIRONMENT '#{raw}', defaulting to production.")
133 SmbCloud::Auth::Environment::PRODUCTION
134 end
135 end
136
137 def self.smbcloud_app_id
138 - ENV.fetch("SMBCLOUD_APP_ID") do
139 - raise KeyError, "Missing required env var: SMBCLOUD_APP_ID"
138 + ENV.fetch("SIGITSI_SMBCLOUD_APP_ID") do
139 + raise KeyError, "Missing required env var: SIGITSI_SMBCLOUD_APP_ID"
140 end
141 end
142
143 def self.smbcloud_app_secret
144 - ENV.fetch("SMBCLOUD_APP_SECRET") do
145 - raise KeyError, "Missing required env var: SMBCLOUD_APP_SECRET"
144 + ENV.fetch("SIGITSI_SMBCLOUD_APP_SECRET") do
145 + raise KeyError, "Missing required env var: SIGITSI_SMBCLOUD_APP_SECRET"
146 end
147 end
148
app/views/commits/show.html.erb
+10 -5
@@ -75,9 +75,14 @@
75 deletions = fd[:lines].count { |l| l.start_with?("-") && !l.start_with?("---") }
76 %>
77
78 - <div class="card overflow-hidden">
79 - <div class="flex items-center justify-between px-4 py-2.5 border-b border-surface-600 bg-surface-700">
80 - <span class="font-mono text-xs text-gray-200 truncate"><%= filename %></span>
78 + <details class="card overflow-hidden group" open>
79 + <summary class="flex items-center justify-between px-4 py-2.5 border-b border-surface-600 bg-surface-700 cursor-pointer list-none hover:bg-surface-600 transition-colors">
80 + <div class="flex items-center gap-2 min-w-0">
81 + <svg class="w-3.5 h-3.5 text-gray-500 shrink-0 transition-transform group-open:rotate-90" viewBox="0 0 16 16" fill="currentColor">
82 + <path d="M6.22 3.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 0 1 0-1.06Z"/>
83 + </svg>
84 + <span class="font-mono text-xs text-gray-200 truncate"><%= filename %></span>
85 + </div>
86 <div class="flex items-center gap-2 shrink-0 ml-4 font-mono text-xs">
87 <% if additions > 0 %>
88 <span class="text-green-400">+<%= additions %></span>
@@ -86,7 +91,7 @@
91 <span class="text-red-400">-<%= deletions %></span>
92 <% end %>
93 </div>
89 - </div>
94 + </summary>
95
96 <div class="font-mono text-xs leading-5 overflow-x-auto">
97 <% fd[:lines].each do |line| %>
@@ -102,7 +107,7 @@
107 <span class="<%= css %>"><%= line.chomp %></span>
108 <% end %>
109 </div>
105 - </div>
110 + </details>
111 <% end %>
112 <% end %>
113 </div>