Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .superset/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ print_summary() {
[ ${#FAILED_STEPS[@]} -eq 0 ]
}

# ============================================================
# Step 1: Load environment variables
# ============================================================
step_load_env() {
echo "📂 Loading environment variables..."

Expand All @@ -79,9 +76,6 @@ step_load_env() {
return 0
}

# ============================================================
# Step 2: Check dependencies
# ============================================================
step_check_dependencies() {
echo "🔍 Checking dependencies..."
local missing=()
Expand Down Expand Up @@ -114,9 +108,6 @@ step_check_dependencies() {
return 0
}

# ============================================================
# Step 3: Install dependencies
# ============================================================
step_install_dependencies() {
echo "📥 Installing dependencies..."

Expand All @@ -134,9 +125,6 @@ step_install_dependencies() {
return 0
}

# ============================================================
# Step 4: Setup Neon branch
# ============================================================
step_setup_neon_branch() {
echo "🗄️ Setting up Neon branch..."

Expand Down Expand Up @@ -201,9 +189,6 @@ step_setup_neon_branch() {
return 0
}

# ============================================================
# Step 5: Start Electric SQL container
# ============================================================
step_start_electric() {
echo "⚡ Starting Electric SQL container..."

Expand Down Expand Up @@ -271,9 +256,6 @@ step_start_electric() {
return 0
}

# ============================================================
# Step 6: Write .env file
# ============================================================
step_write_env() {
echo "📝 Writing .env file..."

Expand Down Expand Up @@ -322,9 +304,6 @@ step_write_env() {
return 0
}

# ============================================================
# Main execution
# ============================================================
main() {
echo "🚀 Setting up Superset workspace..."
echo ""
Expand Down
15 changes: 0 additions & 15 deletions .superset/teardown.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ print_summary() {
[ ${#FAILED_STEPS[@]} -eq 0 ]
}

# ============================================================
# Step 1: Load environment variables
# ============================================================
step_load_env() {
echo "📂 Loading environment variables..."

Expand All @@ -74,9 +71,6 @@ step_load_env() {
return 0
}

# ============================================================
# Step 2: Check dependencies
# ============================================================
step_check_dependencies() {
echo "🔍 Checking dependencies..."
local missing=()
Expand All @@ -101,9 +95,6 @@ step_check_dependencies() {
return 0
}

# ============================================================
# Step 3: Stop Electric SQL container
# ============================================================
step_stop_electric() {
echo "⚡ Stopping Electric SQL container..."

Expand Down Expand Up @@ -133,9 +124,6 @@ step_stop_electric() {
return 0
}

# ============================================================
# Step 4: Delete Neon branch
# ============================================================
step_delete_neon_branch() {
echo "🗄️ Deleting Neon branch..."

Expand Down Expand Up @@ -167,9 +155,6 @@ step_delete_neon_branch() {
return 0
}

# ============================================================
# Main execution
# ============================================================
main() {
echo "🧹 Tearing down Superset workspace..."
echo ""
Expand Down
1 change: 0 additions & 1 deletion apps/api/src/app/api/integrations/linear/callback/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ export async function GET(request: Request) {
});
} catch (error) {
console.error("Failed to queue initial sync job:", error);
// Connection saved successfully, just sync failed - redirect with warning
return Response.redirect(
`${env.NEXT_PUBLIC_WEB_URL}/integrations/linear?warning=sync_queued_failed`,
);
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/app/api/integrations/linear/webhook/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export async function POST(request: Request) {
provider: "linear",
eventId: `${payload.organizationId}-${payload.webhookTimestamp}`,
eventType: `${payload.type}.${payload.action}`,
payload: payload as unknown as Record<string, unknown>,
payload,
status: "pending",
})
.returning();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,19 @@ import type { Terminal } from "@xterm/xterm";
/**
* Registers parser hooks to suppress terminal query responses from being displayed.
*
* When programs query terminal capabilities (DA1, DA2, CPR, etc.), the terminal
* responds with escape sequences. These responses should be handled internally,
* not displayed as visible text. xterm.js's parser hooks let us intercept and
* suppress these sequences at the display layer.
* These handlers intercept specific response-only sequences that should not appear
* as visible text. We only suppress sequences where the response has a DIFFERENT
* format than the query, ensuring we don't break terminal functionality.
*
* SAFE to suppress (response-only, query uses different format):
* - CSI R: CPR response (query is CSI 6n)
* - CSI I/O: Focus reports (no query, just mode enable)
* - CSI $y: Mode report (query is CSI $p)
*
* NOT suppressed (would break queries/commands):
* - CSI c: DA query AND response both end in 'c'
* - CSI t: Window query AND response both end in 't'
* - OSC colors: Set command AND response have same format
*
* @param terminal - The xterm.js Terminal instance
* @returns Cleanup function to dispose all registered handlers
Expand All @@ -15,38 +24,26 @@ export function suppressQueryResponses(terminal: Terminal): () => void {
const disposables: { dispose: () => void }[] = [];
const parser = terminal.parser;

// CSI sequences ending in 'c' - Device Attributes responses
// DA1: ESC[?1;2c (primary device attributes)
// DA2: ESC[>0;276;0c (secondary device attributes)
// Also handles ESC[0;276;0c (without ? or > prefix)
disposables.push(parser.registerCsiHandler({ final: "c" }, () => true));

// CSI sequences ending in 'R' - Cursor Position Report
// CPR: ESC[24;1R (row;column)
// CSI sequences ending in 'R' - Cursor Position Report (SAFE)
// Query: ESC[6n (ends in 'n'), Response: ESC[24;1R (ends in 'R')
// Different final bytes, so suppressing 'R' only catches responses
disposables.push(parser.registerCsiHandler({ final: "R" }, () => true));

// CSI sequences ending in 'y' with '$' intermediate - Mode Reports
// DECRPM: ESC[?1;2$y (private mode report)
// Standard mode report: ESC[12;2$y
// CSI sequences ending in 'I' - Focus In report (SAFE)
// No query - this is sent when terminal gains focus (mode 1004)
disposables.push(parser.registerCsiHandler({ final: "I" }, () => true));

// CSI sequences ending in 'O' - Focus Out report (SAFE)
// No query - this is sent when terminal loses focus (mode 1004)
disposables.push(parser.registerCsiHandler({ final: "O" }, () => true));

// CSI sequences ending in 'y' with '$' intermediate - Mode Reports (SAFE)
// Query: ESC[?Ps$p (ends in 'p'), Response: ESC[?Ps;Pm$y (ends in 'y')
// Different final bytes, so suppressing '$y' only catches responses
disposables.push(
parser.registerCsiHandler({ intermediates: "$", final: "y" }, () => {
return true; // Suppress - don't display
}),
parser.registerCsiHandler({ intermediates: "$", final: "y" }, () => true),
);

// OSC 10-19 - Color query responses
// OSC 10: foreground color (ESC]10;rgb:ffff/ffff/ffff BEL)
// OSC 11: background color
// OSC 12: cursor color
// etc.
for (let i = 10; i <= 19; i++) {
disposables.push(
parser.registerOscHandler(i, () => {
return true; // Suppress - don't display
}),
);
}

return () => {
for (const disposable of disposables) {
disposable.dispose();
Expand Down