task(A4.14): make v2 tool path the default (verified e2e without flag)
This commit is contained in:
@@ -17,6 +17,7 @@ import { logger } from '../utils/logger';
|
||||
import { CADDocument } from '../kernel/document/CADDocument';
|
||||
import { YjsDocument } from '../crdt/YjsDocument';
|
||||
import { setActiveDocument, getActiveDocument } from '../kernel/document/documentService';
|
||||
import { V2_TOOLS_ENABLED } from '../kernel/featureFlags';
|
||||
import { pluginRegistry } from '../plugins';
|
||||
|
||||
const CanvasArea: React.FC<CanvasAreaProps> = ({
|
||||
@@ -53,10 +54,9 @@ const CanvasArea: React.FC<CanvasAreaProps> = ({
|
||||
canvas, zoomPan, renderEngine, snapEngine, selectionEngine, spatialIndex, layerManager,
|
||||
);
|
||||
|
||||
// ── Task A2/A4: V2-Tool-Dispatcher hinter Feature-Flag ──
|
||||
// Flag VITE_TOOL_DISPATCHER=v2: aktiviert den InteractionDispatcher UND
|
||||
// verdrahtet ihn mit einem lokalen CADDocument + SelectionBridge (Task A4.1).
|
||||
if (import.meta.env.VITE_TOOL_DISPATCHER === 'v2') {
|
||||
// ── Task A2/A4.14: V2-Pfad ist seit Verifikation STANDARD — Opt-out via
|
||||
// VITE_TOOL_DISPATCHER=legacy. Siehe kernel/featureFlags.ts.
|
||||
if (V2_TOOLS_ENABLED) {
|
||||
const ydoc = new YjsDocument();
|
||||
ydoc.data.layers.set('layer-0', {
|
||||
id: 'layer-0', name: 'Standard', visible: true, locked: false,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import type { RibbonBarProps, RibbonTab } from '../types/ui.types';
|
||||
import { pluginRegistry } from '../plugins';
|
||||
import { V2_TOOLS_ENABLED } from '../kernel/featureFlags';
|
||||
|
||||
const tabs: Array<{ id: RibbonTab; label: string; svg: React.ReactNode }> = [
|
||||
{ id: 'start', label: 'Start', svg: <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg> },
|
||||
@@ -38,8 +39,8 @@ const RibbonBar: React.FC<RibbonBarProps> = ({
|
||||
</div>
|
||||
|
||||
<div className="ribbon-content" id="ribbon-content">
|
||||
{/* ===== V2 TOOLS (Task A4.13, nur bei aktivem Dispatcher-Flag) ===== */}
|
||||
{activeTab === 'canvas' && import.meta.env.VITE_TOOL_DISPATCHER === 'v2' && (
|
||||
{/* ===== V2 TOOLS (Task A4.13/A4.14: Standard aktiv — Opt-out via VITE_TOOL_DISPATCHER=legacy) ===== */}
|
||||
{activeTab === 'canvas' && V2_TOOLS_ENABLED && (
|
||||
<div style={{
|
||||
display: 'flex', flexWrap: 'wrap', gap: '6px', alignItems: 'center',
|
||||
padding: '8px 4px', width: '100%',
|
||||
@@ -51,6 +52,7 @@ const RibbonBar: React.FC<RibbonBarProps> = ({
|
||||
return (
|
||||
<button
|
||||
key={tool.manifest.id}
|
||||
data-v2tool={tool.manifest.id}
|
||||
title={tool.manifest.description ?? tool.manifest.label}
|
||||
onClick={() => onAction(`v2tool:${tool.manifest.id}`)}
|
||||
style={{
|
||||
|
||||
Reference in New Issue
Block a user