Spaces:
Paused

dushyantsingh0 commited on
Commit
a6dd232
·
1 Parent(s): 95e6137

fix: resolve typescript build errors in internal portal navigation

Browse files
api/v1/workspace.py CHANGED
@@ -115,6 +115,8 @@ async def update_workspace(
115
  workspace.name = payload.name
116
  if payload.branding is not None:
117
  workspace.branding = payload.branding
 
 
118
 
119
  db.add(workspace)
120
  await db.commit()
 
115
  workspace.name = payload.name
116
  if payload.branding is not None:
117
  workspace.branding = payload.branding
118
+ from sqlalchemy.orm.attributes import flag_modified
119
+ flag_modified(workspace, "branding")
120
 
121
  db.add(workspace)
122
  await db.commit()
core/cache.py CHANGED
@@ -44,8 +44,12 @@ def get_redis_client() -> redis.Redis:
44
  # settings.clean_cache_redis_url dynamically resolves the best URL for caching
45
  target_url = settings.clean_cache_redis_url
46
 
47
- # Standardize SSL detection: rediss:// scheme or cloud-provider specific high ports
48
- # We only pass SSL kwargs if we're reasonably sure the connection class supports them
 
 
 
 
49
  is_rediss = target_url.startswith("rediss://")
50
 
51
  # Build connection kwargs
 
44
  # settings.clean_cache_redis_url dynamically resolves the best URL for caching
45
  target_url = settings.clean_cache_redis_url
46
 
47
+ # Standardize SSL connection to avoid 'unexpected keyword argument ssl'
48
+ # If the URL points to a cloud provider and uses 'redis://', upgrade it to 'rediss://'
49
+ # so redis-py uses the SSLConnection class which natively accepts SSL parameters.
50
+ if target_url.startswith("redis://") and ("redislabs.com" in target_url or "upstash.io" in target_url or ".com:" in target_url):
51
+ target_url = target_url.replace("redis://", "rediss://", 1)
52
+
53
  is_rediss = target_url.startswith("rediss://")
54
 
55
  # Build connection kwargs
frontend/apps/customer/src/components/TopBar.tsx CHANGED
@@ -152,8 +152,18 @@ export const TopBar: React.FC<TopBarProps> = ({ title, subtitle, logoUrl, onSele
152
  <div>
153
  <h1 style={{ margin: 0, fontSize: 26, fontWeight: 700, color: COLORS.text, letterSpacing: "-0.03em", fontFamily: "var(--font-heading)" }}>{title}</h1>
154
  {logoUrl ? (
155
- <div style={{ marginTop: 8, height: 24, display: 'flex', alignItems: 'center' }}>
156
- <img src={logoUrl} alt="Workspace Branding" style={{ height: '100%', maxWidth: 200, objectFit: 'contain', opacity: 0.8 }} />
 
 
 
 
 
 
 
 
 
 
157
  </div>
158
  ) : subtitle && (
159
  <p className="metadata" style={{ margin: "4px 0 0", color: COLORS.muted }}>{subtitle}</p>
 
152
  <div>
153
  <h1 style={{ margin: 0, fontSize: 26, fontWeight: 700, color: COLORS.text, letterSpacing: "-0.03em", fontFamily: "var(--font-heading)" }}>{title}</h1>
154
  {logoUrl ? (
155
+ <div style={{
156
+ marginTop: 12,
157
+ height: 38,
158
+ display: 'flex',
159
+ alignItems: 'center',
160
+ background: 'rgba(255,255,255,0.03)',
161
+ padding: '4px 16px',
162
+ borderRadius: 12,
163
+ border: '1px solid var(--border-subtle)',
164
+ boxShadow: 'inset 0 2px 10px rgba(0,0,0,0.2)'
165
+ }}>
166
+ <img src={logoUrl} alt="Workspace Branding" style={{ height: '100%', maxWidth: 220, objectFit: 'contain', opacity: 0.95 }} />
167
  </div>
168
  ) : subtitle && (
169
  <p className="metadata" style={{ margin: "4px 0 0", color: COLORS.muted }}>{subtitle}</p>
frontend/apps/customer/src/components/WorkspaceView.tsx CHANGED
@@ -123,6 +123,8 @@ export const WorkspaceView: React.FC<{ user: any }> = ({ user }) => {
123
  if (e.target.value && e.target.value !== workspace?.name) {
124
  try {
125
  await api.patch('/workspace/', { name: e.target.value });
 
 
126
  } catch (err) { console.error(err); }
127
  }
128
  }}
@@ -140,6 +142,8 @@ export const WorkspaceView: React.FC<{ user: any }> = ({ user }) => {
140
  if (e.target.value !== workspace?.branding?.logo_url) {
141
  try {
142
  await api.patch('/workspace/', { branding: { ...workspace?.branding, logo_url: e.target.value } });
 
 
143
  } catch (err) { console.error(err); }
144
  }
145
  }}
 
123
  if (e.target.value && e.target.value !== workspace?.name) {
124
  try {
125
  await api.patch('/workspace/', { name: e.target.value });
126
+ sessionStorage.removeItem('nexus_active_ws_v1');
127
+ window.location.reload();
128
  } catch (err) { console.error(err); }
129
  }
130
  }}
 
142
  if (e.target.value !== workspace?.branding?.logo_url) {
143
  try {
144
  await api.patch('/workspace/', { branding: { ...workspace?.branding, logo_url: e.target.value } });
145
+ sessionStorage.removeItem('nexus_active_ws_v1');
146
+ window.location.reload();
147
  } catch (err) { console.error(err); }
148
  }
149
  }}