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