new listen preferences reload and init managed
[brisk.git] / TODO.txt
1  TODO |
2 ------+
3
4   FEATURES |
5  ----------+
6    - prefs API:
7      . prefs_assign(content): assign json content as output var
8      . prefs_apply(prefs_new): apply new content to g_prefs and system
9      . prefs_load(content): load json content and apply to g_prefs and system
10
11      . prefs_save (save to the server the new prefs)
12
13    - preferences (listen into preferences)
14      . update values
15      . database change
16
17    - preferences (with "modifiable S")
18      . Mod. S: new flag into database
19      . graph infrastructure
20      . new box to edit color
21
22   MAJOR |
23  -------+
24    - BUG: some connection to the named socket fails
25    - Not simultaneous more then one stream
26
27
28   MINOR |
29  -------+
30    WIP - try to be more antivirus-friendly
31    - multiple rows between games
32    - packetize and automatize php-ancillary and apache module
33    - DISABLED_TO_FIX: DNS access (perform blocking dns requests, must be fixed)
34
35
36   DONE |
37  ------+
38    DONE - temporarly server hung not reflected on user timeouts
39    DONE - timeouted users are still be able to sit down (only the first at the table is banned)
40    DONE - page still opened after the server restart
41    DONE - log_legal address fix
42    DONE - manage too fast reload in xynt-streaming
43    DONE - add xhr as transport layer and manage different streams better
44    TEST - BUG: pari + 72 non fa 4x ma attualmente fa 3x, da correggere
45    TEST - BUG: lurker are logged out (and remain a pending socket opened (look the spush log)
46    DONE - save/restore database
47    DONE - into the room local step remains -1
48    DONE - centralize all '<script ...' incapsulation to allow multiple transport system.
49    DONE - BUG: access with password from 2 diff browsers the second go in strange "page not found" 
50           in the first tentative, the second works
51    DONE - BUG: access with password from 2 diff browsers place the first in a strict loop (the 
52           problem was a call to a static parent method instead of the overrided child method,
53           substitute self:: with the dynamically get class::)
54    DONE - garbage management
55
56    DONE/FROZEN - problem with getpeer (HOSTADDR)
57
58    DONE - slow cards distribution
59    DONE - substr to mb_substr
60    DONE - parametrizations:
61           . parametrization of $DOCUMENT_ROOT  var in brisk-spush.phh file
62           . parametrization of SITE_PREFIX(_LEN) define
63           . move the name of the named socket into the configuration file
64    DONE - manage and test cross forwarder between table and room
65    DONE - setcookie (for tables only and persist prefs)
66    DONE - images flickering on slow windows: try to poll stream every 300 ms (seems to be download problem)
67    DONE - database connection fails after a while, check close and try PGSQL_CONNECT_FORCE_NEW.
68    DONE - unneeded garbage_time.expired access
69    DONE - BUG: fast loop on stream index_rd_ifra page (js watchdog start without timeout corrupt counts)
70    DONE - BUG: logout failed (fixed with a garbage_collector wrapper at sac-a-push level
71    DONE - 404 wrong page management (remove directories redirections (es. brisk/))
72    DONE - configuration file management
73    DONE - app level keep-alive
74    DONE - index_wr other issues
75    DONE - from room to table
76    DONE - from table to room
77    DONE - chunked
78    DONE - bug: read from a not resource handle (already closed because a new socket substitute it)
79    DONE - partial write for normal page management
80    DONE - index_rd_ifra: last_clean issue
81    DONE - fwrite failed error management (select, buffer where store unsent data, and fwrite check and retry)
82    DONE - bug: after restart index_rd.php receive from prev clients a lot of req
83    DONE - index_wr.php::chat
84    DONE - index_wr.php::exit
85    DONE - index_rd.php porting
86    DONE - generic var management from internet
87    DONE - index.php auth part
88    ABRT - index_wr.php::reload - reload is js-only function
89    ABRT - keepalive management - not interesting for our purposes
90
91  BRISK4 (mammuth)
92  ======
93
94  - STEP MANAGEMENT VERIFY
95  Slim Paragraph
96  DONE - move the garbage timeout on file
97  DONE - in index_rd load all data only when required
98  - briskin5 alignment
99    DONE . extern del garb_timeout
100    DONE . user_load parameters verify
101    DONE . Bin5::load_data and Bin5::save_data refactoring with
102           data split
103    . move many function into "Bin5 class"
104  - garbaging of .step files
105
106  DB: - initial usage
107      DONE - configurabilità file o db
108      DONE - aggiornare le funz di gestione db in modo che prevedano anche il flag DISABLE
109      DONE - travasatore file to pg
110        DONE - travaso punteggi
111        DONE - memorizzazione nuovi i punteggi nel db
112        DONE - gestione classifiche in SQL
113          DONE - produrle
114          DONE - mostrarle
115
116      STEP 1.1
117        DONE - points archiver
118
119      STEP 1.2
120        DONE - partial usability if database go down.
121
122      STEP 1.5
123      - sistema di inserimento nuovi utenti (riversatore da form di inserimento)
124
125      STEP 2
126      - aggiornare le funz di gestione db in modo che prevedano anche il flag SUSPEND
127      - modifica password   
128      - ripristino password 
129
130      STEP 3
131      - comunicazioni di aggiornamento (stato salvato sul server) 
132
133  DONE - var $G_base aggiunta per gestire include in include da path differenti
134
135  BRISK3 (trusty)
136  ======
137   DONE - donameter
138     DONE - G_donors
139     DONE (WOW!) - js object with infos
140     DONE - main logic at login (cookie check in index_rd.php; show_message and createCookie via snippets with block
141            to prevent fast reload)
142     DONE - cookie per non assillare e visualizz.
143     DONE - graphical donameter
144     WIP content (in conf.)
145
146   DONE - numero di tavoli auth-only nel .brisk-install
147   - isolation
148     TEST - ricalcolo delle persone in piedi quando si cambia modalità
149     DONE - se si e' in isolation non si può cambiare nick perdendo l' auth
150     DONE - non leggere le chat di quelli non autenticati (in isolation)
151     DONE - regole per passare alla modalita' (in piedi o ai tavoli autenticati) 
152     DONE - treni non auth da nascondere 
153     DONE - verso gli altri ??: uguale a prima
154
155   finire multilingua (briskin5/index_wr.php e altri se ce ne sono)
156   coniglio
157   only auth strictly
158   placing limits to config file
159
160 Dunque, 
161
162 - come vengono aggiornate le classifiche: ogni giorno alle 23:58
163
164 - cosa cambia tra le tre coppie di classifiche: 
165   ci sono le classifiche dell' ultima settimana, quelle dell' ultimo mese,  e quelle dell' ultimo trimestre,
166   per ognuno di questi lassi di tempo poi c'è la classifica di chi ha giocato più di TOT partite o meno di TOT partite, con TOT che cambia a seconda del lasso di tempo.
167
168 - come vengono calcolate le classifiche: per ogni utente vengono presi tutti i punti fatti ai tavoli con lucchetto nel lasso di tempo preso in considerazione (ultima settimana, ultimo mese o ultimo trimestre), sommati e divisi per il numero di partite fatte in quello stesso lasso di tempo per normalizzare i valori; poi siccome la gente quando vede 0.18734 sbarella ho deciso di moltiplicare il tutto per 100.
169
170 Un esempio per chiarire:
171
172   l'utente 'pippo' che è nuovo gioca 4 partite nell'ultima settimana con i seguenti punteggi:
173     -2, 1, 2, 1
174   lo score viene { [ (-2) + (1) + (2) + (1) ] / 4 }  * 100 = 50.0
175   
176   a parità di score tra utenti va più in alto chi ha giocato più partite.
177
178 Se dopo quelle 4 partite 'pippo' non ne giocherà più, passata una settimana dall'ultima giocata 
179 sparirà dalla classifica settimanale e rimarrà in quelle mensili e trimestrali.
180
181
182   
183
184
185
186
187  BUG
188  ---
189  
190   DONE - paste da demauroparavia
191   DONE - recupero partita per re-login con password
192   DONE - problema "|" nei nomi (manca enhance degli script lato server)
193   - problema col treno se mouse sopra mentre stringe (verif)
194   
195  MINOR
196  -----
197
198  NORMAL
199  ------
200
201   - win test
202   WIP - /listen 
203     DONE - skin della textarea
204     DONE - set cookie 
205     DONE - init client (read from cookie) - ALWAYS BY SERVER
206     DONE - init server
207     DONE - after cookie check auth-only when no-auth case
208     DONE - aggiungi info accanto a "Chat"
209   DONE - /mesgtoadm
210   DONE - img dei comandi
211
212   DONE - form per garantire utenti (accoda in un file nel formato corretto)
213   DONE -   process request
214   DONE -   show form
215   DONE -   close butt
216   DONE -   submit form
217   DONE -   process form js side 
218   DONE -   process form
219   DONE -   documentazione in help
220
221   DONE - user status
222
223   DONE - aggiornare help
224   DONE -   overflow management
225   DONE -   for status
226   -   for password
227
228   DONE - reload home
229   - notify for long pages
230
231   - buddy list
232   - silenziastolti vari (fino al buddy import)
233   - restrict challenge per IP
234   - restricted charset for login
235   - watchdog
236
237   - db (minimal)
238     - db admin page
239     - user db admin
240     - use db 
241     - admin db
242
243     - studiare un anti-dos
244   - login modify
245  DONE  - db (fake)
246  DONE  - display auth
247     - manage preferences 
248
249  minor
250  -----
251    - auth after login
252
253 ----- done ------
254
255  BUG
256  ---
257   DONE   righe troncate
258   DONE - questione "a monte" che:
259   DONE   - lascia fuori il bottone
260   DONE   - scrive &agrave e compagnia
261   DONE - refresh act_table when unauthorized
262   DONE - problema ghost autenticato (ne prendi il posto ovunque sia)
263
264  MINOR
265  -----
266   DONE - refactoring of the owner name (auth attr for owner name)
267   DONE   - room
268   DONE     - at chat input line 
269   DONE     - in the chat output line
270   DONE     - deauth management
271   DONE - table
272   DONE   - at chat input line
273   DONE   - in the chat output line
274   DONE   - for user area of other users
275   DONE   - deauth management
276   DONE - alart to one user
277
278
279  NORMAL
280  ------
281   DONE - strong ban: "expire time|IP|session|(nick if authenticated)"
282   DONE   - login: se auth      -  verifica solo gli expire per quel nick
283   DONE   -        se non auth  -  verifica gli expire per IP e sessione
284   DONE   - riscrivere messaggi
285
286   DONE - login 
287   DONE   - se pass:
288   DONE     - richiede per l' utente un token (tutta la parte backend va un minimo studiata)
289   DONE     - lo legge, ci hasha la password
290   DONE     - invia la pass al server hashata
291   DONE   - se non pass:
292   DONE     - check del login e return corretto
293   DONE     - oggetto in shm single table con ( "ip", "login", timestamp ) e suo management
294   DONE     - rename ghost if logged
295   DONE     - onunload_cb e onbeforeunload_cb !!! 
296   DONE   - da change attrs a change class (input field)
297   DONE     - colore del bg per arrivare ad essere omogeneo
298   DONE     - cambiare path e file di config
299   DONE   - login with or without pass
300   DONE   - registered nick notice (METTERE IL MSG NELLA PAG DI LOGIN)
301   DONE     - segnalare tavoli solo per auth
302   DONE     - rename restriction at auth table
303   DONE     - change nick (strcasecmp)
304   DONE   - refact js tables to handle flags
305   DONE - room javascript refactoring
306
307   DONE - work background
308   DONE - reserved tables
309
310
311  BRISK2 (spawn)
312  ======
313
314    
315    URGENT - tables spawn
316             DONE - link with photos
317             DONE - top banner in Etc file
318             DONE - spawn of a table
319             DONE - data to cookies (removed table_idx from xhr calls also)
320             DONE - set subst to shutdowner/shutdowned
321             DONE - return to index.php
322             DONE - game's token
323             DONE - recover of corrupted table data
324             DONE - closure of a table
325             DONE - flush of the table
326             DONE - security checks for right scope access
327             DONE - garbage collector management
328             DONE -    recursive garbage - howto ?
329             DONE - stat & subst in browser
330             DONE - laccwr setting and exit if all players are unactive for some time
331             DONE - the list of test case
332             DONE - shm dimension
333             DONE - remove unused parts
334             DONE - move images
335             DONE - optimizations
336             DONE - cambiare titolo al tavolo
337             DONE - shutdowning lock tables
338             DONE - topbanner
339             DONE - public announcements
340             DONE - 10 sec to exit from table
341
342             FAR - inheritances
343    
344    TRAIN  -  DONE - add again in reload   
345              DONE - wag_set refact
346              DONE - filtra char speciali per title
347              DONE - chatt_send refact 
348              DONE - elenco dei giocatori
349              DONE - documentazione online
350              DONE - timeout management     
351              LATER - border color a muzzo
352        
353    NORM   - testament
354    NORM   - public announcements
355    NORM   - 10 sec to exit from table
356    NORM   - moving label for tables click
357
358 ----------------- join -----------------
359    NORM   - map
360
361    NORM   - restart preload img
362    NORM   - tools dir with a main and some pages where check briscola tools.
363    NORM   - watchdog
364
365    NORM   - chat vecchie in reload (forse)
366
367  MIDDLE TODO
368  ===========
369
370    - user assistant (with button to enable disable)
371    - documentation
372
373
374  FAR TODO
375  ========
376    NORM - internationalization
377    NORM - img -> div + css
378    
379  WEB
380  ===
381
382    - link to stable/unstable
383
384 -------------------------------------------------------------------
385  DONE
386  ====
387
388    ABORTED - asta: highlight buttons (css hover) - change pointer when over
389    DONE - step proxy
390    DONE - special chars in js
391    DONE - ban temporaneo dai tavoli
392    DONE - flash player to play sound
393    DONEBUG - (aum. il timeout) - carte giocate che restano girate
394          Sembra non migliorare di molto la cosa, gestita la cache
395          correttamente, sono apposto.
396
397    DONE - one player reject a game, to less points (<= 2)
398    DONE - help page
399    DONE - test di download per la cache
400    DONE - se passano tutti tranne l'ultimo l'asta va al penultimo.
401           Corretto il codice, occorre verificare se questo
402           ingenera qualche problema.
403    DONE - raddoppiato il numero di righe nella chat
404    DONE - corretto bug del /nick
405    DONE - carosello pubblicità altout
406    DONE - smammamorti
407    DONE - unload of the stream
408    DONE - standup centrati
409    DONE - current player - in info
410    DONE - HELP butt con ABOUT, REGOLE, VERSIONE
411    DONE - welcome lines in the chats (room and table)
412    DONE - welcome lines in the chats (room and table)
413    DONE - nomi in primo piano se vai sul quadrato   
414    DONE - to pass explicit config file to INSTALL.sh
415    DONE - flag to create a config file
416    ABRT - bottoni => immagini
417    DONE - aggiungere bottone al login
418    DONE - nomi in primo piano se vai sul quadrato   
419    DONE - installer to set cookie path
420    DONE - change name
421    DONE - automatic and manual logout
422    DONE - cache problems solved via .htaccess
423    DONE - all players out of the auction
424    DONE - time to send cards
425    DONE - hide cards before sends at a new game
426    DONE - well recognization of the browser and O.S.
427    DONE - login consistency !!!!
428    DONE - functionalization of garbage
429    DONE - call garbage function into login
430    DONE - game
431    DONE - manage the reload from scratch of the table page
432    DONE - table reset
433    DONE - sendcard => card_send(idx, ....)
434    DONE - show table for game
435    DONE - points calculation
436    DONE - make-up of the chooser
437    DONE - where place the briscola on the table
438    DONE - users info
439    DONE - show current auction position
440    DONE - table with internal management of the transition between pages.
441    DONE - server side page abort management  
442    DONE - cookie problem with Ajax
443    DONE - spostare il tasto "esco"
444    DONE - to pass explicit config file to INSTALL.sh 
445    DONE - 8 tables
446    DONE - safety out management
447    DONE - info enhancement and related button (how win the last game and
448           with how much points ?)
449
450  WEB
451    DONE - homepage
452    DONE - screenshots
453
454 DOC
455    CHAPTERS
456       HTTP Streaming
457       Local serializer
458       Database on shmem
459       Page abort (reload on http streaming case)
460       Chat
461       Cookies management
462       CSS tricks
463
464 CHECK ON NEW SERVERS
465 .htaccess AllowOverwrite mode for Cache-Control directive
466
467
468
469
470 */
471