Git Komut Rehberi & Terminal Asistanı
Sıfırdan Yeni Bir Depo Başlatın:
Mevcut Bir Git Deposu veya Klasörü Gönderin:
Hataları Geri Alma, İptal & Temizlik:
Son commit'i geri al (yapılan değişiklikleri korur):
git reset --soft HEAD~1
Yapılan yerel değişiklikleri iptal et (çalışma ağacını temizler):
git restore .
Takip edilmeyen gereksiz dosyaları sil:
git clean -fd
Değişiklikleri geçici sakla ve geri getir (stash):
git stash git stash pop
Dal (Branch) ve Sürüm Etiketleri:
Yeni dal aç ve geçiş yap:
git checkout -b yeni-ozellik git push -u origin yeni-ozellik
Sürüm etiketi (tag) oluştur ve gönder:
git tag -a v1.0.0 -m "Sürüm 1.0.0" git push origin --tags
feat: sesli CAD asistani, bellek optimizasyonlari ve akilli cozunurluk
- SnapVoice Turkce sesli CAD ve komut konsolu (/denetle, /ram, /eko, /otomatik, /sessiz) - 3B uzamsal sesli radar ve gorme engelli gelistirici geometri denetim motoru - LibreDWG/DXF ikili sikistirma, font tembel yukleme ve RAM optimizasyonu - Monitor cozunurlugune gore otomatik uyarlamali dinamik grafik modu
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import type { WorkplaneWorkspaceSettings } from "@/types/sketchforge";
|
||||
import { formatMeasurementNumber, lengthDisplayUnit, millimetersToDisplay, normalizeScaleForUnits, parseMeasurementInput, scaleOptionsForUnits } from "@/lib/measurementUnits";
|
||||
import { canBeginShapeDrag, DEFAULT_SNAP_GRID, DEFAULT_WORKPLANE_WORKSPACE, normalizeSnapGrid, normalizeWorkspaceSettings, shapeDimensionLimit, workplaneSettingsFingerprint, workspaceHydrationSyncDecision } from "@/lib/workplaneSettings";
|
||||
import { canBeginShapeDrag, computeEffectivePixelRatio, DEFAULT_SNAP_GRID, DEFAULT_WORKPLANE_WORKSPACE, normalizeSnapGrid, normalizeWorkspaceSettings, shapeDimensionLimit, workplaneSettingsFingerprint, workspaceHydrationSyncDecision } from "@/lib/workplaneSettings";
|
||||
|
||||
describe("workplane settings helpers", () => {
|
||||
it("accepts known snap grid values and falls back for unknown values", () => {
|
||||
@@ -160,4 +160,25 @@ describe("workplane settings helpers", () => {
|
||||
|
||||
expect(workspaceHydrationSyncDecision(hydratedCommit.pendingFingerprint, projectTwo).shouldSync).toBe(true);
|
||||
});
|
||||
|
||||
it("computes effective pixel ratio automatically according to monitor DPI and scene load", () => {
|
||||
// 1. Auto mode with high-DPI monitor (e.g. 2.0x 4K/Retina)
|
||||
const autoSettings: WorkplaneWorkspaceSettings = { ...DEFAULT_WORKPLANE_WORKSPACE, resolutionMode: "auto" };
|
||||
expect(computeEffectivePixelRatio(autoSettings, 5, 2.0)).toBe(2.0); // Modest scene: native crystal clear 2x
|
||||
expect(computeEffectivePixelRatio(autoSettings, 30, 2.0)).toBe(1.25); // Medium scene: balanced 1.25x
|
||||
expect(computeEffectivePixelRatio(autoSettings, 60, 2.0)).toBe(1.0); // Heavy scene: auto-fallback to 1.0x to prevent RAM crash
|
||||
|
||||
// 2. 1080p standard monitor (1.0x) stays 1.0x
|
||||
expect(computeEffectivePixelRatio(autoSettings, 10, 1.0)).toBe(1.0);
|
||||
|
||||
// 3. Native mode: always preserves native monitor DPR
|
||||
const nativeSettings: WorkplaneWorkspaceSettings = { ...DEFAULT_WORKPLANE_WORKSPACE, resolutionMode: "native" };
|
||||
expect(computeEffectivePixelRatio(nativeSettings, 80, 2.0)).toBe(2.0);
|
||||
|
||||
// 4. Eco mode: always 1.0x
|
||||
const ecoSettings: WorkplaneWorkspaceSettings = { ...DEFAULT_WORKPLANE_WORKSPACE, resolutionMode: "eco" };
|
||||
expect(computeEffectivePixelRatio(ecoSettings, 2, 2.0)).toBe(1.0);
|
||||
const lowMemSettings: WorkplaneWorkspaceSettings = { ...DEFAULT_WORKPLANE_WORKSPACE, lowMemoryMode: true };
|
||||
expect(computeEffectivePixelRatio(lowMemSettings, 2, 2.0)).toBe(1.0);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user