mirror of
https://github.com/penpot/penpot.git
synced 2026-10-02 16:56:16 +00:00
* 🎉 Add multi-file session routing to the MCP server Session routing: - Track each user's Penpot connections by session ID. - Dispatch explicit sessions directly; otherwise discover the sole session. - Return a retryable error when discovery fails or is incomplete. Plugin and tools: - Initialize connections with a fresh session ID and file metadata. - Share the optional sessionId schema and place it last in tool inputs. Validation: - 84 tests, server type checking, and MCP formatting checks pass. - Disable test logging to avoid the logging worker shutdown hang. AI-assisted-by: gpt-6 * 🎉 Support independent MCP connections - Require explicit connection intent for each integrated workspace. - Derive short session IDs from the Penpot app instance and file. - Show and copy session IDs in the MCP menu and standalone plugin UI. - Stop stale callbacks and reconnect attempts after disconnect. Validate with frontend and plugin tests, type checking, live multi-tab checks, and standalone UI checks with a simulated connection. Server tests pass with --test-force-exit; the normal runner can hang on shutdown. AI-assisted-by: gpt-6 * 📚 Document multi-file MCP sessions - Explain independent connections, session selection, and copying IDs. - Describe session ID lifetimes for integrated and standalone plugins. - Correct browser focus, connection, and recovery guidance. Validate with the documentation site build and diff checks. AI-assisted-by: gpt-6 * ✨ Change behavior on session ID duplication * ✨ Open MCP toolbar menu on hover and match menu style --------- Co-authored-by: alonso.torres <alonso.torres@kaleidos.net> Co-authored-by: elhombretecla <delacruzgarciajuan@gmail.com>
202 lines
5.0 KiB
CSS
202 lines
5.0 KiB
CSS
@import "@penpot/plugin-styles/styles.css";
|
|
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.plugin-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--spacing-8);
|
|
padding: var(--spacing-16) var(--spacing-8);
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
/* ── Status pill ─────────────────────────────────────────────────── */
|
|
|
|
.status-pill {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: var(--spacing-8);
|
|
padding: var(--spacing-8) var(--spacing-16);
|
|
border-radius: var(--spacing-8);
|
|
border: 1px solid var(--background-quaternary);
|
|
color: var(--foreground-secondary);
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.status-pill[data-status="connected"] {
|
|
border-color: var(--accent-primary);
|
|
color: var(--accent-primary);
|
|
}
|
|
|
|
.status-pill[data-status="disconnected"],
|
|
.status-pill[data-status="error"] {
|
|
border-color: var(--error-500);
|
|
color: var(--error-500);
|
|
}
|
|
|
|
.status-dot {
|
|
display: inline-block;
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
background-color: currentColor;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* ── Collapsible section ─────────────────────────────────────────── */
|
|
|
|
.collapsible-section {
|
|
border: 1px solid var(--background-quaternary);
|
|
border-radius: var(--spacing-8);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.collapsible-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--spacing-8);
|
|
padding: var(--spacing-8) var(--spacing-12);
|
|
cursor: pointer;
|
|
color: var(--foreground-secondary);
|
|
list-style: none;
|
|
user-select: none;
|
|
}
|
|
|
|
.collapsible-header::-webkit-details-marker {
|
|
display: none;
|
|
}
|
|
|
|
.collapsible-arrow {
|
|
flex-shrink: 0;
|
|
transition: transform 0.2s ease;
|
|
}
|
|
|
|
details[open] > .collapsible-header .collapsible-arrow {
|
|
transform: rotate(90deg);
|
|
}
|
|
|
|
.collapsible-body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--spacing-4);
|
|
padding: var(--spacing-4) var(--spacing-12) var(--spacing-12);
|
|
border-top: 1px solid var(--background-quaternary);
|
|
}
|
|
|
|
/* ── Tool section ────────────────────────────────────────────────── */
|
|
|
|
.tool-label {
|
|
color: var(--foreground-secondary);
|
|
}
|
|
|
|
.tool-display {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--spacing-8);
|
|
padding: var(--spacing-8) var(--spacing-12);
|
|
border-radius: var(--spacing-8);
|
|
background-color: var(--background-tertiary);
|
|
color: var(--foreground-secondary);
|
|
min-height: 32px;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.tool-icon {
|
|
flex-shrink: 0;
|
|
opacity: 0.7;
|
|
}
|
|
|
|
/* ── Code section ────────────────────────────────────────────────── */
|
|
|
|
.code-section-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-top: var(--spacing-8);
|
|
}
|
|
|
|
.code-textarea {
|
|
width: 100%;
|
|
height: 100px;
|
|
resize: vertical;
|
|
padding: var(--spacing-8) var(--spacing-12);
|
|
border-radius: var(--spacing-8);
|
|
border: 1px solid var(--background-quaternary);
|
|
background-color: var(--background-tertiary);
|
|
color: var(--foreground-secondary);
|
|
font-family: monospace;
|
|
font-size: 11px;
|
|
line-height: 1.5;
|
|
box-sizing: border-box;
|
|
outline: none;
|
|
}
|
|
|
|
.copy-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 24px;
|
|
height: 24px;
|
|
padding: 0;
|
|
border: 1px solid var(--background-quaternary);
|
|
border-radius: var(--spacing-4);
|
|
background-color: transparent;
|
|
color: var(--foreground-secondary);
|
|
cursor: pointer;
|
|
flex-shrink: 0;
|
|
transition:
|
|
background-color 0.15s ease,
|
|
color 0.15s ease;
|
|
}
|
|
|
|
.copy-btn:hover:not(:disabled) {
|
|
background-color: var(--background-tertiary);
|
|
color: var(--foreground-primary);
|
|
}
|
|
|
|
.copy-btn:disabled {
|
|
opacity: 0.4;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.copy-btn.copied {
|
|
color: var(--accent-primary);
|
|
border-color: var(--accent-primary);
|
|
}
|
|
|
|
/* ── Version warning ─────────────────────────────────────────────── */
|
|
|
|
.version-warning {
|
|
align-items: flex-start;
|
|
padding: var(--spacing-8) var(--spacing-12);
|
|
border-radius: var(--spacing-8);
|
|
border: 1px solid var(--warning-500, #f59e0b);
|
|
color: var(--warning-500, #f59e0b);
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
/* ── Action buttons ──────────────────────────────────────────────── */
|
|
|
|
#connect-btn,
|
|
#disconnect-btn {
|
|
width: 100%;
|
|
margin-top: var(--spacing-4);
|
|
}
|
|
|
|
.session-id-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--spacing-8);
|
|
}
|
|
|
|
#session-id-value {
|
|
flex: 1;
|
|
user-select: all;
|
|
}
|