BRM-82: стратегия — версии, пояснения и список согласий видны сразу
All checks were successful
peppa/lint lint: success за 0с
peppa/test test: success за 2с
ci / checks (pull_request) Successful in 12s
deploy / deploy (pull_request) Successful in 16s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Peppa 2026-11-17 18:52:50 +05:00
parent c77eb87d46
commit 68488b2ea7
5 changed files with 23 additions and 5 deletions

View File

@ -58,3 +58,4 @@
- BRM-33: plan/opportunities/summary.html без текста в разметке — data-t/data-ph/data-tip, ключи ui.* в locales, поле = label>span[data-t]+input; проверяет test/page-clarity.test.js (кириллица в этих html валит тест). GET /api/summary/status → {telegram}. Экран: headless Chrome только через CDP (--screenshot с --virtual-time-budget зависает). - BRM-33: plan/opportunities/summary.html без текста в разметке — data-t/data-ph/data-tip, ключи ui.* в locales, поле = label>span[data-t]+input; проверяет test/page-clarity.test.js (кириллица в этих html валит тест). GET /api/summary/status → {telegram}. Экран: headless Chrome только через CDP (--screenshot с --virtual-time-budget зависает).
- BRM-34: рынок — у конкурента обязательны group (kz/ca/intl) и country; обещанный объём TARGETS в src/market.js, /api/market отдаёт coverage и коды confidenceCode/checkCode (слова — из ui.mk.* в locales); market.html без текста в разметке (в PAGES page-clarity); непроверенных конкурентов не добавляем, ссылки проверять curl с браузерным User-Agent (kpmg без него не отвечает); в текстах seed нельзя «п.3», BRM-, .md (тест). - BRM-34: рынок — у конкурента обязательны group (kz/ca/intl) и country; обещанный объём TARGETS в src/market.js, /api/market отдаёт coverage и коды confidenceCode/checkCode (слова — из ui.mk.* в locales); market.html без текста в разметке (в PAGES page-clarity); непроверенных конкурентов не добавляем, ссылки проверять curl с браузерным User-Agent (kpmg без него не отвечает); в текстах seed нельзя «п.3», BRM-, .md (тест).
- BRM-67: адрес в текстах подставляет withMail (src/site.js) как mailto-ссылку, для адреса-примера — пометка contact.example; скрипт market.html не перезаписывает уже заполненные сервером data-t; в плашке выкладки нет номера и названия задачи. - BRM-67: адрес в текстах подставляет withMail (src/site.js) как mailto-ссылку, для адреса-примера — пометка contact.example; скрипт market.html не перезаписывает уже заполненные сервером data-t; в плашке выкладки нет номера и названия задачи.
- BRM-82: на strategy.html версии (#versions), 8 согласий, пояснения про публикации и задачи лежат в разметке (видны без скриптов); у замечаний пометка «передано агенту» (ui.str.sentToAgent).

View File

@ -537,6 +537,11 @@
"ui.sum.schedOff": "Scheduled sending is paused.", "ui.sum.schedOff": "Scheduled sending is paused.",
"ui.sum.s.stopWhy": "Sending is already stopped.", "ui.sum.s.stopWhy": "Sending is already stopped.",
"ui.sum.s.resumeWhy": "Sending is already running.", "ui.sum.s.resumeWhy": "Sending is already running.",
"ui.str.hVersions": "Strategy versions",
"ui.str.noPublishNote": "Nothing is published until the strategy is approved.",
"ui.str.feedbackHint": "Tatyana's comment goes to the agent, who reworks the version; it then has to be approved again.",
"ui.str.sentToAgent": "sent to the agent",
"ui.str.tasksHint": "Once approved, tasks from the 90-day plan appear here, one per plan line.",
"ui.str.title": "Strategy and rules", "ui.str.title": "Strategy and rules",
"ui.str.intro": "This page holds the brand strategy and the rules: what the agent does on its own and what only with Tatiana's consent. Nothing is published until the strategy is approved.", "ui.str.intro": "This page holds the brand strategy and the rules: what the agent does on its own and what only with Tatiana's consent. Nothing is published until the strategy is approved.",
"ui.str.hVersion": "Current version", "ui.str.hVersion": "Current version",

View File

@ -537,6 +537,11 @@
"ui.sum.schedOff": "Кесте бойынша жіберу тоқтатылған.", "ui.sum.schedOff": "Кесте бойынша жіберу тоқтатылған.",
"ui.sum.s.stopWhy": "Жіберу әлдеқашан тоқтатылған.", "ui.sum.s.stopWhy": "Жіберу әлдеқашан тоқтатылған.",
"ui.sum.s.resumeWhy": "Жіберу әлдеқашан жүріп жатыр.", "ui.sum.s.resumeWhy": "Жіберу әлдеқашан жүріп жатыр.",
"ui.str.hVersions": "Стратегия нұсқалары",
"ui.str.noPublishNote": "Стратегия бекітілгенге дейін ештеңе жарияланбайды.",
"ui.str.feedbackHint": "Татьянаның ескертуі агентке жіберіледі: ол нұсқаны өңдейді, содан кейін оны қайта бекіту керек.",
"ui.str.sentToAgent": "агентке жіберілді",
"ui.str.tasksHint": "Бекітілгеннен кейін мұнда 90 күндік жоспардың міндеттері пайда болады — жоспардың әр жолына біреуден.",
"ui.str.title": "Стратегия және ережелер", "ui.str.title": "Стратегия және ережелер",
"ui.str.intro": "Мұнда бренд стратегиясы мен ережелер жиналған: агент нені өзі жасайды, нені тек Татьянаның келісімімен. Стратегия бекітілмейінше ештеңе жарияланбайды.", "ui.str.intro": "Мұнда бренд стратегиясы мен ережелер жиналған: агент нені өзі жасайды, нені тек Татьянаның келісімімен. Стратегия бекітілмейінше ештеңе жарияланбайды.",
"ui.str.hVersion": "Ағымдағы нұсқа", "ui.str.hVersion": "Ағымдағы нұсқа",

View File

@ -537,6 +537,11 @@
"ui.sum.schedOff": "Отправка по расписанию приостановлена.", "ui.sum.schedOff": "Отправка по расписанию приостановлена.",
"ui.sum.s.stopWhy": "Рассылка уже остановлена.", "ui.sum.s.stopWhy": "Рассылка уже остановлена.",
"ui.sum.s.resumeWhy": "Рассылка уже идёт.", "ui.sum.s.resumeWhy": "Рассылка уже идёт.",
"ui.str.hVersions": "Версии стратегии",
"ui.str.noPublishNote": "До утверждения стратегии ничего не публикуется.",
"ui.str.feedbackHint": "Замечание Татьяны уходит агенту: он перерабатывает версию, после чего её снова нужно утвердить.",
"ui.str.sentToAgent": "передано агенту",
"ui.str.tasksHint": "После утверждения здесь появятся задачи из плана на 90 дней — по одной на строку плана.",
"ui.str.title": "Стратегия и правила", "ui.str.title": "Стратегия и правила",
"ui.str.intro": "Здесь собрана стратегия бренда и правила: что агент делает сам, а что только с согласия Татьяны. Пока стратегия не утверждена, ничего не публикуется.", "ui.str.intro": "Здесь собрана стратегия бренда и правила: что агент делает сам, а что только с согласия Татьяны. Пока стратегия не утверждена, ничего не публикуется.",
"ui.str.hVersion": "Текущая версия", "ui.str.hVersion": "Текущая версия",

View File

@ -11,7 +11,8 @@ input,select,textarea,button{font:inherit}#err{color:#b00}#ok{color:#070}.hint{f
<p><a href="/" data-t="ui.common.home"></a></p> <p><a href="/" data-t="ui.common.home"></a></p>
<h1 data-t="ui.str.title"></h1> <h1 data-t="ui.str.title"></h1>
<p data-t="ui.str.intro"></p> <p data-t="ui.str.intro"></p>
<p id="state"></p> <p id="state" data-t="ui.str.noPublishNote"></p>
<h2 data-t="ui.str.hVersions"></h2><ul id="versions"><li class="none" data-t="ui.str.none"></li></ul>
<h2 data-t="ui.str.hVersion"></h2> <h2 data-t="ui.str.hVersion"></h2>
<div id="fields"></div> <div id="fields"></div>
<div class="row"> <div class="row">
@ -22,7 +23,7 @@ input,select,textarea,button{font:inherit}#err{color:#b00}#ok{color:#070}.hint{f
<label><span data-t="ui.str.comment"></span><input id="comment" size="40"></label> <label><span data-t="ui.str.comment"></span><input id="comment" size="40"></label>
<button id="back" data-t="ui.str.return" data-tip="ui.str.returnTip"></button></div> <button id="back" data-t="ui.str.return" data-tip="ui.str.returnTip"></button></div>
<p id="err"></p><p id="ok"></p> <p id="err"></p><p id="ok"></p>
<h2 data-t="ui.str.hFeedback"></h2><ul id="feedback"></ul> <h2 data-t="ui.str.hFeedback"></h2><p class="hint" data-t="ui.str.feedbackHint"></p><ul id="feedback"><li class="none" data-t="ui.str.noFeedback"></li></ul>
<h2 data-t="ui.str.hRules"></h2> <h2 data-t="ui.str.hRules"></h2>
<p class="hint" data-t="ui.str.rulesHint"></p> <p class="hint" data-t="ui.str.rulesHint"></p>
<div class="row"> <div class="row">
@ -31,12 +32,12 @@ input,select,textarea,button{font:inherit}#err{color:#b00}#ok{color:#070}.hint{f
<label><span data-t="ui.str.rule.mode"></span><select id="mode"><option value="draft" data-t="ui.str.mode.draft"></option><option value="each" data-t="ui.str.mode.each"></option><option value="auto" data-t="ui.str.mode.auto"></option></select></label> <label><span data-t="ui.str.rule.mode"></span><select id="mode"><option value="draft" data-t="ui.str.mode.draft"></option><option value="each" data-t="ui.str.mode.each"></option><option value="auto" data-t="ui.str.mode.auto"></option></select></label>
<button id="rule" data-t="ui.str.rule.save" data-tip="ui.str.rule.saveTip"></button></div> <button id="rule" data-t="ui.str.rule.save" data-tip="ui.str.rule.saveTip"></button></div>
<ul id="rules"></ul> <ul id="rules"></ul>
<h2 data-t="ui.str.hMust"></h2><ul id="must"></ul> <h2 data-t="ui.str.hMust"></h2><ul id="must"><li data-t="ui.str.act.reposition"></li><li data-t="ui.str.act.new_account"></li><li data-t="ui.str.act.personal_fact"></li><li data-t="ui.str.act.letter_as_owner"></li><li data-t="ui.str.act.spend"></li><li data-t="ui.str.act.price"></li><li data-t="ui.str.act.contract"></li><li data-t="ui.str.act.delete_content"></li></ul>
<h2 data-t="ui.str.hConsent"></h2> <h2 data-t="ui.str.hConsent"></h2>
<p class="hint" data-t="ui.str.consentHint"></p> <p class="hint" data-t="ui.str.consentHint"></p>
<label><span data-t="ui.str.consentText"></span><textarea id="ctext" rows="3"></textarea></label> <label><span data-t="ui.str.consentText"></span><textarea id="ctext" rows="3"></textarea></label>
<button id="grant" data-t="ui.str.grant" data-tip="ui.str.grantTip"></button> <button id="grant" data-t="ui.str.grant" data-tip="ui.str.grantTip"></button>
<h2 data-t="ui.str.hTasks"></h2><ul id="tasks"></ul> <h2 data-t="ui.str.hTasks"></h2><p class="hint" data-t="ui.str.tasksHint"></p><ul id="tasks"><li class="none" data-t="ui.str.noTasks"></li></ul>
<script> <script>
const $=id=>document.getElementById(id); const $=id=>document.getElementById(id);
const esc=s=>String(s).replace(/[&<>"']/g,c=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[c])); const esc=s=>String(s).replace(/[&<>"']/g,c=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[c]));
@ -49,7 +50,8 @@ async function load(){const[,d]=await api("GET","/api/strategy");D=d;const v=d.c
$("state").textContent=v?t("ui.str.v")+" "+v.n+": "+t("ui.str.st."+v.status)+(d.approved?"":" — "+t("ui.str.noPublish")):t("ui.str.none");$("state").classList.toggle("on",d.approved); $("state").textContent=v?t("ui.str.v")+" "+v.n+": "+t("ui.str.st."+v.status)+(d.approved?"":" — "+t("ui.str.noPublish")):t("ui.str.none");$("state").classList.toggle("on",d.approved);
if(!$("fields").children.length)$("fields").innerHTML=d.sections.map(s=>`<label><span>${esc(t("ui.str.sec."+s))}</span><textarea id="f_${s}" rows="3"></textarea></label>`).join(""); if(!$("fields").children.length)$("fields").innerHTML=d.sections.map(s=>`<label><span>${esc(t("ui.str.sec."+s))}</span><textarea id="f_${s}" rows="3"></textarea></label>`).join("");
for(const s of d.sections){const e=$("f_"+s);if(document.activeElement!==e)e.value=v?v.sections[s]:""} for(const s of d.sections){const e=$("f_"+s);if(document.activeElement!==e)e.value=v?v.sections[s]:""}
list($("feedback"),v?v.comments.map(c=>esc(c.by)+": "+esc(c.text)):[],"ui.str.noFeedback"); list($("versions"),d.versions.slice().reverse().map(x=>esc(t("ui.str.v"))+" "+x.n+" — "+esc(t("ui.str.st."+x.status))+(x.approvedAt?" ("+esc(String(x.approvedAt).slice(0,10))+")":"")),"ui.str.none");
list($("feedback"),v?v.comments.map(c=>esc(c.by)+": "+esc(c.text)+" — "+esc(t("ui.str.sentToAgent"))):[],"ui.str.noFeedback");
list($("rules"),d.rules.map(r=>esc(t("ui.str.kind."+r.kind))+" «"+esc(r.key)+"» — "+esc(t("ui.str.mode."+r.mode))),"ui.str.noRules"); list($("rules"),d.rules.map(r=>esc(t("ui.str.kind."+r.kind))+" «"+esc(r.key)+"» — "+esc(t("ui.str.mode."+r.mode))),"ui.str.noRules");
list($("must"),d.mustConsent.map(k=>esc(t("ui.str.act."+k))),"ui.str.noRules"); list($("must"),d.mustConsent.map(k=>esc(t("ui.str.act."+k))),"ui.str.noRules");
list($("tasks"),d.tasks.map(x=>esc(x.title)),"ui.str.noTasks")} list($("tasks"),d.tasks.map(x=>esc(x.title)),"ui.str.noTasks")}