{"id": "project-000001", "stage": "project", "split": "eval", "language": "en", "domain": "project_replay", "project": "project_02", "source_path": "source_000267.txt", "source_sha256": "489d3ef4b64efb9ab30c0e47bfff42b0683e94c4f55d09f880ee68ba481fae8d", "sampling_group": "project_replay/en", "prompt": "<|im_start|>system\nYou help develop this project. Use only the supplied source. Think and answer in English.<|im_end|>\n<|im_start|>user\nExplain the lifecycle and dependencies here. Address asynchronous work, cleanup, and repeated calls when they are present.\n\nProject: project_02\nFile: source_000267.txt\nLines: 1-50\n```ts\nimport type { KpiProjectYearIndicator } from '@shared/types/kpi'\n\nexport const MOCK_PROJECT_CODES: ReadonlySet = new Set([\n 'novosibirsk_irkutsk',\n 'yekaterinburg_novosibirsk',\n 'kazan_samara',\n 'yekaterinburg_chelyabinsk',\n 'chelyabinsk_rf_border',\n 'novosibirsk_barnaul',\n 'novosibirsk_tomsk',\n 'novosibirsk_kemerovo',\n 'novosibirsk_novokuznetsk',\n 'samara_saransk',\n 'samara_penza',\n 'khabarovsk_vladivostok',\n])\nexport const isMockProjectCode = (projectCode: string): boolean =>\n MOCK_PROJECT_CODES.has(projectCode)\n\nconst MOCK_PROJECT_KPI_INDICATOR_TEMPLATE: readonly KpiProjectYearIndicator[] = [\n { code: 'kpi__route_length', name: 'Протяженность линии', unit: 'км', data_type: 'float', value: null },\n { code: 'kpi__route_length_rf', name: 'Протяженность линии (РФ)', unit: 'км', data_type: 'float', value: null },\n { code: 'kpi__gdp_added', name: 'Прирост ВВП', unit: 'млрд руб.', data_type: 'float', value: null },\n { code: 'kpi__investment_need', name: 'Потребность в инвестициях', unit: 'млрд руб.', data_type: 'float', value: null },\n { code: 'kpi__passenger_traffic_sm_vsm', name: 'Пассажиропоток', unit: 'млн пасс.', data_type: 'float', value: null },\n { code: 'kpi__covered_population', name: 'Охват населения', unit: 'млн чел.', data_type: 'float', value: null },\n { code: 'kpi__wagon_need', name: 'Потребность в вагонах', unit: 'шт.', data_type: 'int', value: null },\n]\n\nexport const createMissingProjectKpiIndicators = (): KpiProjectYearIndicator[] =>\n MOCK_PROJECT_KPI_INDICATOR_TEMPLATE.map((indicator) => ({ ...indicator }))\n\nexport const getMockProjectKpiIndicatorsByCode = (\n projectCode: string,\n): KpiProjectYearIndicator[] =>\n isMockProjectCode(projectCode) ? createMissingProjectKpiIndicators() : []\n\nexport const isProjectPlaceholderValue = (\n value: string | number | null | undefined,\n): boolean => {\n if (value == null) return true\n if (typeof value === 'number') return value === 0\n\n const normalized = value\n .trim()\n .replace(/[()]/g, '')\n .replace(/\\s/g, '')\n .replace(',', '.')\n\n if (!normalized) return true\n```<|im_end|>\n<|im_start|>assistant\n\n\n\n", "completion": "## Lifecycle and Dependencies\n\nThis module is a **pure, stateless utility** for working with mock project data in the `project_02` project. It has no side effects, no mutable state, and no external runtime dependencies beyond the type definitions it imports.\n\n### Imports\n\n- `@shared/types/kpi` — provides the `KpiProjectYearIndicator` type (a shape for KPI indicator objects).\n- `source_000267.txt` — this file itself (self-referencing import is fine in TypeScript since it's a constant).\n\n### Exports\n\n1. **`MOCK_PROJECT_CODES`** — a `ReadonlySet` containing 14 project codes (e.g. `'novosibirsk_irkutsk'`, `'yekaterinburg_novosibirsk'`, `'kazan_samara'`, etc.).\n2. **`isMockProjectCode(projectCode: string): boolean`** — a pure predicate that checks whether a given code is in the set.\n3. **`createMissingProjectKpiIndicators()`** — a factory that returns a fresh copy of the KPI template array.\n4. **`getMockProjectKpiIndicatorsByCode", "post_training_anonymized": true, "eligible_for_original_loader": true, "source_kind": "private_project"} {"id": "project-000002", "stage": "project", "split": "eval", "language": "en", "domain": "project_replay", "project": "project_02", "source_path": "source_000222.txt", "source_sha256": "356cdd06cface8845dfe15955357f9ff9b20d4796e791f40c3d691ee7f106f4c", "sampling_group": "project_replay/en", "prompt": "<|im_start|>system\nYou help develop this project. Use only the supplied source. Think and answer in English.<|im_end|>\n<|im_start|>user\nExplain how to simplify this code while preserving behavior. Show a small project_03 refactoring and explain it.\n\nProject: project_02\nFile: source_000222.txt\nLines: 1-27\n```ts\nimport { useWindowSize } from '@vueuse/core'\nimport { MAP_LOW_HEIGHT_SCREEN_MAX_PX } from '@modules/map/constants/map'\n\nexport const resolveIsLowMapHeightScreen = (): boolean => {\n if (typeof window === 'undefined') {\n return false\n }\n\n return window.innerHeight < MAP_LOW_HEIGHT_SCREEN_MAX_PX\n}\n\nexport const useMapHeightMode = () => {\n const { height } = useWindowSize()\n\n const isLowMapHeightScreen = computed(() => {\n const viewportHeight = height.value\n if (!Number.isFinite(viewportHeight) || viewportHeight <= 0) {\n return resolveIsLowMapHeightScreen()\n }\n\n return viewportHeight < MAP_LOW_HEIGHT_SCREEN_MAX_PX\n })\n\n return {\n isLowMapHeightScreen,\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n\n\n\n", "completion": "## Goal\n\nSimplify the code while preserving behavior. The current code:\n\n1. Has a standalone `resolveIsLowMapHeightScreen` function that checks `window` exists and compares `window.innerHeight` to a constant.\n2. Has a `useMapHeightMode` composable that uses `useWindowSize` and wraps the check in a `computed`.\n3. Falls back to the standalone function when `height.value` is invalid (not a number, or ≤ 0).\n\nThe behavior is:\n- If `window` is undefined → `false`.\n- If `height.value` is invalid (not a number, or ≤ 0) → same as above.\n- Otherwise → `height.value < MAP_LOW_HEIGHT_SCREEN_MAX_PX`.\n\n## Refactoring\n\nWe can eliminate the redundant standalone function and the `computed` wrapper by making the composable directly return a reactive boolean. The key insight is that `useWindowSize` already gives us a reactive `height` ref, so we can just use it directly in the template or in other composables.\n\nHowever, the user asked for a \"small project_03 refactoring\" and to \"explain it.\" Let's keep it minimal and focused.\n\n### Option A: Remove the", "post_training_anonymized": true, "eligible_for_original_loader": true, "source_kind": "private_project"} {"id": "project-000003", "stage": "project", "split": "eval", "language": "en", "domain": "project_replay", "project": "project_01", "source_path": "source_000059.txt", "source_sha256": "fc86370741bb97d8686496cd1fbfc5fb37fbb396613147077c2ff4e6327bde69", "sampling_group": "project_replay/en", "prompt": "<|im_start|>system\nYou help develop this project. Use only the supplied source. Think and answer in English.<|im_end|>\n<|im_start|>user\nDescribe the interface and constraints of this excerpt. Show a correct usage example of the existing API.\n\nProject: project_01\nFile: source_000059.txt\nLines: 1-11\n```ts\nimport { SHADCN_PALETTE } from './theme';\n\nexport const SKELETON_APPEARANCE = {\n backgroundColor: SHADCN_PALETTE.neutral[800],\n borderRadius: 8\n} as const;\n\nexport const SKELETON_ANIMATION = {\n durationMs: 800,\n minimumOpacity: 0.45\n} as const;\n```<|im_end|>\n<|im_start|>assistant\n\n", "completion": "The user wants me to describe the interface and constraints of this TypeScript code, and show a correct usage example of the existing API.\n\nLet me analyze the code:\n\n1. It imports `SHADCN_PALETTE` from a theme file\n2. It exports two constants:\n - `SKELETON_APPEARANCE` - an object with `backgroundColor` and `borderRadius`, typed as `as const`\n - `SKELETON_ANIMATION` - an object with `durationMs` and `minimumOpacity`, typed as `as const`\n\nConstraints:\n- `SKELETON_APPEARANCE` is `as const` - meaning it's a readonly object literal. You can't modify its properties after declaration.\n- `SKELETON_ANIMATION` is also `as const` - same constraint.\n- The `backgroundColor` is derived from `SHADCN_PALETTE.neutral[800]` - it's a specific shade from a theme palette.\n- `borderRadius` is hardcoded to `8`.\n- `durationMs` is hardcoded to `800`.\n- `minimumOpacity` is hardcoded to `0.45`.\n\nUsage example:\n- In", "post_training_anonymized": true, "eligible_for_original_loader": true, "source_kind": "private_project"} {"id": "project-000004", "stage": "project", "split": "eval", "language": "en", "domain": "project_replay", "project": "project_01", "source_path": "source_000030.txt", "source_sha256": "63444b2271928bdddef2c452eac523c51f9a446af67cf60fa173b2c45861938a", "sampling_group": "project_replay/en", "prompt": "<|im_start|>system\nYou help develop this project. Use only the supplied source. Think and answer in English.<|im_end|>\n<|im_start|>user\nExplain the lifecycle and dependencies here. Address asynchronous work, cleanup, and repeated calls when they are present.\n\nProject: project_01\nFile: source_000030.txt\nLines: 1-42\n```ts\nimport type { UseKycTierUpgradeNoticeAnimationResult } from 'native/types/kyc';\nimport { useMemo } from 'react';\nimport { Easing, Keyframe } from 'react-native-reanimated';\nimport { KYC_TIER_UPGRADE_NOTICE_ANIMATION } from 'native/constants/kyc';\n\nconst createNoticeExitingAnimation = (easing: ReturnType) =>\n new Keyframe({\n 0: {\n opacity: 1,\n transform: [\n {\n translateY: 0\n }\n ]\n },\n 100: {\n easing,\n opacity: KYC_TIER_UPGRADE_NOTICE_ANIMATION.exitOpacity,\n transform: [\n {\n translateY: KYC_TIER_UPGRADE_NOTICE_ANIMATION.exitTranslateY\n }\n ]\n }\n }).duration(KYC_TIER_UPGRADE_NOTICE_ANIMATION.durationMs);\n\nexport const useKycTierUpgradeNoticeAnimation = (): UseKycTierUpgradeNoticeAnimationResult => {\n const noticeExiting = useMemo(() => {\n const easing = Easing.bezier(\n KYC_TIER_UPGRADE_NOTICE_ANIMATION.easingX1,\n KYC_TIER_UPGRADE_NOTICE_ANIMATION.easingY1,\n KYC_TIER_UPGRADE_NOTICE_ANIMATION.easingX2,\n KYC_TIER_UPGRADE_NOTICE_ANIMATION.easingY2\n );\n\n return createNoticeExitingAnimation(easing);\n }, []);\n\n return {\n noticeExiting\n };\n};\n```<|im_end|>\n<|im_start|>assistant\n\n\n\n", "completion": "## Lifecycle and Dependencies\n\nThis hook is a **React Native Reanimated** animation utility for a KYC tier-upgrade notice. It produces a single `Keyframe` object that describes an \"exit\" animation (fade out + slide down) and exposes it via a `useMemo` so the animation object is stable across renders.\n\n### Dependencies\n\n- **`react`** – `useMemo` (React hooks)\n- **`react-native-reanimated`** – `Easing.bezier`, `Keyframe` (animation primitives)\n- **`native/types/kyc`** – `UseKycTierUpgradeNoticeAnimationResult` (type definition)\n- **`native/constants/kyc`** – `KYC_TIER_UPGRADE_NOTICE_ANIMATION` (config object with easing params, duration, opacity, translate values)\n\n### Lifecycle\n\n1. **First render** – `useMemo` calls the factory. It reads the easing curve from `KYC_TIER_UPGRADE_NOTICE_ANIMATION` (four bezier coefficients), builds a `Keyframe` with:\n - `0%`: `opacity: 1`, `translateY: 0`\n - `100%`: `opacity: exitOpacity`,", "post_training_anonymized": true, "eligible_for_original_loader": true, "source_kind": "private_project"} {"id": "project-000005", "stage": "project", "split": "eval", "language": "en", "domain": "project_replay", "project": "project_02", "source_path": "source_000188.txt", "source_sha256": "c2400f165e0a86bade580c6f2910f22ca8ba1f648dedb2609200b6ad399f43a1", "sampling_group": "project_replay/en", "prompt": "<|im_start|>system\nYou help develop this project. Use only the supplied source. Think and answer in English.<|im_end|>\n<|im_start|>user\nExplain how to simplify this code while preserving behavior. Show a small project_03 refactoring and explain it.\n\nProject: project_02\nFile: source_000188.txt\nLines: 90-143\n```vue\n stepSize: props.stepSize,\n }),\n)\n\nconst chartOptions = computed(() => {\n const chartTheme = theme.value\n const textColor = resolveThemeValue(chartTheme.colors.text)\n const secondaryTextColor = resolveThemeValue(chartTheme.colors.secondaryText)\n const mutedTextColor = resolveThemeValue(chartTheme.colors.mutedText)\n const gridColor = resolveThemeValue(chartTheme.colors.grid)\n const chartAreaBorderColor = resolveThemeValue(chartTheme.colors.chartAreaBorder)\n const chartAreaBorderStrongColor = resolveThemeValue(chartTheme.colors.chartAreaBorderStrong)\n const fontFamily = resolveThemeValue(chartTheme.typography.fontFamily)\n const gridDashPattern = chartTheme.grid.dashPattern.map((item) => scalePx(item))\n\n return {\n ...createGroupedBarChartRootcodeOptions({\n customGridLines: {\n verticalSpacing:\n props.verticalGridSpacing != null ? scalePx(props.verticalGridSpacing) : null,\n horizontalSpacing:\n props.horizontalGridSpacing != null ? scalePx(props.horizontalGridSpacing) : null,\n color: gridColor,\n lineWidth: scalePx(chartTheme.grid.lineWidth),\n dashPattern: gridDashPattern,\n },\n chartAreaBorder: {\n color: chartAreaBorderColor,\n lineWidth: scalePx(chartTheme.grid.lineWidth),\n dashPattern: gridDashPattern,\n dashOffset: scalePx(chartTheme.grid.dashOffset),\n solidBottom: true,\n },\n centerSingleGroupedBar: props.centerSingleBarPerCategory\n ? { minVisibleValue: 0 }\n : false,\n structuredTooltip: isTooltipEnabled.value\n ? createComparisonTooltipOptions(chartScaleFactor.value)\n : false,\n }),\n responsive: true,\n maintainAspectRatio: false,\n layout: {\n padding: { top: scalePx(22), right: scalePx(8), bottom: 0, left: scalePx(8) },\n },\n interaction: {\n mode: 'index' as const,\n intersect: false,\n },\n /* НАСТРОЙКА ГРУППИРОВКИ (для grouped bar chart) */\n scales: {\n x: {\n /* НАСТРОЙКА ГОРИЗОНТАЛЬНОЙ ОСИ */\n stacked: false, // Отключить стекирование для группировки\n```<|im_end|>\n<|im_start|>assistant\n\n\n\n", "completion": "## Refactoring: Extract the `resolveThemeValue` calls into a helper\n\nThe code repeatedly calls `resolveThemeValue(chartTheme.colors.xxx)` for every color. This is repetitive, makes the `computed` block harder to scan, and is a small source of copy-paste errors. A small project_03 helper makes the intent clearer and reduces the number of lines in the main block.\n\n### New helper (placed before the `computed` block)\n\n```js\n// Resolve a theme color value once per call site.\nconst resolveColor = (key: keyof typeof theme.value.colors) =>\n resolveThemeValue(theme.value.colors[key])\n```\n\n### Refactored `computed` block\n\n```js\nconst chartOptions = computed(() => {\n const chartTheme = theme.value\n const textColor = resolveColor('text')\n const secondaryTextColor = resolveColor('secondaryText')\n const mutedTextColor = resolveColor('mutedText')\n const gridColor = resolveColor('grid')\n const chartAreaBorderColor = resolveColor('chartAreaBorder')\n const chartAreaBorderStrongColor = resolveColor('chartAreaBorderStrong')\n const fontFamily = resolveColor('typography.fontFamily')\n const gridDash", "post_training_anonymized": true, "eligible_for_original_loader": true, "source_kind": "private_project"} {"id": "project-000006", "stage": "project", "split": "eval", "language": "en", "domain": "project_replay", "project": "project_01", "source_path": "source_000012.txt", "source_sha256": "e138df380242ee1119033ec8853e5936081843a6acfb7f75fa1cfd4752e4dc6f", "sampling_group": "project_replay/en", "prompt": "<|im_start|>system\nYou help develop this project. Use only the supplied source. Think and answer in English.<|im_end|>\n<|im_start|>user\nExplain the lifecycle and dependencies here. Address asynchronous work, cleanup, and repeated calls when they are present.\n\nProject: project_01\nFile: source_000012.txt\nLines: 1-50\n```tsx\nimport React from 'react';\nimport { ScrollView, Text, View } from 'react-native';\nimport { useUnit } from 'effector-react';\nimport { EXCHANGE_PIN_COPY, EXCHANGE_PIN_LENGTH } from 'native/constants/exchange';\nimport { exchangeExitRequestedFn } from 'native/models/exchange';\nimport { useExchangeLockCountdown } from 'native/composables/exchange';\nimport { getPropsForInputGroup, usePinInputGroupField } from 'native/composables/ui';\nimport { Button, InputGroup } from 'native/components/ui';\nimport { exchangePinStyles as styles } from 'native/styles/exchange';\n\nconst ignoreLockedPinChange = () => {};\n\nexport const ExchangePinLocked = () => {\n const onExit = useUnit(exchangeExitRequestedFn);\n const countdown = useExchangeLockCountdown();\n const field = usePinInputGroupField({\n accessibilityLabel: EXCHANGE_PIN_COPY.inputAccessibilityLabel,\n clearAccessibilityLabel: EXCHANGE_PIN_COPY.clearAccessibilityLabel,\n disabled: true,\n inputMode: 'numeric',\n keyboardType: 'number-pad',\n length: EXCHANGE_PIN_LENGTH,\n onChangeText: ignoreLockedPinChange,\n value: ''\n });\n\n return (\n \n \n {EXCHANGE_PIN_COPY.lockedTitle}\n \n {EXCHANGE_PIN_COPY.lockedBody}\n\n \n {EXCHANGE_PIN_COPY.tryAgainIn}\n {countdown}\n \n\n \n \n \n\n \n \n \n \n );\n};\n```<|im_end|>\n<|im_start|>assistant\n\n", "completion": "The user wants me to explain the lifecycle and dependencies of this React Native component, specifically addressing asynchronous work, cleanup, and repeated calls when present.\n\nLet me analyze the code:\n\n1. **Dependencies:**\n - `react` - React framework\n - `react-native` - ScrollView, Text, View\n - `effector-react` - `useUnit` hook\n - `native/constants/exchange` - `EXCHANGE_PIN_COPY`, `EXCHANGE_PIN_LENGTH`\n - `native/models/exchange` - `exchangeExitRequestedFn`\n - `native/composables/exchange` - `useExchangeLockCountdown`\n - `native/composables/ui` - `getPropsForInputGroup`, `usePinInputGroupField`\n - `native/components/ui` - Button, InputGroup\n - `native/styles/exchange` - `exchangePinStyles` (imported as `styles`)\n\n2. **Lifecycle:**\n - `useUnit(exchangeExitRequestedFn)` - This is an Effector hook that returns a function. It's called when the user presses the \"Got It\" button. This is the exit handler.\n - `useExchangeLockCountdown()` - Returns a countdown value", "post_training_anonymized": true, "eligible_for_original_loader": true, "source_kind": "private_project"} {"id": "project-000007", "stage": "project", "split": "eval", "language": "en", "domain": "project_replay", "project": "project_02", "source_path": "source_000238.txt", "source_sha256": "12d9ef0fc19405ec60a1a28e1b464e0be974110084e6a085e83200d6262da0bd", "sampling_group": "project_replay/en", "prompt": "<|im_start|>system\nYou help develop this project. Use only the supplied source. Think and answer in English.<|im_end|>\n<|im_start|>user\nDescribe the interface and constraints of this excerpt. Show a correct usage example of the existing API.\n\nProject: project_02\nFile: source_000238.txt\nLines: 121-176\n```ts\n recoverySettingsVersion.value = null\n needsReload.value = false\n }\n catch (error) {\n if (requestGeneration !== generation || requestId !== editorRequestId) return\n captureConflict(error)\n paramsError.value = errorMessage(error)\n }\n finally {\n if (requestGeneration === generation && requestId === editorRequestId) isParamsLoading.value = false\n }\n }\n\n const closeParams = () => {\n if (isCalculating.value) return\n editorRequestId++\n isParamsOpen.value = false\n isParamsLoading.value = false\n editor.clear()\n }\n\n const refreshResult = async (id: number, requestGeneration: number) => {\n try {\n const currentResult = await opmService.getResult(id)\n if (requestGeneration === generation) result.value = currentResult\n }\n catch (error) {\n if (requestGeneration === generation) loadError.value = errorMessage(error)\n }\n }\n\n const calculate = async () => {\n const id = projectId.value\n const currentSettings = editor.settings\n if (id === null || !currentSettings || isBusy.value || isParamsLoading.value || needsReload.value) return\n if (editor.revealInvalidField()) return\n const requestGeneration = generation\n isCalculating.value = true\n paramsError.value = ''\n try {\n const response = await opmService.calculate(id, {\n base_version: currentSettings.base_version,\n settings_version: currentSettings.settings_version,\n schema_version: currentSettings.schema_version,\n changes: editor.changes,\n })\n if (requestGeneration !== generation) return\n settings.value = response.settings\n result.value = response.result\n recoverySettingsVersion.value = null\n loadError.value = ''\n if (editor.schema) editor.load(editor.schema, response.settings)\n await refreshResult(id, requestGeneration)\n if (requestGeneration !== generation) return\n isParamsOpen.value = false\n if (!resultError.value) {\n```<|im_end|>\n<|im_start|>assistant\n\n\n\n", "completion": "## Interface and Constraints\n\nThis excerpt is a Vue 3 store (using `ref`/`reactive`) for an \"OPM\" (Open Project Management) module. It manages the lifecycle of a parameter calculation request: opening the params panel, loading parameters, calculating results, and handling errors.\n\n### Key State Variables\n- `isParamsOpen` – whether the params panel is visible\n- `isParamsLoading` – whether parameter values are being fetched\n- `isCalculating` – whether the calculation is in progress\n- `needsReload` – whether the result needs to be re-fetched\n- `paramsError` / `resultError` / `loadError` – error messages for each phase\n- `recoverySettingsVersion` – tracks the last successful settings version\n- `generation` / `editorRequestId` – concurrency guards to prevent stale updates from overwriting newer ones\n- `result` / `settings` / `schema` – the computed result, settings, and schema\n- `editor` – a reference to the editor instance (for clearing and loading schema)\n\n### Constraints & Guards\n1. **Stale-request guard**: In the `catch` block of `loadParams`, if `requestGeneration !== generation ||", "post_training_anonymized": true, "eligible_for_original_loader": true, "source_kind": "private_project"} {"id": "project-000008", "stage": "project", "split": "eval", "language": "en", "domain": "project_replay", "project": "project_01", "source_path": "source_000096.txt", "source_sha256": "4253d2dc543abf57c98f3d3c6e3c95610afa5791b4a6780a681bad23ffa5756c", "sampling_group": "project_replay/en", "prompt": "<|im_start|>system\nYou help develop this project. Use only the supplied source. Think and answer in English.<|im_end|>\n<|im_start|>user\nExplain how to simplify this code while preserving behavior. Show a small project_03 refactoring and explain it.\n\nProject: project_01\nFile: source_000096.txt\nLines: 9-38\n```ts\n} from 'native/types/transactions';\nimport { combine, createDomain } from 'effector';\nimport { getAllTransactionsPage } from 'native/adapters/api/transactions';\nimport { resolveAllTransactionGroups, resolveDashboardTransactionDetailsPage } from 'native/lib/transactions';\nimport { $authSessionIdentity } from 'native/models/auth';\n\nconst transactionsHistoryDomain = createDomain('transactions.history');\n\nexport const getAllTransactionsPageFx = transactionsHistoryDomain.createEffect<\n AllTransactionsPageAttempt,\n AllTransactionsPageResponse\n>(({ requestId: _requestId, ...request }) => getAllTransactionsPage(request));\n\nexport const allTransactionsOpenedFn = transactionsHistoryDomain.createEvent();\nexport const allTransactionsOpeningAcceptedFn = transactionsHistoryDomain.createEvent();\nexport const allTransactionsBackRequestedFn = transactionsHistoryDomain.createEvent();\nexport const allTransactionsClosedFn = transactionsHistoryDomain.createEvent();\nexport const allTransactionsLoadMoreRequestedFn = transactionsHistoryDomain.createEvent();\nexport const allTransactionsRetryRequestedFn = transactionsHistoryDomain.createEvent();\nexport const allTransactionsTransactionPressedFn = transactionsHistoryDomain.createEvent();\nexport const allTransactionsSelectionClearedFn = transactionsHistoryDomain.createEvent();\nexport const allTransactionsSelectionAcceptedFn = transactionsHistoryDomain.createEvent();\nexport const allTransactionsLoadRequestedFn = transactionsHistoryDomain.createEvent();\nexport const allTransactionsBatchPreparedFn = transactionsHistoryDomain.createEvent();\n\nexport const allTransactionsPageCandidateFn =\n transactionsHistoryDomain.createEvent();\n\nexport const allTransactionsPageAcceptedFn = transactionsHistoryDomain.createEvent();\nexport const allTransactionsPageRejectedFn = transactionsHistoryDomain.createEvent();\n```<|im_end|>\n<|im_start|>assistant\n\n", "completion": "The user wants me to simplify this code while preserving behavior. Let me analyze what's happening:\n\n1. It's an Effector domain for transactions history\n2. It creates a domain called 'transactions.history'\n3. It exports several effects and events\n\nLet me look at what can be simplified:\n\n1. The `getAllTransactionsPageFx` effect - it uses a destructuring pattern `{ requestId: _requestId, ...request }` where `_requestId` is unused. This is a minor style issue but not really a simplification opportunity.\n\n2. The events are all created separately with `createEvent()` or `createEvent()`. This is verbose but it's the Effector API pattern - you need to declare the event type separately to get proper type inference. However, we could potentially use `createEvent` without a type parameter for events that don't carry data, and use `createEvent` only when needed.\n\nWait, let me re-read the code more carefully:\n\n- `allTransactionsOpenedFn` - no type parameter (no data)\n- `allTransactionsOpeningAcceptedFn` - no type parameter\n- `allTransactionsBackRequestedFn` - no type parameter\n- `allTransactionsClosedFn` -", "post_training_anonymized": true, "eligible_for_original_loader": true, "source_kind": "private_project"} {"id": "project-000009", "stage": "project", "split": "eval", "language": "en", "domain": "project_replay", "project": "project_02", "source_path": "source_000263.txt", "source_sha256": "0e79bdcaa2b9cee767d850e76b51ff8855837724f14f17502455b92d3eab5d6b", "sampling_group": "project_replay/en", "prompt": "<|im_start|>system\nYou help develop this project. Use only the supplied source. Think and answer in English.<|im_end|>\n<|im_start|>user\nExplain how to simplify this code while preserving behavior. Show a small project_03 refactoring and explain it.\n\nProject: project_02\nFile: source_000263.txt\nLines: 26-74\n```ts\n const dragDistancePx = ref(0)\n const isTimelineDragging = ref(false)\n const isClickSuppressed = ref(false)\n const dragThumbLeft = ref(null)\n const dragActiveFillWidth = ref(null)\n let isBodySelectionLocked = false\n let bodyUserSelectBeforeDrag = ''\n let bodyCursorBeforeDrag = ''\n let isWindowPointerListenersBound = false\n let clickSuppressionTimeoutId: ReturnType | null = null\n\n const getTimelineRootElement = (): HTMLElement | null => timelineRootElementRef.value\n const getTimelineTrackElement = (): HTMLElement | null => timelineTrackElementRef.value\n\n const getYearButtonByYear = (year: number): HTMLButtonElement | null =>\n getTimelineRootElement()?.querySelector(`[data-timeline-year=\"${year}\"]`) ?? null\n\n const resolveNearestSelectableYear = (pointerClientX: number): number | null => {\n if (!selectableYears.value.length) return null\n\n let nearestYear: number | null = null\n let nearestDistance = Number.POSITIVE_INFINITY\n\n for (const selectableYear of selectableYears.value) {\n const yearButton = getYearButtonByYear(selectableYear)\n if (!yearButton || yearButton.disabled) continue\n\n const yearRect = yearButton.getBoundingClientRect()\n const yearCenterX = yearRect.left + (yearRect.width / 2)\n const distance = Math.abs(yearCenterX - pointerClientX)\n if (distance < nearestDistance) {\n nearestDistance = distance\n nearestYear = selectableYear\n }\n }\n\n return nearestYear\n }\n\n const resolveTrackPointerOffset = (pointerClientX: number): number | null => {\n const timelineTrackElement = getTimelineTrackElement()\n if (!timelineTrackElement) return null\n\n const trackRect = timelineTrackElement.getBoundingClientRect()\n if (trackRect.width <= 0) return null\n\n const halfLabelPx = timelineHalfLabelWidthPx()\n const minOffsetPx = Math.min(halfLabelPx, trackRect.width / 2)\n const maxOffsetPx = Math.max(trackRect.width - halfLabelPx, minOffsetPx)\n```<|im_end|>\n<|im_start|>assistant\n\n\n\n", "completion": "Let me analyze this code to find a good refactoring opportunity that preserves behavior.\n\nLooking at the code, I notice several things:\n\n1. The `resolveNearestSelectableYear` function iterates through all selectable years and finds the nearest one. This is fine but could be simplified.\n\n2. The `resolveTrackPointerOffset` function has a somewhat convoluted calculation for `minOffsetPx` and `maxOffsetPx`:\n```ts\nconst halfLabelPx = timelineHalfLabelWidthPx()\nconst minOffsetPx = Math.min(halfLabelPx, trackRect.width / 2)\nconst maxOffsetPx = Math.max(trackRect.width - halfLabelPx, minOffsetPx)\n```\n\nWait, let me think about this. `minOffsetPx` is `Math.min(halfLabelPx, trackRect.width / 2)`. Then `maxOffsetPx` is `Math.max(trackRect.width - halfLabelPx, minOffsetPx)`.\n\nSince `trackRect.width / 2` is always ≤ `trackRect.width - halfLabelPx` (assuming `halfLabelPx ≤ trackRect.width / 2`), the `Math.max(trackRect.width - halfLabelPx, minOffsetPx)` would just be", "post_training_anonymized": true, "eligible_for_original_loader": true, "source_kind": "private_project"} {"id": "project-000010", "stage": "project", "split": "eval", "language": "en", "domain": "project_replay", "project": "project_02", "source_path": "source_000194.txt", "source_sha256": "b44824d4bf23287b69e40c1b7b1758acdd93aab54f5ca1d742e5b39b5dee5650", "sampling_group": "project_replay/en", "prompt": "<|im_start|>system\nYou help develop this project. Use only the supplied source. Think and answer in English.<|im_end|>\n<|im_start|>user\nExplain the lifecycle and dependencies here. Address asynchronous work, cleanup, and repeated calls when they are present.\n\nProject: project_02\nFile: source_000194.txt\nLines: 1-65\n```ts\nconst DEFAULT_COMPARISON_TABLE_FRAME_WIDTH_REM = 87\nconst ULTRA_WIDE_BREAKPOINT_PX = 2560\n\nconst getRootFontSizePx = (): number => {\n if (typeof window === 'undefined') return 16\n\n const rootFontSize = Number.parseFloat(window.getComputedStyle(document.documentElement).fontSize)\n return Number.isFinite(rootFontSize) && rootFontSize > 0 ? rootFontSize : 16\n}\n\nexport const useConstructorComparisonTableFrameWidth = () => {\n const comparisonTableElementRef = ref(null)\n const frameWidthPx = ref(null)\n\n const getBaseFrameWidthPx = (): number => DEFAULT_COMPARISON_TABLE_FRAME_WIDTH_REM * getRootFontSizePx()\n\n const updateFrameWidth = () => {\n if (typeof window === 'undefined') return\n\n if (window.innerWidth < ULTRA_WIDE_BREAKPOINT_PX) {\n frameWidthPx.value = null\n return\n }\n\n const comparisonTableElement = comparisonTableElementRef.value\n if (!comparisonTableElement) return\n\n const frameHostElement = comparisonTableElement.parentElement ?? comparisonTableElement\n const nextFrameWidth = Math.max(frameHostElement.clientWidth, getBaseFrameWidthPx())\n frameWidthPx.value = Number.isFinite(nextFrameWidth) ? nextFrameWidth : null\n }\n\n let comparisonResizeObserver: ResizeObserver | null = null\n\n onMounted(() => {\n updateFrameWidth()\n window.addEventListener('resize', updateFrameWidth)\n\n if (typeof ResizeObserver === 'undefined') return\n\n comparisonResizeObserver = new ResizeObserver(() => {\n updateFrameWidth()\n })\n\n const targetElement = comparisonTableElementRef.value?.parentElement ?? comparisonTableElementRef.value\n if (targetElement) {\n comparisonResizeObserver.observe(targetElement)\n }\n })\n\n onUnmounted(() => {\n window.removeEventListener('resize', updateFrameWidth)\n comparisonResizeObserver?.disconnect()\n comparisonResizeObserver = null\n })\n\n const comparisonTableFrameStyle = computed(() => {\n if (frameWidthPx.value === null) return undefined\n\n return {\n '--comparison-frame-width': `${frameWidthPx.value}px`,\n }\n })\n\n return {\n```<|im_end|>\n<|im_start|>assistant\n\n", "completion": "The user wants me to explain the lifecycle and dependencies of this Vue composable, specifically addressing asynchronous work, cleanup, and repeated calls. Let me analyze the code carefully.\n\nLet me trace through the code:\n\n1. **Constants**: `DEFAULT_COMPARISON_TABLE_FRAME_WIDTH_REM = 87` and `ULTRA_WIDE_BREAKPOINT_PX = 2560`\n\n2. **`getRootFontSizePx()`**: Gets the root font size from CSS. Handles SSR (window undefined) by returning 16. Falls back to 16 if the parsed value is not finite or not > 0.\n\n3. **`useConstructorComparisonTableFrameWidth()`**: Returns an object with:\n - `comparisonTableElementRef`: ref to the comparison table element\n - `frameWidthPx`: reactive ref for the frame width in px\n - `getBaseFrameWidthPx()`: calculates base width as 87rem * root font size\n - `updateFrameWidth()`: the main logic\n - `comparisonResizeObserver`: a ResizeObserver instance\n - `comparisonTableFrameStyle`: computed style object\n\n4. **`onMounted()`**:\n - Calls `updateFrameWidth()` immediately", "post_training_anonymized": true, "eligible_for_original_loader": true, "source_kind": "private_project"} {"id": "project-000011", "stage": "project", "split": "eval", "language": "en", "domain": "project_replay", "project": "project_01", "source_path": "source_000137.txt", "source_sha256": "4478e970a779b5c96ab3c8de9a0262b1114e3b1e93860efeb0e89767f279b36b", "sampling_group": "project_replay/en", "prompt": "<|im_start|>system\nYou help develop this project. Use only the supplied source. Think and answer in English.<|im_end|>\n<|im_start|>user\nReview the correctness of this code. Identify the most substantial supported risk, or explain why the excerpt does not establish one.\n\nProject: project_01\nFile: source_000137.txt\nLines: 1-6\n```ts\nimport type { AppStackParamList } from 'native/types/routing';\nimport type { NativeStackScreenProps } from '@react-navigation/native-stack';\n\nexport type KycTierUpgradeScreenProps = NativeStackScreenProps;\n\nexport type VerificationScreenProps = NativeStackScreenProps;\n```<|im_end|>\n<|im_start|>assistant\n\n", "completion": "The user wants me to review the correctness of this TypeScript code and identify the most substantial supported risk, or explain why the excerpt does not establish one.\n\nLet me analyze the code:\n\n1. It imports `AppStackParamList` from `'native/types/routing'`\n2. It imports `NativeStackScreenProps` from `'@react-navigation/native-stack'`\n3. It defines two type aliases:\n - `KycTierUpgradeScreenProps` - a type alias for `NativeStackScreenProps`\n - `VerificationScreenProps` - a type alias for `NativeStackScreenProps`\n\nNow, let me think about what risks or issues exist:\n\n1. **Type aliasing instead of type definition**: The code uses `export type` (type aliases) instead of `export interface` or `export type`. This means:\n - `KycTierUpgradeScreenProps` is just a type alias, not a distinct type. If someone does `KycTierUpgradeScreenProps extends SomeOtherType`, it would work because type aliases are transparent.\n - More importantly, if `NativeStackScreenProps` changes its", "post_training_anonymized": true, "eligible_for_original_loader": true, "source_kind": "private_project"} {"id": "project-000012", "stage": "project", "split": "eval", "language": "en", "domain": "project_replay", "project": "project_01", "source_path": "source_000116.txt", "source_sha256": "cf3aa13d3474be7ad6fc186a76b1c261b1eadf56b4eb28fe451b04d513388a3a", "sampling_group": "project_replay/en", "prompt": "<|im_start|>system\nYou help develop this project. Use only the supplied source. Think and answer in English.<|im_end|>\n<|im_start|>user\nDescribe the interface and constraints of this excerpt. Show a correct usage example of the existing API.\n\nProject: project_01\nFile: source_000116.txt\nLines: 43-112\n```ts\n },\n amountCardInputShell: {\n flex: 1,\n minWidth: 0,\n position: 'relative'\n },\n amountInputContainer: {\n flex: 1\n },\n amountInputField: {\n backgroundColor: 'transparent',\n borderColor: 'transparent',\n borderRadius: 0,\n borderWidth: 0,\n minHeight: 50,\n paddingHorizontal: 0,\n paddingVertical: 0\n },\n amountCardValueRow: {\n alignItems: 'center',\n flex: 1,\n flexDirection: 'row',\n minWidth: 0\n },\n amountCardValue: {\n fontFamily: SHADCN_TYPOGRAPHY['data-large-value'].fontFamily,\n fontSize: 36,\n fontWeight: '600',\n lineHeight: 42,\n color: SHADCN_PALETTE.neutral[100],\n flex: 1,\n fontVariant: ['tabular-nums'],\n paddingVertical: 4\n },\n amountCardFooter: {\n gap: 4,\n minHeight: 34\n },\n amountCardBalance: {\n ...(SHADCN_TYPOGRAPHY['body-reg-12'] as TextStyle),\n color: SHADCN_PALETTE.neutral[300],\n fontVariant: ['tabular-nums']\n },\n amountCardBalanceInvalid: {\n color: SHADCN_PALETTE.error[100]\n },\n amountPair: {\n position: 'relative'\n },\n currencyChip: {\n alignItems: 'center',\n flexDirection: 'row',\n gap: 8,\n minHeight: 44,\n paddingLeft: 8\n },\n currencyChipPressed: {\n opacity: 0.7,\n transform: [{ scale: 0.97 }]\n },\n currencyChipCode: {\n ...(SHADCN_TYPOGRAPHY['body-med-16'] as TextStyle),\n color: SHADCN_PALETTE.neutral[100],\n fontVariant: ['tabular-nums']\n },\n swapRow: {\n alignItems: 'center',\n height: 28,\n justifyContent: 'center',\n marginVertical: -5,\n```<|im_end|>\n<|im_start|>assistant\n\n", "completion": "The user wants me to describe the interface and constraints of this code excerpt, and show a correct usage example of the existing API.\n\nLet me analyze the code:\n\nThis is a TypeScript file (`money.ts`) from a project called `project_01`. It's in the `apps/native/src/styles/exchange/` directory. It defines a set of style objects (likely for a React Native or similar mobile app using a styling system like Tamagui or similar).\n\nThe objects defined are:\n- `amountCardInputShell` - flex: 1, minWidth: 0, position: 'relative'\n- `amountInputContainer` - flex: 1\n- `amountInputField` - transparent background/border, no border radius, no border width, minHeight: 50, no padding\n- `amountCardValueRow` - alignItems: 'center', flex: 1, flexDirection: 'row', minWidth: 0\n- `amountCardValue` - uses SHADCN typography and palette, fontSize: 36, fontWeight: '600', lineHeight: 42, color: neutral[100], flex: 1, fontVariant: ['tabular-nums'], paddingVertical: 4", "post_training_anonymized": true, "eligible_for_original_loader": true, "source_kind": "private_project"} {"id": "project-000013", "stage": "project", "split": "eval", "language": "en", "domain": "project_replay", "project": "project_02", "source_path": "source_000196.txt", "source_sha256": "a020b4351638d8d4465e37fd02284217a311bb8b821145ba4d528ab0d5f13cb2", "sampling_group": "project_replay/en", "prompt": "<|im_start|>system\nYou help develop this project. Use only the supplied source. Think and answer in English.<|im_end|>\n<|im_start|>user\nExplain how to simplify this code while preserving behavior. Show a small project_03 refactoring and explain it.\n\nProject: project_02\nFile: source_000196.txt\nLines: 73-139\n```ts\n ),\n )\n\n const constructorSkeletonShape = computed(() => ({\n comparisonRowCount: comparisonTableRows.value.length\n || CONSTRUCTOR_SKELETON_DEFAULT_COMPARISON_ROW_COUNT,\n ganttProjectCount: implementationProjects.value.length\n || CONSTRUCTOR_SKELETON_DEFAULT_GANTT_PROJECT_COUNT,\n ganttYearCount: implementationYears.value.length\n || CONSTRUCTOR_SKELETON_DEFAULT_GANTT_YEAR_COUNT,\n indicatorCount: indicators.value.length\n || CONSTRUCTOR_SKELETON_DEFAULT_INDICATOR_COUNT,\n projectCount: projects.value.length\n || CONSTRUCTOR_SKELETON_DEFAULT_PROJECT_COUNT,\n }))\n\n const constructorTabs: TabItem[] = [{\n label: 'Параметры',\n value: 'scenario-params',\n }, {\n label: 'Сравнение',\n value: 'scenario-comparison',\n }]\n\n const changeComparisonMode = async (tabValue: string | undefined) => {\n if (!tabValue) return\n if (tabValue !== 'scenario-params' && tabValue !== 'scenario-comparison') return\n\n const shouldEnableComparison = tabValue === 'scenario-comparison'\n if (shouldEnableComparison === isComparisonMode.value) return\n\n await constructorStore.compareScenarios(shouldEnableComparison)\n }\n\n const activeTab = computed({\n get: () => (isComparisonMode.value ? 'scenario-comparison' : 'scenario-params'),\n set: (tab) => {\n changeComparisonMode(tab)\n },\n })\n\n const shouldShowModeTabs = computed(() => canShowComparisonControls.value)\n\n const selectScenario = (scenarioId: number) => {\n if (isComparisonMode.value) {\n constructorStore.compareScenarios(false)\n }\n constructorStore.selectScenario(scenarioId)\n }\n\n const addScenario = () => {\n if (isComparisonMode.value) {\n constructorStore.compareScenarios(false)\n }\n constructorStore.addScenario()\n }\n\n const onScenarioCardClick = (scenarioId: number) => {\n if (isComparisonMode.value) {\n constructorStore.toggleScenarioComparison(scenarioId)\n return\n }\n\n selectScenario(scenarioId)\n }\n\n const { getGroupedBarChartYMax } = useGroupedBarChartYMax()\n```<|im_end|>\n<|im_start|>assistant\n\n\n\n", "completion": "Let's analyze the code to find opportunities for simplification while preserving behavior.\n\nLooking at the code, I notice several patterns:\n\n1. **Repeated `if (isComparisonMode.value)` checks** - The `selectScenario`, `addScenario`, and `onScenarioCardClick` functions all start with the same guard:\n```ts\nif (isComparisonMode.value) {\n constructorStore.compareScenarios(false)\n}\n```\nThis is a repeated pattern that could be extracted.\n\n2. **The `changeComparisonMode` function** - It has a guard for `!tabValue` and then checks against two specific values. The logic is:\n - If no tab value → return\n - If tab value is neither 'scenario-params' nor 'scenario-comparison' → return\n - Otherwise, if the new tab is 'scenario-comparison' and we're already in comparison mode → return\n - Otherwise, enable/disable comparison\n\n3. **The `constructorTabs` array** - This is a static array that's defined inline. It could be extracted as a constant.\n\n4. **The `constructorSkeletonShape` computed** - Uses `||` (falsy check) instead of `??`", "post_training_anonymized": true, "eligible_for_original_loader": true, "source_kind": "private_project"} {"id": "project-000014", "stage": "project", "split": "eval", "language": "en", "domain": "project_replay", "project": "project_02", "source_path": "source_000146.txt", "source_sha256": "0b9544df18057fd4788349dd5054cb42a6afb8ea711a30fcbccf5737f2276846", "sampling_group": "project_replay/en", "prompt": "<|im_start|>system\nYou help develop this project. Use only the supplied source. Think and answer in English.<|im_end|>\n<|im_start|>user\nDescribe the interface and constraints of this excerpt. Show a correct usage example of the existing API.\n\nProject: project_02\nFile: source_000146.txt\nLines: 1-25\n```scss\n@use 'sass:math';\n\n$rem-base: 16px !default;\n\n/// Converts a pixel value from Figma to rem.\n@function rem($pixels) {\n @if math.is-unitless($pixels) {\n $pixels: $pixels * 1px;\n }\n\n @if not math.compatible($pixels, 1px) {\n @error 'rem() expects a pixel value or a unitless pixel count.';\n }\n\n @return math.div($pixels, $rem-base) * 1rem;\n}\n\n/// Converts a Figma inner spacing to rem and compensates for a 1px CSS border.\n@function rem-inner($pixels) {\n @if math.is-unitless($pixels) {\n $pixels: $pixels * 1px;\n }\n\n @return rem($pixels - 1px);\n}\n```<|im_end|>\n<|im_start|>assistant\n\n\n\n", "completion": "## Interface and Constraints\n\nThis SCSS file defines two utility functions for converting Figma pixel values to CSS `rem` units:\n\n### `rem($pixels)`\n- **Input:** A pixel value (e.g., `16px`, `24px`) or a unitless number (e.g., `16`).\n- **Behavior:**\n - If the input is unitless, it's treated as pixels.\n - If the input is not compatible with `1px` (e.g., a non-numeric value), it throws an error.\n - Returns the value divided by `$rem-base` (16px) and multiplied by `1rem`.\n- **Output:** A `rem` value (e.g., `1rem`, `1.5rem`).\n\n### `rem-inner($pixels)`\n- **Input:** A pixel value or unitless number.\n- **Behavior:** Subtracts 1px from the input (to compensate for a CSS border) and passes it to `rem()`.\n- **Output:** A `rem` value adjusted for a 1px border.\n\n---\n\n## Correct Usage Example\n\n```scss\n// In a Figma design, a card has a", "post_training_anonymized": true, "eligible_for_original_loader": true, "source_kind": "private_project"} {"id": "project-000015", "stage": "project", "split": "eval", "language": "en", "domain": "project_replay", "project": "project_02", "source_path": "source_000157.txt", "source_sha256": "4a2504822779145eabe3c2e63c24a3e26c1206777ee7803ab3717fa0a69c6ef5", "sampling_group": "project_replay/en", "prompt": "<|im_start|>system\nYou help develop this project. Use only the supplied source. Think and answer in English.<|im_end|>\n<|im_start|>user\nExplain the lifecycle and dependencies here. Address asynchronous work, cleanup, and repeated calls when they are present.\n\nProject: project_02\nFile: source_000157.txt\nLines: 76-145\n```vue\n \n \n\n\n\n```<|im_end|>\n<|im_start|>assistant\n\n\n\n", "completion": "## Lifecycle and Dependencies\n\nThis component is a small Vue 3 button that toggles a boolean (`modelValue`) and emits an `update:modelValue` event. It has no external JS dependencies beyond Vue 3 itself. The only asset it references is a SCSS file (`@/app/assets/styles/components/network/VsmEditorVisibilityButton.scss`), which is scoped to the component via the `\n```<|im_end|>\n<|im_start|>assistant\n\n\n\n", "completion": "## Жизненный цикл и зависимости\n\n### 1. Пропсы (props)\n- `modelValue: boolean` — значение, отображаемое на кнопке (вкл/выкл).\n- `label: string` — текст кнопки (используется для `aria-label` и `title`).\n- `disabled?: boolean` — опционально, кнопка может быть заблокирована.\n\n### 2. Эмиттеры (emits)\n- `update:modelValue` — высылается при клике, передаёт новое значение (вкл/выкл).\n\n### 3. Шаблон (template)\n- Кнопка с классы `vsm-editor-visibility` и `vsm-editor-visibility--hidden` (когда `modelValue` — `false`).\n- `:disabled` — блокирует кнопку.\n- `:aria-label` и `:title` — текст для скрин-читеров и тултипа.\n- `:aria-pressed` — индикатор состояния (вкл/выкл).\n- `@click` — при клике высылает `update:modelValue` с новым значением.\n- `VIcon` — отобра", "post_training_anonymized": true, "eligible_for_original_loader": true, "source_kind": "private_project"} {"id": "project-000051", "stage": "project", "split": "eval", "language": "ru", "domain": "project_replay", "project": "project_02", "source_path": "source_000194.txt", "source_sha256": "9f14b2115598e0750c35d0b7ccc8c31656aa6c38c3df39195d2409b47fdb8123", "sampling_group": "project_replay/ru", "prompt": "<|im_start|>system\nТы помогаешь разрабатывать этот проект. Используй только предоставленный код. Рассуждай и отвечай по-русски.<|im_end|>\n<|im_start|>user\nРазбери жизненный цикл и зависимости этого кода. Обрати внимание на асинхронность, очистку ресурсов и повторные вызовы, если они здесь есть.\n\nProject: project_02\nFile: source_000194.txt\nLines: 1-65\n```ts\nconst DEFAULT_COMPARISON_TABLE_FRAME_WIDTH_REM = 87\nconst ULTRA_WIDE_BREAKPOINT_PX = 2560\n\nconst getRootFontSizePx = (): number => {\n if (typeof window === 'undefined') return 16\n\n const rootFontSize = Number.parseFloat(window.getComputedStyle(document.documentElement).fontSize)\n return Number.isFinite(rootFontSize) && rootFontSize > 0 ? rootFontSize : 16\n}\n\nexport const useConstructorComparisonTableFrameWidth = () => {\n const comparisonTableElementRef = ref(null)\n const frameWidthPx = ref(null)\n\n const getBaseFrameWidthPx = (): number => DEFAULT_COMPARISON_TABLE_FRAME_WIDTH_REM * getRootFontSizePx()\n\n const updateFrameWidth = () => {\n if (typeof window === 'undefined') return\n\n if (window.innerWidth < ULTRA_WIDE_BREAKPOINT_PX) {\n frameWidthPx.value = null\n return\n }\n\n const comparisonTableElement = comparisonTableElementRef.value\n if (!comparisonTableElement) return\n\n const frameHostElement = comparisonTableElement.parentElement ?? comparisonTableElement\n const nextFrameWidth = Math.max(frameHostElement.clientWidth, getBaseFrameWidthPx())\n frameWidthPx.value = Number.isFinite(nextFrameWidth) ? nextFrameWidth : null\n }\n\n let comparisonResizeObserver: ResizeObserver | null = null\n\n onMounted(() => {\n updateFrameWidth()\n window.addEventListener('resize', updateFrameWidth)\n\n if (typeof ResizeObserver === 'undefined') return\n\n comparisonResizeObserver = new ResizeObserver(() => {\n updateFrameWidth()\n })\n\n const targetElement = comparisonTableElementRef.value?.parentElement ?? comparisonTableElementRef.value\n if (targetElement) {\n comparisonResizeObserver.observe(targetElement)\n }\n })\n\n onUnmounted(() => {\n window.removeEventListener('resize', updateFrameWidth)\n comparisonResizeObserver?.disconnect()\n comparisonResizeObserver = null\n })\n\n const comparisonTableFrameStyle = computed(() => {\n if (frameWidthPx.value === null) return undefined\n\n return {\n '--comparison-frame-width': `${frameWidthPx.value}px`,\n }\n })\n\n return {\n```<|im_end|>\n<|im_start|>assistant\n\n", "completion": "The user wants me to analyze the lifecycle and dependencies of this Vue composable code. Let me look at it carefully and identify issues, especially around async behavior, resource cleanup, and repeated calls.\n\nLet me go through the code:\n\n1. **`getBaseFrameWidthPx()`** - This is a computed value that's called every time. It depends on `getRootFontSizePx()` which reads from `document.documentElement`. This is fine for a computed property.\n\n2. **`updateFrameWidth()`** - This is the main logic:\n - Returns early if `window` is undefined\n - If `window.innerWidth < ULTRA_WIDE_BREAKPOINT_PX`, sets `frameWidthPx.value = null` and returns\n - Gets the comparison table element from the ref\n - If not found, returns\n - Gets the \"frame host\" element (parent or self)\n - Calculates `nextFrameWidth = Math.max(frameHostElement.clientWidth, getBaseFrameWidthPx())`\n - Sets `frameWidthPx.value` to the result if finite, else null\n\n3. **Lifecycle hooks:**\n - `onMounted()`: Calls `updateFrameWidth()`, adds resize listener, creates ResizeObserver\n ", "post_training_anonymized": true, "eligible_for_original_loader": true, "source_kind": "private_project"} {"id": "project-000052", "stage": "project", "split": "eval", "language": "ru", "domain": "project_replay", "project": "project_02", "source_path": "source_000238.txt", "source_sha256": "c5ac7078abc4147d18693ab14b0908d9cd504ea6c4198ab69a579eaa5594bb3b", "sampling_group": "project_replay/ru", "prompt": "<|im_start|>system\nТы помогаешь разрабатывать этот проект. Используй только предоставленный код. Рассуждай и отвечай по-русски.<|im_end|>\n<|im_start|>user\nОпиши интерфейс и ограничения этого фрагмента. Покажи пример корректного использования существующего API.\n\nProject: project_02\nFile: source_000238.txt\nLines: 121-176\n```ts\n recoverySettingsVersion.value = null\n needsReload.value = false\n }\n catch (error) {\n if (requestGeneration !== generation || requestId !== editorRequestId) return\n captureConflict(error)\n paramsError.value = errorMessage(error)\n }\n finally {\n if (requestGeneration === generation && requestId === editorRequestId) isParamsLoading.value = false\n }\n }\n\n const closeParams = () => {\n if (isCalculating.value) return\n editorRequestId++\n isParamsOpen.value = false\n isParamsLoading.value = false\n editor.clear()\n }\n\n const refreshResult = async (id: number, requestGeneration: number) => {\n try {\n const currentResult = await opmService.getResult(id)\n if (requestGeneration === generation) result.value = currentResult\n }\n catch (error) {\n if (requestGeneration === generation) loadError.value = errorMessage(error)\n }\n }\n\n const calculate = async () => {\n const id = projectId.value\n const currentSettings = editor.settings\n if (id === null || !currentSettings || isBusy.value || isParamsLoading.value || needsReload.value) return\n if (editor.revealInvalidField()) return\n const requestGeneration = generation\n isCalculating.value = true\n paramsError.value = ''\n try {\n const response = await opmService.calculate(id, {\n base_version: currentSettings.base_version,\n settings_version: currentSettings.settings_version,\n schema_version: currentSettings.schema_version,\n changes: editor.changes,\n })\n if (requestGeneration !== generation) return\n settings.value = response.settings\n result.value = response.result\n recoverySettingsVersion.value = null\n loadError.value = ''\n if (editor.schema) editor.load(editor.schema, response.settings)\n await refreshResult(id, requestGeneration)\n if (requestGeneration !== generation) return\n isParamsOpen.value = false\n if (!resultError.value) {\n```<|im_end|>\n<|im_start|>assistant\n\n\n\n", "completion": "## Интерфейс и ограничения\n\n### Основные переменные (state)\n- `projectId` — ID проекта (число или `null`)\n- `editor` — объект редактора (с `settings`, `changes`, `schema`, `revealInvalidField()`, `clear()`, `load()`)\n- `result` — результат (объект/`null`)\n- `loadError` — ошибка при загрузке (строка)\n- `resultError` — ошибка при результате (строка)\n- `paramsError` — ошибка при параметрах (строка)\n- `isCalculating` — флаг \"загрузка/расчет\"\n- `isParamsOpen` — флаг \"окно параметров открыто\"\n- `isParamsLoading` — флаг \"загрузка параметров\"\n- `needsReload` — флаг \"нужно перезагрузить\"\n- `generation` — генератор запроса (число, увеличивается при каждом новом запросе)\n- `editorRequestId` — ID редактора (для отбросить старых запросов)\n- `recoverySettingsVersion` — версия recovery (число или `null`)\n\n### Методы\n- `fetchParams", "post_training_anonymized": true, "eligible_for_original_loader": true, "source_kind": "private_project"} {"id": "project-000053", "stage": "project", "split": "eval", "language": "ru", "domain": "project_replay", "project": "project_01", "source_path": "source_000011.txt", "source_sha256": "4e207c7869aab8d42471516bd19ede91995c707ee22bb28e5d1c680d6c0b878b", "sampling_group": "project_replay/ru", "prompt": "<|im_start|>system\nТы помогаешь разрабатывать этот проект. Используй только предоставленный код. Рассуждай и отвечай по-русски.<|im_end|>\n<|im_start|>user\nПроведи краткий обзор корректности этого кода. Выбери наиболее существенный реальный риск либо обоснуй, почему по этому фрагменту его нельзя установить.\n\nProject: project_01\nFile: source_000011.txt\nLines: 1-59\n```tsx\nimport type { DiagnosticsOverlayViewportNativeProps } from 'native/types/diagnostics';\nimport React from 'react';\nimport { Pressable, Text, View } from 'react-native';\nimport Reanimated from 'react-native-reanimated';\nimport { useDiagnosticsOverlay } from 'native/composables/diagnostics';\nimport { DIAGNOSTIC_OVERLAY_ACCESSIBILITY_LABEL } from 'native/constants/diagnostics';\nimport { diagnosticsOverlayStyles as styles } from 'native/styles/diagnostics';\n\nexport const DiagnosticsOverlayViewport = ({\n interactionBlocked = false,\n layer = 'root'\n}: DiagnosticsOverlayViewportNativeProps) => {\n const {\n buttonBaseStyle,\n buttonPositionStyle,\n dragPanHandlers,\n handleButtonLayout,\n handleSave,\n handleTouchStart,\n isVisible,\n label,\n status\n } = useDiagnosticsOverlay({ layer });\n\n if (!isVisible) {\n return null;\n }\n\n return (\n \n \n [\n styles.button,\n status === 'success' ? styles.buttonSuccess : undefined,\n status === 'error' ? styles.buttonError : undefined,\n pressed ? styles.buttonPressed : undefined\n ]}\n >\n {label}\n \n \n \n );\n};\n```<|im_end|>\n<|im_start|>assistant\n\n\n\n", "completion": "## Краткий обзор\n\nКод выглядит чистым и соответствует паттернам React Native / Reanimated. Однако есть **один существенный риск** — **`onPress={handleSave}` is not guarded against double-tap / rapid taps**.\n\n## Почему это риск\n\n`handleSave` is called on every press. If the user taps the button twice in quick succession (which is common on mobile — e.g. they tap once, see no feedback, tap again), `handleSave` fires twice. In a diagnostics overlay this means:\n\n- Two save operations are dispatched.\n- If `handleSave` triggers a network call or state mutation, the second call may overwrite or duplicate data.\n- The `status` flag (`'success'` / `'error'`) is only updated after the save completes, so the second tap may still trigger a save while the first is in flight.\n\nThe code does guard against `interactionBlocked` and `status === 'saving'` for the `disabled` prop, but it does **not** guard against the `onPress` handler itself.\n\n## Подходящий паттерн\n\n```tsx\nsystem\nТы помогаешь разрабатывать этот проект. Используй только предоставленный код. Рассуждай и отвечай по-русски.<|im_end|>\n<|im_start|>user\nОпиши интерфейс и ограничения этого фрагмента. Покажи пример корректного использования существующего API.\n\nProject: project_02\nFile: source_000197.txt\nLines: 1-59\n```ts\nimport { gantBadgeColors, gantConfig } from '@modules/constructor/constants/gant'\nimport type { GantConfig } from '@modules/constructor/types/gant'\n\nexport function useGant() {\n const store = useGantStore()\n const { projects } = storeToRefs(store)\n\n const config = computed(() => {\n const projectStartYears = projects.value.map((project) => project.startDate.getFullYear())\n const projectEndYears = projects.value.map((project) => project.endDate.getFullYear())\n\n return {\n ...gantConfig,\n startYear: Math.min(gantConfig.startYear, ...projectStartYears),\n endYear: Math.max(gantConfig.endYear, ...projectEndYears),\n }\n })\n\n const years = computed(() => {\n const result: number[] = []\n for (let y = config.value.startYear; y <= config.value.endYear; y++) {\n result.push(y)\n }\n return result\n })\n\n const totalWidth = computed(() => years.value.length * config.value.yearWidth)\n\n function calculatePosition(date: Date): number {\n const startOfTimeline = new Date(config.value.startYear, 0, 1)\n const msPerYear = 365.25 * 24 * 60 * 60 * 1000\n const yearsFromStart = (date.getTime() - startOfTimeline.getTime()) / msPerYear\n return (yearsFromStart / years.value.length) * 100\n }\n\n function calculateWidth(startDate: Date, endDate: Date): number {\n const msPerYear = 365.25 * 24 * 60 * 60 * 1000\n const durationYears = (endDate.getTime() - startDate.getTime()) / msPerYear\n return (durationYears / years.value.length) * 100\n }\n\n function formatDateRange(startDate: Date, endDate: Date): string {\n const format = (d: Date) =>\n `${String(d.getDate()).padStart(2, '0')}.${String(d.getMonth() + 1).padStart(2, '0')}.${d.getFullYear()}`\n return `${format(startDate)} – ${format(endDate)}`\n }\n\n function getBadgeColor(phaseName: string): string {\n return gantBadgeColors[phaseName] ?? ''\n }\n\n return {\n config,\n projects,\n years,\n totalWidth,\n toggleProject: store.toggleProject,\n toggleSection: store.toggleSection,\n expandAll: store.expandAll,\n```<|im_end|>\n<|im_start|>assistant\n\n\n\n", "completion": "## Интерфейс и ограничения\n\n### Что возвращает `useGant()`\n\n```ts\n{\n config: ComputedRef,\n projects: Ref>,\n years: ComputedRef,\n totalWidth: ComputedRef,\n toggleProject: (project: GantProject) => void,\n toggleSection: (section: string) => void,\n expandAll: () => void,\n}\n```\n\n- **`config`** — объект с `startYear`, `endYear`, `yearWidth` и прочим.\n- **`projects`** — `RefArray` (объект-обёртка `ref` для массива) с проектами.\n- **`years`** — массив всех годов, от `startYear` до `endYear`.\n- **`totalWidth`** — ширина всего ганта в процентах (100% = 100% ширины контейнера).\n- **`toggleProject`** — функция для сгруппировки/разгруппировки проекта.\n- **`toggleSection`** — функция для сгруппировки", "post_training_anonymized": true, "eligible_for_original_loader": true, "source_kind": "private_project"} {"id": "project-000055", "stage": "project", "split": "eval", "language": "ru", "domain": "project_replay", "project": "project_01", "source_path": "source_000087.txt", "source_sha256": "898446cae0e0c77c1e5108560cbd8cafaf2d16c7c7ec3da647e3f5a93b7071bb", "sampling_group": "project_replay/ru", "prompt": "<|im_start|>system\nТы помогаешь разрабатывать этот проект. Используй только предоставленный код. Рассуждай и отвечай по-русски.<|im_end|>\n<|im_start|>user\nОбъясни, как безопасно упростить этот код с сохранением поведения. Покажи небольшой локальный рефакторинг и объясни его.\n\nProject: project_01\nFile: source_000087.txt\nLines: 33-85\n```ts\n/// ///////////////////////////////////////////////////////////\n\nimport './modal/Controller/init';\nimport './feedback/init';\nimport './project_03ization/init';\nimport './diagnostics/init';\nimport './diagnostics/Report/init';\nimport './diagnostics/NativeInstallation/init';\nimport './security/AppIntegrity/init';\nimport './security/RiskMonitoring/init';\nimport './security/SecureStoreDiagnostics/init';\nimport './network/Check/init';\nimport './network/ConnectionState/init';\nimport './network/OfflineRecovery/init';\nimport './network/Monitor/init';\n\n/// ///////////////////////////////////////////////////////////\n// ============== AUTHENTICATION FLOWS ====================== //\n/// ///////////////////////////////////////////////////////////\n\nimport './auth/RequestLifecycle/init';\nimport './auth/TwoFactor/init';\nimport './auth/CredentialContinuation/init';\nimport './auth/Passkey/Availability/init';\nimport './auth/Passkey/SessionCompletion/init';\nimport './auth/LoginContinuation/init';\nimport './auth/Session/Account/init';\nimport './auth/Session/LoginSessionPersistence/init';\nimport './auth/Session/SessionRefresh/init';\nimport './auth/Session/Logout/init';\nimport './auth/Session/Expiration/init';\nimport './auth/Session/Kyc/init';\nimport './auth/Session/PasswordRecovery/init';\nimport './auth/Session/VerifiedEmail/init';\nimport './auth/Passkey/init';\nimport './auth/Passkey/Registration/init';\nimport './auth/SignIn/LoginOptions/init';\nimport './auth/SignIn/PreferenceEnrollment/init';\nimport './auth/SignIn/PhoneCountry/init';\nimport './auth/SignIn/OtpDispatch/init';\nimport './auth/SignIn/OtpVerification/init';\nimport './auth/SignUp/PhoneCountry/init';\nimport './auth/SignUp/OtpDispatch/init';\nimport './auth/SignUp/OtpVerification/init';\nimport './auth/SignUp/Account/init';\nimport './auth/SignUp/Welcome/init';\nimport './auth/Start/RememberedPhone/init';\nimport './auth/Start/Credential/init';\nimport './auth/Start/ForgotPassword/init';\nimport './auth/Start/Password/init';\nimport './auth/Start/Pin/init';\nimport './auth/Start/Completion/init';\nimport './auth/ForgotPassword/Flow/init';\n```<|im_end|>\n<|im_start|>assistant\n\n\n\n", "completion": "## Что можно упростить здесь\n\nВ этом файле нет логики — это только **импорты**. Но импорты всё-таки можно упростить, если:\n\n1. **Убрать пустые строки и комментарии** — они не добавляют ничего.\n2. **Сгруппировать импорты по модулю** — так читается, что модуль `auth` содержит 20+ строк, а `network` 4.\n3. **Убрать `/// ///////////////////////////////////////////////////////////`** — это не стандартный TypeScript, а просто визуальный разделитель, который можно заменить по необходимости.\n4. **Убрать `// ============== ... =====================`** — тоже визуальный разделитель.\n\nНо самое важное: **не удалять ни одного импорта**, потому что каждый из них запускает `init()` и/или регистрирует модуль.\n\n---\n\n## Локальный рефакторинг\n\n```ts\nimport './modal/Controller/init';\nimport './feedback/init';\nimport './project_03ization/init';\nimport './diagnostics/init';\nimport './diagnostics/Report/init';\nimport './diagnostics/NativeInstallation/init';\nimport './security/AppIntegrity/init';", "post_training_anonymized": true, "eligible_for_original_loader": true, "source_kind": "private_project"} {"id": "project-000056", "stage": "project", "split": "eval", "language": "ru", "domain": "project_replay", "project": "project_01", "source_path": "source_000099.txt", "source_sha256": "ac12e07ff3eb0b45bff4cf61bd2c723ad08d5625597f21b0b318252581b1fe01", "sampling_group": "project_replay/ru", "prompt": "<|im_start|>system\nТы помогаешь разрабатывать этот проект. Используй только предоставленный код. Рассуждай и отвечай по-русски.<|im_end|>\n<|im_start|>user\nОбъясни, как безопасно упростить этот код с сохранением поведения. Покажи небольшой локальный рефакторинг и объясни его.\n\nProject: project_01\nFile: source_000099.txt\nLines: 25-88\n```tsx\n\nexport const AppRouter = ({ onReady }: AppRouterNativeProps) => {\n const navigationRef = useNavigationContainerRef();\n const [isNavigationReady, setIsNavigationReady] = useState(false);\n\n const [authColdStartSessionNavigationRoute, consumeAuthColdStartSessionNavigationRoute, syncAppRouting] = useUnit([\n $authColdStartSessionNavigationRoute,\n authColdStartSessionNavigationRouteConsumedFn,\n syncAppRoutingFromNavigationFn\n ]);\n\n const [authColdStartInitialState] = useState(() =>\n authColdStartSessionNavigationRoute\n ? createAuthColdStartNavigationState(authColdStartSessionNavigationRoute)\n : undefined\n );\n\n const hasAuthColdStartInitialState = authColdStartInitialState !== undefined;\n\n const { style: modalBottomSafeAreaStyle } = useScreenFooterSpacing({\n bottomGap: 0,\n includeSafeAreaInset: Platform.OS === 'ios'\n });\n\n const handleNavigationStateChange = useCallback(\n (state?: AppNavigationState) => {\n syncAppRouting(resolveAppRoutingFromNavigationState(state));\n },\n [syncAppRouting]\n );\n\n const completeAuthColdStartNavigation = useCallback(\n (route: AppAuthColdStartDestination) => {\n if (!hasAuthColdStartInitialState) {\n navigationRef.resetRoot(createAuthColdStartNavigationState(route));\n }\n\n consumeAuthColdStartSessionNavigationRoute();\n },\n [consumeAuthColdStartSessionNavigationRoute, hasAuthColdStartInitialState, navigationRef]\n );\n\n const handleNavigationReady = useCallback(() => {\n handleNavigationStateChange(navigationRef.getRootState());\n\n if (authColdStartSessionNavigationRoute) {\n completeAuthColdStartNavigation(authColdStartSessionNavigationRoute);\n }\n\n setIsNavigationReady(true);\n onReady?.();\n }, [\n authColdStartSessionNavigationRoute,\n completeAuthColdStartNavigation,\n handleNavigationStateChange,\n navigationRef,\n onReady\n ]);\n\n useEffect(() => {\n if (!isNavigationReady || !authColdStartSessionNavigationRoute) {\n return;\n }\n\n```<|im_end|>\n<|im_start|>assistant\n\n\n\n", "completion": "## Объяснение рефакторинга\n\n### 1. Упрощение `completeAuthColdStartNavigation`\n\n**Проблема:**\n```tsx\nconst completeAuthColdStartNavigation = useCallback(\n (route: AppAuthColdStartDestination) => {\n if (!hasAuthColdStartInitialState) {\n navigationRef.resetRoot(createAuthColdStartNavigationState(route));\n }\n\n consumeAuthColdStartSessionNavigationRoute();\n },\n [consumeAuthColdStartSessionNavigationRoute, hasAuthColdStartInitialState, navigationRef]\n);\n```\n\nЗдесь `hasAuthColdStartInitialState` — это `authColdStartInitialState !== undefined`, а `authColdStartInitialState` — это `authColdStartSessionNavigationRoute ? createAuthColdStartNavigationState(route) : undefined`.\n\nВ `completeAuthColdStartNavigation` мы проверяем `hasAuthColdStartInitialState` (то есть `authColdStartSessionNavigationRoute !== undefined`), а затем в `handleNavigationReady` мы проверяем `authColdStartSessionNavigationRoute` (тоже `!== undefined`).\n\n**Риски:**\n- `hasAuthColdStartInitialState` и `authColdStartSessionNavigationRoute` —", "post_training_anonymized": true, "eligible_for_original_loader": true, "source_kind": "private_project"} {"id": "project-000057", "stage": "project", "split": "eval", "language": "ru", "domain": "project_replay", "project": "project_01", "source_path": "source_000003.txt", "source_sha256": "c7b9bb84d3c0d57dddca99034fc5637aef6392749e199aa43d475624a409bf87", "sampling_group": "project_replay/ru", "prompt": "<|im_start|>system\nТы помогаешь разрабатывать этот проект. Используй только предоставленный код. Рассуждай и отвечай по-русски.<|im_end|>\n<|im_start|>user\nОбъясни поток данных и ответственность этого фрагмента. Укажи конкретные функции и состояния, не выдумывай отсутствующие детали.\n\nProject: project_01\nFile: source_000003.txt\nLines: 33-102\n```ts\n name,\n recordDiagnostic = recordDiagnosticEvent\n}: StorageOperationQueueOptions) => {\n let pendingOperation = Promise.resolve();\n let pendingOperationCount = 0;\n let nextOperationId = 1;\n\n return (operation: () => Promise) => {\n const operationId = nextOperationId;\n const operationsAhead = pendingOperationCount;\n const queuedAt = Date.now();\n let startedAt = queuedAt;\n\n nextOperationId += 1;\n pendingOperationCount += 1;\n\n const runOperation = () => {\n startedAt = Date.now();\n\n recordStorageOperationQueueDiagnostic(recordDiagnostic, name, 'started', {\n operationId,\n operationsAhead,\n waitDurationMs: startedAt - queuedAt\n });\n\n try {\n const operationResult = operation();\n\n void operationResult.then(\n () => {\n pendingOperationCount -= 1;\n recordStorageOperationQueueDiagnostic(recordDiagnostic, name, 'succeeded', {\n durationMs: Date.now() - startedAt,\n operationId,\n operationsAhead,\n waitDurationMs: startedAt - queuedAt\n });\n },\n (error) => {\n pendingOperationCount -= 1;\n recordStorageOperationQueueDiagnostic(recordDiagnostic, name, 'failed', {\n durationMs: Date.now() - startedAt,\n error,\n operationId,\n operationsAhead,\n waitDurationMs: startedAt - queuedAt\n });\n }\n );\n\n return operationResult;\n } catch (error) {\n pendingOperationCount -= 1;\n recordStorageOperationQueueDiagnostic(recordDiagnostic, name, 'failed', {\n durationMs: Date.now() - startedAt,\n error,\n operationId,\n operationsAhead,\n waitDurationMs: startedAt - queuedAt\n });\n\n throw error;\n }\n };\n\n const result = pendingOperation.then(runOperation, runOperation);\n\n pendingOperation = result.then(\n () => {},\n () => {}\n```<|im_end|>\n<|im_start|>assistant\n\n\n\n", "completion": "## Поток данных и ответственность\n\n### 1. Структура\n\nФайл `operationQueue.ts` реализует **очередку (queue) операций** для `StorageOperationQueue`. Он не содержит логики самой операции — только **управление последовательности** и **статистика**.\n\n### 2. Переменные состояния\n\n| Переменная | Тип | Описание |\n|---|---|---|\n| `pendingOperation` | `Promise` | \"Операция, которая в данный момент выполняется или уже в очереди\". Начинает с `Promise.resolve()` — т.е. очередь пустая. |\n| `pendingOperationCount` | `number` | Количество операций, которые **в очереди или выполняются**. |\n| `nextOperationId` | `number` | **ID последовательной операции**. Начинает с 1 и увеличивается на 1 для каждой новой операции. |\n\n### 3. Функция `operationQueue` — что она возвращает\n\n```ts\nreturn (operation: () => Promise) => {\n```\n\nЭто **функция, которая возвращает функцию** (currying). Ты передаёшь `operation` — функцию, что возвращает `", "post_training_anonymized": true, "eligible_for_original_loader": true, "source_kind": "private_project"} {"id": "project-000058", "stage": "project", "split": "eval", "language": "ru", "domain": "project_replay", "project": "project_02", "source_path": "source_000182.txt", "source_sha256": "195649884a8c901592e7a31d320c1ffd165ae8a9a77ca4345850ee2ac2f0e930", "sampling_group": "project_replay/ru", "prompt": "<|im_start|>system\nТы помогаешь разрабатывать этот проект. Используй только предоставленный код. Рассуждай и отвечай по-русски.<|im_end|>\n<|im_start|>user\nРазбери жизненный цикл и зависимости этого кода. Обрати внимание на асинхронность, очистку ресурсов и повторные вызовы, если они здесь есть.\n\nProject: project_02\nFile: source_000182.txt\nLines: 4-56\n```ts\n DEFAULT_PASSWORD_SETUP_MODE,\n SET_PASSWORD_SETUP_MODE,\n SUCCESS_REDIRECT_DELAY_MS,\n} from '@modules/auth/constants/reset-password'\nimport { useResetPasswordStore } from '@modules/auth/stores/reset-password'\nimport type { PasswordSetupMode } from '@modules/auth/types/reset-password'\nimport { AUTH_ROUTE_PATH, useproject_03Toast, type ToastType } from '@shared'\n\nconst isPasswordSetupMode = (value: unknown): value is PasswordSetupMode => {\n return value === DEFAULT_PASSWORD_SETUP_MODE || value === SET_PASSWORD_SETUP_MODE\n}\n\nexport const useResetPasswordPage = () => {\n const authStore = useAuthStore()\n const resetPasswordStore = useResetPasswordStore()\n const route = useRoute()\n const router = useRouter()\n const { add: showToastAdd } = useproject_03Toast()\n\n const {\n isValidating,\n isSubmitting,\n maxPasswordLength,\n passwordSetupConfig,\n passwordSchema,\n isReadyForForm,\n } = storeToRefs(resetPasswordStore)\n\n const passwordSetupMode = computed(() => {\n return isPasswordSetupMode(route.meta.passwordSetupMode)\n ? route.meta.passwordSetupMode\n : DEFAULT_PASSWORD_SETUP_MODE\n })\n\n const { handleSubmit, errors, meta, submitCount } = useForm({ validationSchema: passwordSchema })\n const { value: password, meta: passwordMeta } = useField('password')\n const { value: confirmPassword, meta: confirmPasswordMeta } = useField('confirmPassword')\n\n const hasPasswordInput = computed(() => Boolean(password.value?.length))\n const shouldShowRequirementErrors = computed(() => hasPasswordInput.value || submitCount.value > 0)\n\n const showPasswordError = computed(() => {\n return Boolean(errors.value.password) && (passwordMeta.dirty || submitCount.value > 0)\n })\n\n const showConfirmPasswordError = computed(() => {\n return Boolean(errors.value.confirmPassword) && (confirmPasswordMeta.dirty || submitCount.value > 0)\n })\n\n const passwordFieldErrorText = computed(() => {\n return resetPasswordStore.getRequiredFieldErrorText(showPasswordError.value, password.value, 'Введите пароль')\n })\n\n```<|im_end|>\n<|im_start|>assistant\n\n\n\n", "completion": "## Жизненный цикл и зависимости\n\n### 1. Импорты и константы\n- `DEFAULT_PASSWORD_SETUP_MODE`, `SET_PASSWORD_SETUP_MODE`, `SUCCESS_REDIRECT_DELAY_MS` — режимы настройки пароля и задержка после успешного сохранения.\n- `useResetPasswordStore` — стор, который хранит состояние формы (пароль, подтверждение, ошибки, статусы).\n- `PasswordSetupMode` — тип для режима (создание / изменение).\n- `AUTH_ROUTE_PATH`, `useproject_03Toast`, `ToastType` — маршруты и локальные уведомления.\n\n### 2. Функция `isPasswordSetupMode`\nПроверяет, является ли значение `DEFAULT_PASSWORD_SETUP_MODE` или `SET_PASSWORD_SETUP_MODE`.\n\n### 3. `useResetPasswordPage` — основной composable\n- **Создание сторов:** `authStore`, `resetPasswordStore`.\n- **Маршрут:** `route`, `router`.\n- **Уведнения:** `showToastAdd`.\n- **Связи с сторами:** `storeToRefs(resetPasswordStore)` — разворачивает стор в реактивные переменные.\n- **Режим пароля", "post_training_anonymized": true, "eligible_for_original_loader": true, "source_kind": "private_project"} {"id": "project-000059", "stage": "project", "split": "eval", "language": "ru", "domain": "project_replay", "project": "project_02", "source_path": "source_000158.txt", "source_sha256": "a6c4edab7340c4805328665972af1ed9ea074fb3d1f29ebabaf5a25d7e648b9f", "sampling_group": "project_replay/ru", "prompt": "<|im_start|>system\nТы помогаешь разрабатывать этот проект. Используй только предоставленный код. Рассуждай и отвечай по-русски.<|im_end|>\n<|im_start|>user\nПроанализируй обработку ошибок и пограничные случаи. Предложи одно небольшое улучшение и покажи соответствующий фрагмент кода.\n\nProject: project_02\nFile: source_000158.txt\nLines: 104-173\n```vue\n height: rem(260);\n padding: rem(20);\n border-radius: var(--radius-3xl);\n background: var(--background-primary);\n border: rem(1) solid var(--modal-stroke);\n box-shadow: var(--shadow-drawer-outer);\n contain: layout style;\n\n &--expanded {\n width: min(95vw, 140rem);\n height: 92vh;\n }\n\n &__body {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n padding: 0;\n border-radius: 0;\n background: transparent;\n border: 0;\n box-sizing: border-box;\n box-shadow: none;\n }\n\n &__headline {\n position: absolute;\n top: rem(20);\n right: rem(20);\n z-index: 1;\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n min-height: rem(44);\n }\n\n &__content {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n flex: 1;\n gap: rem(8);\n min-height: 0;\n }\n\n &__icon-group {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: rem(28);\n }\n\n &__icon {\n width: rem(48);\n height: rem(48);\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n\n svg {\n width: rem(48);\n height: rem(48);\n }\n\n &--loading {\n background: transparent;\n```<|im_end|>\n<|im_start|>assistant\n\n", "completion": "The user wants me to analyze error handling and edge cases in the provided Vue component code (lines 104-173), then propose one small improvement and show the corresponding code fragment.\n\nLet me look at what's actually in this code. It's a CSS/SCSS section of a Vue component called `VDownloadModal`. Let me analyze what's here:\n\n1. It's a modal component with:\n - A fixed height of 260px (or expanded to 92vh)\n - A body with flex layout\n - An absolute-positioned headline\n - An icon group with loading state\n\nNow, the user asks me to \"analyze error handling and edge cases.\" But looking at the code, this is purely a CSS/SCSS section. There's no JavaScript logic, no error handling, no data processing. The code is just styling.\n\nWait, let me re-read the prompt. \"Проанализируй обработку ошибок и пограничные случаи. Предложи одно небольшое улучшение и покажи соответствующий фрагмент кода.\"\n\nThe user is asking me to analyze error handling and edge cases in this code. But this code is just CSS/SCSS. There's no", "post_training_anonymized": true, "eligible_for_original_loader": true, "source_kind": "private_project"} {"id": "project-000060", "stage": "project", "split": "eval", "language": "ru", "domain": "project_replay", "project": "project_02", "source_path": "source_000222.txt", "source_sha256": "91ca22b932e13fbdabd3448b087ea0d6ee7b323fe9fa62930179afb7e5b42da8", "sampling_group": "project_replay/ru", "prompt": "<|im_start|>system\nТы помогаешь разрабатывать этот проект. Используй только предоставленный код. Рассуждай и отвечай по-русски.<|im_end|>\n<|im_start|>user\nОбъясни, как безопасно упростить этот код с сохранением поведения. Покажи небольшой локальный рефакторинг и объясни его.\n\nProject: project_02\nFile: source_000222.txt\nLines: 1-27\n```ts\nimport { useWindowSize } from '@vueuse/core'\nimport { MAP_LOW_HEIGHT_SCREEN_MAX_PX } from '@modules/map/constants/map'\n\nexport const resolveIsLowMapHeightScreen = (): boolean => {\n if (typeof window === 'undefined') {\n return false\n }\n\n return window.innerHeight < MAP_LOW_HEIGHT_SCREEN_MAX_PX\n}\n\nexport const useMapHeightMode = () => {\n const { height } = useWindowSize()\n\n const isLowMapHeightScreen = computed(() => {\n const viewportHeight = height.value\n if (!Number.isFinite(viewportHeight) || viewportHeight <= 0) {\n return resolveIsLowMapHeightScreen()\n }\n\n return viewportHeight < MAP_LOW_HEIGHT_SCREEN_MAX_PX\n })\n\n return {\n isLowMapHeightScreen,\n }\n}\n```<|im_end|>\n<|im_start|>assistant\n\n\n\n", "completion": "## Рефакторинг: упростить `resolveIsLowMapHeightScreen`\n\n### Сокращенный код\n\n```ts\nimport { useWindowSize } from '@vueuse/core'\nimport { MAP_LOW_HEIGHT_SCREEN_MAX_PX } from '@modules/map/constants/map'\n\nexport const useMapHeightMode = () => {\n const { height } = useWindowSize()\n\n const isLowMapHeightScreen = computed(() => {\n const viewportHeight = height.value\n if (!Number.isFinite(viewportHeight) || viewportHeight <= 0) {\n return false\n }\n\n return viewportHeight < MAP_LOW_HEIGHT_SCREEN_MAX_PX\n })\n\n return {\n isLowMapHeightScreen,\n }\n}\n```\n\n### Что я изменил\n\n1. **Удален `resolveIsLowMapHeightScreen`** — функция была только для проверки `window` и сравнения с константой. Поскольку `computed` уже работает в Vue 3 и `height.value` is a reactive reference, the `window` check is unnecessary in a Vue app context. If you truly need SSR safety, you can keep it as a small helper, but for a frontend-only module it", "post_training_anonymized": true, "eligible_for_original_loader": true, "source_kind": "private_project"} {"id": "project-000061", "stage": "project", "split": "eval", "language": "ru", "domain": "project_replay", "project": "project_02", "source_path": "source_000188.txt", "source_sha256": "1d0d284e6e08e0a884a06d6b1cf13a3bd16df1490f28fb9aeac29ce8da49dbf5", "sampling_group": "project_replay/ru", "prompt": "<|im_start|>system\nТы помогаешь разрабатывать этот проект. Используй только предоставленный код. Рассуждай и отвечай по-русски.<|im_end|>\n<|im_start|>user\nОбъясни, как безопасно упростить этот код с сохранением поведения. Покажи небольшой локальный рефакторинг и объясни его.\n\nProject: project_02\nFile: source_000188.txt\nLines: 90-143\n```vue\n stepSize: props.stepSize,\n }),\n)\n\nconst chartOptions = computed(() => {\n const chartTheme = theme.value\n const textColor = resolveThemeValue(chartTheme.colors.text)\n const secondaryTextColor = resolveThemeValue(chartTheme.colors.secondaryText)\n const mutedTextColor = resolveThemeValue(chartTheme.colors.mutedText)\n const gridColor = resolveThemeValue(chartTheme.colors.grid)\n const chartAreaBorderColor = resolveThemeValue(chartTheme.colors.chartAreaBorder)\n const chartAreaBorderStrongColor = resolveThemeValue(chartTheme.colors.chartAreaBorderStrong)\n const fontFamily = resolveThemeValue(chartTheme.typography.fontFamily)\n const gridDashPattern = chartTheme.grid.dashPattern.map((item) => scalePx(item))\n\n return {\n ...createGroupedBarChartRootcodeOptions({\n customGridLines: {\n verticalSpacing:\n props.verticalGridSpacing != null ? scalePx(props.verticalGridSpacing) : null,\n horizontalSpacing:\n props.horizontalGridSpacing != null ? scalePx(props.horizontalGridSpacing) : null,\n color: gridColor,\n lineWidth: scalePx(chartTheme.grid.lineWidth),\n dashPattern: gridDashPattern,\n },\n chartAreaBorder: {\n color: chartAreaBorderColor,\n lineWidth: scalePx(chartTheme.grid.lineWidth),\n dashPattern: gridDashPattern,\n dashOffset: scalePx(chartTheme.grid.dashOffset),\n solidBottom: true,\n },\n centerSingleGroupedBar: props.centerSingleBarPerCategory\n ? { minVisibleValue: 0 }\n : false,\n structuredTooltip: isTooltipEnabled.value\n ? createComparisonTooltipOptions(chartScaleFactor.value)\n : false,\n }),\n responsive: true,\n maintainAspectRatio: false,\n layout: {\n padding: { top: scalePx(22), right: scalePx(8), bottom: 0, left: scalePx(8) },\n },\n interaction: {\n mode: 'index' as const,\n intersect: false,\n },\n /* НАСТРОЙКА ГРУППИРОВКИ (для grouped bar chart) */\n scales: {\n x: {\n /* НАСТРОЙКА ГОРИЗОНТАЛЬНОЙ ОСИ */\n stacked: false, // Отключить стекирование для группировки\n```<|im_end|>\n<|im_start|>assistant\n\n\n\n", "completion": "## Рефакторинг: упростить `computed` и его зависимости\n\nВ коде есть много повторяющихся `resolveThemeValue(...)` и `scalePx(...)` — это 10+ строк, которые можно уместить в 2-3 строк.\n\n### 1. Упростить `chartOptions`\n\n```vue\nconst chartOptions = computed(() => {\n const chartTheme = theme.value\n const textColor = resolveThemeValue(chartTheme.colors.text)\n const secondaryTextColor = resolveThemeValue(chartTheme.colors.secondaryText)\n const mutedTextColor = resolveThemeValue(chartTheme.colors.mutedText)\n const gridColor = resolveThemeValue(chartTheme.colors.grid)\n const chartAreaBorderColor = resolveThemeValue(chartTheme.colors.chartAreaBorder)\n const chartAreaBorderStrongColor = resolveThemeValue(chartTheme.colors.chartAreaBorderStrong)\n const fontFamily = resolveThemeValue(chartTheme.typography.fontFamily)\n const gridDashPattern = chartTheme.grid.dashPattern.map((item) => scalePx(item))\n\n return {\n ...createGroupedBarChartRootcodeOptions({\n customGridLines: {\n verticalSpacing:\n props.verticalGridSpacing !=", "post_training_anonymized": true, "eligible_for_original_loader": true, "source_kind": "private_project"} {"id": "project-000062", "stage": "project", "split": "eval", "language": "ru", "domain": "project_replay", "project": "project_01", "source_path": "source_000076.txt", "source_sha256": "a569451446e6a91cef2185e1f4324c5cfe5e815efcb9ebd63d91049f8415b035", "sampling_group": "project_replay/ru", "prompt": "<|im_start|>system\nТы помогаешь разрабатывать этот проект. Используй только предоставленный код. Рассуждай и отвечай по-русски.<|im_end|>\n<|im_start|>user\nОбъясни, как безопасно упростить этот код с сохранением поведения. Покажи небольшой локальный рефакторинг и объясни его.\n\nProject: project_01\nFile: source_000076.txt\nLines: 105-174\n```ts\n maxAmountMinor,\n maxSendableMinor,\n minAmountMinor,\n minorUnitExponent,\n sendable,\n status\n };\n\n return hasConsistentLimits(wallet) ? wallet : null;\n};\n\nconst isUnsupportedCurrencyRow = (value: Record) => {\n if (typeof value.currency !== 'string') {\n return false;\n }\n\n const normalizedCurrency = value.currency.trim().toUpperCase();\n\n const isIsoCurrencyCode =\n value.currency === normalizedCurrency && TRANSFER_CURRENCY_CODE_PATTERN.test(normalizedCurrency);\n\n return isIsoCurrencyCode && !isTransferSourceWalletCurrency(normalizedCurrency);\n};\n\nexport const resolveTransferSourceWalletsResponse = (value: unknown): TransferSourceWallet[] | null => {\n if (!isRecord(value) || !Array.isArray(value.wallets)) {\n return null;\n }\n\n const wallets: TransferSourceWallet[] = [];\n const currencies = new Set();\n\n for (const row of value.wallets) {\n if (!isRecord(row)) {\n return null;\n }\n\n if (isUnsupportedCurrencyRow(row)) {\n continue;\n }\n\n const wallet = resolveTransferSourceWallet(row);\n\n if (wallet === null || currencies.has(wallet.currency)) {\n return null;\n }\n\n currencies.add(wallet.currency);\n wallets.push(wallet);\n }\n\n return wallets;\n};\n\nexport const resolveTransferSourceWalletOptions = (\n wallets: readonly TransferSourceWallet[] | null\n): readonly DashboardWallet[] => {\n if (wallets === null) {\n return [];\n }\n\n const options: DashboardWallet[] = [];\n\n for (const wallet of wallets) {\n const presentation = TRANSFER_SOURCE_WALLET_METADATA.find(({ currency }) => currency === wallet.currency);\n\n if (presentation) {\n const amount =\n wallet.availableMinor === 0\n ? TRANSFER_SOURCE_WALLET_BALANCE_FALLBACK\n```<|im_end|>\n<|im_start|>assistant\n\n\n\n", "completion": "## Общее\n\nКод — это \"чистый\" (pure) resolver: данные в, данные out. Он делает три вещи:\n1. `resolveTransferSourceWalletsResponse` — парсит сырые строки/объекты из API и возвращает массив `TransferSourceWallet[]` или `null`.\n2. `resolveTransferSourceWalletOptions` — превращает массив `TransferSourceWallet` в массив `DashboardWallet` (с fallback-балансом и metadata-картами).\n3. `isUnsupportedCurrencyRow` — проверяет, не является ли строка \"неправильной\" (не-ISO или не-переводимой).\n\n## Основная проблема\n\nВ `resolveTransferSourceWalletsResponse` есть **silent failure**: если *любая* строка в `value.wallets` не-`Record` или имеет \"неправильную\" валюту, функция возвращает `null` — то есть **весь** массив, включая wallets, которые были успешно распarsed. Это не \"якорь\" (fail-fast), это \"якорь-в-пустую\": один плохой элемент отбрасывает всё.\n\nВ `resolveTransferSourceWalletOptions` же", "post_training_anonymized": true, "eligible_for_original_loader": true, "source_kind": "private_project"} {"id": "project-000063", "stage": "project", "split": "eval", "language": "ru", "domain": "project_replay", "project": "project_02", "source_path": "source_000264.txt", "source_sha256": "543bb1bc697a6f70e66fe0906e11d7d8e0867909480ade0235399954f2e47772", "sampling_group": "project_replay/ru", "prompt": "<|im_start|>system\nТы помогаешь разрабатывать этот проект. Используй только предоставленный код. Рассуждай и отвечай по-русски.<|im_end|>\n<|im_start|>user\nОпиши интерфейс и ограничения этого фрагмента. Покажи пример корректного использования существующего API.\n\nProject: project_02\nFile: source_000264.txt\nLines: 1-67\n```ts\nexport const DOCX_MIME_TYPE = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'\nexport const DOCX_VALUE_FRACTION_DIGITS = 2\n\n/** Макеты 842 × 595: геометрия в pt, в OOXML переводится в twips. */\nexport const DOCX_PAPERS = {\n A4: { width: 841.9, height: 595.3 },\n A3: { width: 1190.6, height: 841.9 },\n} as const\nexport const DOCX_LAYOUT = {\n margin: 34,\n headerMargin: 14,\n font: 'Onest',\n bodySize: 10,\n headingSize: 14,\n headerSize: 8,\n tablePadding: 9,\n labelColumnWidth: 232,\n dataColumnsPerPage: 5,\n cardColumns: 3,\n chartHeight: 244,\n graphicGap: 14,\n rasterScale: 4,\n ganttRowHeight: 28,\n ganttYearsPerPage: 12,\n} as const\nexport const DOCX_COLORS = {\n text: '1C3A73', muted: '667085', border: 'E4E5E8',\n panel: 'F8F8F9', stripe: 'F2F3F5', white: 'FFFFFF', accent: '6172F3',\n palette: ['A4ABF5', 'EFA1B7', '8DBFF7', '87D99C', 'FEB273', 'B2A0F4'],\n gantt: { project: 'E99342', section: 'E99342', design: '8DBFF7', construction: 'B2A0F4', commissioning: '87C990' },\n} as const\nexport const DOCX_CHART_CATEGORIES = { line: 18, grouped: 12, single: 24 } as const\nexport const DOCX_FONT_FILES = {\n regular: 'fonts/docx/Onest-Regular.ttf',\n bold: 'fonts/docx/Onest-Bold.ttf',\n} as const\n\nexport const DOCX_TABLE_LAYOUT = {\n projectsPerPage: 4,\n rankingRowsPerPage: 10,\n cellPadding: 16,\n matrixRowHeight: 52,\n rankingRowHeight: 42,\n rankingMatrixRowHeight: 40,\n rankingMatrixGroupHeight: 30,\n rankingMatrixCellPadding: 10,\n rankingMatrixHeaderHeight: 74,\n panelPadding: 12,\n headingHeight: 34,\n headerHeight: 36,\n badgeHeaderHeight: 58,\n} as const\n\nexport const DOCX_CARD_LAYOUT = {\n columns: 3,\n gap: 12,\n headingHeight: 28,\n metricHeight: 88,\n projectHeight: 56,\n projectsWithMetrics: 9,\n} as const\n\nexport const DOCX_BADGE_COLORS = {\n vsm: 'E99342',\n 'vsm-inter': 'F7E28C',\n sm: '6555E8',\n} as const\n```<|im_end|>\n<|im_start|>assistant\n\n", "completion": "The user wants me to describe the interface and constraints of this code fragment, and show an example of correct usage of the existing API. Let me analyze the code carefully.\n\nThis is a TypeScript constants file (`source_000264.txt`) for a project called \"project_02\". It exports a set of constants related to DOCX (Microsoft Word Open XML) document generation, specifically for what appears to be a CV/Resume (PRIVATE_LABEL_007) document template.\n\nLet me identify the interface and constraints:\n\n1. **Type safety**: All objects use `as const` assertions, making them readonly and preventing mutation.\n2. **MIME type**: Only one specific DOCX MIME type is supported.\n3. **Paper sizes**: Only A4 and A3 are defined (A3 is 1190.6 × 841.9 pt).\n4. **Layout constants**: All layout values are numeric and have specific semantic meanings (margins, font sizes, heights).\n5. **Color constants**: Colors are hex strings (6 chars, no # prefix), and the palette is a fixed array.\n6. **Font files**: Only two font files are referenced (regular and bold).\n7. **Chart categories", "post_training_anonymized": true, "eligible_for_original_loader": true, "source_kind": "private_project"} {"id": "project-000064", "stage": "project", "split": "eval", "language": "ru", "domain": "project_replay", "project": "project_01", "source_path": "source_000059.txt", "source_sha256": "44a6702e60340859dc10b64888af22c267498d6cff6a023fc9d2ace8d245a3ce", "sampling_group": "project_replay/ru", "prompt": "<|im_start|>system\nТы помогаешь разрабатывать этот проект. Используй только предоставленный код. Рассуждай и отвечай по-русски.<|im_end|>\n<|im_start|>user\nОпиши интерфейс и ограничения этого фрагмента. Покажи пример корректного использования существующего API.\n\nProject: project_01\nFile: source_000059.txt\nLines: 1-11\n```ts\nimport { SHADCN_PALETTE } from './theme';\n\nexport const SKELETON_APPEARANCE = {\n backgroundColor: SHADCN_PALETTE.neutral[800],\n borderRadius: 8\n} as const;\n\nexport const SKELETON_ANIMATION = {\n durationMs: 800,\n minimumOpacity: 0.45\n} as const;\n```<|im_end|>\n<|im_start|>assistant\n\n", "completion": "We need answer in Russian. User asks: \"Опиши интерфейс и ограничения этого фрагмента. Покажи пример корректного использования существующего API.\" Project: project_01, File: source_000059.txt, Lines: 1-11. Need describe interface and limitations of this fragment. Show example of correct usage of existing API.\n\nNeed analyze code. It's a TypeScript file exporting two constants: SKELETON_APPEARANCE and SKELETON_ANIMATION. They are as const objects. SKELETON_APPEARANCE has backgroundColor from SHADCN_PALETTE.neutral[800], borderRadius 8. SKELETON_ANIMATION has durationMs 800, minimumOpacity 0.45.\n\nNeed likely explain: interface? It's not a TypeScript interface, just exported constants. But user says \"интерфейс\" maybe means API surface. Need describe: SKELETON_APPEARANCE is a frozen object literal with two properties: backgroundColor (color from theme neutral 800) and borderRadius (8). SKELETON_ANIMATION is frozen object with durationMs (800 ms) and minimumOpacity (0.45). Usage example:", "post_training_anonymized": true, "eligible_for_original_loader": true, "source_kind": "private_project"}