diff --git a/.peppa/memory.md b/.peppa/memory.md index 62f5266..f9a1ed9 100644 --- a/.peppa/memory.md +++ b/.peppa/memory.md @@ -27,10 +27,12 @@ - Фото и описания (DIK-42): колонки «источник фото»/«источник описания» обязательны при наличии фото/описания; фото из 2ГИС/соцсетей/чужих сайтов не берём (лицензия) — только свободные лицензии или ссылка владельца; правка владельцем ставит источник «владелец» и не трогает дату проверки (patch без checked) - Пеший маршрут (DIK-45): src/route.js, OSRM table foot, ROUTE_URL ("off" в npm test); /api/venues отдаёт walk {m,min,approx}, сортировка по walk.min; без маршрута — по прямой 80 м/мин и approx - Источники и сайты (DIK-46): колонка CSV «сайт и соцсети» (обновлено/нет данных/пусто) + колонка «Источник» на /base (ключи colSource, web*); сайты заведений цен ланча почти не дают, Instagram закрыт — значения из 2ГИС остаются +- Пустых мест в карточке нет (DIK-26): buildList/offerState отдаёт price active|later|unconfirmed (+lunchHours) и promoState active|ended|none; unconfirmed = цена не подтверждена; fmt в app.js/base.js подставляет "" вместо undefined; /base: закончившаяся акция — basePromoEnded, нет даты — baseNotChecked ## Грабли - 2ГИС отдаёт данные только через WebFetch (curl — пустая оболочка); в карточке есть «Ланч от N ₸» и «Ланч ЧЧ:ММ-ЧЧ:ММ» на /tab/info, дней недели нет; часть левого берега — район Нура, а пр. Абая/Республики — Байконур и Сарыарка, не Алматы - В общей рабочей копии может одновременно работать другой агент и переключать ветку — для своей стори бери отдельный git worktree +- Браузер chrome-devtools может быть занят другим агентом — тексты карточек тогда проверяй, прогнав /api/venues через переводы в node ## Соглашения - Подписи (DIK-5): у полей — видимый label for, у кнопок без текста — data-al (aria-label) и data-ti (title) из i18n; новые ключи сразу ru/kk/en (check-i18n сверяет) diff --git a/openspec/changes/dik-26-no-empty-price/design.md b/openspec/changes/archive/2026-11-16-dik-26-no-empty-price/design.md similarity index 100% rename from openspec/changes/dik-26-no-empty-price/design.md rename to openspec/changes/archive/2026-11-16-dik-26-no-empty-price/design.md diff --git a/openspec/changes/dik-26-no-empty-price/proposal.md b/openspec/changes/archive/2026-11-16-dik-26-no-empty-price/proposal.md similarity index 100% rename from openspec/changes/dik-26-no-empty-price/proposal.md rename to openspec/changes/archive/2026-11-16-dik-26-no-empty-price/proposal.md diff --git a/openspec/changes/dik-26-no-empty-price/specs/nearby-lunch/spec.md b/openspec/changes/archive/2026-11-16-dik-26-no-empty-price/specs/nearby-lunch/spec.md similarity index 100% rename from openspec/changes/dik-26-no-empty-price/specs/nearby-lunch/spec.md rename to openspec/changes/archive/2026-11-16-dik-26-no-empty-price/specs/nearby-lunch/spec.md diff --git a/openspec/changes/dik-26-no-empty-price/specs/venues-base/spec.md b/openspec/changes/archive/2026-11-16-dik-26-no-empty-price/specs/venues-base/spec.md similarity index 100% rename from openspec/changes/dik-26-no-empty-price/specs/venues-base/spec.md rename to openspec/changes/archive/2026-11-16-dik-26-no-empty-price/specs/venues-base/spec.md diff --git a/openspec/changes/dik-26-no-empty-price/tasks.md b/openspec/changes/archive/2026-11-16-dik-26-no-empty-price/tasks.md similarity index 87% rename from openspec/changes/dik-26-no-empty-price/tasks.md rename to openspec/changes/archive/2026-11-16-dik-26-no-empty-price/tasks.md index 7be95e2..b377e86 100644 --- a/openspec/changes/dik-26-no-empty-price/tasks.md +++ b/openspec/changes/archive/2026-11-16-dik-26-no-empty-price/tasks.md @@ -8,5 +8,5 @@ - [x] 2.3 Тексты ru/kk/en, проверка ключей в `client.test.js` ## 3. Завершение -- [ ] 3.1 Проверки (lint/test/build), просмотр экрана, сверка текстов со словарём -- [ ] 3.2 Память, archive, PR +- [x] 3.1 Проверки (lint/test/build), просмотр экрана, сверка текстов со словарём +- [x] 3.2 Память, archive, PR diff --git a/openspec/specs/nearby-lunch/spec.md b/openspec/specs/nearby-lunch/spec.md index 038888e..3fb537b 100644 --- a/openspec/specs/nearby-lunch/spec.md +++ b/openspec/specs/nearby-lunch/spec.md @@ -46,7 +46,7 @@ - **THEN** вместо списка показано сообщение, что рядом нет заведений из базы ### Requirement: Бизнес-ланч и акции -Система SHALL показывать бизнес-ланч с ценой и временем, а акцию с описанием и сроком, только пока они действуют; акция, срок которой в базе не указан, SHALL показываться без даты. +Система SHALL показывать бизнес-ланч с ценой и временем, а акцию с описанием и сроком, только пока они действуют; акция, срок которой в базе не указан, SHALL показываться без даты. Если действующих ланча или акции нет, карточка SHALL вместо них показывать понятную фразу, а не пустое место. #### Scenario: Ланч в будний день в обед - **GIVEN** у заведения ланч за 2500 ₸ по будням с 12:00 до 15:00 @@ -54,14 +54,28 @@ - **THEN** в карточке указаны цена 2500 ₸ и время 12:00–15:00 #### Scenario: Ланч вечером или в выходной -- **GIVEN** у заведения ланч по будням с 12:00 до 15:00 +- **GIVEN** у заведения ланч по будням с 12:00 до 15:00, данные проверены вчера - **WHEN** пользователь открывает список в субботу в 13:00 -- **THEN** заведение в списке есть, но без пометки о ланче +- **THEN** заведение в списке есть, без пометки о действующем ланче +- **AND** в карточке написано «Бизнес-ланч в другое время: 12:00–15:00» + +#### Scenario: Нет данных о цене +- **GIVEN** у заведения в базе нет бизнес-ланча, но есть действующая акция «Кофе в подарок» +- **WHEN** пользователь открывает список +- **THEN** в карточке написано «Цена не подтверждена» +- **AND** показана «Акция: Кофе в подарок» #### Scenario: Акция закончилась - **GIVEN** срок акции истёк вчера - **WHEN** пользователь открывает список -- **THEN** акция в карточке не показана +- **THEN** акция в карточке как действующая не показана +- **AND** в карточке написано «Акция закончилась» + +#### Scenario: Акции нет +- **GIVEN** у заведения в базе нет акции +- **WHEN** пользователь открывает список +- **THEN** в карточке написано «Акции сейчас нет» +- **AND** на экране нет слов null, undefined и пустых значений #### Scenario: Акция без срока - **GIVEN** у заведения акция «Кофе в подарок к обеду» без даты окончания diff --git a/openspec/specs/venues-base/spec.md b/openspec/specs/venues-base/spec.md index f3a99a4..3d4f118 100644 --- a/openspec/specs/venues-base/spec.md +++ b/openspec/specs/venues-base/spec.md @@ -86,7 +86,7 @@ - **THEN** проверка проходит, прежние строки не менялись ### Requirement: Страница со всей базой -Сервис SHALL показывать на странице `/base` таблицу всех заведений базы: название, адрес, координаты, время и цену бизнес-ланча в тенге, акцию и дату проверки в формате ДД.ММ.ГГГГ. Района в таблице нет. Если бизнес-ланча нет, SHALL быть написано «бизнес-ланча нет», если нет акции — «нет». +Сервис SHALL показывать на странице `/base` таблицу всех заведений базы: название, адрес, координаты, время и цену бизнес-ланча в тенге, акцию и дату проверки в формате ДД.ММ.ГГГГ. Района в таблице нет. Если бизнес-ланча нет, SHALL быть написано «бизнес-ланча нет», если нет акции — «нет», если срок акции прошёл — «акция закончилась», если нет даты проверки — «не проверяли». #### Scenario: Открытие таблицы - **GIVEN** в базе 29 заведений @@ -99,6 +99,16 @@ - **WHEN** пользователь смотрит его строку - **THEN** в колонке ланча написано «бизнес-ланча нет», в колонке акции — «нет» +#### Scenario: Акция закончилась +- **GIVEN** у заведения акция «Кофе в подарок» до 01.11.2026 +- **WHEN** пользователь открывает страницу «Вся база» 16.11.2026 +- **THEN** в колонке акции написано «Кофе в подарок — акция закончилась (01.11.2026)» + +#### Scenario: Нет даты проверки +- **GIVEN** у заведения не указана дата проверки +- **WHEN** пользователь смотрит его строку +- **THEN** в колонке «Проверено» написано «не проверяли», а не пустая ячейка + ### Requirement: Пояснение об источниках данных Страница «Вся база» SHALL содержать короткий текст о том, откуда взяты данные и кто их собирал, по каждому источнику, а раздел «О сервисе» SHALL вести на него ссылкой. diff --git a/public/i18n/en.json b/public/i18n/en.json index 1fbe8a1..03d008d 100644 --- a/public/i18n/en.json +++ b/public/i18n/en.json @@ -1 +1 @@ -{"title":"Lunch nearby","subtitle":"Nearest lunch places in Astana with business lunches and promotions.","useLocation":"Show places near me","manualHint":"Or enter an address — we will show places near it.","addressPlaceholder":"Address, e.g. Dostyk St, 13","findAddress":"Find by address","onlyOffers":"Only with a business lunch or promotion","lunch":"Business lunch {price} ₸, {from}–{to}","promo":"Promotion: {text} (until {until})","m":"m","km":"km","noneNearby":"There are no places near you yet. Showing the full list.","noOffers":"No places nearby have a business lunch or promotion right now. Turn the switch off to see all places.","geoDenied":"We cannot access your location. Allow it for this site in your browser settings and press the button again — or enter an address below.","addrNotFound":"We do not have this address. Please check it — meanwhile, here is the full list.","error":"The list did not load. Please try again in a moment.","menuNearby":"Near me","menuAbout":"About","aboutText":"We show the nearest lunch places in Astana and mark where a business lunch or promotion is available now. Distance and time follow the walking route, and places are sorted by travel time. If a route cannot be worked out, we say “about” and use the straight line.","promoOpen":"Promotion: {text}","admTitle":"Edit data","admIntro":"Here you change business lunch prices, deals, end dates and the check date. Entries not checked for more than 14 days, and deals past their end date, are hidden on the site. To bring an entry back, set a new check date or end date.","admName":"Place","admPrice":"Lunch price, ₸","admPromo":"Deal (empty — no deal)","admUntil":"Deal ends","admChecked":"Check date","admToday":"Today","admSave":"Save","admStatus":"On the site","admActive":"Shown","admHiddenStale":"Hidden: not checked for more than 14 days","admHiddenExpired":"Hidden: the deal has ended","admNoLunch":"No business lunch","admNoPromo":"No deal","admLunchLabel":"Business lunch","admPromoLabel":"Deal","admOnlyHidden":"Hidden entries only","admHiddenCount":"Hidden entries: {n}","admSaved":"Saved. The changes are already on the site.","admErrPrice":"The price is not valid. Enter a whole number of tenge, for example 3500.","admErrDate":"The date is not valid. Pick the check date in the calendar.","admErrFuture":"The check date is in the future. Pick today or an earlier day.","admErrOther":"Could not save. Check the fields and try again.","admLoadError":"Could not load the table. Refresh the page.","admBack":"To the site","searching":"Looking for places near you…","menuOpen":"Open menu","langLabel":"Language","menuLabel":"Menu","addressLabel":"Enter an address","promoTexts":{"1 кг сазана + 1 л напитка в подарок":"1 kg of carp + 1 l of a drink as a gift","KUDAFEST: сет из нескольких блюд, десерта и напитка за 4000 ₸, ежедневно 11:00–21:00":"KUDAFEST: a set of several dishes, a dessert and a drink for 4000 ₸, daily 11:00–21:00","KUDAFEST: сет из нескольких блюд, десерта и напитка за 4000 ₸, ежедневно 15:00–22:30, кроме среды":"KUDAFEST: a set of several dishes, a dessert and a drink for 4000 ₸, daily 15:00–22:30 except Wednesday"},"menuBase":"Full list","baseTitle":"All places","baseIntro":"All places in our list: address, business lunch, offer and the date we last checked.","baseCount":"Places: {n}","colName":"Name","colAddress":"Address","colCoords":"Coordinates","colLunch":"Business lunch","colPromo":"Offer","colChecked":"Checked","noLunch":"no business lunch","noPromo":"none","baseLunch":"{price} ₸, {from}–{to}","baseError":"We could not load the places. Please refresh the page.","backHome":"Back to nearby search","srcTitle":"Where the data comes from","srcIntro":"All data was collected by our team's AI agent on 16.11.2026 from open sources on the internet. Nobody has called or visited the places yet, so please confirm prices and lunch hours with the place.","srcGis":"2GIS — collected by the AI agent: name, address, map location, business lunch, price and serving time, offers from the place's card.","srcNews":"An article by the city outlet digitalbusiness.kz dated 04.11.2026 — read by the AI agent: the KUDAFEST offer at two places.","srcMap":"OpenStreetMap — checked by the AI agent: only used to verify map locations.","srcSite":"Places' own websites — looked at by the AI agent on 16.11.2026: they almost never list lunch prices or hours, so most prices still come from 2GIS.","srcSocial":"Places' social media — searched by the AI agent on 16.11.2026: pages are often closed without logging in, and no fresh prices were found.","srcCall":"Phone calls to the places — nobody has called yet.","srcVisit":"Visits to the places — nobody has visited yet.","srcLink":"Where the data comes from","listPreparing":"The list of places is still being prepared. Please check back a little later — they will appear here as soon as they are ready.","checkedOn":"Checked {date}","admCheckedOn":"Checked on {date}","admNeverChecked":"No check date set","admHiddenHint":"This entry is hidden and not shown on the site. To bring it back, press «Today» and save, or set a new end date for the offer.","admAutoDate":"If you change the price, offer or end date and leave the check date alone, we set today's date.","notConfirmed":"Price not confirmed","geoFailed":"We could not work out where you are. Enter an address below — meanwhile, here is the full list.","geoSlow":"Finding your location took too long. Enter an address below — meanwhile, here is the full list.","resultsAll":"Places found: {n}. Showing all places nearby.","resultsOffers":"Places found: {n}. Showing only places with a business lunch or promotion.","noDescription":"Description coming soon","photoAlt":"Photo: {name}","noPhoto":"No photo yet","filterDistance":"Distance","distAny":"Any","dist1":"Up to 1 km","dist2":"Up to 2 km","dist5":"Up to 5 km","distNeedPlace":"You can pick a distance once we know where you are. Press “Show places near me” or enter an address.","filterPrice":"Lunch price","priceAny":"Any","price2000":"Up to 2000 ₸","price3000":"Up to 3000 ₸","price4000":"Up to 4000 ₸","noMatch":"Nothing matches the chosen filters. Reset the filters to see all places nearby.","resetFilters":"Reset filters","admDescription":"Description (up to 300 characters, empty — bring back the placeholder)","admPhoto":"Photo link (empty — bring back the placeholder)","admDescSource":"Description source: {source}","admPhotoSource":"Photo source: {source}","admNoDescription":"No description yet","admNoPhoto":"No photo yet","admSaveText":"Save description and photo","admErrDescription":"The description is too long. Shorten it to 300 characters.","admErrPhoto":"The photo link is not valid. Paste a picture address that starts with http or https.","admSrcOwner":"you (the owner)","colDescription":"Description","colPhoto":"Photo","colSource":"Source","srcOwner":"site owner","noDescriptionBase":"no description","noPhotoBase":"placeholder","photoOf":"Photo","srcPhotoNote":"We use a photo only where its source allows it. Where it does not, or none was found, the card keeps a placeholder. Descriptions are written in our own words.","srcLabel":"Source:","walkExact":"{dist}, {min} min on foot","walkApprox":"about {dist}, {min} min on foot","walkApproxNote":"“About” means we could not work out the walking route, so we used the straight-line distance.","webUpdated":"Website and social media checked, data updated","webNone":"Website and social media checked, nothing new — kept the previous values","webNot":"Website and social media not checked","resultsNoPlace":"Places found: {n}. No place is set, so the full list is shown.","lunchLater":"Business lunch at another time: {from}–{to}","promoNone":"No offer right now","promoEnded":"The offer has ended","basePromoEnded":"{text} — offer ended ({until})","baseNotChecked":"not checked","baseNoSource":"not specified"} +{"title":"Lunch nearby","subtitle":"Nearest lunch places in Astana with business lunches and promotions.","useLocation":"Show places near me","manualHint":"Or enter an address — we will show places near it.","addressPlaceholder":"Address, e.g. Dostyk St, 13","findAddress":"Find by address","onlyOffers":"Only with a business lunch or promotion","lunch":"Business lunch {price} ₸, {from}–{to}","promo":"Promotion: {text} (until {until})","m":"m","km":"km","noneNearby":"There are no places near you yet. Showing the full list.","noOffers":"No places nearby have a business lunch or promotion right now. Turn the switch off to see all places.","geoDenied":"We cannot access your location. Allow it for this site in your browser settings and press the button again — or enter an address below.","addrNotFound":"We do not have this address. Please check it — meanwhile, here is the full list.","error":"The list did not load. Please try again in a moment.","menuNearby":"Near me","menuAbout":"About","aboutText":"We show the nearest lunch places in Astana and mark where a business lunch or promotion is available now. Distance and time follow the walking route, and places are sorted by travel time. If a route cannot be worked out, we say “about” and use the straight line.","promoOpen":"Promotion: {text}","admTitle":"Edit data","admIntro":"Here you change business lunch prices, deals, end dates and the check date. Entries not checked for more than 14 days, and deals past their end date, are hidden on the site. To bring an entry back, set a new check date or end date.","admName":"Place","admPrice":"Lunch price, ₸","admPromo":"Deal (empty — no deal)","admUntil":"Deal ends","admChecked":"Check date","admToday":"Today","admSave":"Save","admStatus":"On the site","admActive":"Shown","admHiddenStale":"Hidden: not checked for more than 14 days","admHiddenExpired":"Hidden: the deal has ended","admNoLunch":"No business lunch","admNoPromo":"No deal","admLunchLabel":"Business lunch","admPromoLabel":"Deal","admOnlyHidden":"Hidden entries only","admHiddenCount":"Hidden entries: {n}","admSaved":"Saved. The changes are already on the site.","admErrPrice":"The price is not valid. Enter a whole number of tenge, for example 3500.","admErrDate":"The date is not valid. Pick the check date in the calendar.","admErrFuture":"The check date is in the future. Pick today or an earlier day.","admErrOther":"Could not save. Check the fields and try again.","admLoadError":"Could not load the table. Refresh the page.","admBack":"To the site","searching":"Looking for places near you…","menuOpen":"Open menu","langLabel":"Language","menuLabel":"Menu","addressLabel":"Enter an address","promoTexts":{"1 кг сазана + 1 л напитка в подарок":"1 kg of carp + 1 l of a drink as a gift","KUDAFEST: сет из нескольких блюд, десерта и напитка за 4000 ₸, ежедневно 11:00–21:00":"KUDAFEST: a set of several dishes, a dessert and a drink for 4000 ₸, daily 11:00–21:00","KUDAFEST: сет из нескольких блюд, десерта и напитка за 4000 ₸, ежедневно 15:00–22:30, кроме среды":"KUDAFEST: a set of several dishes, a dessert and a drink for 4000 ₸, daily 15:00–22:30 except Wednesday"},"menuBase":"Full list","baseTitle":"All places","baseIntro":"All places in our list: address, business lunch, offer and the date we last checked.","baseCount":"Places: {n}","colName":"Name","colAddress":"Address","colCoords":"Coordinates","colLunch":"Business lunch","colPromo":"Offer","colChecked":"Checked","noLunch":"no business lunch","noPromo":"none","baseLunch":"{price} ₸, {from}–{to}","baseError":"We could not load the places. Please refresh the page.","backHome":"Back to nearby search","srcTitle":"Where the data comes from","srcIntro":"All data was collected by our team's AI agent on 16.11.2026 from open sources on the internet. Nobody has called or visited the places yet, so please confirm prices and lunch hours with the place.","srcGis":"2GIS — collected by the AI agent: name, address, map location, business lunch, price and serving time, offers from the place's card.","srcNews":"An article by the city outlet digitalbusiness.kz dated 04.11.2026 — read by the AI agent: the KUDAFEST offer at two places.","srcMap":"OpenStreetMap — checked by the AI agent: only used to verify map locations.","srcSite":"Places' own websites — looked at by the AI agent on 16.11.2026: they almost never list lunch prices or hours, so most prices still come from 2GIS.","srcSocial":"Places' social media — searched by the AI agent on 16.11.2026: pages are often closed without logging in, and no fresh prices were found.","srcCall":"Phone calls to the places — nobody has called yet.","srcVisit":"Visits to the places — nobody has visited yet.","srcLink":"Where the data comes from","listPreparing":"The list of places is still being prepared. Please check back a little later — they will appear here as soon as they are ready.","checkedOn":"Checked {date}","admCheckedOn":"Checked on {date}","admNeverChecked":"No check date set","admHiddenHint":"This entry is hidden and not shown on the site. To bring it back, press «Today» and save, or set a new end date for the offer.","admAutoDate":"If you change the price, offer or end date and leave the check date alone, we set today's date.","notConfirmed":"Price not confirmed","geoFailed":"We could not work out where you are. Enter an address below — meanwhile, here is the full list.","geoSlow":"Finding your location took too long. Enter an address below — meanwhile, here is the full list.","resultsAll":"Places found: {n}. Showing all places nearby.","resultsOffers":"Places found: {n}. Showing only places with a business lunch or promotion.","noDescription":"Description coming soon","photoAlt":"Photo: {name}","noPhoto":"No photo yet","filterDistance":"Distance","distAny":"Any","dist1":"Up to 1 km","dist2":"Up to 2 km","dist5":"Up to 5 km","distNeedPlace":"You can pick a distance once we know where you are. Press “Show places near me” or enter an address.","filterPrice":"Lunch price","priceAny":"Any","price2000":"Up to 2000 ₸","price3000":"Up to 3000 ₸","price4000":"Up to 4000 ₸","noMatch":"Nothing matches the chosen filters. Reset the filters to see all places nearby.","resetFilters":"Reset filters","admDescription":"Description (up to 300 characters, empty — bring back the placeholder)","admPhoto":"Photo link (empty — bring back the placeholder)","admDescSource":"Description source: {source}","admPhotoSource":"Photo source: {source}","admNoDescription":"No description yet","admNoPhoto":"No photo yet","admSaveText":"Save description and photo","admErrDescription":"The description is too long. Shorten it to 300 characters.","admErrPhoto":"The photo link is not valid. Paste a picture address that starts with http or https.","admSrcOwner":"you (the owner)","colDescription":"Description","colPhoto":"Photo","colSource":"Source","srcOwner":"site owner","noDescriptionBase":"no description","noPhotoBase":"placeholder","photoOf":"Photo","srcPhotoNote":"We use a photo only where its source allows it. Where it does not, or none was found, the card keeps a placeholder. Descriptions are written in our own words.","srcLabel":"Source:","walkExact":"{dist}, {min} min on foot","walkApprox":"about {dist}, {min} min on foot","walkApproxNote":"“About” means we could not work out the walking route, so we used the straight-line distance.","webUpdated":"Website and social media checked, data updated","webNone":"Website and social media checked, nothing new — kept the previous values","webNot":"Website and social media not checked","resultsNoPlace":"Places found: {n}. No place is set, so the full list is shown.","lunchLater":"Business lunch at another time: {from}–{to}","promoNone":"No promotion right now","promoEnded":"The promotion has ended","basePromoEnded":"{text} — promotion ended ({until})","baseNotChecked":"not checked","baseNoSource":"not specified"}