Reported as "why can't i see anything from codegit its just a black box".
NOT a codegit bug. Verified first, exhaustively, through the authenticated API:
overview 200 940 bytes
log 200 79596 bytes (full commit history)
transfer 200 1460 bytes
config 200 1174 bytes
no JS errors in the console; every DOM helper codegit calls exists.
ROOT CAUSE 1 - a generic CSS rule hardcodes a height
theme/modules/common/_panel.scss -> theme/main.min.css:
panel { ... height: 500px; ... }
That forces EVERY modal panel to a fixed 500px box. Measured live:
#dialog 404px (clamped by max-height:70vh + overflow-y:auto)
#codegit panel 500px, while its content is only 119px
toolbar ("Branch") top 620 vs dialog bottom 490 -> OUTSIDE the modal
So ~380px of the dialog was empty dead space and the Branch line rendered below the
modal, invisible. Fixed to height:auto with max-height:58vh (long content still scrolls):
before: panel 500 -> toolbar top 620, dialog bottom 490 (outside)
after: panel 136 -> toolbar top 256, dialog bottom 279 (inside)
_panel.scss updated too so the source does not contradict the shipped CSS.
ROOT CAUSE 2 - the fix was invisible because of the browser cache
Atheos serves theme/main.min.css and the generated bundles from stable URLs with no cache
headers, so browsers legitimately reuse their cached copy - which is why the first attempt
appeared to do nothing. nginx now sends Cache-Control: no-cache, must-revalidate for
*.css/*.js: caching still works (cheap 304s) but changes are always picked up.
Adds
scripts/fix-panel-layout.sh idempotent re-apply for both fixes (lost on update-atheos)
docs/known-issues.md §4, §5 both findings, with the measurements
Tests (44 passed, 1 failed - the failure is branch protection, a genuine open item)
+ panel must not be fixed at 500px
+ theme CSS must send Cache-Control: no-cache
53 lines
2.0 KiB
Plaintext
53 lines
2.0 KiB
Plaintext
server {
|
|
listen 80 default_server;
|
|
listen [::]:80 default_server;
|
|
|
|
server_name _;
|
|
|
|
root /var/www/atheos;
|
|
index index.php index.html;
|
|
|
|
# --- logging ---------------------------------------------------------
|
|
access_log /var/log/nginx/atheos.access.log;
|
|
error_log /var/log/nginx/atheos.error.log;
|
|
|
|
# --- PHP: the socket path here MUST byte-match the pool's `listen =`
|
|
# in /etc/php83/php-fpm.d/www.conf (interface I-1 -> else bare 502)
|
|
location ~ \.php$ {
|
|
try_files $uri =404;
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
fastcgi_pass unix:/run/php-fpm83/php-fpm.sock;
|
|
fastcgi_index index.php;
|
|
include fastcgi.conf;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
|
|
# --- hardening (free, no downside) -----------------------------------
|
|
# never serve the VCS directory, the app's private data, or dotfiles
|
|
location ~ /\.git { deny all; }
|
|
location ~ /\.ssh { deny all; }
|
|
location ~ /\. { deny all; }
|
|
location ~ ^/data/ { deny all; }
|
|
location ~ ^/(config\.php|common\.php|controller\.php|traits/) { deny all; }
|
|
location ~* \.(md|py|sh|log|conf|ini|sql|bak|orig)$ { deny all; }
|
|
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
|
|
|
client_max_body_size 64m;
|
|
|
|
# Atheos serves theme/main.min.css and the generated *.min.js/css bundles from STABLE URLs
|
|
# with no cache headers. Without this, a CSS/JS change stays invisible behind a cached copy
|
|
# until the user hard-refreshes. "no-cache" permits caching but forces revalidation, so a
|
|
# 304 keeps normal loads fast while guaranteeing updates are picked up on the next load.
|
|
location ~* \.(css|js)$ {
|
|
add_header Cache-Control "no-cache, must-revalidate";
|
|
try_files $uri =404;
|
|
}
|
|
}
|