Spaces:
Running
Running
Commit History
-
perf(deploy): scope TS connection to demo DB + monthly-rotating database (250s -> <1s table imports)
Root cause of the ~250s-per-call table TML imports (found 2026-08-10, corrects the July "server-side, not reducible" conclusion): ThoughtSpot table import scans all external metadata VISIBLE TO THE CONNECTION. Our connections had no database property, so every import scanned ~507 Snowflake DBs. Measured on the same instance with the same trivial table: unscoped 246s, scoped to DEMOBUILD (1,003 schemas of demo debris) 33s, scoped to a fresh tiny DB 0.7s. Prod secloud showed identical ~250s unscoped — never instance-specific. - thoughtspot_deployer: create_connection_tml/create_connection_with_reconcile now REQUIRE a database and emit a `database` property in the connection TML. - snowflake_auth: get_demo_database() -> <SNOWFLAKE_DATABASE>_<YYYY_MM> (memoized per process); ensure_demo_database() creates it on connect. Session params + cdw_connector + env injection (supabase_client) all use the rotated DB so write and deploy paths agree. Admin setting stays the base name. - chat_…21ee86d
-
fix(mcp): durable payload logging with NO new table — reuse demo_history
The mcp_payloads approach was blocked on a table the anon key can't create (no DDL access), so durable capture never actually turned on and real runs kept rolling off (e.g. iPipeline run c93bc9f040f0 — gone after an HF container restart). Pivot log_mcp_payload() to the EXISTING demo_history table (anon key already writes it): rows tagged status='mcp_intake' with a sentinel user_email (so they never pollute a real user's history) and the full payload (brief + company/use_case/url/ ts_url/owner/run_id) in results. Verified end-to-end (insert + readback). Now every intake persists on deploy with zero setup — query: select * from demo_history where status='mcp_intake' order by created_at desc; Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>a0a8307 -
feat(mcp): durably persist full intake payload to Supabase (real logging)
Ephemeral stdout logging (~1 day) is not a system of record — it's why Jack's CopperPoint/Surescripts briefs were lost. Add durable capture: log_mcp_payload() in supabase_client inserts the full brief + metadata into an `mcp_payloads` table, called from build_demo_from_brief on receipt (before validation, so even rejected payloads are kept). Best-effort and non-raising — a persist failure never blocks or breaks a build (verified: with the table absent it returns False gracefully, PGRST205). Uses the existing anon-key client pattern. Requires a one-time table (anon key can't run DDL): create table if not exists public.mcp_payloads ( id bigint generated always as identity primary key, created_at timestamptz not null default now(), run_id text, company_name text, use_case text, company_url text, ts_url text, owner_email text, brief text, brief_len integer ); SQL-created tables have RLS off by default, so the anon key can write. Co-Authored-By: Claude Opus 4.8 <norepl…4b20a09
-
fix: polish onboarding invite defaults
mike boonecc01f82 -
fix: require email username for onboarding
mike boone167af05
-
feat: add temporary-password onboarding flow
mike booneece9b51
-
fix: settings save/load + vertical layout + line cascade
- supabase_client.py: load_gradio_settings now returns ALL saved keys, not just hardcoded defaults — fixes default_ts_env, default_data_size, share_with etc. silently dropping on load - Settings tab: all default fields now stacked vertically (no gr.Row) - Default Line is now a dropdown that cascades from Default Vertical, same as App tab behavior - Add new panel default keys to load_gradio_settings defaults dict Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>b525aea
-
feat: comprehensive logging + pipeline status cleanup
Logging: - session_logger: off/regular/verbose log levels + log_verbose() method - LOG_LEVEL admin setting (dropdown in Admin Settings UI) - populate stage logged to Supabase via legitdata_bridge session_logger param - liveboard stage logged to Supabase via liveboard_creator session_logger param - thoughtspot deploy_all accepts session_logger; logs auth/tables/model as regular events - verbose sub-steps: auth start, connection start, liveboard start - exception handler in deploy_all logs to Supabase Stability: - Thread timeouts: LegitData 15min, ThoughtSpot 30min hard limits - Heartbeat every 60s during both thread waits (verbose) - Research cache filename fix: strip newlines, truncate to 60 chars - Top-level pipeline exception: real error → Live Progress + Supabase, clean msg → user Pipeline status cleanup: - Research streaming tokens removed from phase_log entirely - All DEBUG log_feedback calls removed - Website access warning silenced from UI (goes to print/HF logs only) - log_pr…d4c98c6
-
feat: App/Chat tab split, Spotter Viz dual stories, Custom vertical, bug fixes
UI: - Rename Chat tab → App; split input into App (form) and Chat (freeform) sub-tabs - Remove quick action buttons (Start Research, Configure, Help) - Add Custom vertical option — disables Function dd, makes Context required - Context field renamed from "Additional context (optional)" → "Context" - Phase log timer now activates on Send + Enter, not just GO - GO button bypasses init confirmation dialog, goes straight to pipeline Spotter Viz Story: - Split into two sub-tabs: ThoughtSpot Story (matrix-driven) and AI Story (pure LLM) - New _generate_matrix_spotter_story() — builds from vertical×function KPIs/liveboard_questions - New _generate_ai_spotter_story() — pure LLM, no matrix constraints - New spotter_viz_story_matrix prompt in prompts.py Bug fixes: - NaN/Inf floats in LegitData population now replaced with NULL (fixes Snowflake 22018 errors) - TS auth key: KEY_VAR value is the key directly, not a pointer to another env var - Async pipeline plan added to sprint doc Co-Authored-…f87fe7f
-
cleanup: revert debug supabase import exception to ImportError
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>0c2ea33 -
debug: show real Supabase import error on HF Spaces
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>4cf104e
-
refactor: centralize LLM config and env-backed client setup
Create a single source of truth for model selection, provider routing, token policy, and API key loading so LLM updates no longer require multi-file edits. This also keeps runtime key sourcing in environment variables and normalizes legacy model aliases for compatibility. Made-with: Cursorcd91248
-
feat: login system, admin settings in Supabase, auth simplification
- Login gate: Gradio auth with PBKDF2 password hashing, UserManager in supabase_client.py - Admin settings: all secrets (TS, Snowflake, LLM keys) stored in Supabase under __admin__ key - get_admin_setting() replaces all os.getenv() for admin-managed values - Admin Settings tab for viewing/editing (admin-only visibility) - Migration script: scratch/migrate_env_to_supabase.py - Auth simplification: removed password auth entirely, trusted auth only - Renamed THOUGHTSPOT_SECRET_KEY -> THOUGHTSPOT_TRUSTED_AUTH_KEY - Removed authenticate_password(), ts_auth_method dropdown, ts_password field - Removed obsolete env vars: INITIAL_USER, USER_EMAIL, USE_MCP_LIVEBOARD, LIVEBOARD_METHOD - Added Regular Case naming style (State Id, Total Revenue) as default - Startup validation: validate_required_settings() blocks pipeline if settings missing - Prompt logger: logs all LLM calls with timing/tokens to logs/prompts/ - Batch test runner: tests/batch_runner.py with 8 test cases - Cherry-picked…1ab614e
-
Feb sprint: vertical×function matrix, structured outliers, unified prompts
- demo_personas.py: VERTICALS, FUNCTIONS, MATRIX_OVERRIDES dicts with get_use_case_config() and parse_use_case() - outlier_system.py: OutlierPattern/OutlierConfig dataclasses, OUTLIER_CONFIGS with Retail Sales patterns - prompts.py: build_prompt() composable system, STAGE_TEMPLATES for research/ddl/liveboard/demo_notes - chat_interface.py: research cache fix (absolute paths), auto-use cache, DDL failure guard - liveboard_creator.py: _clean_viz_title() helper, revert MCP to working stdio/npx approach - smart_data_adjuster.py: multi-LLM support (Claude + OpenAI) via _call_llm() - thoughtspot_deployer.py: fix model validation by keeping FK/PK columns, tag debug logging - CLAUDE.md/PROJECT_STATUS.md: simplify liveboard docs to unified process - demo_prep.py: remove unsupported max_lines from gr.Code() Co-authored-by: Cursor <cursoragent@cursor.com>3b2cd7b
-
MCP bearer auth, HYBRID liveboards, universal context prompts
Major changes: - MCP liveboard creation now uses bearer auth with trusted token (same org) - HYBRID method: MCP creates liveboard, TML post-processes for KPIs/groups - Universal context prompt for all use cases (not just generic) - User override section in DDL prompts takes precedence over defaults - Dynamic date generation in LegitData (relative to today, not hardcoded 2024) - Self-join skip in model creation (e.g., EMPLOYEES.MANAGER_ID) - Broken pipe handling for long-running operations New files: - legitdata_bridge.py: AI-powered data generation integration - outlier_system.py: SQL UPDATE generation for data story patterns Use case framework: - Expanded demo_personas.py with outlier patterns per use case - KPI questions use "[measure] weekly/monthly" format for sparklines Co-authored-by: Cursor <cursoragent@cursor.com>f10a9f5
-
Merge feature/naming-convention-fix into feature/chat-interface
a2a4e6d -
Features: Add tag support, improve error handling, MCP improvements
- Add tag_name parameter to deployment flow - Improve population retry logic with numbered options - Add MCP package to requirements - Update CLAUDE.md with dual method documentation - File organization: move docs to dev_notes/, create scratch/ folder - Add .cursorrules for file organization - Add data adjuster modules for runtime data modificationb91d31b
-
Fix chat interface: Enter key, DDL display, and pre-filled responses
af73fd7
-
fix: Implement consistent naming convention across all objects
- Replace verbose DM{YYMMDD}_{HHMMSS}_{COMPANY}_{USECASE} format - New format: {PREFIX}_{DDMICROS}_{objtype} (prefix optional) - Extract base timestamp from schema to ensure consistency across objects - Add naming_prefix field to UI settings (saved in Supabase) - Fix DDL transaction commit in cdw_connector.py:153 - Add USE SCHEMA command to population scripts for proper context - Remove confusing "per table" timing messages, show batch call times only - Enhance Liveboard error handling with detailed exception catching Key fixes: - Schema/connection/model now use same base timestamp - Tables persist in Snowflake (commit added) - Population scripts set proper schema context - Clean performance metrics display 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>b2a3e22
-
feat: Add settings system and multi-LLM support
Mike Boone +1: ClaudeSettings System (Supabase-backed): - Created supabase_client.py for persistent settings storage - Organized settings into 4 tabs: Default Settings, Demo Settings, Admin, AI Settings - Auto-loads settings on startup (uses INITIAL_USER from .env) - Two-way sync between settings and main form fields - All 14 settings save/load correctly with proper type conversion Multi-LLM Support: - Rewrote MultiLLMResearcher to support OpenAI, Anthropic, and Google - Working providers: OpenAI (gpt-4o, gpt-4o-mini), Anthropic (claude-sonnet-4.5) - Google Gemini support added but needs debugging - Unified request method with provider-specific streaming Logging System: - Added demo_logger.py for comprehensive session logging - Tracks use case, company, LLM model, DDL, errors to files and Supabase 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>e2453c7