aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAgando <roduccomm@gmail.com>2026-10-26 13:48:20 +0100
committerAgando <roduccomm@gmail.com>2026-10-26 13:48:20 +0100
commit299a946af3f54d072fa74c35902564438d2c9430 (patch)
tree125a4c57a376f60dda208f18abb05220c22aa412
parent66d30f637b763c6f4c5061e4fde306cc66ef7f59 (diff)
feat(feedback): open the Agent tab on the queue, guide out of empty states, cleaner directives
-rwxr-xr-xscripts/newos4-feedback-apply.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/newos4-feedback-apply.py b/scripts/newos4-feedback-apply.py
index 38188fb..ed1a34c 100755
--- a/scripts/newos4-feedback-apply.py
+++ b/scripts/newos4-feedback-apply.py
@@ -125,7 +125,8 @@ def report_title(rid):
try:
with open(os.path.join(REPORTS, rid + '.json'), encoding='utf-8') as f:
d = json.load(f)
- return str(d.get('title') or d.get('message') or rid)[:160]
+ t = str(d.get('title') or d.get('message') or rid)[:160]
+ return t[6:] if t.startswith('Auto: ') else t # the 'Auto: ' prefix is redundant in a directive
except Exception:
return rid
@@ -133,8 +134,9 @@ def report_title(rid):
def apply_report(name, decision, note):
if decision != 'approve':
return 'recorded (no action)'
- text = '%s — %s' % (report_title(name), name)
- if note:
+ title = report_title(name)
+ text = '%s — %s' % (title, name)
+ if note and note.strip() != title.strip(): # the note often repeats the title
text = '%s — %s' % (text, note)
r = subprocess.run([sys.executable, STEER, 'add', text, '--priority', 'high'],
capture_output=True, text=True, timeout=60)